Magellan Linux

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

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

revision 461 by niro, Thu Jun 5 20:40:29 2008 UTC revision 470 by niro, Thu Jun 5 22:04:21 2008 UTC
# Line 1  Line 1 
1  <?  <?
2   // INCLUDE UND TABELLEN-DEFINITIONEN   // INCLUDE UND TABELLEN-DEFINITIONEN
3   include('include/basesql.php');   include('include/basesql.php');
4   $tabs = array('cfg_graphic', 'cfg_network', 'cfg_network_interfaces', 'cfg_input', 'client_auth', 'cfg_autostart', 'client_serials', 'cfg_comments', 'cfg_printers', 'cfg_sessions', 'cfg_modules', 'cfg_other_menuitems', 'cfg_screensaver');   $tabs = array('cfg_graphic', 'cfg_network', 'cfg_interfaces', 'cfg_input', 'client_auth', 'cfg_autostart', 'client_serials', 'cfg_comments', 'cfg_printers', 'cfg_sessions', 'cfg_modules', 'cfg_other_menuitems', 'cfg_screensaver');
5   $multi= array(    0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0);   $multi= array(    0, 0,  1,   0, 0, 0, 0,   1,   1,   1,   1, 1,   0);
6   $data = array();   $data = array();
7    
8   if($kill==1)   if($kill==1)
# 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_network_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 39  Line 39 
39   $drop['monitorid'] = 'monitorid';   $drop['monitorid'] = 'monitorid';
40   $drop['hostname'] = 'bold';   $drop['hostname'] = 'bold';
41   $drop['session'] = 'bold';   $drop['session'] = 'bold';
42     $drop['displaymode'] = array('fullscreen', 'seamless', '1280x1024', '1024x768', '800x600');
43   $drop['cfg_autostart_session'] = 'filename';   $drop['cfg_autostart_session'] = 'filename';
44   $drop['mtime'] = 'showtime';   $drop['mtime'] = 'showtime';
45   $drop['mac'] = 'show';   $drop['mac'] = 'show';
# Line 101  Line 102 
102    
103   foreach($tabs as $k=>$t)   foreach($tabs as $k=>$t)
104   {   {
105   if(!$multi[$k]) mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t)).' WHERE serial='.$id);   if(!$multi[$k])
106     {
107     if(updatestr(postarr($t))='') $myupdatestr='NULL' else $myupdatestr=updatestr(postarr($t));
108     echo "debug1: '".$myupdatestr."'<br>";
109     //mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t)).' WHERE serial='.$id);
110     mysql_query('UPDATE '.$t.' SET '.$myupdatestr.' WHERE serial='.$id);
111     }
112   else   else
113   {   {
114   $i=0;   $i=0;
# Line 110  Line 117 
117   if($_POST[$t.'_'.$i.'_delete'])   if($_POST[$t.'_'.$i.'_delete'])
118   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']);
119   else   else
120   mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t.'_'.$i)).' WHERE serial='.$id.' AND id='.$_POST[$t.'_'.$i.'_id']);   if(updatestr(postarr($t.'_'.$i)))='') $myupdatestr='NULL' else $myupdatestr=updatestr(postarr($t.'_'.$i)));
121     echo "debug2: '".$myupdatestr."'<br>";
122     //mysql_query('UPDATE '.$t.' SET '.updatestr(postarr($t.'_'.$i)).' WHERE serial='.$id.' AND id='.$_POST[$t.'_'.$i.'_id']);
123     mysql_query('UPDATE '.$t.' SET '.$myupdatestr.' WHERE serial='.$id.' AND id='.$_POST[$t.'_'.$i.'_id']);
124   $i++;   $i++;
125   }   }
126   }   }
# Line 173  Line 183 
183    
184   foreach($arr as $k=>$v)   foreach($arr as $k=>$v)
185   {   {
186   if( (substr($k,0,9)=='wireless_') xor $wireless ) Continue;   //if( (substr($k,0,9)=='wireless_') xor $wireless ) Continue;
187    
188   $d = $drop[$name.'_'.$k]; if($d==null) $d = $drop[$k];   $d = $drop[$name.'_'.$k]; if($d==null) $d = $drop[$k];
189   $k = str_replace('wireless_', '', $k);   //$k = str_replace('wireless_', '', $k);
190   $k2 = $k;   $k2 = $k;
191    
192   if(is_array($d))   if(is_array($d))
# Line 202  Line 212 
212   echo '</table>';   echo '</table>';
213   closeabs();   closeabs();
214    
215   if($name=='cfg_network' && !$wireless) parsearr($name.'_wireless', $arr, $del, true);   //if($name=='cfg_network' && !$wireless) parsearr($name.'_wireless', $arr, $del, true);
216   }   }
217   function parsearrs($name, $arr)   function parsearrs($name, $arr)
218   {   {

Legend:
Removed from v.461  
changed lines
  Added in v.470