Magellan Linux

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

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

revision 7134 by niro, Tue Sep 15 08:18:35 2015 UTC revision 7744 by niro, Tue Nov 3 11:07:38 2015 UTC
# Line 66  array_unshift($drop['cfg_autostart_sessi Line 66  array_unshift($drop['cfg_autostart_sessi
66  $drop['mtime'] = 'showtime';  $drop['mtime'] = 'showtime';
67  $drop['mac'] = 'show';  $drop['mac'] = 'show';
68  $drop['client_serials_serial'] = 'show';  $drop['client_serials_serial'] = 'show';
69  //$drop['password'] = 'password';  $drop['password'] = 'password';
70  //$drop['shell'] = 'password';  //$drop['shell'] = 'password';
71  $drop['client_auth_user'] = 'password';  $drop['client_auth_user'] = 'password';
72  $drop['root'] = 'password';  $drop['root'] = 'password';
# Line 80  $drop['client_version_os'] = 'show'; Line 80  $drop['client_version_os'] = 'show';
80  $drop['client_version_utils'] = 'show';  $drop['client_version_utils'] = 'show';
81  $drop['hwdetected'] = 'ignore';  $drop['hwdetected'] = 'ignore';
82    
83  // ACHTUNG!!! wlan_-Felder heißen eigentlich wireless_  // ACHTUNG!!! wlan_-Felder heißen eigentlich wireless_
84  $drop['wireless_mode'] = array('', 'managed', 'ad-hoc', 'master', 'repeater', 'secondary', 'monitor', 'auto');  $drop['wireless_mode'] = array('', 'managed', 'ad-hoc', 'master', 'repeater', 'secondary', 'monitor', 'auto');
85  $drop['wireless_auth_mode'] = array('', 'wep', 'wpa', 'wpa2', 'off');  $drop['wireless_auth_mode'] = array('', 'wep', 'wpa', 'wpa2', 'off');
86  $drop['wireless_key_length'] = array('', '64', '128', '256');  $drop['wireless_key_length'] = array('', '64', '128', '256');
# Line 104  array_unshift($storefront_apps, ""); Line 104  array_unshift($storefront_apps, "");
104  // hackish, fix me  // hackish, fix me
105  for ($i=0; $i<999; $i++) { $drop['cfg_sessions_storefront_'.$i.'_session'] = $storefront_apps; }  for ($i=0; $i<999; $i++) { $drop['cfg_sessions_storefront_'.$i.'_session'] = $storefront_apps; }
106    
107  // GGF. NEUEN DATENSATZ EINFÜGEN  $drop['enabled'] = 'ignore';
108    $drop['filename'] = 'ignore';
109    $drop['autostart'] = array('0','1');
110    
111    // GGF. NEUEN DATENSATZ EINFÃœGEN
112  if(isset($_POST['do_add']))  if(isset($_POST['do_add']))
113  {  {
114   list($bla,$what) = explode(' ',$_POST['do_add']);   list($bla,$what) = explode(' ',$_POST['do_add']);
115   if($what=='COMMENT') sqladd('cfg_comments', array('serial'=>$id));   if($what=='COMMENT') sqladd('cfg_comments', array('serial'=>$id));
116   else if($what=='PRINTER') sqladd('cfg_printers', array('serial'=>$id));   else if($what=='PRINTER') sqladd('cfg_printers', array('serial'=>$id));
117   else if($what=='MODULE') sqladd('cfg_modules', array('serial'=>$id));   else if($what=='MODULE') sqladd('cfg_modules', array('serial'=>$id));
118   else if($what=='SESSION-CITRIX') sqladd('cfg_sessions_citrix', array('domain'=>$citrix_domain_name, 'browseradrs'=>$citrix_browseradrs, 'serial'=>$id));   else if($what=='SESSION-CITRIX') sqladd('cfg_sessions_citrix', array('domain'=>$citrix_domain_name, 'serverlist'=>$citrix_serverlist, 'serial'=>$id));
119   else if($what=='SESSION-STOREFRONT') sqladd('cfg_sessions_storefront', array('domain'=>$storefront_domain_name, 'store'=>$storefront_store, 'serial'=>$id));   else if($what=='SESSION-STOREFRONT') sqladd('cfg_sessions_storefront', array('domain'=>$storefront_domain_name, 'store'=>$storefront_store, 'serial'=>$id));
120   else if($what=='MENUITEM') sqladd('cfg_other_menuitems', array('serial'=>$id));   else if($what=='MENUITEM') sqladd('cfg_other_menuitems', array('serial'=>$id));
121   else if($what=='AUTOSTART') sqladd('cfg_autostart', array('serial'=>$id));   else if($what=='AUTOSTART') sqladd('cfg_autostart', array('serial'=>$id));
# Line 128  if($_POST['do_upl']) Line 132  if($_POST['do_upl'])
132    
133   $arr = array();   $arr = array();
134   foreach($_POST as $k=>$v)   foreach($_POST as $k=>$v)
135     {
136   if((substr($k,0,$prelen)==$prefix) && ($v!='KEEPPASS'))   if((substr($k,0,$prelen)==$prefix) && ($v!='KEEPPASS'))
137   $arr[substr($k,$prelen)] = stripslashes($v);   $arr[substr($k,$prelen)] = stripslashes($v);
138     }
139    
140   return $arr;   return $arr;
141   }   }
# Line 169  function openabs($heading, $helpfile='') Line 175  function openabs($heading, $helpfile='')
175  {  {
176   global $absnames;   global $absnames;
177   $absnames[] = $heading;   $absnames[] = $heading;
178    
179   // <AufZuLink> <Bild/> <Heading/> </AufZuLink><BR/> <Absatz>   // <AufZuLink> <Bild/> <Heading/> </AufZuLink><BR/> <Absatz>
180    
181   if( $_SESSION['openclose'][$heading] )   if( $_SESSION['openclose'][$heading] )
182   {   {
183   echo '<a href="JavaScript:openclose(\''.$heading.'\',1);"><img border="0" src="pics/minus.gif" title="CLOSE" id="sch_bild_'.$heading.'"> <b>['.$heading.']</b></a>';   echo '<a href="JavaScript:openclose(\''.$heading.'\',1);"><img border="0" src="pics/minus.gif" title="CLOSE" id="sch_bild_'.$heading.'"> <b>['.$heading.']</b></a>';
184   if($helpfile!='') echo ' <a href="JavaScript:showhelp(\''.$helpfile.'\')" title="HELP">[?]</a>';   if($helpfile!='') echo ' <a href="JavaScript:showhelp(\''.$helpfile.'\')" title="HELP">[?]</a>';
185   echo '<br><div id="sch_absatz_'.$heading.'" style="top:0px; visibility:visible">';   echo '<br><div id="sch_absatz_'.$heading.'" style="top:0px; visibility:visible">';
186   }   }
187   else   else
188   {   {
# Line 189  function openabs($heading, $helpfile='') Line 195  function openabs($heading, $helpfile='')
195  function closeabs()  function closeabs()
196  {  {
197   // </Absatz> <BR/>   // </Absatz> <BR/>
   
198   echo '</div><br>';   echo '</div><br>';
199  }  }
200    
201    // ANZEIGEN
 // ANZEIGEN  
202    
203  function parsearr($name, $arr, $del=false, $wireless=false)  function parsearr($name, $arr, $del=false, $wireless=false)
204  {  {
# Line 209  function parsearr($name, $arr, $del=fals Line 213  function parsearr($name, $arr, $del=fals
213   foreach($arr as $k=>$v)   foreach($arr as $k=>$v)
214   {   {
215   if( (substr($k,0,9)=='wireless_') xor $wireless ) Continue;   if( (substr($k,0,9)=='wireless_') xor $wireless ) Continue;
216    
217   $d = $drop[$name.'_'.$k]; if($d==null) $d = $drop[$k];   $d = $drop[$name.'_'.$k]; if($d==null) $d = $drop[$k];
218   $k = str_replace('wireless_', '', $k);   $k = str_replace('wireless_', '', $k);
219   $k2 = $k;   $k2 = $k;
# Line 270  function parsearrs($name, $arr) Line 274  function parsearrs($name, $arr)
274    
275  /* ignore this atm, not always working, sometime open does not work  /* ignore this atm, not always working, sometime open does not work
276   function openclose(nummer, act)   function openclose(nummer, act)
277   {   {
278   var bild = document.images['sch_bild_'+nummer];   var bild = document.images['sch_bild_'+nummer];
279   var absatz = document.all['sch_absatz_'+nummer].style;   var absatz = document.all['sch_absatz_'+nummer].style;
280   var senden = false;   var senden = false;
# Line 282  function parsearrs($name, $arr) Line 286  function parsearrs($name, $arr)
286   }   }
287  */  */
288   function openclose(nummer, act)   function openclose(nummer, act)
289   {   {
290   var bild = document.images['sch_bild_'+nummer];   var bild = document.images['sch_bild_'+nummer];
291   var absatz = document.all['sch_absatz_'+nummer].style;   var absatz = document.all['sch_absatz_'+nummer].style;
292   var senden = false;   var senden = false;
293    
294   if(bild.title == 'OPEN')   if(bild.title == 'OPEN')
295   {   {
296   if(act<=1)   if(act<=1)
# Line 311  function parsearrs($name, $arr) Line 315  function parsearrs($name, $arr)
315   act = 2;   act = 2;
316   }   }
317   }   }
   
318   if(senden) sendopenclose(nummer,act);   if(senden) sendopenclose(nummer,act);
319   }   }
320    
# Line 414  echo '</td><td valign=top>'; Line 417  echo '</td><td valign=top>';
417   if($state=='On')   if($state=='On')
418   {   {
419   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>';
420   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=shutdown\', \'ShutdownWin\', \'width=200,height=100\')"><br>';
421   echo '<br>';   echo '<br>';
422   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>';
423   echo 'Hardware Detection:</b></div>';  // echo 'Hardware Detection:</b></div>';
424   echo '<input class="but" type=button value="LAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=lan\',\'POST\');">';  // echo '<input class="but" type=button value="LAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=lan\',\'POST\');">';
425   echo '<input class="but" type=button value="WLAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=wlan\',\'POST\');">';  // echo '<input class="but" type=button value="WLAN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=wlan\',\'POST\');">';
426   echo '<input class="but" type=button value="VGA" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=vga\',\'POST\');">';  // echo '<input class="but" type=button value="VGA" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=vga\',\'POST\');">';
427   echo '<br>';  // echo '<br>';
428   echo '<input class="but" type=button value="PRN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=printer\',\'POST\');">';  // echo '<input class="but" type=button value="PRN" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=printer\',\'POST\');">';
429   echo '<input class="but" type=button value="HRDW" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=system\',\'POST\');">';  // echo '<input class="but" type=button value="HRDW" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=system\',\'POST\');">';
430   echo '<input class="but" type=button value="FS" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=rootfs\',\'POST\');">';  // echo '<input class="but" type=button value="FS" style="width:50px" onclick="javascript:urlopen(\'include/hwinfo.php?ip='.$conn['ip'].'&cmd=rootfs\',\'POST\');">';
431   echo '<br><br>';  // echo '<br><br>';
432   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>';
433   echo 'Remote Shadow:</b></div>';   echo 'Remote Shadow:</b></div>';
434   echo '<input class="but" type=button value="VNC" style="width:75px" onclick="window.open(\'vncviewer.php?ip='.$conn['ip'].'\', \'VncViewer\', \'width=200,height=100\')">';   echo '<input class="but" type=button value="VNC" style="width:75px" onclick="window.open(\'vncviewer.php?ip='.$conn['ip'].'\', \'VncViewer\', \'width=200,height=100\')">';
435   echo '<input class="but" type=button value="SSH" style="width:75px" onclick="window.open(\'mindterm.php?ip='.$conn['ip'].'\', \'MindTerm\', \'width=200,height=100\')">';   echo '<input class="but" type=button value="SSH" style="width:75px" onclick="window.open(\'mindterm.php?ip='.$conn['ip'].'\', \'MindTerm\', \'width=200,height=100\')">';
436   echo '<br><br>';  // echo '<br><br>';
437   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>';
438   echo 'Client Update:</b></div>';  // echo 'Client Update:</b></div>';
439   echo '<input class="but" type=button value="UPDATE MAGE DB" style="width:150px" onclick="if(confirm(\'UPDATE DB ON CLIENT #'.$id.' ?\')) window.open(\'mageupgrade.php?client='.$id.'&ip='.$conn['ip'].'&op=update\', \'ShutdownWin\', \'width=800,height=600\')"><br>';  // echo '<input class="but" type=button value="UPDATE MAGE DB" style="width:150px" onclick="if(confirm(\'UPDATE DB ON CLIENT #'.$id.' ?\')) window.open(\'mageupgrade.php?client='.$id.'&ip='.$conn['ip'].'&op=update\', \'ShutdownWin\', \'width=800,height=600\')"><br>';
440   echo '<input class="but" type=button value="CALC DEPS" style="width:150px" onclick="if(confirm(\'CALC DEPS FOR CLIENT #'.$id.' ?\')) window.open(\'mageupgrade.php?client='.$id.'&ip='.$conn['ip'].'&op=calc\', \'ShutdownWin\', \'width=800,height=600\')"><br>';  // echo '<input class="but" type=button value="CALC DEPS" style="width:150px" onclick="if(confirm(\'CALC DEPS FOR CLIENT #'.$id.' ?\')) window.open(\'mageupgrade.php?client='.$id.'&ip='.$conn['ip'].'&op=calc\', \'ShutdownWin\', \'width=800,height=600\')"><br>';
441   echo '<input class="but" type=button value="UPGRADE CLIENT" style="width:150px" onclick="if(confirm(\'UPGRADE ALL PACKAGES ON CLIENT #'.$id.' ?\')) window.open(\'mageupgrade.php?client='.$id.'&ip='.$conn['ip'].'&op=upgrade\', \'ShutdownWin\', \'width=800,height=600\');setTimeout(\'window.location.reload()\',0);"><br>';  // echo '<input class="but" type=button value="UPGRADE CLIENT" style="width:150px" onclick="if(confirm(\'UPGRADE ALL PACKAGES ON CLIENT #'.$id.' ?\')) window.open(\'mageupgrade.php?client='.$id.'&ip='.$conn['ip'].'&op=upgrade\', \'ShutdownWin\', \'width=800,height=600\');setTimeout(\'window.location.reload()\',0);"><br>';
442   }   }
443   else   else
444   echo '<input class="but" type=button value="WAKE ON LAN" style="width:150px" onclick="if(confirm(\'WAKE CLIENT #'.$id.' ?\')) window.open(\'wake_on_lan.php?mac='.$data['client_serials']['mac'].'\', \'WakeWin\', \'width=200,height=100\')"><br>';   echo '<input class="but" type=button value="WAKE ON LAN" style="width:150px" onclick="if(confirm(\'WAKE CLIENT #'.$id.' ?\')) window.open(\'wake_on_lan.php?mac='.$data['client_serials']['mac'].'\', \'WakeWin\', \'width=200,height=100\')"><br>';
445    
446   echo '<br><center><a href="share/ChangeLog.html" target="_blank">[ChangeLog]</a> <a href="share/FAQ.html" target="_blank">[FAQs]</a></center>';  // echo '<br><center><a href="share/ChangeLog.html" target="_blank">[ChangeLog]</a> <a href="share/FAQ.html" target="_blank">[FAQs]</a></center>';
447    
448  echo '</td></tr></table>';  echo '</td></tr></table>';
449  echo '</form>';  echo '</form>';

Legend:
Removed from v.7134  
changed lines
  Added in v.7744