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


PHP clladp::GroupDatas方法代码示例

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


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

示例1: Tree_group_delete

function Tree_group_delete()
{
    $gid = $_GET["Tree_group_delete"];
    $ldap = new clladp();
    $hash = $ldap->GroupDatas($gid);
    $ldap->ldap_delete($hash["dn"]);
    $pages = new HtmlPages();
    echo $pages->PageOu($hash["dn_ou"]);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:domains.php

示例2: DeleteGroup

function DeleteGroup()
{
    if (isset($_GET["DeleteGroup"])) {
        $gpid = $_GET["DeleteGroup"];
    }
    if (isset($_GET["delgroup"])) {
        $gpid = $_GET["delgroup"];
    }
    $ou = $_GET["ou"];
    $ldap = new clladp();
    $tpl = new templates();
    $classGroup = new groups($gpid);
    $hashgroup = $ldap->GroupDatas($gpid);
    $default_dn_nogroup = "cn=nogroup,ou=groups,ou={$ou},dc=organizations,{$ldap->suffix}";
    if (!$ldap->ExistsDN($default_dn_nogroup)) {
        $ldap->AddGroup("nogroup", $ou);
    }
    $nogroup_id = $ldap->GroupIDFromName($ou, "nogroup");
    if (is_array($hashgroup["members"])) {
        while (list($num, $val) = each($hashgroup["members"])) {
            $ldap->AddUserToGroup($nogroup_id, $num);
        }
    }
    $users = new usersMenus();
    if ($users->KAV_MILTER_INSTALLED) {
        $sock = new sockets();
        $sock->getfile("KavMilterDeleteRule:{$classGroup->groupName}.{$classGroup->ou}");
    }
    $kas_dn = "cn={$gpid},cn=kaspersky Antispam 3 rules,cn=artica,{$ldap->suffix}";
    if ($ldap->ExistsDN($kas_dn)) {
        $ldap->ldap_delete($kas_dn, false);
    }
    $ldap->ldap_delete($hashgroup["dn"], false);
    if ($ldap->ldap_last_error != null) {
        echo $ldap->ldap_last_error;
    } else {
        echo $tpl->_ENGINE_parse_body('{success}');
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:39,代码来源:domains.edit.group.php

示例3: DeleteUserGroup

function DeleteUserGroup()
{
    $usr = new usersMenus();
    $tpl = new templates();
    if ($usr->AllowAddGroup == false) {
        echo $tpl->_ENGINE_parse_body('{no_privileges}');
        exit;
    }
    $ldap = new clladp();
    $group_datas = $ldap->GroupDatas($_GET["DeleteUserGroup"]);
    unset($group_datas["members"][$_GET["user"]]);
    while (list($num, $ligne) = each($group_datas["members"])) {
        $update_array["memberUid"][] = $num;
    }
    $ldap->Ldap_modify($group_datas["dn"], $update_array);
    if ($ldap->ldap_last_error != null) {
        echo $ldap->ldap_last_error;
    }
    $_GET["LoadUsersTab"] = 3;
    echo Main_page_user($_GET["user"]);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:21,代码来源:domains.manage.users.index.php

示例4: LoadMembers

function LoadMembers()
{
    $gid = $_GET["LoadMembers"];
    $ldap = new clladp();
    $hash = $ldap->GroupDatas($gid);
    if (!is_array($hash["members"])) {
        return null;
    }
    $html = "\n\t\n\t<table style='width:400px;margin-left:10px'>";
    while (list($num, $ligne) = each($hash["members"])) {
        $arr = $ldap->UserDatas($num);
        $mail = $arr["mail"];
        $domain = $arr["domainName"];
        $html = $html . "\n\t\t<tr>\n\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td><a href=\"javascript:LoadUsersDatas('{$num}');\">{$ligne}</a></td>\n\t\t<td>{$mail}</td>\n\t\t<td>{$domain}</td>\n\t\t<td>" . imgtootltip('x.gif', '{delete}', "javascript:DeleteMember('{$num}','{$gid}')") . "</td>\n\t\t</tr>";
    }
    $html = $html . "</table>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:19,代码来源:domains.manage.org.index.php

示例5: BuildLevel3

function BuildLevel3($gid)
{
    $ldap = new clladp();
    $hash = $ldap->GroupDatas($gid);
    $pages = new HtmlPages();
    $hash = $hash["members"];
    $items = $items . "{\n";
    $items = $items . "\t\t\t'id' : 'kav:{$gid}',\n";
    $items = $items . "\t\t\t'txt' : 'Email Antivirus',\n";
    $items = $items . "\t\t'onclick' : TreeKavSelect,\n";
    $items = $items . "\t\t'draggable' : false,\n";
    $items = $items . "\t\t\t'editable' : false,\n";
    $items = $items . "\t\t\t'img' : 'k.gif'\n";
    $items = $items . "\t\t\t},";
    if ($pages->kas_installed == true) {
        $items = $items . "{\n";
        $items = $items . "\t\t\t'id' : 'kas:{$gid}',\n";
        $items = $items . "\t\t\t'txt' : 'Email Anti-spam',\n";
        $items = $items . "\t\t'onclick' : TreeKasSelect,\n";
        $items = $items . "\t\t'draggable' : false,\n";
        $items = $items . "\t\t\t'editable' : false,\n";
        $items = $items . "\t\t\t'img' : 'k.gif'\n";
        $items = $items . "\t\t\t},";
    }
    if (is_array($hash)) {
        while (list($num, $ligne) = each($hash)) {
            $ligne = str_replace("'", "`", $ligne);
            $num = str_replace("'", "\\'", $num);
            if ($ligne == null) {
                $ligne = 'unknown';
            }
            $items = $items . "{\n";
            $items = $items . "\t\t\t'id' : 'user:{$num}',\n";
            $items = $items . "\t\t\t'txt' : '{$ligne}',\n";
            $items = $items . "\t\t'openlink' : 'ldapTree.php',\n";
            $items = $items . "\t\t'draggable' : true,\n";
            $items = $items . "\t\t\t'img' : 'outicon_1002.gif'\n";
            $items = $items . "\t\t\t},";
        }
    }
    if ($items[strlen($items) - 1] == ',') {
        $items = substr($items, 0, strlen($items) - 1);
    }
    return $items;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:45,代码来源:ldapTree.php

示例6: SaveActionsRules

function SaveActionsRules()
{
    $gidNumber = $_GET["gidnumber"];
    unset($_GET["gidnumber"]);
    $ldap = new clladp();
    $tpl = new templates();
    $HashGroup = $ldap->GroupDatas($gidNumber);
    $DN = $HashGroup["dn"];
    $HashGroup["KasperskyASGroupNumber"] = $gidNumber;
    $tpl = new templates();
    $kas = new kas_groups();
    $SettingsDatas = $kas->SaveArrayRules();
    $FileToSave = $kas->BuildRulesFile($HashGroup, $SettingsDatas);
    if (!is_array_key('KasperkyASDatasRules', $HashGroup)) {
        $hash_add_array2["KasperkyASDatasRules"] = $FileToSave;
        $ldap->Ldap_add_mod($DN, $hash_add_array2);
        if ($ldap->ldap_last_error != null) {
            echo '{SaveActionsRules} -> add Mod:' . $ldap->ldap_last_error;
        }
    }
    $error = $ldap->ldap_last_error;
    $hash_update_array["KasperkyASDatasRules"] = $FileToSave;
    $ldap->Ldap_modify($DN, $hash_update_array);
    $error = $error . " " . $ldap->ldap_last_error;
    $kas = new kas_groups($FileToSave);
    $kas->PrepareFiles($gidNumber);
    if (strlen($error) < 5) {
        $error = "{success} {group rules}";
    }
    echo $tpl->_ENGINE_parse_body($error);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:users.kas.php

示例7: FilterByName_load

function FilterByName_load($return = 0)
{
    if (preg_match('#kav:([0-9]+)#', $_GET["TreeKasSelect"], $reg)) {
        $gidNumber = $reg[1];
    }
    $ldap = new clladp();
    $HashGroup = $ldap->GroupDatas($gidNumber);
    $kav4mailservers = new kav4mailservers(1, $HashGroup["KasperkyAVScanningDatas"]);
    $hashKAV = $kav4mailservers->array_conf["smtpscan.group:{$gidNumber}"];
    $html = "<table style='width:30%' align='center'>";
    $tbl = explode(',', $hashKAV["FilterByName"]);
    if (is_array($tbl)) {
        while (list($num, $ligne) = each($tbl)) {
            if ($ligne != null) {
                if ($class == 'rowA') {
                    $class = "rowB";
                } else {
                    $class = "rowA";
                }
                $html = $html . "<tr>\n\t\t\t\t<td width=1% valign=middle>" . get_img_ext($ligne) . "</td>\n\t\t\t\t<td valign=middle>{$ligne}</td>\n\t\t\t\t<td valign=middle width=1%><a href=\"javascript:FilterByName_delete({$num});\"><img src='img/x.gif'></a></td>\n\t\t\t\t</tr>";
            }
        }
        $html = $html . "</table>";
        if ($return == 0) {
            echo $html;
            exit;
        }
        return $html;
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:30,代码来源:users.kav.php

示例8: UpdateGroup

function UpdateGroup($gid)
{
    $newcn = $_GET["EditBranchValue"];
    $newcn = replace_accents($newcn);
    $ldap = new clladp();
    $hash = $ldap->GroupDatas($gid);
    $dn = $hash["dn"];
    if (preg_match('#cn=([a-zA-Z0-9\\.\\-_\\(\\)\\s]+)#', $dn, $reg)) {
        $oldcn = $reg[1];
        if ($oldcn != $newcn) {
            $ldap->ldap_group_rename($dn, "cn={$newcn}");
            if ($ldap->ldap_last_error != null) {
                echo "!Error";
            } else {
                echo $newcn;
            }
        } else {
            echo $newcn;
            return null;
        }
    } else {
        echo "!Error";
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:24,代码来源:tree.functions.php

示例9: GroupUserDelete

function GroupUserDelete()
{
    $gid = $_GET["GroupUserDelete"];
    $ldap = new clladp();
    $hash = $ldap->GroupDatas($gid);
    $hash["members"];
    unset($hash["members"][$_GET["userid"]]);
    while (list($num, $ligne) = each($hash["members"])) {
        $update_array["memberUid"][] = $num;
    }
    $ldap->Ldap_modify($hash["dn"], $update_array);
    if ($ldap->ldap_last_error == null) {
        $ldap->ldap_last_error = "{success}";
    }
    $tpl = new templates();
    echo "success";
    exit;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:18,代码来源:group.edit.php


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