75 |
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); |
76 |
usort($comps, 'sortcomp'); |
usort($comps, 'sortcomp'); |
77 |
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
78 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; |
79 |
echo '<head>'; |
echo '<head>'; |
80 |
echo '<title>ALX Config - Index</title>'; |
echo '<title>ALX Config - Index</title>'; |
81 |
echo '<script language="JavaScript">'; |
echo '<script language="JavaScript">'; |
88 |
|
|
89 |
if($reload!='off') echo '<body onload="window.setTimeout(\'location.reload()\',60000)">'; |
if($reload!='off') echo '<body onload="window.setTimeout(\'location.reload()\',60000)">'; |
90 |
|
|
|
/* |
|
|
echo '<img src="logo.jpg" align=middle>'; |
|
|
echo '<a href="index.php" style="padding-left:170px; color:#000000;text-decoration:none; font-weight:bold">[REFRESH]</a><br>'; |
|
|
|
|
|
echo '<form action="index.php" method="get" style="margin-top:0px"><b>SORT BY</b> <input onclick="this.form.submit()" type="radio" name="s_krit" value="serial"'.checkif($_SESSION['alx_sort_krit']=='serial').'>serial <input onclick="this.form.submit()" type="radio" name="s_krit" value="hostname"'.checkif($_SESSION['alx_sort_krit']=='hostname').'>hostname'; |
|
|
echo '<input onclick="this.form.submit()" style="margin-left:125px" name="s_on" type="checkbox" value="1"'.checkif($_SESSION['alx_sort_onfirst']).'>online clients on top</form><br>'; |
|
|
*/ |
|
|
|
|
91 |
echo '<form action="index.php" method="get" style="margin:0px">'; |
echo '<form action="index.php" method="get" style="margin:0px">'; |
92 |
echo '<table width=480><tr>'; |
echo '<table width=480><tr>'; |
93 |
echo '<td><img src="pics/logo.jpg"></td>'; |
echo '<td><img src="pics/logo.jpg"></td>'; |
136 |
echo '<td width=40><b>#'.$c['serial'].'</b></td>'; |
echo '<td width=40><b>#'.$c['serial'].'</b></td>'; |
137 |
echo '<td><nobr>'.$c['hostname'].'</nobr></td>'; |
echo '<td><nobr>'.$c['hostname'].'</nobr></td>'; |
138 |
|
|
139 |
echo '<td><nobr>'.$c['ip'].'</nobr></td>'; |
echo '<td><nobr>'.$c['ip'].'</nobr></td>'; |
140 |
echo '<td><nobr>'.$c['mac'].'</nobr></td>'; |
echo '<td><nobr>'.$c['mac'].'</nobr></td>'; |
141 |
if($c['mtime']) { echo '<td><nobr>'.date('Y-m-d, H:i:s',$c['mtime']).'</nobr></td>'; } |
if($c['mtime']) { echo '<td><nobr>'.date('Y-m-d, H:i:s',$c['mtime']).'</nobr></td>'; } |
|
//if($c['mtime']) { echo '<td><nobr>'.$c['mtime'].'</nobr></td>'; } |
|
142 |
else echo '<td></td>'; |
else echo '<td></td>'; |
143 |
|
|
144 |
if($showversion=='on') |
if($showversion=='on') |
148 |
$alxver = $alxinfo[os]; |
$alxver = $alxinfo[os]; |
149 |
$alxutils = $alxinfo[utils]; |
$alxutils = $alxinfo[utils]; |
150 |
|
|
|
// if( $alxver == '') |
|
|
// { |
|
|
// if($c['online']) |
|
|
// { |
|
|
// //$alxinfo = @sshdo('os_ver=$(</etc/mageversion);cfg_ver=$(/sbin/magequery -n alxconfig-ng | cut -d" " -f5);pname=${cfg_ver%-*-*};cfg_ver=${cfg_ver/${pname}-};echo "${os_ver}:${cfg_ver}"', $c['ip']); |
|
|
// //$alxinfo = explode(':',$alxinfo[1]); |
|
|
// //$alxver = $alxinfo[0]; |
|
|
// //$alxutils = $alxinfo[1]; |
|
|
// } |
|
|
// } |
|
151 |
if($alxver == '') $alxver='unknown'; |
if($alxver == '') $alxver='unknown'; |
152 |
if($alxutils == '') $alxutils='unknown'; |
if($alxutils == '') $alxutils='unknown'; |
153 |
|
|