示例#1
0
if ($user->AsSystemAdministrator == false) {
    $tpl = new templates();
    echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');";
    die;
    exit;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["add-form"])) {
    popup_add();
    exit;
}
if (isset($_POST["ip_addr"])) {
    host_add();
    exit;
}
if (isset($_GET["refresh"])) {
    echo getlist();
    exit;
}
if (isset($_POST["host-delete"])) {
    popup_delete();
    exit;
}
if (isset($_GET["table"])) {
    table();
    exit;
}
if (isset($_GET["add-etc-hosts-p"])) {
示例#2
0
<?php
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');

	$user=new usersMenus();
	if($user->AsSystemAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}

	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["add-form"])){popup_add();exit;}
	if(isset($_POST["ip_addr"])){host_add();exit;}
	if(isset($_GET["refresh"])){echo getlist();exit;}
	if(isset($_POST["host-delete"])){popup_delete();exit;}
	if(isset($_GET["table"])){table();exit;}
	if(isset($_GET["add-etc-hosts-p"])){Paragraphe_add();exit;}
	if(isset($_GET["DisableEtcHosts"])){DisableEtcHosts_save();exit;}
	if(isset($_GET["hosts-search"])){hosts_search();exit;}
	if(isset($_POST["rebuild"])){rebuild();exit;}
	js();
	
	
function js(){
	$page=CurrentPageName();
	$tpl=new templates();
	header("content-type: application/x-javascript");
	$title=$tpl->_ENGINE_parse_body("{etc_hosts}");
	echo "YahooWin3(800,'$page?popup=yes','$title',true);";