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


PHP clladp::CountDeDomainsOU方法代码示例

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


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

示例1: ORGANISATIONS_LIST

function ORGANISATIONS_LIST()
{
    $tpl = new templates();
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        return ORGANISATIONS_LIST_ACTIVE_DIRECTORY();
    }
    include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
    $Mypage = CurrentPageName();
    $users = new usersMenus();
    $sock = new sockets();
    $ou_nozarafa_explain = $tpl->_ENGINE_parse_body("{ou_nozarafa_explain}");
    $t = $_GET["t"];
    $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
    if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
        $EnableManageUsersTroughActiveDirectory = 0;
    }
    $AllowInternetUsersCreateOrg = $sock->GET_INFO("AllowInternetUsersCreateOrg");
    if ($EnableManageUsersTroughActiveDirectory == 1) {
        $ldap = new ldapAD();
        $hash = $ldap->hash_get_ou(true);
    } else {
        $ldap = new clladp();
        $hash = $ldap->hash_get_ou(true);
    }
    if (!is_array($hash)) {
        json_error_show("No data...");
    }
    ksort($hash);
    if ($EnableManageUsersTroughActiveDirectory == 0) {
        if (!$ldap->BuildOrganizationBranch()) {
            json_error_show("{GENERIC_LDAP_ERROR}<br>{$ldap->ldap_last_error}");
        }
    }
    if ($_POST["query"] != null) {
        $search = $_POST["query"];
        $search = str_replace(".", "\\.", $search);
        $search = str_replace("*", ".*?", $search);
    }
    if (isset($_GET["ajaxmenu"])) {
        $ajax = true;
    }
    $pic = "32-environement.png";
    $style = "style='font-size:16px;'";
    $c = 0;
    $ldap2 = new clladp();
    if (count($hash) == 0) {
        json_error_show("no data");
    }
    while (list($num, $ligne) = each($hash)) {
        $ou = $ligne;
        $ou_encoded = base64_encode($ou);
        if (!preg_match("#{$search}#i", $ligne)) {
            writelogs("'{$ligne}' NO MATCH {$search}", __FUNCTION__, __FILE__, __LINE__);
            continue;
        }
        $md = md5(serialize($hash) . time());
        $md5S = $md;
        $uri = "javascript:Loadjs('domains.manage.org.index.php?js=yes&ou={$ligne}');";
        if ($ajax) {
            $uri = "javascript:Loadjs('{$Mypage}?LoadOrgPopup={$ligne}');";
        }
        $IsOUUnderActiveDirectory = $ldap2->IsOUUnderActiveDirectory($ou);
        $GroupsNB = 0;
        if ($EnableManageUsersTroughActiveDirectory == 0) {
            $img = $ldap->get_organization_picture($ligne, 32);
            writelogs("ldap->CountDeUSerOu({$ligne})", __FUNCTION__, __FILE__, __LINE__);
            $usersNB = $ldap->CountDeUSerOu($ligne);
            $usersNB = "{$usersNB}";
        } else {
            $img = $pic;
            if ($IsOUUnderActiveDirectory) {
                $ad = new external_ad_search();
                writelogs("ldap->CountDeUSerOu({$ligne})", __FUNCTION__, __FILE__, __LINE__);
                $usersNB = $ad->CountDeUSerOu($ligne);
            } else {
                writelogs("ldap->CountDeUSerOu({$ligne})", __FUNCTION__, __FILE__, __LINE__);
                $usersNB = $ldap->CountDeUSerOu($ligne);
                $usersNB = "{$usersNB}";
            }
        }
        $delete = imgtootltip("delete-32-grey.png", "<b>{delete_ou} {$ligne}</b><br><i>{delete_ou_text}</i>");
        if ($users->AsArticaAdministrator) {
            $delete = Paragraphe('64-cancel.png', "{delete_ou} {$ligne}", '{delete_ou_text}', "javascript:Loadjs('domains.delete.org.php?ou={$ligne}');", null, 210, 100, 0, true);
            $delete = imgsimple("delete-32.png", "<b>{delete_ou} {$ligne}</b><br><i>{delete_ou_text}</i>", "javascript:Loadjs('domains.delete.org.php?ou={$ligne}&t={$t}&id-table={$md5S}');");
        }
        $DomainsNB = $ldap->CountDeDomainsOU($ligne);
        if ($GroupsNB == 0) {
            if ($IsOUUnderActiveDirectory) {
                $ad = new external_ad_search();
                writelogs("->CountDeGroups({$ou})", __FUNCTION__, __FILE__, __LINE__);
                $GroupsNB = $ad->CountDeGroups($ou);
            } else {
                writelogs("->CountDeGroups({$ou})", __FUNCTION__, __FILE__, __LINE__);
                $GroupsNB = $ldap->CountDeGroups($ou);
            }
        }
        Paragraphe('folder-useradd-64.png', '{create_user}', '{create_user_text}', "javascript:Loadjs('domains.add.user.php?ou={$ou}')", null, 210, null, 0, true);
        Paragraphe('64-folder-group-add.png', '{create_user}', '{create_user_text}', "javascript:Loadjs('domains.add.user.php?ou={$ou}')", null, 210, null, 0, true);
        Paragraphe("64-folder-group-add.png", "{$ou}:{add_group}", "{add_a_new_group_in_this_org}:<b>{$ou}</b>", "javascript:Loadjs('domains.edit.group.php?popup-add-group=yes&ou={$ou}&t={$t}')");
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:domains.index.php

示例2: info_messaging

function info_messaging(){
	$ldap=new clladp();
	$users=new usersMenus();
	$usersNB=$ldap->CountDeDomainsOU($_SESSION["ou"]);
	$ouencoded=base64_encode($_SESSION["ou"]);
return "
	<table style='width:98%' class=form>
	<tr>
		<td valign='top' width=1%><img src='img/128-catch-all.png'></td>
		<td valign='top'><H3 style='font-weight:bold'>{messaging}: $usersNB {domains}</H3>
			<ul>
			<li><a href=\"javascript:blur()\" 
				OnClick=\"javascript:Loadjs('domains.edit.domains.php?js=yes&ou=$ouencoded&encoded=yes&in-front-ajax=yes');\" 
				style='font-size:13px;font-weight:normal'>{localdomains_text}</a>
			</li>
			</ul>	
			
		
		</td>
	</tr>
	</table>
	";	
	
	
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:25,代码来源:miniadm.index.php


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