function networks() { $networsplus = Paragraphe("64-win-nic-plus.png", "{add_network}", '{add_network_text}', "javascript:AddNetwork()", "add_network", 210); $importArtica = Paragraphe("64-samba-get.png", "{import_artica_computers}", '{import_artica_computers_text}', "javascript:ImportComputers('')", "import_artica_computers", 210); $importList = Paragraphe("64-samba-get.png", "{import_artica_computers}", '{import_artica_computers_list_text}', "javascript:ImportListComputers()", "import_artica_computers_list_text", 210); $articas = artica_import_list(); $nets = networkslist(1); $html = "<H1>{edit_networks}</H1>\n\t<div id='networks'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=70%>\n\t\t\t<div style='width:100%;height:200px;overflow:auto'>\n\t\t\t\t" . RoundedLightWhite("<div id='netlist'>{$nets}</div>") . "\n\t\t\t</div>\n\t\t\t<br>\n\t\t\t<div style='width:100%;height:200px;overflow:auto'>\n\t\t\t\t" . RoundedLightWhite("<div id='articas'>{$articas}</div>") . "\n\t\t\t</div>\t\n\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t</td>\n\t\t<td valign='top'>\n\t\t{$networsplus}\n\t\t{$importArtica}\n\t\t{$importList}\n\t\t</td>\n\t</tr>\n\t</table>\n\t</div>"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
exit; } if (isset($_GET["scan-nets-js"])) { scan_net_js(); exit; } if (isset($_GET["computer-delete-js"])) { computer_delete_js(); exit; } if ($_GET["mode"] == "selection") { selection_js(); exit; } if (isset($_GET["networkslist"])) { networkslist(0); exit; } if (isset($_GET["ComputersAllowDHCPLeases"])) { ComputersAllowDHCPLeasesSave(); exit; } if (isset($_GET["ComputersAllowNmap"])) { ComputersAllowNmapSave(); exit; } if (isset($_GET["EnableArpDaemon"])) { EnableArpDaemonSave(); exit; } if (isset($_GET["browse-computers"])) {
function networks(){ $page=CurrentPageName(); $networsplus=Paragraphe("64-win-nic-plus.png","{add_network}",'{add_network_text}',"javascript:AddNetwork()","add_network",210); $importArtica=Paragraphe("64-samba-get.png","{import_artica_computers}",'{import_artica_computers_text}',"javascript:ImportComputers('')","import_artica_computers",210); $importList=Paragraphe("64-samba-get.png","{import_artica_computers}",'{import_artica_computers_list_text}',"javascript:ImportListComputers()","import_artica_computers_list_text",210); $sock=new sockets(); $ComputersAllowNmap=$sock->GET_INFO("ComputersAllowNmap"); $ComputersAllowDHCPLeases=$sock->GET_INFO("ComputersAllowDHCPLeases"); if($ComputersAllowNmap==null){$ComputersAllowNmap=1;} if($ComputersAllowDHCPLeases==null){$ComputersAllowDHCPLeases=1;} $autoscan_form=" <table style='width:100%'> <tr> <td valign='top' class=legend>{allow_nmap_scanner}</td> <td valign='top'>". Field_checkbox("ComputersAllowNmap",1,$ComputersAllowNmap,"ComputersAllowNmapCheck()")."</td> </tr> <tr> <td valign='top' class=legend>{allow_parse_dhcp_leases}</td> <td valign='top'>". Field_checkbox("ComputersAllowDHCPLeases",1,$ComputersAllowDHCPLeases,"ComputersAllowDHCPLeasesCheck()")."</td> </tr> </table> "; $articas=artica_import_list(); $height_artica=200; if(strlen($articas)<5){$height_artica=0;} $nets=networkslist(1); $html=" <div id='networks'> <table style='width:100%'> <tr> <td valign='top' width=70%> <div style='width:100%;height:265px;overflow:auto'> <div id='netlist'>$nets</div> </div> $autoscan_form <br> <div style='width:100%;height:{$height_artica}px;overflow:auto'> <div id='articas'>$articas</div> </div> </td> <td valign='top'> $networsplus $importArtica $importList </td> </tr> </table> </div> <script> function ComputersAllowDHCPLeasesCheck(){ var XHR = new XHRConnection(); if(document.getElementById('ComputersAllowDHCPLeases').checked){ XHR.appendData('ComputersAllowDHCPLeases',1);}else{XHR.appendData('ComputersAllowDHCPLeases',0);} XHR.sendAndLoad('$page', 'GET'); } function ComputersAllowNmapCheck(){ var XHR = new XHRConnection(); if(document.getElementById('ComputersAllowNmap').checked){ XHR.appendData('ComputersAllowNmap',1);}else{XHR.appendData('ComputersAllowNmap',0);} XHR.sendAndLoad('$page', 'GET') } </script> "; $tpl=new templates(); echo $tpl->_ENGINE_parse_body($html); }