44 |
$drop['depth'] = array('24', '16', '8'); |
$drop['depth'] = array('24', '16', '8'); |
45 |
$drop['mouse'] = array('Auto', 'IMPS/2', 'PS/2'); |
$drop['mouse'] = array('Auto', 'IMPS/2', 'PS/2'); |
46 |
$drop['keyboard'] = array('PC105'); |
$drop['keyboard'] = array('PC105'); |
47 |
if($alxos >= '0.6.0') { |
if($alxos >= '0.6.0') |
48 |
|
{ |
49 |
$drop['cfg_network_module'] = array('3c509', '3c59x', '8139cp', '8139too', '8390', 'amd8111e', 'atl1c', 'atl1e', 'atl1', 'atl2', 'b44', 'bnx2', 'cnic', 'e100', 'e1000', 'e1000e', 'forcedeth', 'igb', 'ipg', 'jme', 'natsemi', 'ne2k-pci', 'ns83820', 'pcnet32', 'qla3xxx', 'r8169', 'sis190', 'sis900', 'skge', 'sky2', 'tg3', 'typhoon', 'via-rhine', 'via-velocity', 'adm8211', 'airo', 'at76c50x-usb', 'ar9170usb', 'ath5k', 'ath9k', 'atmel', 'b43', 'b43legacy', 'hostap_pci', 'hostap_plx', 'ipw2100', 'ipw2200', 'iwl3945', 'usb8xxx', 'libertas_tf', 'libertas_tf_usb', 'mwl8k', 'orinoco', 'orinoco_nortel', 'orinoco_plx', 'orinoco_tmd', 'orinoco_usb', 'p54pci', 'p54usb', 'prism54', 'rndis_wlan', 'rt2400pci', 'rt2500pci', 'rt2500usb', 'rt2800pci', 'rt2800usb', 'rt61pci', 'rt73usb', 'rtl8180', 'rtl8187', 'wl1251', 'wl1271', 'zd1201', 'zd1211rw'); |
$drop['cfg_network_module'] = array('3c509', '3c59x', '8139cp', '8139too', '8390', 'amd8111e', 'atl1c', 'atl1e', 'atl1', 'atl2', 'b44', 'bnx2', 'cnic', 'e100', 'e1000', 'e1000e', 'forcedeth', 'igb', 'ipg', 'jme', 'natsemi', 'ne2k-pci', 'ns83820', 'pcnet32', 'qla3xxx', 'r8169', 'sis190', 'sis900', 'skge', 'sky2', 'tg3', 'typhoon', 'via-rhine', 'via-velocity', 'adm8211', 'airo', 'at76c50x-usb', 'ar9170usb', 'ath5k', 'ath9k', 'atmel', 'b43', 'b43legacy', 'hostap_pci', 'hostap_plx', 'ipw2100', 'ipw2200', 'iwl3945', 'usb8xxx', 'libertas_tf', 'libertas_tf_usb', 'mwl8k', 'orinoco', 'orinoco_nortel', 'orinoco_plx', 'orinoco_tmd', 'orinoco_usb', 'p54pci', 'p54usb', 'prism54', 'rndis_wlan', 'rt2400pci', 'rt2500pci', 'rt2500usb', 'rt2800pci', 'rt2800usb', 'rt61pci', 'rt73usb', 'rtl8180', 'rtl8187', 'wl1251', 'wl1271', 'zd1201', 'zd1211rw'); |
50 |
} else { |
} |
51 |
|
else |
52 |
|
{ |
53 |
$drop['cfg_network_module'] = array('3c59x', '8139too', '8139cp', 'e100', 'ne2k-pci', 'pcnet32', 'sis900', 'via-rhine', 'zd1211', 'b44', 'bnx2', 'dl2k', 'e1000', 'forcedeth', 'r8169', 'sk98lin', 'tg3', 'via-velocity'); |
$drop['cfg_network_module'] = array('3c59x', '8139too', '8139cp', 'e100', 'ne2k-pci', 'pcnet32', 'sis900', 'via-rhine', 'zd1211', 'b44', 'bnx2', 'dl2k', 'e1000', 'forcedeth', 'r8169', 'sk98lin', 'tg3', 'via-velocity'); |
54 |
} |
} |
55 |
$drop['networking'] = array('dhcp', 'static'); |
$drop['networking'] = array('dhcp', 'static'); |
70 |
} |
} |
71 |
$drop['hostname'] = 'bold'; |
$drop['hostname'] = 'bold'; |
72 |
$drop['session'] = 'bold'; |
$drop['session'] = 'bold'; |
73 |
$drop['cfg_autostart_session'] = 'filename'; |
if($alxos>='0.6.0') |
74 |
|
{ |
75 |
|
$drop['cfg_autostart_session'] = array(''); |
76 |
|
$drop['cfg_autostart_session'] += sqlarr('SELECT filename FROM cfg_sessions where serial='.$id, 'array', 'filename'); |
77 |
|
} |
78 |
|
else |
79 |
|
{ |
80 |
|
$drop['cfg_autostart_session'] = 'filename'; |
81 |
|
} |
82 |
$drop['mtime'] = 'showtime'; |
$drop['mtime'] = 'showtime'; |
83 |
$drop['mac'] = 'show'; |
$drop['mac'] = 'show'; |
84 |
$drop['client_serials_serial'] = 'show'; |
$drop['client_serials_serial'] = 'show'; |
156 |
} |
} |
157 |
} |
} |
158 |
} |
} |
|
} |
|
159 |
|
|
160 |
|
// reload site |
161 |
|
header("location: show.php?id=".$id); |
162 |
|
} |
163 |
|
|
164 |
// EINLESEN DER DATEN AUS SQL-TABELLEN |
// EINLESEN DER DATEN AUS SQL-TABELLEN |
165 |
foreach($tabs as $k=>$t) |
foreach($tabs as $k=>$t) |
288 |
<script language="JavaScript" src="openclose_ajax.js"></script> |
<script language="JavaScript" src="openclose_ajax.js"></script> |
289 |
<script language="JavaScript"> |
<script language="JavaScript"> |
290 |
|
|
291 |
|
// opens an url and shows retval in a javascript-alert on current site |
292 |
|
function urlopen(url,typ) { |
293 |
|
var $url = url.split("?"); |
294 |
|
$.ajax({type:""+typ+"",url:$url[0],data:$url[1],cache:false,success:function(data){ alert(data); }}); |
295 |
|
} |
296 |
|
|
297 |
function openclose(nummer, act) |
function openclose(nummer, act) |
298 |
{ |
{ |
299 |
var bild = document.images['sch_bild_'+nummer]; |
var bild = document.images['sch_bild_'+nummer]; |
300 |
var absatz = document.all['sch_absatz_'+nummer].style; |
var absatz = document.all['sch_absatz_'+nummer].style; |
301 |
var senden = false; |
var senden = false; |
302 |
|
|
303 |
if(bild.title == 'OPEN') |
$("#sch_absatz_"+nummer).toggle(0, function(){ |
304 |
{ |
if($(this).css("display")=="none"){$("#sch_bild_"+nummer).attr({title:'OPEN',src:'pics/plus.gif'});}else{$("#sch_bild_"+nummer).attr({title:'CLOSE',src:'pics/minus.gif'});} |
305 |
if(act<=1) |
}); |
306 |
{ |
if(act<=1){ $("#sch_bild_"+nummer).attr({title:'CLOSE',src:'pics/minus.gif'}); }else{ $("#sch_bild_"+nummer).attr({title:'OPEN',src:'pics/plus.gif'}); }; |
307 |
absatz.visibility = 'visible'; |
} |
|
absatz.position = ''; |
|
|
bild.title = 'CLOSE'; |
|
|
bild.src = 'pics/minus.gif'; |
|
|
senden = true; |
|
|
act = 0; |
|
|
} |
|
|
} |
|
|
else |
|
|
{ |
|
|
if(act>=1) |
|
|
{ |
|
|
absatz.visibility = 'hidden'; |
|
|
absatz.position = 'absolute'; |
|
|
bild.title = 'OPEN'; |
|
|
bild.src = 'pics/plus.gif'; |
|
|
senden = true; |
|
|
act = 2; |
|
|
} |
|
|
} |
|
|
|
|
|
if(senden) sendopenclose(nummer,act); |
|
|
} |
|
308 |
|
|
309 |
function showhelp(name) |
function showhelp(name) |
310 |
{ window.open(name, 'HelpWin', 'width=620,height=500,scrollbars=yes'); } |
{ window.open(name, 'HelpWin', 'width=620,height=500,scrollbars=yes'); } |
314 |
|
|
315 |
<body><? |
<body><? |
316 |
|
|
317 |
//echo '<body style="background-image:URL(logo.jpg);background-repeat:no-repeat; background-position:0px 0px; margin-top:25px">'; |
echo '<form action="show.php" method="post" onreset="return confirm(\'UNDO CHANGES?\')">'; |
|
echo '<form action="show.php" method=post onreset="return confirm(\'UNDO CHANGES?\')">'; |
|
318 |
echo '<input type=hidden name="do_upl" value="1">'; |
echo '<input type=hidden name="do_upl" value="1">'; |
319 |
echo '<input type=hidden name="id" value="'.$id.'">'; |
echo '<input type=hidden name="id" value="'.$id.'">'; |
320 |
|
|
349 |
$state = 'Off'; |
$state = 'Off'; |
350 |
if(count($conn)>0) |
if(count($conn)>0) |
351 |
{ |
{ |
|
// passthru($pingcmd." ".$conn['ip']." &> /dev/null && exit 0 || exit 1",$retval); |
|
352 |
if($retval==0) $state = 'On'; |
if($retval==0) $state = 'On'; |
353 |
} |
} |
354 |
|
|
|
|
|
355 |
echo '<img src="pics/logo2.jpg"><br><br>'; |
echo '<img src="pics/logo2.jpg"><br><br>'; |
356 |
|
|
357 |
echo '<input class="but" type=submit value="SAVE" style="width:150px"><br><br>'; |
echo '<input class="but" type=submit value="SAVE" style="width:150px"><br><br>'; |
376 |
echo '<input class="but" type=button '.$disdanach.' value=">" style="width:30px" onclick="location.href=\'show.php?id='.($id+1).'\'">'; |
echo '<input class="but" type=button '.$disdanach.' value=">" style="width:30px" onclick="location.href=\'show.php?id='.($id+1).'\'">'; |
377 |
echo '<br><input class="but" type=button value="INDEX" style="width:150px; font-weight:bold" onclick="location.href=\'index.php\'"><br><br>'; |
echo '<br><input class="but" type=button value="INDEX" style="width:150px; font-weight:bold" onclick="location.href=\'index.php\'"><br><br>'; |
378 |
|
|
379 |
echo '<br><br>'; |
echo '<br>'; |
380 |
echo '<div style="border:solid black 1px; padding:5px; background-color:#d5e5ff"><b>'; |
echo '<div style="border:solid black 1px; padding:5px; background-color:#d5e5ff"><b>'; |
381 |
if($id<0) echo '<b>DEACTIVATED!</b><br><br>'; |
if($id<0) echo '<b>DEACTIVATED!</b><br><br>'; |
382 |
echo '<u>Serial:</u> #'.$id.'<br>'; |
echo '<u>Serial:</u> #'.$id.'<br>'; |
385 |
if($state=='On') |
if($state=='On') |
386 |
{ |
{ |
387 |
echo '<u>IP:</u> '.$conn['ip'].'<br><br>'; |
echo '<u>IP:</u> '.$conn['ip'].'<br><br>'; |
388 |
if($alxos >= '0.6.0') { |
if($alxos >= '0.6.0') |
389 |
|
{ |
390 |
$osver = 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}"', $conn['ip']); |
$osver = 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}"', $conn['ip']); |
391 |
} else { |
} |
392 |
|
else |
393 |
|
{ |
394 |
$osver = sshdo('os_ver=$(</etc/mageversion);cfg_ver=$(/sbin/magequery -n alxconfig-ng-alx | cut -d" " -f5);pname=${cfg_ver%-*-*};cfg_ver=${cfg_ver/${pname}-};echo "${os_ver}:${cfg_ver}"', $conn['ip']); |
$osver = sshdo('os_ver=$(</etc/mageversion);cfg_ver=$(/sbin/magequery -n alxconfig-ng-alx | cut -d" " -f5);pname=${cfg_ver%-*-*};cfg_ver=${cfg_ver/${pname}-};echo "${os_ver}:${cfg_ver}"', $conn['ip']); |
395 |
} |
} |
396 |
$osver = explode(':',$osver[1]); |
$osver = explode(':',$osver[1]); |
416 |
} |
} |
417 |
|
|
418 |
echo '</b></div>'; |
echo '</b></div>'; |
|
//echo '<br><br>'; |
|
419 |
|
|
420 |
if($state=='On') |
if($state=='On') |
421 |
{ |
{ |
422 |
echo '<input class="but" type=button value="REBOOT" style="width:150px" onclick="if(confirm(\'REBOOT CLIENT #'.$id.' ?\')) window.open(\'reboot.php?client='.$id.'&ip='.$conn['ip'].'&op=reboot\', \'ShutdownWin\', \'width=200,height=100\')"><br>'; |
echo '<input class="but" type=button value="REBOOT" style="width:150px" onclick="if(confirm(\'REBOOT CLIENT #'.$id.' ?\')) window.open(\'reboot.php?client='.$id.'&ip='.$conn['ip'].'&op=reboot\', \'ShutdownWin\', \'width=200,height=100\')"><br>'; |
423 |
echo '<input class="but" type=button value="SHUTDOWN" style="width:150px" onclick="if(confirm(\'SHUTDOWN CLIENT #'.$id.' ?\')) window.open(\'reboot.php?client='.$id.'&ip='.$conn['ip'].'&op=halt\', \'ShutdownWin\', \'width=200,height=100\')"><br>'; |
echo '<input class="but" type=button value="SHUTDOWN" style="width:150px" onclick="if(confirm(\'SHUTDOWN CLIENT #'.$id.' ?\')) window.open(\'reboot.php?client='.$id.'&ip='.$conn['ip'].'&op=halt\', \'ShutdownWin\', \'width=200,height=100\')"><br>'; |
424 |
echo '<br>'; |
echo '<br>'; |
425 |
|
|
426 |
|
if($alxos >= '0.6.0') |
427 |
|
{ |
428 |
|
echo '<div style="border:solid black 1px; padding:5px; background-color:#d5e5ff" align="center"><b>'; |
429 |
|
echo 'Hardware Detection:</b></div>'; |
430 |
|
echo '<input class="but" type=button value="LAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=lan\',\'POST\');">'; |
431 |
|
echo '<input class="but" type=button value="WLAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=wlan\',\'POST\');">'; |
432 |
|
echo '<input class="but" type=button value="VGA" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=vga\',\'POST\');">'; |
433 |
|
echo '<br><br>'; |
434 |
|
} |
435 |
|
|
436 |
echo '<div style="border:solid black 1px; padding:5px; background-color:#d5e5ff" align="center"><b>'; |
echo '<div style="border:solid black 1px; padding:5px; background-color:#d5e5ff" align="center"><b>'; |
437 |
echo 'Remote Shadow:</b></div>'; |
echo 'Remote Shadow:</b></div>'; |
438 |
echo '<input class="but" type=button value="VNC" style="width:150px" onclick="window.open(\'vncviewer.php?ip='.$conn['ip'].'\', \'VncViewer\', \'width=200,height=100\')"><br>'; |
echo '<input class="but" type=button value="VNC" style="width:150px" onclick="window.open(\'vncviewer.php?ip='.$conn['ip'].'\', \'VncViewer\', \'width=200,height=100\')"><br>'; |