Magellan Linux

Diff of /alx-src/branches/alx-web-070/show.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2199 by niro, Tue Jun 7 18:29:36 2011 UTC revision 2598 by niro, Wed Jul 6 10:15:09 2011 UTC
# Line 1  Line 1 
1  <?  <?
2  // INCLUDE UND TABELLEN-DEFINITIONEN  // INCLUDE UND TABELLEN-DEFINITIONEN
3  include('include/basesql.php');  include('include/basesql.php');
4    include('include/common-functions.php');
5    
6  // INCLUDE CURRENT-PROBLEMS  // INCLUDE CURRENT-PROBLEMS
7  include('include/current-problems.php');  include('include/current-problems.php');
# Line 43  $drop['resolution'] = array('640x480', ' Line 44  $drop['resolution'] = array('640x480', '
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  $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');  if($alxos >= '0.6.0') {
48     $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');
49    } else {
50     $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');
51    }
52  $drop['networking'] = array('dhcp', 'static');  $drop['networking'] = array('dhcp', 'static');
53  $drop['port'] = array('lpt1', 'usb1', 'usb2', 'com1', 'com2', 'lpd', 'socket', 'ipp');  $drop['port'] = array('lpt1', 'usb1', 'usb2', 'com1', 'com2', 'lpd', 'socket', 'ipp');
54  $drop['location'] = sqlarr('SELECT location FROM client_locations', '', 'location');  $drop['location'] = sqlarr('SELECT location FROM client_locations', '', 'location');
# Line 88  $drop['client_version_utils'] = 'show'; Line 93  $drop['client_version_utils'] = 'show';
93    
94  // ACHTUNG!!! wlan_-Felder heißen eigentlich wireless_  // ACHTUNG!!! wlan_-Felder heißen eigentlich wireless_
95  $drop['wireless_mode'] = array('', 'managed', 'ad-hoc', 'master', 'repeater', 'secondary', 'monitor', 'auto');  $drop['wireless_mode'] = array('', 'managed', 'ad-hoc', 'master', 'repeater', 'secondary', 'monitor', 'auto');
96  $drop['wireless_auth_mode'] = array('', 'wep', 'wpa', 'off');  $drop['wireless_auth_mode'] = array('', 'wep', 'wpa', 'wpa2', 'off');
97  $drop['wireless_key_length'] = array('', '64', '128', '256');  $drop['wireless_key_length'] = array('', '64', '128', '256');
98  $drop['wireless_channel'] = array('', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14');  $drop['wireless_channel'] = array('', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14');
99  $drop['wireless_frequency'] = array('', '2.412G', '2.417G', '2.422G', '2.427G', '2.432G', '2.437G', '2.442G',  $drop['wireless_frequency'] = array('', '2.412G', '2.417G', '2.422G', '2.427G', '2.432G', '2.437G', '2.442G',
# Line 270  function parsearrs($name, $arr) Line 275  function parsearrs($name, $arr)
275  <script language="JavaScript" src="openclose_ajax.js"></script>  <script language="JavaScript" src="openclose_ajax.js"></script>
276  <script language="JavaScript">  <script language="JavaScript">
277    
278     // opens an url and shows retval in a javascript-alert on current site
279     function urlopen(url,typ) {
280     var $url = url.split("?");
281     $.ajax({type:""+typ+"",url:$url[0],data:$url[1],cache:false,success:function(data){ alert(data); }});
282     }
283    
284   function openclose(nummer, act)   function openclose(nummer, act)
285   {   {
286   var bild = document.images['sch_bild_'+nummer];   var bild = document.images['sch_bild_'+nummer];
# Line 377  echo '</td><td valign=top>'; Line 388  echo '</td><td valign=top>';
388   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).'\'">';
389   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>';
390    
391   echo '<br><br>';   echo '<br>';
392   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>';
393   if($id<0) echo '<b>DEACTIVATED!</b><br><br>';   if($id<0) echo '<b>DEACTIVATED!</b><br><br>';
394   echo '<u>Serial:</u>&nbsp;&nbsp;#'.$id.'<br>';   echo '<u>Serial:</u>&nbsp;&nbsp;#'.$id.'<br>';
# Line 386  echo '</td><td valign=top>'; Line 397  echo '</td><td valign=top>';
397   if($state=='On')   if($state=='On')
398   {   {
399   echo '<u>IP:</u> '.$conn['ip'].'<br><br>';   echo '<u>IP:</u> '.$conn['ip'].'<br><br>';
400   $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']);   if($alxos >= '0.6.0') {
401     $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']);
402     } else {
403     $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']);
404     }
405   $osver = explode(':',$osver[1]);   $osver = explode(':',$osver[1]);
406   if($osver[0] == '') $osver[0]='unkown';   if($osver[0] == '') $osver[0]='unkown';
407   if($osver[1] == '') $osver[1]='unkown';   if($osver[1] == '') $osver[1]='unkown';
# Line 417  echo '</td><td valign=top>'; Line 432  echo '</td><td valign=top>';
432   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>';
433   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>';
434   echo '<br>';   echo '<br>';
435    
436     if($alxos >= '0.6.0')
437     {
438     echo '<div style="border:solid black 1px; padding:5px; background-color:#d5e5ff" align="center"><b>';
439     echo 'Hardware Detection:</b></div>';
440     echo '<input class="but" type=button value="LAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=lan\',\'POST\');">';
441     echo '<input class="but" type=button value="WLAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=wlan\',\'POST\');">';
442     echo '<input class="but" type=button value="VGA" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=vga\',\'POST\');">';
443     echo '<br><br>';
444     }
445    
446   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>';
447   echo 'Remote Shadow:</b></div>';   echo 'Remote Shadow:</b></div>';
448   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>';

Legend:
Removed from v.2199  
changed lines
  Added in v.2598