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'); |
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 |
|
|
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>'; |