本文整理汇总了PHP中clladp::Hash_associated_domains方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::Hash_associated_domains方法的具体用法?PHP clladp::Hash_associated_domains怎么用?PHP clladp::Hash_associated_domains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clladp
的用法示例。
在下文中一共展示了clladp::Hash_associated_domains方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DOMAINSLIST_SEARCH
function DOMAINSLIST_SEARCH()
{
$ldap = new clladp();
$page = CurrentPageName();
$tpl = new templates();
$ou = $_GET["ou"];
include_once "ressources/class.amavis.inc";
$amavis = new amavis();
$amavis_oui = false;
$disclaimer = true;
$users = new usersMenus();
$users->LoadModulesEnabled();
if ($users->AMAVIS_INSTALLED) {
if ($users->EnableAmavisDaemon == 1) {
$amavis_oui = true;
}
}
$POSTFIX_INSTALLED = $users->POSTFIX_INSTALLED;
$sock = new sockets();
$disclaimer = IS_DISCLAIMER();
$HashDomains = $ldap->Hash_associated_domains($ou);
if ($GLOBALS["VERBOSE"]) {
echo count($HashDomains) . " domains for this ou = {$ou}\n";
}
$aliases = new AutoAliases($ou);
$search = string_to_regex($_POST["query"]);
$domainstyle = "font-size:16px";
if (isset($_GET["expand"])) {
$domainstyle = "font-size:18px";
}
$data = array();
$c = 0;
while (list($num, $ligne) = each($HashDomains)) {
if ($search != null) {
if (!preg_match("#{$search}#", $num)) {
continue;
}
}
$c++;
$autoalias = " ";
$disclaimer_domain = " ";
$amavis_infos = " ";
$amavis_duplicate = " ";
$js = "Loadjs('domains.relay.domains.php?domain={$num}&ou={$ou}&local=yes')";
$delete = imgtootltip("delete-24.png", '{label_delete_transport}', "DeleteInternetDomainInside('{$num}')");
if (strlen($aliases->DomainsArray[$num]) > 0) {
$autoalias = "<img src='img/20-check.png'>";
}
if ($amavis_oui) {
$amavis_infos = imgtootltip("24-parameters.png", "AS -> {$num}", "Loadjs('domains.amavis.php?domain={$num}')");
}
if ($amavis->copy_to_domain_array[strtolower($num)]["enable"] == 1) {
$amavis_duplicate = "<strong style='font-size:12px'>{$amavis->copy_to_domain_array[strtolower($num)]["duplicate_host"]}:{$amavis->copy_to_domain_array[strtolower($num)]["duplicate_port"]}";
}
if ($disclaimer) {
$disclaimer_domain = imgtootltip("24-parameters.png", "disclaimer -> {$num}", "Loadjs('domains.disclaimer.php?domain={$num}&ou={$ou}')");
}
$autoalias = $tpl->_ENGINE_parse_body($autoalias);
$data['rows'][] = array('id' => "dom-{$num}", 'cell' => array("\n\t\t<a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\" style='{$domainstyle};font-weight:bold;text-decoration:underline'>{$num}</span>", "<span style='font-size:14px'>{$autoalias}</span>", "<span style='font-size:14px'>{$amavis_infos}</span>", "<span style='font-size:14px'>{$disclaimer_domain}</span>", "<span style='font-size:14px'>{$amavis_duplicate}</span>", $delete));
}
if ($c == 0) {
json_error_show("No Internet domain...");
}
$data['page'] = 1;
$data['total'] = $c;
echo json_encode($data);
}
示例2: localdomain_search
function localdomain_search()
{
$users = new usersMenus();
$page = CurrentPageName();
$t = time();
$tpl = new templates();
$ldap = new clladp();
$are_you_sure_to_delete = $tpl->javascript_parse_text("{are_you_sure_to_delete}");
if ($users->AsPostfixAdministrator) {
$hash = $ldap->hash_get_all_local_domains();
} else {
$hash = $ldap->Hash_associated_domains($_SESSION["ou"]);
}
$search = string_to_flexregex("localdomain-search");
while (list($domain, $ligne) = each($hash)) {
$id = md5($domain);
$delete = imgsimple("delete-32.png", null, "DeleteLocalDomain{$t}('{$domain}','{$id}')");
if ($search != null) {
if (!preg_match("#{$search}#", $domain)) {
continue;
}
}
$tr[] = "\n\t\t<tr id='{$id}'>\n\t\t\t<td style='font-size:18px'><i class='icon-globe'></i> {$domain}</td>\n\t\t\t<td style='text-align:center'>{$delete}</td>\n\t\t</tr>";
}
echo $tpl->_ENGINE_parse_body("\n\t\n\t\t<table class='table table-bordered table-hover'>\n\t\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style='width:99%'>{domains}</th>\n\t\t\t\t\t<th> </th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t <tbody>\n\t\t\t") . @implode("\n", $tr) . " </tbody>\n\t\t\t\t</table>\n<script>\n\tvar xmem{$t}='';\n\tvar xDeleteLocalDomain{$t}= function (obj) {\t\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue); return;};\n\t\t\$('#'+xmem{$t}).remove();\n\t}\t\t\t\n\t\t\t\t\n\t\tfunction DeleteLocalDomain{$t}(domain,id){\n\t\t\txmem{$t}=id;\n\t\t\tif(confirm('{$are_you_sure_to_delete} '+domain)){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('localdomain-remove',domain);\n\t\t\t\tXHR.appendData('ou','{$_SESSION["ou"]}');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',xDeleteLocalDomain{$t});\t\n\t\t\t}\n\t\t}\n\t\t\t\t\n</script>";
}
示例3: organization_list
function organization_list()
{
$ldap = new clladp();
$tpl = new templates();
$tools = new DomainsTools();
$t = $_GET["t"];
$localdomains = $ldap->Hash_associated_domains();
$relaydomains = $ldap->Hash_relay_domains();
$sock = new sockets();
$PostfixLocalDomainToRemote = $sock->GET_INFO("PostfixLocalDomainToRemote");
if (!is_numeric($PostfixLocalDomainToRemote)) {
$PostfixLocalDomainToRemote = 0;
}
$PostfixLocalDomainToRemoteAddr = $sock->GET_INFO("PostfixLocalDomainToRemoteAddr");
$forwared = $tpl->_ENGINE_parse_body("{forwarded}");
while (list($domain, $ligne) = each($localdomains)) {
$array[$domain]["DELETE"] = "DeleteLocalDomain{$t}('{$domain}')";
$ou = $ldap->organization_name_from_localdomain($domain);
if ($ou == null) {
$ou = "{none}";
}
$array[$domain]["TEXT"] = "<span style='font-size:18px'>{localdomain}</span><br><span style='font-size:16px'>{organization}: <strong>{$ou}</strong>";
if ($PostfixLocalDomainToRemote == 1) {
$array[$domain]["TEXT"] = "<span style='font-size:18px'>{localdomain}</span><br><span style='font-size:16px'>{organization}: <strong>{$ou}</strong></span><br>{$forwared} -» smtp:{$PostfixLocalDomainToRemoteAddr} ";
}
}
while (list($domain, $ligne) = each($relaydomains)) {
$arr = $tools->transport_maps_explode($ligne);
$ou = $ldap->organization_name_from_transporttable($domain);
$array[$domain]["TEXT"] = "{$arr[1]}:{$arr[2]} ({$ou})";
$array[$domain]["OU"] = $ou;
$array[$domain]["DELETE"] = "DeleteTransportDomain{$t}('{$domain}')";
}
$data = array();
if ($_POST["query"] != null) {
$search = string_to_regex($_POST["query"]);
}
$c = 0;
if ($_POST["sortorder"] == "desc") {
krsort($array);
} else {
ksort($array);
}
while (list($domain, $ligne) = each($array)) {
if ($search != null) {
if (!preg_match("#{$search}#", $domain)) {
continue;
}
}
$c++;
$ligne["TEXT"] = $tpl->_ENGINE_parse_body($ligne["TEXT"]);
$domainenc = urlencode($domain);
$OuEnc = urlencode($ligne["OU"]);
$delete = imgsimple("delete-48.png", '{label_delete_transport}', $ligne["DELETE"]);
$m5 = md5($domain);
$js = "Loadjs('domains.relay.domains.php?domain={$domainenc}&ou={$OuEnc}')";
$data['rows'][] = array('id' => "dom{$m5}", 'cell' => array("\n\t\t<a href=\"javascript:blur();\" \n\t\t\tOnClick=\"javascript:{$js}\" \n\t\t\tstyle='font-size:24px;font-weight:bold;text-decoration:underline'>{$domain}</span>", "<span style='font-size:24px'>{$ligne["TEXT"]}</span>", "<center>{$delete}</center>"));
if ($c > $_POST["rp"]) {
break;
}
}
if ($c == 0) {
json_error_show("no data");
}
$data['page'] = 1;
$data['total'] = $c;
echo json_encode($data);
}
示例4: DOMAINSLIST
function DOMAINSLIST($ou)
{
$ldap = new clladp();
$tpl = new templates();
include_once "ressources/class.amavis.inc";
$amavis = new amavis();
$amavis_oui = false;
$disclaimer = true;
$users = new usersMenus();
$users->LoadModulesEnabled();
if ($users->AMAVIS_INSTALLED) {
if ($users->EnableAmavisDaemon == 1) {
$amavis_oui = true;
}
}
$POSTFIX_INSTALLED = $users->POSTFIX_INSTALLED;
$sock = new sockets();
$disclaimer = IS_DISCLAIMER();
$HashDomains = $ldap->Hash_associated_domains($ou);
$aliases = new AutoAliases($ou);
if (is_array($HashDomains)) {
$ul[] = "<ul id='domains-checklist'>";
while (list($num, $ligne) = each($HashDomains)) {
$ul[] = "<li class='domainsli' style='width:350px'>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td width=1% valign='top'>" . imgtootltip("domain-64.png", "{edit}", $js) . "</td>\n\t\t\t\t<td valign='top'>";
$js = "EditInfosLocalDomain('{$num}','{$ou}');";
$jstr = CellRollOver();
if (strlen($aliases->DomainsArray[$num]) > 0) {
$autoalias = "{yes}";
} else {
$autoalias = "{no}";
}
if ($amavis_oui) {
$amavis_infos = "\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend width=1% nowrap>{Anti-spam}:</td>\n\t\t\t\t<td>" . texttooltip("[{settings}]", "{Anti-spam}:{$num}", "Loadjs('domains.amavis.php?domain={$num}')", null, 0, "font-weight:bold;font-size:12px") . "</td>\n\t\t\t\t</tr>";
if ($amavis->copy_to_domain_array[strtolower($num)]["enable"] == 1) {
$amavis_duplicate = "\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend width=1% nowrap>{duplicate_domain}:</td>\n\t\t\t\t<td><strong style='font-size:12px'>{$amavis->copy_to_domain_array[strtolower($num)]["duplicate_host"]}:{$amavis->copy_to_domain_array[strtolower($num)]["duplicate_port"]}</td>\n\t\t\t\t</tr>";
}
}
if ($disclaimer) {
$disclaimer_domain = "\n\t\t\t\t<tr>\n\t\t\t\t<td class=legend width=1% nowrap>{disclaimer}:</td>\n\t\t\t\t<td>" . texttooltip("[{settings}]", "{disclaimer}:{$num}", "Loadjs('domains.disclaimer.php?domain={$num}&ou={$ou}')", null, 0, "font-weight:bold;font-size:12px") . "</td>\n\t\t\t\t</tr>";
}
$delete = "<tr>\n\t\t\t\t<td colspan=2 align='right'>" . imgtootltip("delete-24.png", '{label_delete_transport}', "DeleteInternetDomain('{$num}')") . "</td>\n\t\t\t</tr>";
if (!$POSTFIX_INSTALLED) {
$js = null;
}
$ul[] = "\n\t\t\t<table style='width:90%'>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><strong style='font-size:16px'>" . texttooltip($num, "{parameters}", $js, null, 0, "font-size:16px;color:#005447") . "</strong></td>\n\t\t\t\t\t\t<td>" . imgtootltip("delete-24.png", '{label_delete_transport}', "DeleteInternetDomain('{$num}')") . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t<tr>\n\t\t\t\t<td class=legend width=1% nowrap>{aliases}:</td>\n\t\t\t\t<td><strong>{$autoalias}</strong></td>\n\t\t\t</tr>\n\t\t\t{$amavis_infos}\n\t\t\t{$amavis_duplicate}\n\t\t\t{$disclaimer_domain}\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t";
$ul[] = "</li>";
}
}
$ul[] = "</ul>";
$html = @implode("\n", $ul);
return $tpl->_ENGINE_parse_body($html);
}