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


PHP clladp::getobjectDNClass方法代码示例

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


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

示例1: SaveLdapUser

function SaveLdapUser()
{
    $ldap = new clladp();
    $dn = $_GET["dn"];
    unset($_GET["dn"]);
    unset($_GET["ou"]);
    unset($_GET["SaveLdapUser"]);
    $users = new usersMenus();
    $user = new user($_GET["uid"]);
    $uid = $user->uid;
    if ($uid == null) {
        $uid = $user->_GetuidFromDn($dn);
    }
    $user = new user($uid);
    writelogs("UID={$uid},DN={$dn}", __FUNCTION__, __FILE__, __LINE__);
    if (isset($_GET["SimpleGroupWareActive"])) {
        writelogs("[{$uid}]:: SimpleGroupWareActive={$_GET["SimpleGroupWareActive"]}", __FUNCTION__, __FILE__, __LINE__);
        $SimpleGroupWareActive = $_GET["SimpleGroupWareActive"];
        unset($_GET["SimpleGroupWareActive"]);
    }
    $smtp_sender_dependent_authentication_password = $_GET["smtp_sender_dependent_authentication_password"];
    $smtp_sender_dependent_authentication_username = $_GET["smtp_sender_dependent_authentication_username"];
    unset($_GET["smtp_sender_dependent_authentication_password"]);
    unset($_GET["smtp_sender_dependent_authentication_username"]);
    if ($user->SenderCanonical != null) {
        if ($smtp_sender_dependent_authentication_password != null) {
            if ($smtp_sender_dependent_authentication_username != null) {
                $sasl = new smtp_sasl_password_maps();
                $sasl->add($user->SenderCanonical, $smtp_sender_dependent_authentication_username, $smtp_sender_dependent_authentication_password);
            }
        }
    }
    $hash = $ldap->getobjectDNClass($dn, 1);
    writelogs("[{$_GET["uid"]}]:: Save object user email address is {$_GET["mail"]}", __FUNCTION__, __FILE__, __LINE__);
    unset($_GET["user_domain"]);
    unset($_GET["SenderCanonical"]);
    unset($_GET["SaveSenderCanonical"]);
    $tpl = new templates();
    while (list($num, $ligne) = each($_GET)) {
        if ($ligne == 'true') {
            $ligne = 'TRUE';
        }
        if ($ligne == 'false') {
            $ligne = 'FALSE';
        }
        if ($ligne != null) {
            writelogs("[{$_GET["uid"]}]:: Save object user->{$num}={$ligne}", __FUNCTION__, __FILE__, __LINE__);
            $user->{$num} = $ligne;
        }
    }
    $user->FinalDateToLive = $_GET["FinalDateToLive"];
    $user->DotClearUserEnabled = $_GET["DotClearUserEnabled"];
    if ($user->add_user()) {
        if (is_numeric($SimpleGroupWareActive)) {
            $users = new usersMenus();
            if ($users->SIMPLE_GROUPEWARE_INSTALLED) {
                include_once "ressources/class.mysql.inc";
                $sql = new mysql();
                $sql->SET_SIMPLE_GROUPWARE_ACTIVE($user->uid, $SimpleGroupWareActive);
            }
        } else {
            writelogs("[{$user->uid}]:: warning \"{$SimpleGroupWareActive}\" is not numeric for SimpleGroupWareActive", __FUNCTION__, __FILE__, __LINE__);
        }
        echo html_entity_decode($tpl->_ENGINE_parse_body("{apply} {$uid}:{success}\n"));
    } else {
        echo "ERROR {$user->ldap_error}";
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:68,代码来源:domains.edit.user.php

示例2: saveDatas

function saveDatas()
{
    $gidNumber = $_GET["GidNumber"];
    unset($_GET["GidNumber"]);
    $ldap = new clladp();
    $mailAliases = $ldap->GroupMailAliases($gidNumber);
    if (is_array($mailAliases)) {
        $recipients = implode(',', $mailAliases);
        $recipients = "Recipients={$recipients}\n";
    }
    while (list($num, $ligne) = each($_GET)) {
        $ini = $ini . "{$num}={$ligne}\n";
    }
    $ini = "[smtpscan.group:{$gidNumber}]\n{$recipients}{$ini}";
    $Hash = $ldap->GroupAllDatas($gidNumber);
    $updatearray["KasperkyAVScanningDatas"][0] = $ini;
    writelogs('Save Kaspersky settings in ' . $Hash["dn"], __FUNCTION__, __FILE__);
    $Classes = $ldap->getobjectDNClass($Hash["dn"], 1);
    if (!is_array_key('ArticaSettings', $Classes)) {
        $array_class["objectClass"][] = "ArticaSettings";
        writelogs('Add ArticaSettings objectClass to group', __FUNCTION__, __FILE__);
        $ldap->Ldap_add_mod($Hash["dn"], $array_class);
    }
    if (!is_array_key("KasperkyAVScanningDatas", $Hash)) {
        writelogs('Add KasperkyAVScanningDatas object to group ' . $gidNumber, __FUNCTION__, __FILE__);
        $ldap->Ldap_add_mod($Hash["dn"], $updatearray);
        if ($ldap->ldap_last_error != null) {
            echo $ldap->ldap_last_error;
            exit;
        }
    } else {
        $ldap->Ldap_modify($Hash["dn"], $updatearray);
        writelogs('Modify KasperkyAVScanningDatas object to group ' . $gidNumber, __FUNCTION__, __FILE__);
        if ($ldap->ldap_last_error != null) {
            echo $ldap->ldap_last_error;
            exit;
        }
    }
    $kav = new kav4mailservers();
    $kav->Save();
    echo "OK";
}
开发者ID:brucewu16899,项目名称:artica,代码行数:42,代码来源:users.kav.php

示例3: 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

示例4: AddWhiteAndRelease

function AddWhiteAndRelease()
{
    $email_from = $_GET["AddWhiteAndRelease"];
    $ldap = new clladp();
    $hash = $ldap->UserDatas($_SESSION["uid"]);
    $hashObj = $ldap->getobjectDNClass($hash["dn"], 1);
    if (!isset($hashObj["ArticaSettings"])) {
        $add_array["objectClass"][] = "ArticaSettings";
        $ldap->Ldap_add_mod($hash["dn"], $add_array);
    }
    $update_array["KasperkyASDatasAllow"][] = $email_from;
    $ldap->Ldap_add_mod($hash["dn"], $update_array);
    if ($ldap->ldap_last_error != null) {
        echo nl2br($ldap->ldap_last_error);
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:16,代码来源:user.quarantine.query.php


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