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 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"); |
$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"); |
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'); |
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=2>version</th>'; |
118 |
|
echo '<th width=100>arch</th>'; |
119 |
echo '<th width=100>boot</th>'; |
echo '<th width=100>boot</th>'; |
120 |
echo '<th width=150>up/down</th></tr></thead><tbody>'; |
echo '<th width=150>up/down</th></tr></thead><tbody>'; |
121 |
|
|
159 |
if($c['netboot'] == 1) echo '<td>Netboot (PXE)</td>'; |
if($c['netboot'] == 1) echo '<td>Netboot (PXE)</td>'; |
160 |
else echo '<td>Local Disk</td>'; |
else echo '<td>Local Disk</td>'; |
161 |
|
|
162 |
|
// arch |
163 |
|
if($c['arch'] == 1) echo '<td>'.$c['arch'].'</td>'; |
164 |
|
else echo '<td></td>'; |
165 |
|
|
166 |
echo '<td>'; |
echo '<td>'; |
167 |
if(isset($c['online'])) |
if(isset($c['online'])) |
168 |
{ |
{ |