10 |
$multi= array( 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1); |
$multi= array( 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1); |
11 |
$data = array(); |
$data = array(); |
12 |
|
|
|
|
|
13 |
// get alx version info for |
// get alx version info for |
14 |
$alxinfo = sqlfirst('SELECT * FROM client_version WHERE serial='.$id); |
$alxinfo = sqlfirst('SELECT * FROM client_version WHERE serial='.$id); |
15 |
$alxos = $alxinfo[os]; |
$alxos = $alxinfo[os]; |
34 |
|
|
35 |
// FELD-DEFINITIONEN (ARRAY=>DROPDOWN / HIDDEN / IGNORE / 1 / BOLD / PASSWORD / SHOW / SHOWTIME / MONITORID) |
// FELD-DEFINITIONEN (ARRAY=>DROPDOWN / HIDDEN / IGNORE / 1 / BOLD / PASSWORD / SHOW / SHOWTIME / MONITORID) |
36 |
$drop = array(); |
$drop = array(); |
37 |
$drop['cfg_graphic_module'] = array('vesa', 'ati', 'cirrus', 'i710', 'intel', 'nv', 'nouveau', 'mach64', 'mga', 'unichrome', 'radeon', 's3', 's3virge', 'savage', 'sis', 'trident', 'tseng', 'vmware'); |
$drop['cfg_graphic_module'] = sqlarr('SELECT value FROM values_graphic_module where enabled=1', '', 'value'); |
38 |
if($gfxinfo[module] == 'intel') |
if($gfxinfo[module] == 'intel') |
39 |
{ |
{ |
40 |
$drop['cfg_graphic_hdmi'] = array('disable', 'enable'); |
$drop['cfg_graphic_hdmi'] = array('disable', 'enable'); |
43 |
{ |
{ |
44 |
$drop['cfg_graphic_hdmi'] = 'ignore'; |
$drop['cfg_graphic_hdmi'] = 'ignore'; |
45 |
} |
} |
46 |
$drop['resolution'] = array('640x480', '800x600', '1024x768', '1280x960', '1280x1024', '1360x768', '1366x768', '1400x1050', '1440x900', '1600x1200', '1680x1050', '1280x720', '1920x1080'); |
$drop['resolution'] = sqlarr('SELECT value FROM values_graphic_resolution where enabled=1', '', 'value'); |
47 |
$drop['depth'] = array('24', '16', '8'); |
$drop['depth'] = sqlarr('SELECT value FROM values_graphic_depth where enabled=1', '', 'value'); |
48 |
$drop['mouse'] = array('Auto', 'IMPS/2', 'PS/2'); |
//$drop['mouse'] = array('Auto', 'IMPS/2', 'PS/2'); |
49 |
$drop['keyboard'] = array('PC105'); |
//$drop['keyboard'] = array('PC105'); |
50 |
$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', 'atmel_pci', 'b43', 'b43legacy', 'hostap_pci', 'hostap_plx', 'ipw2100', 'ipw2200', 'iwl3945', 'iwl4965', 'iwldvm', 'iwlwifi', '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', 'usb8xxx', 'wl1251', 'wl1271', 'zd1201', 'zd1211rw'); |
$drop['keymap'] = sqlarr('SELECT value FROM values_input_keymap where enabled=1', '', 'value'); |
51 |
|
$drop['cfg_network_module'] = sqlarr('SELECT value FROM values_network_module where enabled=1', '', 'value'); |
52 |
$drop['networking'] = array('dhcp', 'static'); |
$drop['networking'] = array('dhcp', 'static'); |
53 |
$drop['port'] = array('lpt1', 'usb1', 'usb2', 'com1', 'com2'); |
$drop['port'] = sqlarr('SELECT value FROM values_printers_port where enabled=1', '', 'value'); |
54 |
for ($i=0; $i<999; $i++) { $drop['cfg_printers_'.$i.'_ip'] = 'ignore'; } |
//for ($i=0; $i<999; $i++) { $drop['cfg_printers_'.$i.'_ip'] = 'ignore'; } |
55 |
$drop['share'] = 'ignore'; |
$drop['share'] = 'ignore'; |
56 |
$drop['location'] = sqlarr('SELECT location FROM client_locations', '', 'location'); |
$drop['location'] = sqlarr('SELECT location FROM client_locations where enabled=1', '', 'location'); |
57 |
$drop['id'] = 'hidden'; |
$drop['id'] = 'hidden'; |
58 |
$drop['flg_modified'] = '1'; |
$drop['flg_modified'] = '1'; |
59 |
$drop['serial'] = 'ignore'; |
$drop['serial'] = 'ignore'; |
60 |
$drop['monitorid'] = 'ignore'; |
$drop['monitorid'] = 'ignore'; |
61 |
$drop['refresh_rate'] = array('','60','75','85','100'); |
$drop['refresh_rate'] = sqlarr('SELECT value FROM values_graphic_refresh_rate where enabled=1', '', 'value'); |
62 |
$drop['hostname'] = 'bold'; |
$drop['hostname'] = 'bold'; |
63 |
$drop['session'] = 'bold'; |
$drop['session'] = 'bold'; |
64 |
$drop['cfg_autostart_session'] = sqlarr('SELECT filename FROM cfg_sessions where serial='.$id, '', 'filename'); |
$drop['cfg_autostart_session'] = sqlarr('SELECT filename FROM cfg_sessions where serial='.$id, '', 'filename'); |
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'; |
72 |
|
$drop['root'] = 'password'; |
73 |
$drop['vnc'] = 'password'; |
$drop['vnc'] = 'password'; |
74 |
$drop['samba'] = 'password'; |
$drop['samba'] = 'password'; |
75 |
$drop['station'] = 'password'; |
$drop['station'] = 'password'; |
76 |
$drop['txt'] = 'txt'; |
$drop['txt'] = 'txt'; |
77 |
$drop['screensaver'] = array('','blank', 'random', 'ant', 'ant3d', 'apollonian', 'ball', 'bat', 'blot', 'bomb', 'bouboule', |
$drop['screensaver'] = sqlarr('SELECT value FROM values_screensaver_screensaver where enabled=1', '', 'value'); |
78 |
'bounce', 'braid', 'bubble', 'bug', 'clock', 'coral', 'crystal', 'daisy', 'dclock', 'decay', 'deco', |
//$drop['iface'] = array('eth0', 'wlan0'); |
|
'demon', 'dilemma', 'discrete', 'dragon', 'drift', 'euler2d', 'eyes', 'fadeplot', 'fiberlamp', 'flag', |
|
|
'flame', 'flow', 'forest', 'galaxy', 'goop', 'grav', 'helix', 'hop', 'hyper', 'ico', 'ifs', 'image', |
|
|
'juggle', 'julia', 'kaleid', 'kumppa', 'laser', 'life', 'life1d', 'life3d', 'lightning', 'lisa', 'lissie', |
|
|
'loop', 'lyapunov', 'mandelbrot', 'marquee', 'matrix', 'maze', 'mountain', 'munch', 'nose', 'pacman', |
|
|
'penrose', 'petal', 'petri', 'polyominoes', 'puzzle', 'pyro', 'qix', 'roll', 'rotor', 'scooter', 'shape', |
|
|
'sierpinski', 'slip', 'solitare', 'space', 'sphere', 'spiral', 'spline', 'star', 'starfish', 'strange', |
|
|
'swarm', 'swirl', 't3d', 'tetris', 'thornbird', 'tik_tak', 'toneclock', 'triangle', 'tube', 'turtle', |
|
|
'vines', 'voters', 'wator', 'wire', 'world', 'worm', 'xcl', 'xjack'); |
|
|
$drop['iface'] = array('eth0', 'wlan0'); |
|
79 |
$drop['client_version_os'] = 'show'; |
$drop['client_version_os'] = 'show'; |
80 |
$drop['client_version_utils'] = 'show'; |
$drop['client_version_utils'] = 'show'; |
81 |
|
$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'); |
417 |
if($state=='On') |
if($state=='On') |
418 |
{ |
{ |
419 |
echo '<u>IP:</u> '.$conn['ip'].'<br><br>'; |
echo '<u>IP:</u> '.$conn['ip'].'<br><br>'; |
420 |
$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']); |
echo '<u>OS:</u> '.$alxos.'<br>'; |
421 |
$osver = explode(':',$osver[1]); |
echo '<u>Utils:</u> '.$alxutils.'<br>'; |
|
if($osver[0] == '') $osver[0]='unknown'; |
|
|
if($osver[1] == '') $osver[1]='unknown'; |
|
|
|
|
|
# update os string in database |
|
|
if($alxos == '') |
|
|
{ |
|
|
mysql_query('insert into client_version(serial,os,utils) values("'.$id.'","'.$osver[0].'","'.$osver[1].'") |
|
|
on duplicate key update os="'.$osver[0].'", utils="'.$osver[1].'"'); |
|
|
# reload the site |
|
|
echo '<script type="text/javascript">setTimeout(\'window.location.reload()\',0);</script>'; |
|
|
} |
|
|
|
|
|
echo '<u>OS:</u> '.$osver[0].'<br>'; |
|
|
echo '<u>Utils:</u> '.$osver[1].'<br>'; |
|
|
|
|
|
if($osver[0] <> 'unknown') |
|
|
{ |
|
|
//write them to database |
|
|
} |
|
422 |
} |
} |
423 |
|
|
424 |
echo '</b></div>'; |
echo '</b></div>'; |