[wpkg_web] / unattend_list.php Repository:
ViewVC logotype

View of /unattend_list.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29 - (download) (annotate)
Thu Jan 11 02:13:58 2007 UTC (11 years, 8 months ago) by linuxkidd
File size: 5367 byte(s)
Language pack and Icon pack conversion complete.
Moved all settings into config.php.
Added CHANGELOG.
Fixed bug in packages_xml_in which prevented proper creation of initial level.
Added UPGRADE instructions.

<?php
  
include "connect.php";
  include 
"header.php";
  
$page='ualist';
  
$properties=array('ComputerName','FullName','OrgName','JoinDomain','JoinWorkgroup','AdminPassword',
                    
'OS_media','Windows XP Professional ProductKey','top_scripts','middle_scripts',
                    
'bottom_scripts','ntp_servers','Partitions','DriverPath','UnattendedFile');
  if(isset(
$_GET['new'])) {
    
$new=1;
  } else {
    
$new=0;
  }
  if(isset(
$_GET['lookup'])) {
    
$lookup=$_GET['lookup'];
    
$property=$_GET['property'];
  } else {
    
$lookup='';
    
$property='';
  }
?>
    <title>Host List</title>
  </head>
  <body>
    <form name='ua' id='ua' method='get' action='unattend_sub.php'>
    <table class='tbl_main'>
      <tr>
<?php
  $key
=array(5);
  include 
"sidebar.php";
  
$page='general';
?>
        <td valign='top'>
          <table class='tbl_mainsub'>
            <tr class='headline'>
              <td>Host List</td>
            </tr>
            <tr class='tr_main'>
              <td>
          <table class='tbl_sub2' style='width: 800px;' cellpadding='0' cellspacing='0'>
            <tr class='headline'>
              <td width='23px'>&nbsp;</td>
              <td><input type='button' onclick='window.location="unattend_list.php?&new=1"' value="Add" style='font-weight: normal;'> &nbsp; Lookup</td>
              <td>Property</td>
              <td>Value</td>
            </tr>
        <?php
          $sql
="select * from unattended order by Lookup,Property";
          
$sql_handle=mysql_query($sql) or error_report($sql,mysql_error());
          
$count=0;
          while(
$ua_info=mysql_fetch_array($sql_handle)) {
            
$count++;
            
$status='';
            if(
$lookup==$ua_info['Lookup'] && $property==$ua_info['Property']) {
              print 
"      <tr style='background: {$alt_bg_colors[$count%2]};'>\n";
              print 
"        <td>&nbsp;</td>\n";
              print 
"        <td><input type='hidden' name='lookup' value='" htmlspecialchars($ua_info['Lookup']) . "'>" .
                     
htmlspecialchars($ua_info['Lookup']) . "</td>\n";
              print 
"        <td><input type='hidden' name='property' value='{$ua_info['Property']}'>{$ua_info['Property']}</td>\n";
              print 
"        <td><input type='text' name='value' id='value' size='30' maxlength='255' value='" .
                        
htmlspecialchars($ua_info['Value']) . "'></td>\n";
              print 
"      </tr>\n";
              print 
"      <tr style='background: {$alt_bg_colors[$count%2]};'>\n";
              print 
"        <td colspan='3'>&nbsp;</td><td align='left'><input type='submit' id='update' name='update' value='Update'> &nbsp; <input type='button' onclick='window.location=\"unattend_list.php\"' value='Cancel'></td>\n";
              print 
"      </tr>\n";
              continue;
            }
            
$link="<a href='unattend_list.php?lookup={$ua_info['Lookup']}&property={$ua_info['Property']}' title='Edit this Unattended property.'>";
            
$status.="<a href='unattend_sub.php?del=1&lookup={$ua_info['Lookup']}&property={$ua_info['Property']}' title='Delete' onClick=\"return confirm('Clicking OK will permanently delete this Unattended property.  ARE YOU SURE?!');\">{$icon['delete'][0]}</a>";
            
$style="background: {$alt_bg_colors[$count%2]};";
            print 
"      <tr style='background: {$alt_bg_colors[$count%2]};'>\n";
            print 
"        <td>{$status}</td>\n";
            print 
"        <td>{$link}htmlspecialchars($ua_info['Lookup']) . "</a></td>\n";
            print 
"        <td>{$link}{$ua_info['Property']}</a></td>\n";
            print 
"        <td><input size='40' type='text' style='{$style}' readonly value='" htmlspecialchars($ua_info['Value']) . "'></td>\n";
            print 
"      </tr>\n";
          }
          
$count++;
          if(
$count<&& !$new) {
            print 
"      <tr style='background: {$alt_bg_colors[$count%2]};'>\n";
            print 
"        <td colspan='4'>No Unattended properties defined.</td>\n";
            print 
"      </tr>\n";
          }
          if(
$new) {
            print 
"      <tr style='background: {$alt_bg_colors[$count%2]};'>\n";
            print 
"        <td>&nbsp;</td>\n";
            print 
"        <td><input type='text' name='lookup' id='lookup' size='15' maxlength='128'></td>\n";
            print 
"        <td><select id='property' name='property'>\n";
            foreach ( 
$properties as $prop ) {
              print 
"           <option value='{$prop}'>{$prop}</option>\n";
            }
            print 
"          </select>\n";
            print 
"        </td>\n";
            print 
"        <td><input type='text' name='value' id='value' size='30' maxlength='255'></td>\n";
            print 
"      </tr>\n";
            print 
"      <tr style='background: {$alt_bg_colors[$count%2]};'>\n";
            print 
"        <td>&nbsp;</td><td colspan='2' align='center'><input type='submit' id='add' name='add' value='Add'> &nbsp; <input type='button' onclick='window.location=\"unattend_list.php\"' value='Cancel'></td><td>&nbsp;</td>\n";
            print 
"      </tr>\n";
          }
        
?>
          </table>
          </form>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <?php include "footer.php"?>
  </body>
</html>

ViewVC Help
Powered by ViewVC 1.0.3