Exemple #1
0
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.artica.inc');
	include_once('ressources/class.ini.inc');
	include_once('ressources/class.amavis.inc');
	$user=new usersMenus();
	if($user->AsPostfixAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_POST["template"])){savetpl();exit;}
	if(isset($_GET["readme-curtomize"])){readme_curtomize();exit;}
js();

function js(){
	$page=CurrentPageName();
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body("{{$_GET["type"]}}");
	
	$html="YahooWin4('700','$page?popup={$_GET["type"]}','$title')";
	echo $html;
	
	
}

function savetpl(){
	$datas=base64_encode($_POST["template-data"]);
if ($user->AsPostfixAdministrator == false) {
    $tpl = new templates();
    echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');";
    die;
    exit;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_POST["template"])) {
    savetpl();
    exit;
}
if (isset($_GET["readme-curtomize"])) {
    readme_curtomize();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body("{{$_GET["type"]}}");
    $html = "YahooWin4('700','{$page}?popup={$_GET["type"]}','{$title}')";
    echo $html;
}
function savetpl()
{
    $datas = base64_encode($_POST["template-data"]);
    $sock = new sockets();