edit | serial | hostname | ip | last connected | '; - if($showversion=='on') echo 'version | '; - echo 'up/down | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
'; - echo ' | '.substr($c['location'],0,1).' | '; - echo ''; - echo ' | #'.$c['serial'].' | '; - echo ''; +function checkif($b) +{ + if($b) return ' checked'; + else return ''; +} + +$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"); + +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); +usort($comps, 'sortcomp'); +echo ''; +echo ''; + echo ' |
edit | serial | hostname | ip | mac | last connected | '; +echo 'version | '; +echo 'boot | '; +echo 'up/down | '.$osver[1].' | '; - } + echo '||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
'; + echo ' | '.substr($c['location'],0,3).' | '; + echo ''; + echo ' | #'.$c['serial'].' | '; + echo ''; + + // get alx version info for + $alxinfo = sqlfirst('SELECT * FROM client_version WHERE serial='.$c['serial']); + if (isset($alxinfo[os])) $alxver = $alxinfo[os]; + else $alxver = 'unknown'; + if (isset($alxinfo[utils])) $alxutils = $alxinfo[utils]; + else $alxutils = 'unknown'; + + echo ' | '.$alxver.' | '; + echo ''.$alxutils.' | '; + + // netboot state + if($c['netboot'] == 1) echo 'Netboot (PXE) | '; + else echo 'Local Disk | '; echo ''; - if($c['online']) - { - echo ''; + if(isset($c['online'])) + { + echo ''; echo ''; echo ''; echo ''; } - else echo ''; + else echo ''; echo ' | '; - echo '