--- alx-src/branches/alx-web-060/show.php 2011/07/06 10:40:34 2602 +++ alx-src/branches/alx-web-060/show.php 2011/07/07 20:01:30 2638 @@ -53,7 +53,17 @@ $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['networking'] = array('dhcp', 'static'); -$drop['port'] = array('lpt1', 'usb1', 'usb2', 'com1', 'com2', 'lpd', 'socket', 'ipp'); +// 0.6.0 does not support lpd, ipp and socket printing atm +if($alxos>='0.6.0') +{ + $drop['port'] = array('lpt1', 'usb1', 'usb2', 'com1', 'com2'); + for ($i=0; $i<999; $i++) { $drop['cfg_printers_'.$i.'_ip'] = 'ignore'; } + $drop['share'] = 'ignore'; +} +else +{ + $drop['cfg_printers_port'] = array('lpt1', 'usb1', 'usb2', 'com1', 'com2', 'lpd', 'socket', 'ipp'); +} $drop['location'] = sqlarr('SELECT location FROM client_locations', '', 'location'); $drop['id'] = 'hidden'; $drop['flg_modified'] = '1'; @@ -112,6 +122,20 @@ $drop['wireless_key'] = 'password'; $drop['wireless_key_ascii'] = 'password'; +// get current citrix sessions +// split all citrix server into an array to get the first server from list +$citrix_query_browser = split(";", $citrix_browseradrs); +exec($wwwroot.'/pnabrowse-wrapper -A '.$citrix_query_browser[0], $returned_citrix_sessions, $retval); +if ($retval == 0) +{ + $citrix_public_applications = str_replace("'", "", $returned_citrix_sessions); + // add an empty value add the first position of the array as session-default + array_unshift($citrix_public_applications, ""); + for ($i=0; $i<999; $i++) { $drop['cfg_sessions_'.$i.'_session'] = $citrix_public_applications; } +} +else if($retval = 126) echo "pnabrowser-wrapper has no execute permission! please run chmod +x on ".$wwwroot."/pnabrowser-wrapper."; +else echo "pnabrowse-wrapper does not run successfully! retval->'".$retval."'
"; + // GGF. NEUEN DATENSATZ EINFÜGEN if(isset($_POST['do_add'])) { @@ -119,7 +143,7 @@ if($what=='COMMENT') sqladd('cfg_comments', array('serial'=>$id)); else if($what=='PRINTER') sqladd('cfg_printers', array('serial'=>$id)); else if($what=='MODULE') sqladd('cfg_modules', array('serial'=>$id)); - else if($what=='SESSION') sqladd('cfg_sessions', array('domain'=>'DOM_AKA_NT', 'browseradrs'=>'128.20.50.50;128.20.50.66;128.20.50.71;128.20.50.46;128.20.100.31;128.20.100.32', 'serial'=>$id)); + else if($what=='SESSION') sqladd('cfg_sessions', array('domain'=>$citrix_domain_name, 'browseradrs'=>$citrix_browseradrs, 'serial'=>$id)); else if($what=='MENUITEM') sqladd('cfg_other_menuitems', array('serial'=>$id)); } @@ -295,6 +319,7 @@ $.ajax({type:""+typ+"",url:$url[0],data:$url[1],cache:false,success:function(data){ alert(data); }}); } +/* ignore this atm, not always working, sometime open does not work function openclose(nummer, act) { var bild = document.images['sch_bild_'+nummer]; @@ -306,6 +331,40 @@ }); if(act<=1){ $("#sch_bild_"+nummer).attr({title:'CLOSE',src:'pics/minus.gif'}); }else{ $("#sch_bild_"+nummer).attr({title:'OPEN',src:'pics/plus.gif'}); }; } +*/ + function openclose(nummer, act) + { + var bild = document.images['sch_bild_'+nummer]; + var absatz = document.all['sch_absatz_'+nummer].style; + var senden = false; + + if(bild.title == 'OPEN') + { + if(act<=1) + { + 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); + } function showhelp(name) { window.open(name, 'HelpWin', 'width=620,height=500,scrollbars=yes'); }