Magellan Linux

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

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

revision 2496 by niro, Thu Jun 30 11:30:32 2011 UTC revision 2599 by niro, Wed Jul 6 10:28:40 2011 UTC
# Line 67  else Line 67  else
67  }  }
68  $drop['hostname'] = 'bold';  $drop['hostname'] = 'bold';
69  $drop['session'] = 'bold';  $drop['session'] = 'bold';
70  $drop['cfg_autostart_session'] = 'filename';  if($alxos>='0.6.0')
71    {
72     $drop['cfg_autostart_session'] = array('');
73     $drop['cfg_autostart_session'] += sqlarr('SELECT filename FROM cfg_sessions where serial='.$id, 'array', 'filename');
74    }
75    else
76    {
77     $drop['cfg_autostart_session'] = 'filename';
78    }
79  $drop['mtime'] = 'showtime';  $drop['mtime'] = 'showtime';
80  $drop['mac'] = 'show';  $drop['mac'] = 'show';
81  $drop['client_serials_serial'] = 'show';  $drop['client_serials_serial'] = 'show';
# Line 145  if($_POST['do_upl']) Line 153  if($_POST['do_upl'])
153   }   }
154   }   }
155   }   }
 }  
156    
157     // reload site
158     header("location: show.php?id=".$id);
159    }
160    
161  // EINLESEN DER DATEN AUS SQL-TABELLEN  // EINLESEN DER DATEN AUS SQL-TABELLEN
162  foreach($tabs as $k=>$t)  foreach($tabs as $k=>$t)
# Line 275  function parsearrs($name, $arr) Line 285  function parsearrs($name, $arr)
285  <script language="JavaScript" src="openclose_ajax.js"></script>  <script language="JavaScript" src="openclose_ajax.js"></script>
286  <script language="JavaScript">  <script language="JavaScript">
287    
288     // opens an url and shows retval in a javascript-alert on current site
289     function urlopen(url,typ) {
290     var $url = url.split("?");
291     $.ajax({type:""+typ+"",url:$url[0],data:$url[1],cache:false,success:function(data){ alert(data); }});
292     }
293    
294   function openclose(nummer, act)   function openclose(nummer, act)
295   {   {
296   var bild = document.images['sch_bild_'+nummer];   var bild = document.images['sch_bild_'+nummer];
# Line 382  echo '</td><td valign=top>'; Line 398  echo '</td><td valign=top>';
398   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).'\'">';
399   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>';
400    
401   echo '<br><br>';   echo '<br>';
402   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>';
403   if($id<0) echo '<b>DEACTIVATED!</b><br><br>';   if($id<0) echo '<b>DEACTIVATED!</b><br><br>';
404   echo '<u>Serial:</u>&nbsp;&nbsp;#'.$id.'<br>';   echo '<u>Serial:</u>&nbsp;&nbsp;#'.$id.'<br>';
# Line 391  echo '</td><td valign=top>'; Line 407  echo '</td><td valign=top>';
407   if($state=='On')   if($state=='On')
408   {   {
409   echo '<u>IP:</u> '.$conn['ip'].'<br><br>';   echo '<u>IP:</u> '.$conn['ip'].'<br><br>';
410   $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') {
411     $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']);
412     } else {
413     $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']);
414     }
415   $osver = explode(':',$osver[1]);   $osver = explode(':',$osver[1]);
416   if($osver[0] == '') $osver[0]='unkown';   if($osver[0] == '') $osver[0]='unkown';
417   if($osver[1] == '') $osver[1]='unkown';   if($osver[1] == '') $osver[1]='unkown';
# Line 422  echo '</td><td valign=top>'; Line 442  echo '</td><td valign=top>';
442   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>';
443   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>';
444   echo '<br>';   echo '<br>';
445    
446     if($alxos >= '0.6.0')
447     {
448     echo '<div style="border:solid black 1px; padding:5px; background-color:#d5e5ff" align="center"><b>';
449     echo 'Hardware Detection:</b></div>';
450     echo '<input class="but" type=button value="LAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=lan\',\'POST\');">';
451     echo '<input class="but" type=button value="WLAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=wlan\',\'POST\');">';
452     echo '<input class="but" type=button value="VGA" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=vga\',\'POST\');">';
453     echo '<br><br>';
454     }
455    
456   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>';
457   echo 'Remote Shadow:</b></div>';   echo 'Remote Shadow:</b></div>';
458   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.2496  
changed lines
  Added in v.2599