예제 #1
0
function js(){
	if(isset($_GET["newinterface"])){$fontsize="font-size:14px";$linkadd="&newinterface=yes";}	
	$add=js_addon()."\n".file_get_contents("js/system-network.js");
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body('{net_settings}');
	$page=CurrentPageName();
	$prefix=md5($page);
	$openjs="YahooWin(700,'$page?popup=yes','$title');";
	IF(isset($_GET["in-front-ajax"])){
		$openjs="$('#BodyContent').load('$page?popup=yes$linkadd');";
	}
	
	$html="
	$add
	$openjs
";
	
	echo $html;
}
예제 #2
0
function StartPage()
{
    //
    $apply = RoundedLightGrey(Paragraphe("64-apply-network-service.png", "{apply_network}", "{apply_network_text}", "javascript:ApplyConfigToServer()", "apply_network"));
    $conf = RoundedLightGrey(Paragraphe("64-tablet.png", "{show_config_file}", "{show_config_file_text}", "javascript:NicShowConfig()", "show_config_file"));
    $tabs = tabs();
    $page = CurrentPageName();
    $html = "\n\t\n<script language=\"JavaScript\">       \nvar timerID  = null;\nvar timerID1  = null;\nvar tant=0;\nvar reste=0;\n\nfunction demarre(){\n   tant = tant+1;\n   reste=10-tant;\n\tif (tant < 20 ) {                           \n      timerID = setTimeout(\"demarre()\",5000);\n      } else {\n               tant = 0;\n               //document.getElementById('wait').innerHTML='<img src=img/wait.gif>';\n               NicSettingsChargeLogs();\n               demarre();                                //la boucle demarre !\n   }\n}\n\n" . js_addon() . "\n\n</script>\t\t\n<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top' style='padding-left:80px;padding-right:50px'><img src='img/bg_ip_settings.png'></td>\n\t<td valing='top' style='padding-left:10px'>\n\t<p class=caption>{network_about}</p>\n\t<div id='hostname_cf'></div>\n\t\n\t<div id='nic_status'>\n\t\n\t</div>\n\t\n\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 valign='top'>\n\t\t\t{$tabs}\n\t\t\t<div id='current_table' style='width:100%;height:200px;overflow:auto'></div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>demarre();</script>\n\t<script>NicSettingsChargeLogs();</script>\n\t";
    $JS["JS"][] = "js/system-network.js";
    $tpl = new template_users('{net_settings}', $html, 0, 0, 0, 0, $JS);
    echo $tpl->web_page;
}