本文整理汇总了PHP中clladp::BuildOrganizationBranch方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::BuildOrganizationBranch方法的具体用法?PHP clladp::BuildOrganizationBranch怎么用?PHP clladp::BuildOrganizationBranch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clladp
的用法示例。
在下文中一共展示了clladp::BuildOrganizationBranch方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ORGANISATIONS_LIST
function ORGANISATIONS_LIST(){
$ldap=new clladp();
$page=CurrentPageName();
$hash=$ldap->hash_get_ou(true);
$users=new usersMenus();
$sock=new sockets();
$AllowInternetUsersCreateOrg=$sock->GET_INFO("AllowInternetUsersCreateOrg");
if(!is_array($hash)){return null;}
ksort($hash);
if(!$ldap->BuildOrganizationBranch()){
$error="<div style='float:left'>".Paragraphe("danger64.png","{GENERIC_LDAP_ERROR}",$ldap->ldap_last_error)."</div>";
}
$page=CurrentPageName();
if(isset($_GET["ajaxmenu"])){$header="
<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='{add_new_organisation_text}'>
<input type='hidden' name='ajaxmenu' id='ajaxmenu' value='yes'>";
}
$html="
$header
<div style='width:700px;height:550px'>$error";
if(isset($_GET["ajaxmenu"])){$ajax=true;}
$html=$html."<div style='float:left'>".butadm()."</div>";
while (list ($num, $ligne) = each ($hash) ){
$md=md5($ligne);
$uri="javascript:Loadjs('domains.manage.org.index.php?js=yes&ou=$ligne');";
if($ajax){
$uri="javascript:Loadjs('$page?LoadOrgPopup=$ligne');";
}
$img=$ldap->get_organization_picture($ligne,64);
$html=$html . "<div style='float:left'>" . Paragraphe($img,"{manage} $ligne","
<strong>$ligne:<br></strong>{manage_organisations_text}",$uri,null,220,100) . "</div>
";
}
if($AllowInternetUsersCreateOrg==1){
$sql="SELECT * FROM register_orgs WHERE sended=0 ORDER BY ou";
$q=new mysql();
$results=$q->QUERY_SQL($sql,"artica_backup");
if(!$q->ok){echo "<H2>$q->mysql_error</H2>";}
while($ligne=mysql_fetch_array($results,MYSQL_ASSOC)){
$uri="javascript:Loadjs('domains.organizations.parameters.php?ou-sql-js={$ligne["zmd5"]}')";
$name=$ligne["ou"];
$time=$ligne["register_date"];
$html=$html . "<div style='float:left'>" . Paragraphe("img/org-warning-64.png","$name","
<strong>$time:<br></strong>{waiting}",$uri,null,220,100) . "</div>
";
}
}
if($users->POSTFIX_INSTALLED){
$sendmail="<div style='float:left'>".Buildicon64('DEF_ICO_SENDTOALL',220,100)."</div>";
}
if(isset($_GET["ajaxmenu"])){
$html=$html."
<div style='float:left'>" .butadm()."</div>";
}
if($users->AsArticaAdministrator){
$parameters="<div style='float:left'>".Paragraphe("parameters2-64.png","{organizations_parameters}","
{organizations_parameters_text}","javascript:Loadjs('domains.organizations.parameters.php')",null,220,100)."</div>";
}
$ldap->ldap_close();
return "$parameters".$html."$sendmail</div>";
}
示例2: 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}')");
//.........这里部分代码省略.........
示例3: date
}
if (!$unix->IS_OPENLDAP_RUNNING()) {
echo "Starting......: " . date("H:i:s") . " Postfix openldap is not running, start it\n";
system("/etc/init.d/artica-postfix start ldap");
}
if (!$unix->IS_OPENLDAP_RUNNING()) {
echo "Starting......: " . date("H:i:s") . " Postfix openldap is not running, aborting\n";
die;
}
$ldap = new clladp();
if ($ldap->ldapFailed) {
echo "Starting......: " . date("H:i:s") . " Postfix openldap error, aborting\n";
die;
}
if (!$ldap->ExistsDN("dc=organizations,{$ldap->suffix}")) {
$ldap->BuildOrganizationBranch();
}
if (!$ldap->ExistsDN("dc=organizations,{$ldap->suffix}")) {
echo "Starting......: " . date("H:i:s") . " dc=organizations,{$ldap->suffix} Failed to create Branch\n";
echo "Starting......: " . date("H:i:s") . " dc=organizations,{$ldap->suffix} no such branch...\n";
echo "Starting......: " . date("H:i:s") . " Postfix openldap is not ready, aborting\n";
die;
}
echo "Starting......: " . date("H:i:s") . " Postfix openldap server success\n";
$q = new mysql();
if (!$q->test_mysql_connection()) {
echo "Starting......: " . date("H:i:s") . " Postfix mysql is not ready aborting...\n";
die;
}
echo "Starting......: " . date("H:i:s") . " Postfix mysql server success\n";
if ($argv[1] == '--notifs-templates-force') {
示例4: ORGANISATIONS_LIST
function ORGANISATIONS_LIST()
{
$ldap = new clladp();
$page = CurrentPageName();
$hash = $ldap->hash_get_ou(true);
$users = new usersMenus();
if (!is_array($hash)) {
return null;
}
ksort($hash);
if (!$ldap->BuildOrganizationBranch()) {
$error = "<div style='float:left'>" . Paragraphe("danger64.png", "{GENERIC_LDAP_ERROR}", $ldap->ldap_last_error) . "</div>";
}
$page = CurrentPageName();
if (isset($_GET["ajaxmenu"])) {
$header = "\n\t<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='{add_new_organisation_text}'>\n\t<input type='hidden' name='ajaxmenu' id='ajaxmenu' value='yes'>";
}
$html = "\n\t{$header}\n\t<div style='width:700px;height:300px'>{$error}";
if (isset($_GET["ajaxmenu"])) {
$ajax = true;
}
$html = $html . "<div style='float:left'>" . butadm() . "</div>";
while (list($num, $ligne) = each($hash)) {
$md = md5($ligne);
$uri = "javascript:Loadjs('domains.manage.org.index.php?js=yes&ou={$ligne}');";
if ($ajax) {
$uri = "javascript:Loadjs('{$page}?LoadOrgPopup={$ligne}');";
}
$img = $ldap->get_organization_picture($ligne, 64);
$html = $html . "<div style='float:left'>" . Paragraphe($img, "{manage} {$ligne}", "\n\t\t<strong>{$ligne}:<br></strong>{manage_organisations_text}", $uri, null, 220, 100) . "</div>\n\t\t";
}
if ($users->POSTFIX_INSTALLED) {
$sendmail = "<div style='float:left'>" . Buildicon64('DEF_ICO_SENDTOALL', 220, 100) . "</div>";
}
if (isset($_GET["ajaxmenu"])) {
$html = $html . "\n\t\t<div style='float:left'>" . butadm() . "</div>";
}
$ldap->ldap_close();
return $html . "{$sendmail}</div>";
}