Magellan Linux

Diff of /alx-src/branches/alx-web-070/index.php

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

revision 10658 by niro, Wed Aug 30 14:57:46 2017 UTC revision 10662 by niro, Wed Aug 30 15:08:15 2017 UTC
# Line 73  function checkif($b) Line 73  function checkif($b)
73   else return '';   else return '';
74  }  }
75    
76  $comps = sqlarr("select client_serials.serial, client_serials.enabled, client_serials.location, client_serials.mac, cfg_network.hostname, state_connected.mtime, state_connected.netboot, client_version.arch from client_serials left join cfg_network on client_serials.serial=cfg_network.serial left join state_connected on client_serials.serial=state_connected.serial left join client_version on client_serials.serial=client_version.serial", "serial");  $comps = sqlarr("select client_serials.serial, client_serials.enabled, client_serials.location, client_serials.mac, cfg_network.hostname, state_connected.mtime, state_connected.netboot from client_serials left join cfg_network on client_serials.serial=cfg_network.serial left join state_connected on client_serials.serial=state_connected.serial", "serial");
77    
78  sqlforeach('SELECT state_connected.serial, state_connected.ip, cfg_network.hostname, state_connected.mac FROM state_connected left join cfg_network on cfg_network.serial=state_connected.serial', 'check_online', null);  sqlforeach('SELECT state_connected.serial, state_connected.ip, cfg_network.hostname, state_connected.mac FROM state_connected left join cfg_network on cfg_network.serial=state_connected.serial', 'check_online', null);
79  usort($comps, 'sortcomp');  usort($comps, 'sortcomp');
# Line 114  echo '</form>'; Line 114  echo '</form>';
114    
115  echo '<table border="1" id="mytab">';  echo '<table border="1" id="mytab">';
116  echo '<thead><tr style="font-weight:bold;background-color:#d5e5ff"><th>edit</th><th colspan=3>serial</th><th width=170>hostname</th><th width=100>ip</th><th width=100>mac</th><th width=100>last connected</th>';  echo '<thead><tr style="font-weight:bold;background-color:#d5e5ff"><th>edit</th><th colspan=3>serial</th><th width=170>hostname</th><th width=100>ip</th><th width=100>mac</th><th width=100>last connected</th>';
117  echo '<th colspan=2>version</th>';  echo '<th colspan=3>version</th>';
 echo '<th width=100>arch</th>';  
118  echo '<th width=100>boot</th>';  echo '<th width=100>boot</th>';
119  echo '<th width=150>up/down</th></tr></thead><tbody>';  echo '<th width=150>up/down</th></tr></thead><tbody>';
120    
# Line 152  foreach($comps as $c) Line 151  foreach($comps as $c)
151   if (isset($alxinfo[utils])) $alxutils = $alxinfo[utils];   if (isset($alxinfo[utils])) $alxutils = $alxinfo[utils];
152   else $alxutils = 'unknown';   else $alxutils = 'unknown';
153    
154     if (isset($alxinfo[arch])) $alxarch = $alxinfo[arch];
155     else $alxarch = 'unknown';
156    
157   echo '<td>'.$alxver.'</td>';   echo '<td>'.$alxver.'</td>';
158   echo '<td>'.$alxutils.'</td>';   echo '<td>'.$alxutils.'</td>';
159     echo '<td>'.$alxarch.'</td>';
  // arch  
  if($c['arch'] == 1) echo '<td>'.$c['arch'].'</td>';  
  else echo '<td></td>';  
160    
161   // netboot state   // netboot state
162   if($c['netboot'] == 1) echo '<td>Netboot (PXE)</td>';   if($c['netboot'] == 1) echo '<td>Netboot (PXE)</td>';

Legend:
Removed from v.10658  
changed lines
  Added in v.10662