Magellan Linux

Diff of /alx-src/trunk/alx-web/show.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 465 by niro, Thu Jun 5 20:46:44 2008 UTC revision 469 by niro, Thu Jun 5 21:58:08 2008 UTC
# Line 29  Line 29 
29   $drop['keyboard'] = array('kbd');   $drop['keyboard'] = array('kbd');
30   $drop['cfg_network_module'] = array('auto','3c59x', '8139too', '8139cp', 'e100', 'ne2k-pci', 'pcnet32', 'sis900', 'via-rhine', 'zd1211');   $drop['cfg_network_module'] = array('auto','3c59x', '8139too', '8139cp', 'e100', 'ne2k-pci', 'pcnet32', 'sis900', 'via-rhine', 'zd1211');
31   $drop['networking'] = array('dhcp', 'static');   $drop['networking'] = array('dhcp', 'static');
32   $drop['default_iface'] = sqlarr('SELECT iface FROM cfg_interfaces where serial='.$id, 'default_iface', 'iface');   $drop['default_iface'] = sqlarr('SELECT iface FROM cfg_interfaces where serial='.$id, '', 'iface');
33   $drop['iface'] = 'show';   $drop['iface'] = 'show';
34   $drop['port'] = array('lpt1', 'com1', 'com2', 'lpd', 'socket', 'ipp');   $drop['port'] = array('lpt1', 'com1', 'com2', 'lpd', 'socket', 'ipp');
35   $drop['location'] = sqlarr('SELECT location FROM client_locations', '', 'location');   $drop['location'] = sqlarr('SELECT location FROM client_locations', '', 'location');
# Line 102  Line 102 
102    
103   foreach($tabs as $k=>$t)   foreach($tabs as $k=>$t)
104   {   {
105     echo "debug1: '".updatestr(postarr($t))."'<br>";
106   if(!$multi[$k]) mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t)).' WHERE serial='.$id);   if(!$multi[$k]) mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t)).' WHERE serial='.$id);
107   else   else
108   {   {
# Line 111  Line 112 
112   if($_POST[$t.'_'.$i.'_delete'])   if($_POST[$t.'_'.$i.'_delete'])
113   mysql_query('DELETE FROM '.$t.' WHERE serial='.$id.' AND id='.$_POST[$t.'_'.$i.'_id']);   mysql_query('DELETE FROM '.$t.' WHERE serial='.$id.' AND id='.$_POST[$t.'_'.$i.'_id']);
114   else   else
115     echo "debug2: '".updatestr(postarr($t.'_'.$i))."'<br>";
116   mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t.'_'.$i)).' WHERE serial='.$id.' AND id='.$_POST[$t.'_'.$i.'_id']);   mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t.'_'.$i)).' WHERE serial='.$id.' AND id='.$_POST[$t.'_'.$i.'_id']);
117   $i++;   $i++;
118   }   }
# Line 174  Line 176 
176    
177   foreach($arr as $k=>$v)   foreach($arr as $k=>$v)
178   {   {
179   if( (substr($k,0,9)=='wireless_') xor $wireless ) Continue;   //if( (substr($k,0,9)=='wireless_') xor $wireless ) Continue;
180    
181   $d = $drop[$name.'_'.$k]; if($d==null) $d = $drop[$k];   $d = $drop[$name.'_'.$k]; if($d==null) $d = $drop[$k];
182   $k = str_replace('wireless_', '', $k);   //$k = str_replace('wireless_', '', $k);
183   $k2 = $k;   $k2 = $k;
184    
185   if(is_array($d))   if(is_array($d))
# Line 203  Line 205 
205   echo '</table>';   echo '</table>';
206   closeabs();   closeabs();
207    
208   if($name=='cfg_network' && !$wireless) parsearr($name.'_wireless', $arr, $del, true);   //if($name=='cfg_network' && !$wireless) parsearr($name.'_wireless', $arr, $del, true);
209   }   }
210   function parsearrs($name, $arr)   function parsearrs($name, $arr)
211   {   {

Legend:
Removed from v.465  
changed lines
  Added in v.469