Ejemplo n.º 1
0
function deleteou()
{
    //     sys.THREAD_COMMAND_SET(sys.LOCATE_PHP5_BIN()+' /usr/share/artica-postfix/exec.delete-ou.php "'+RegExpr.Match[1]+'" ' +RegExpr.Match[2]);
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?organization-delete=" . base64_encode($_GET["delete-ou"]) . "&delete-mailboxes={$_GET["delete_mailboxes"]}");
    $sock->getFrameWork("cmd.php?ad-import-remove-schedule=yes&ou=" . base64_encode($_GET["delete-ou"]));
    $tpl = new templates();
    sleep(3);
    echo $tpl->javascript_parse_text('{apply_upgrade_help}');
    REMOVE_CACHED("domains.index.php");
}
Ejemplo n.º 2
0
function choose_language_save(){
	session_start();
	$_SESSION["detected_lang"]=$_POST["miniconfig-POST-lang"];
	writelogs("Unset array of ".count($_SESSION["translation"]),__FUNCTION__,__FILE__,__LINE__);
	unset($_SESSION["translation"]);
	writelogs("-> remove cached",__FUNCTION__,__FILE__,__LINE__);
	REMOVE_CACHED(null);
	writelogs("-> setcookie",__FUNCTION__,__FILE__,__LINE__);
	setcookie("artica-language", $_POST["miniconfig-POST-lang"], time()+172800);
	$tpl=new templates();	
}
Ejemplo n.º 3
0
$sock->DeleteCache();
$sock->getFrameWork("system.php?process1=yes");
while (list($num, $val) = each($GLOBALS["langs"])) {
    $datas = $sock->LANGUAGE_DUMP($val);
    $bb = strlen(serialize($datas));
    $a = $a + $bb;
    $bb = str_replace(" ", " ", FormatBytes($bb / 1024));
    $tt[] = "\tDumping language {$val} {$bb}";
}
$dataSess = strlen(serialize($_SESSION));
$text = $text . "Session Cache.....................: " . str_replace(" ", " ", FormatBytes($dataSess / 1024)) . "\n";
$text = $text . "Session Page Cache................: {$cc} page(s)\n";
$bytes = $a;
$text = $text . "Language Cache....................: " . str_replace(" ", " ", FormatBytes($bytes / 1024)) . "/" . str_replace(" ", " ", FormatBytes($sock->semaphore_memory / 1024)) . "\n";
$text = $text . implode("\n", $tt) . "\n";
$text = $text . "Console Cache.....................: " . str_replace(" ", " ", FormatBytes(REMOVE_CACHED())) . "\n";
$text = $text . "\n\n{cache_cleaned}\n";
$text = $text . "language : {$_SESSION["detected_lang"]}\n";
$text = $text . "icons cache : " . count($_SESSION["ICON_MYSQL_CACHE"]) . "\n";
$sock->DATA_CACHE_EMPTY();
writelogs("Clean cache, language was {$_SESSION["detected_lang"]}", __FUNCTION__, __FILE__, __LINE__);
unset($_SESSION["CACHE_PAGE"]);
unset($_SESSION["APC"]);
unset($_SESSION["cached-pages"]);
unset($_SESSION["translation-en"]);
unset($_SESSION["translation"]);
unset($_SESSION["privileges"]);
unset($_SESSION["qaliases"]);
unset($_SERVER['PHP_AUTH_USER']);
unset($_SESSION["ARTICA_HEAD_TEMPLATE"]);
unset($_SESSION['smartsieve']['authz']);
Ejemplo n.º 4
0
function TreeAddNewOrganisation()
{
    $usr = new usersMenus();
    $tpl = new templates();
    if ($usr->AsArticaAdministrator == false) {
        echo $tpl->_ENGINE_parse_body('{no_privileges}');
        exit;
    }
    $ou = $_GET["TreeAddNewOrganisation"];
    if ($ou == "_Global") {
        echo "Reserved!";
        exit;
    }
    $ldap = new clladp();
    $ldap->AddOrganization($ou);
    if ($ldap->ldap_last_error != null) {
        if ($ldap->ldap_last_error_num != 68) {
            echo "\n****************************************\nAdding Organization \"{$ou}\"\n********************\n";
            echo $ldap->ldap_last_error;
            exit;
        }
    }
    $ldap->ldap_close();
    REMOVE_CACHED("domains.index.php");
    $sock = new sockets();
    $sock->getFrameWork("status.php?force-front-end=yes");
}
Ejemplo n.º 5
0
function TreeAddNewOrganisation()
{
    $usr = new usersMenus();
    $tpl = new templates();
    if ($usr->AsArticaAdministrator == false) {
        echo $tpl->_ENGINE_parse_body('{no_privileges}');
        exit;
    }
    $ou = $_GET["TreeAddNewOrganisation"];
    if ($ou == "_Global") {
        echo "Reserved!";
        exit;
    }
    $ldap = new clladp();
    $ldap->AddOrganization($ou);
    if ($ldap->ldap_last_error != null) {
        if ($ldap->ldap_last_error_num != 68) {
            echo $ldap->ldap_last_error;
            exit;
        }
    }
    $ldap->ldap_close();
    REMOVE_CACHED("domains.index.php");
}