예제 #1
0
include_once 'ressources/class.templates.inc';
include_once 'ressources/class.ldap.inc';
$users = new usersMenus();
if (!$users->AsArticaAdministrator) {
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body("alert('{ERROR_NO_PRIVS}')");
    exit;
    die;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["delete-ou"])) {
    deleteou();
    exit;
}
js();
function js()
{
    $ou = $_GET["ou"];
    $tpl = new templates();
    $page = CurrentPageName();
    $title = $tpl->_ENGINE_parse_body('{delete_ou}');
    $prefix = str_replace('.', '', $page);
    $html = "\n\tfunction {$prefix}LoadPage(){\n\t\tLoadWinORG(450,'{$page}?popup=yes&ou={$_GET["ou"]}','{$title}');\n\t\t}\n\t\t\n\t\t\nvar x_ConFirmDelete= function (obj) {\n\tvar results=obj.responseText;\n\tWinORGHide();\n\tWinORG2Hide();\n\talert(results);\n\tLoadjs('domains.index.php?js=yes');\n\t}\t\n\t\n\t\n\tfunction ConFirmDelete(){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('delete-ou','{$_GET["ou"]}');\n\t\t\t\tXHR.appendData('delete_mailboxes',document.getElementById('delete_mailboxes').value);\n\t\t\t\tdocument.getElementById('confirmdeleteou').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\t\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_ConFirmDelete);\n\t\t\t\t\n\t\t\t}\t\n\n\n{$prefix}LoadPage();";
    echo $html;
}
function popup()
{
예제 #2
0
<?php
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');

	$users=new usersMenus();
	if(!$users->AsArticaAdministrator){
		$tpl=new templates();
		echo $tpl->_ENGINE_parse_body("alert('{ERROR_NO_PRIVS}')");exit;die();
	}

	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["delete-ou"])){deleteou();exit;}
	
js();


function js(){
	$ou=$_GET["ou"];
	$tpl=new templates();
	$page=CurrentPageName();
	$title=$tpl->_ENGINE_parse_body('{delete_ou}');
	$prefix=str_replace('.','',$page);
$html="
	function {$prefix}LoadPage(){
		LoadWinORG(450,'$page?popup=yes&ou={$_GET["ou"]}','$title::{$_GET["ou"]}');
		}
		
		
var x_ConFirmDelete= function (obj) {
	var results=obj.responseText;
	WinORGHide();