当前位置: 首页>>代码示例>>PHP>>正文


PHP clladp::Ldap_del_mod方法代码示例

本文整理汇总了PHP中clladp::Ldap_del_mod方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::Ldap_del_mod方法的具体用法?PHP clladp::Ldap_del_mod怎么用?PHP clladp::Ldap_del_mod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clladp的用法示例。


在下文中一共展示了clladp::Ldap_del_mod方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DelPointerDC

function DelPointerDC()
{
    $dn = $_GET["DelAssociatedDomain"];
    $ldap = new clladp();
    $upd["associateddomain"] = $_GET["entry"];
    if (!$ldap->Ldap_del_mod($dn, $upd)) {
        echo $ldap->ldap_last_error;
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:9,代码来源:pdns.php

示例2: zarafaEnabled

function zarafaEnabled()
{
    $ldap = new clladp();
    $dn = "ou={$_GET["ou"]},dc=organizations,{$ldap->suffix}";
    $upd["objectClass"] = "zarafa-company";
    if ($_GET["zarafaEnabled"] == 1) {
        if (!$ldap->Ldap_add_mod("{$dn}", $upd)) {
            echo $ldap->ldap_last_error;
            return;
        }
    } else {
        if (!$ldap->Ldap_del_mod("{$dn}", $upd)) {
            echo $ldap->ldap_last_error;
            return;
        }
    }
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?zarafa-admin=yes");
}
开发者ID:brucewu16899,项目名称:artica,代码行数:19,代码来源:domains.edit.zarafa.php

示例3: zarafaEnabled

function zarafaEnabled()
{
    $ldap = new clladp();
    $sock = new sockets();
    $dn = "ou={$_GET["ou"]},dc=organizations,{$ldap->suffix}";
    $upd["objectClass"] = "zarafa-company";
    $upd["cn"] = $_GET["ou"];
    if ($_GET["zarafaEnabled"] == 1) {
        if (!$ldap->Ldap_add_mod("{$dn}", $upd)) {
            echo $ldap->ldap_last_error;
            return;
        }
        $oumd5 = md5(strtolower(trim($_GET["ou"])));
        $sock->SET_INFO("zarafaMBXLang{$oumd5}", $_GET["zarafaMbxLang"]);
        $sock->SET_INFO("OuZarafaDeleteADM{$oumd5}", $_GET["OuZarafaDeleteADM"]);
    } else {
        if (!$ldap->Ldap_del_mod("{$dn}", $upd)) {
            echo $ldap->ldap_last_error;
        }
        return;
    }
    $sock = new sockets();
    $EnableZarafaMulti = $sock->GET_INFO("EnableZarafaMulti");
    if (!is_numeric($EnableZarafaMulti)) {
        $EnableZarafaMulti = 0;
    }
    if ($EnableZarafaMulti == 0) {
        $sock->getFrameWork("cmd.php?zarafa-admin=yes");
        return;
    }
    $q = new mysql();
    $sql = "SELECT servername,ID FROM zarafamulti WHERE ou='{$_GET["ou"]}' AND enabled=1";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (mysql_num_rows($results) > 0) {
        while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
            $sock->getFrameWork("cmd.php?zarafa-admin=yes&instance-id={$ligne["ID"]}");
        }
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:39,代码来源:domains.edit.zarafa.php

示例4: blocker_delrule

function blocker_delrule()
{
    $ou = $_GET["ou"];
    $bl = new htmlblocker($ou);
    $datas["BigMailHtmlRules"] = $bl->ruleslist[$_GET["blockerdelterule"]];
    $ldap = new clladp();
    $ldap->Ldap_del_mod($bl->dn, $datas);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:8,代码来源:html.blocker.ou.php

示例5: TreePostfixDeleteHeaderCheckRule

function TreePostfixDeleteHeaderCheckRule()
{
    include_once "ressources/class.main_cf_filtering.inc";
    $id = $_GET["TreePostfixDeleteHeaderCheckRule"];
    $filters = new main_header_check();
    $datas = $filters->array_ldap_source[$id];
    unset($filters->array_ldap_source[$id]);
    if (count($filters->array_ldap_source) == 0) {
        $update_array["PostfixHeadersRegex"] = $datas;
        $ldap = new clladp();
        $ldap->Ldap_del_mod("cn=artica,{$ldap->suffix}", $update_array);
    } else {
        while (list($num, $ligne) = each($filters->array_ldap_source)) {
            $update_array["PostfixHeadersRegex"][] = $filters->array_ldap_source[$num];
        }
        $ldap = new clladp();
        $ldap->Ldap_modify("cn=artica,{$ldap->suffix}", $update_array);
        if ($ldap->ldap_last_error != null) {
            echo nl2br("ID=[{$_GET["TreePostfixDeleteHeaderCheckRule"]}]\n{$ldap->ldap_last_error}");
        }
    }
    $pages = new HtmlPages();
    if ($pages->AutomaticConfig == true) {
        $filters->SaveToDaemon();
    }
    echo $pages->PagePostfixRules();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:tree.listener.postfix.php

示例6: RblDelete

function RblDelete()
{
    $ldap = new clladp();
    $ou = $_GET["ou"];
    $hash = $ldap->OUDatas($ou);
    $upd["SURBLServers"] = $hash["SURBLServers"][$_GET["SURBLServers"]];
    $dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
    if (!$ldap->Ldap_del_mod($dn, $upd)) {
        echo $ldap->ldap_last_error;
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:11,代码来源:global-countries-surbl.ou.php

示例7: ZARAFA_DISABLE_FEATURES_SAVE

function ZARAFA_DISABLE_FEATURES_SAVE()
{
    $zarafaEnabledFeatures = null;
    $zarafaDisabledFeatures = null;
    $array = array();
    if ($_POST["user_zarafa_enable_imap"] == 1) {
        $zarafaEnabledFeatures = "imap";
    }
    if ($_POST["user_zarafa_enable_pop3"] == 1) {
        $zarafaEnabledFeatures = $zarafaEnabledFeatures . " pop3";
    }
    if ($_POST["user_zarafa_enable_imap"] == 0) {
        $zarafaDisabledFeatures = "imap";
    }
    if ($_POST["user_zarafa_enable_pop3"] == 0) {
        $zarafaDisabledFeatures = $zarafaDisabledFeatures . " pop3";
    }
    $u = new user($_POST["uid"]);
    $ldap = new clladp();
    if ($zarafaEnabledFeatures == null) {
        if (!$ldap->Ldap_del_mod($u->dn, $array["zarafaEnabledFeatures"])) {
            echo "zarafaEnabledFeatures = '{$zarafaEnabledFeatures}'\nzarafaDisabledFeatures = '{$zarafaDisabledFeatures}'\nLDAP ERROR :\nFunction: " . __FUNCTION__ . "\nPage: " . basename(__FILE__) . "\nLine:" . __LINE__ . "\nError:\n" . $ldap->ldap_last_error;
        }
    }
    if ($zarafaDisabledFeatures == null) {
        if (!$ldap->Ldap_del_mod($u->dn, $array["zarafaDisabledFeatures"])) {
            echo "zarafaEnabledFeatures = '{$zarafaEnabledFeatures}'\nzarafaDisabledFeatures = '{$zarafaDisabledFeatures}'\nLDAP ERROR :\nFunction: " . __FUNCTION__ . "\nPage: " . basename(__FILE__) . "\nLine:" . __LINE__ . "\nError:\n" . $ldap->ldap_last_error;
        }
    }
    if ($zarafaEnabledFeatures != null) {
        $upd["zarafaEnabledFeatures"][0] = $zarafaEnabledFeatures;
    }
    if ($zarafaDisabledFeatures != null) {
        $upd["zarafaDisabledFeatures"][0] = $zarafaDisabledFeatures;
    }
    if (!$ldap->Ldap_modify($u->dn, $upd)) {
        echo "zarafaEnabledFeatures = '{$zarafaEnabledFeatures}'\nzarafaDisabledFeatures = '{$zarafaDisabledFeatures}'\nLDAP ERROR :\nFunction: " . __FUNCTION__ . "\nPage: " . basename(__FILE__) . "\nLine:" . __LINE__ . "\nError:\n" . $ldap->ldap_last_error;
        return;
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:40,代码来源:domains.edit.user.php

示例8: DNS_DEL_ENTRY

function DNS_DEL_ENTRY($value)
{
    $hostname = base64_decode($value);
    $EXEC_NICE = EXEC_NICE();
    if (is_file("/usr/bin/nohup")) {
        $nohup = "/usr/bin/nohup ";
    }
    $reload_datas = $nohup . $EXEC_NICE . LOCATE_PHP5_BIN() . " " . dirname(__FILE__) . "/exec.artica.meta.users.php --export-all-dns >/dev/null 2>&1 &";
    include_once dirname(__FILE__) . "/ressources/class.pdns.inc";
    $ldap = new clladp();
    $upd = array();
    $tbl = explode(".", $hostname);
    $dc = "dc=" . @implode(",dc=", $tbl);
    if ($ldap->ExistsDN("{$dc},ou=dns,{$ldap->suffix}")) {
        if ($ldap->ldap_delete("{$dc},ou=dns,{$ldap->suffix}", true)) {
            send_email_events("Success deleting DNS entry {$hostname}", "DN removed was : {$dc},ou=dns,{$ldap->suffix}", "CLOUD");
            return true;
        }
    } else {
        events("unable to stat {$dc},ou=dns,{$ldap->suffix}", __FUNCTION__, __FILE__, __LINE__);
    }
    $suffix = "ou=dns,{$ldap->suffix}";
    $pattern = "(&(objectclass=*)(associatedDomain={$hostname}))";
    $sr = @ldap_search($ldap->ldap_connection, $suffix, "{$pattern}", array());
    if ($sr) {
        $hash = ldap_get_entries($ldap->ldap_connection, $sr);
        for ($i = 0; $i < $hash["count"]; $i++) {
            $dn = $hash[$i]["dn"];
            if (strlen($dn) > 0) {
                $dns[] = $dn;
                events("removing  associateddomain={$hostname} in {$dn}", __FUNCTION__, __FILE__, __LINE__);
                $upd["associateddomain"] = $hostname;
                if (!$ldap->Ldap_del_mod($dn, $upd)) {
                    $dns[] = $ldap->ldap_last_error;
                }
            }
        }
        send_email_events("Success executing remove DNS entry {$hostname}", @implode("\n", $dns), "CLOUD");
        return true;
    }
    events("Failed -> notify", __FUNCTION__, __FILE__, __LINE__);
    send_email_events("Failed remove DNS entry {$hostname} does not exists", null, "CLOUD");
    shell_exec($reload_datas);
    return true;
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:45,代码来源:exec.artica.meta.tasks.php

示例9: main_rules_group_del

function main_rules_group_del()
{
    $kav = new kav4proxy();
    $number = $_POST["Kav4ProxyDeleteGroup"];
    $ldap = new clladp();
    $res = @ldap_read($ldap->ldap_connection, $kav->dn, "(objectClass=*)", array());
    if ($res) {
        $hash = ldap_get_entries($ldap->ldap_connection, $res);
        for ($i = 0; $i < $hash[0][strtolower('kav4proxygroupsconf')]["count"]; $i++) {
            $array[$i] = $hash[0][strtolower('kav4proxygroupsconf')][$i];
        }
    }
    writelogs("Delete group number {$number}", __FUNCTION__, __FILE__);
    $upd["Kav4ProxyGroupsConf"] = $array[$number];
    $ldap->Ldap_del_mod($kav->dn, $upd);
    $kav = new kav4proxy();
    $kav->SaveToLdap();
}
开发者ID:brucewu16899,项目名称:artica,代码行数:18,代码来源:kav4proxy.index.php

示例10: DeleteGroupFromExtensionsRule

function DeleteGroupFromExtensionsRule()
{
    $ou = $_GET["ou"];
    $gid = $_GET["DeleteGroupFromExtensionsRule"];
    $ExtensionsRule = $_GET["ExtensionsRule"];
    $ldap = new clladp();
    $dn = "cn={$gid},ou={$ou},dc=organizations,{$ldap->suffix}";
    $upd["FiltersExtensionsGroupName"] = $ExtensionsRule;
    writelogs("Delete {$dn},FiltersExtensionsGroupName={$ExtensionsRule} in {$gid}");
    $ldap->Ldap_del_mod($dn, $upd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:11,代码来源:global-ext-filters.ou.php

示例11: DisableProfiles

function DisableProfiles(){
	$ldap=new clladp();
	$pattern="(&(objectclass=sambaSamAccount)(sambaProfilePath=*))";
	$attr=array("sambaProfilePath","uid","dn");
	$sr =@ldap_search($ldap->ldap_connection,$ldap->suffix,$pattern,$attr);
	$hash=ldap_get_entries($ldap->ldap_connection,$sr);
	for($i=0;$i<$hash["count"];$i++){
		$uid=$hash[$i][strtolower("uid")][0];
		$dn=$hash[$i][strtolower("dn")];
		$sambaProfilePath=$hash[$i][strtolower("sambaProfilePath")][0];
		$upd["sambaProfilePath"]=$sambaProfilePath;
		$ldap->Ldap_del_mod($dn,$upd);
		}
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:14,代码来源:exec.samba.php

示例12: SaveLdapUser

function SaveLdapUser()
{
    $ldap = new clladp();
    $dn = $_GET["dn"];
    unset($_GET["dn"]);
    unset($_GET["SaveLdapUser"]);
    $hash = $ldap->getobjectDNClass($dn, 1);
    if (!isset($hash["ArticaSettings"])) {
        $add_array["objectClass"][] = "ArticaSettings";
        $ldap->Ldap_add_mod($dn, $add_array);
    }
    if (trim($_GET["SenderCanonical"]) == null) {
        $hash = $ldap->UserDatas($_GET["uid"]);
        if ($hash['SenderCanonical'] != null) {
            writelogs("delete SenderCanonical:{$_GET["uid"]}=>{$hash['SenderCanonical']}", __FUNCTION__, __FILE__);
            $upd["SenderCanonical"][0] = $hash['SenderCanonical'];
            $ldap->Ldap_del_mod($dn, $upd);
        }
        unset($_GET["SenderCanonical"]);
    }
    while (list($num, $ligne) = each($_GET)) {
        if ($ligne == 'true') {
            $ligne = 'TRUE';
        }
        if ($ligne == 'false') {
            $ligne = 'FALSE';
        }
        if ($ligne != null) {
            $update_array[$num][] = $ligne;
        }
    }
    $ldap->Ldap_modify($dn, $update_array);
    if ($ldap->ldap_last_error != null) {
        echo $ldap->ldap_last_error;
    } else {
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body('{success}');
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:39,代码来源:domains.manage.users.index.php

示例13: aliase_delete

function aliase_delete()
{
    $ldap = new clladp();
    $hash = $ldap->UserDatas($_SESSION["uid"]);
    $updatearray["mailAlias"] = $_GET["delete-alias-delete"];
    if (!$ldap->Ldap_del_mod($hash["dn"], $updatearray)) {
        echo $ldap->ldap_last_error;
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:user.messaging.php

示例14: DeleteAliases

function DeleteAliases()
{
    $ldap = new clladp();
    $hash = $ldap->UserDatas($_GET["DeleteAliases"]);
    $updatearray["mailAlias"] = $_GET["aliase"];
    if (!$ldap->Ldap_del_mod($hash["dn"], $updatearray)) {
        echo $ldap->ldap_last_error;
    }
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?postfix-hash-tables=yes");
}
开发者ID:brucewu16899,项目名称:artica,代码行数:11,代码来源:domains.edit.user.php

示例15: DeleteRuleID

function DeleteRuleID()
{
    $ldap = new clladp();
    $ruleid = $_GET["DeleteRuleID"];
    $dn = "cn=inadyn,cn=artica,{$ldap->suffix}";
    $pattern = "(objectClass=*)";
    $attr = array("ArticaInadynRule");
    $sr = ldap_read($ldap->ldap_connection, $dn, $pattern, $attr);
    if ($sr) {
        $hash = ldap_get_entries($ldap->ldap_connection, $sr);
    }
    if (!is_array($hash)) {
        echo null;
        exit;
    }
    $upd["ArticaInadynRule"] = $hash[0][strtolower("ArticaInadynRule")][$ruleid];
    if (!$ldap->Ldap_del_mod($dn, $upd)) {
        echo $ldap->ldap_last_error;
    }
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body('{success}');
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:22,代码来源:system.nic.dynamicdns.php


注:本文中的clladp::Ldap_del_mod方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。