本文整理汇总了PHP中clladp::AllDomains方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::AllDomains方法的具体用法?PHP clladp::AllDomains怎么用?PHP clladp::AllDomains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clladp
的用法示例。
在下文中一共展示了clladp::AllDomains方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: popup
function popup()
{
$ldap = new clladp();
$hash = $ldap->AllDomains();
$page = CurrentPageName();
$sock = new sockets();
$luser_relay = $sock->GET_INFO("luser_relay");
if (preg_match("#(.+?)@(.+)#", $luser_relay, $re)) {
$email = $re[1];
$domain = $re[2];
}
$html = "\n\t<div id='luser_relaydiv'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'><img src='img/unknown-user-90.png'></td>\n\t\t<td valign='top'>\n\t\t\t<div style='font-size:16px;padding:5px'>{postfix_unknown_users_tinytext}\n\t\t\t</div>\n\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:13px'>{email}:</td>\n\t\t\t\t\t<td width=1%>" . Field_text("luser_relay", $email, "font-size:13px;padding:3px;width:120px") . "</td>\n\t\t\t\t\t<td width=1%><strong style='font-size:13px'>@</td>\n\t\t\t\t\t<td width=1%>" . Field_array_Hash($hash, "luser_relay_domain", $domain, null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=4 align='right'>\n\t\t\t\t\t\t<hr>" . button("{apply}", "Saveluser_relayForm()") . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t\n\t<script>\n\t\n\tvar x_Saveluser_relayForm= function (obj) {\n\t\tvar results=trim(obj.responseText);\n\t\tif(results.length>0){alert(results);}\n\t\tYahooWinHide();\n\t}\t\n\t\n\tfunction Saveluser_relayForm(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('luser_relay',document.getElementById('luser_relay').value+'@'+document.getElementById('luser_relay_domain').value);\n\t\tdocument.getElementById('luser_relaydiv').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_Saveluser_relayForm);\n\t}\n\t\t\n\t\n\t</script>\t\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例2: popup
function popup()
{
$ldap = new clladp();
$hash = $ldap->AllDomains();
$page = CurrentPageName();
$sock = new sockets();
$PostfixPostmaster = $sock->GET_INFO("PostfixPostmaster");
if (preg_match("#(.+?)@(.+)#", $PostfixPostmaster, $re)) {
$email = $re[1];
$domain = $re[2];
}
$html = "\n\t<div id='postmasterdiv' style='width:80%;margin:30px' class=form>\n\t<center>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:26px' nowrap>" . texttooltip("{postmaster}", "{postmaster_text}") . ":</td>\n\t\t\t<td width=1%>" . Field_text("postmaster_email", $email, "font-size:26px;padding:3px;width:480px") . "</td>\n\t\t\t<td width=1%><strong style='font-size:26px'>@</td>\n\t\t\t<td width=1%>" . Field_array_Hash($hash, "postmaster_domain", $domain, null, null, 0, "font-size:26px;padding:3px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=4 align='right'>\n\t\t\t<hr>" . button("{apply}", "SavePostMasterForm()", 40) . "</td>\n\t\t</tr>\n\t</table>\n\t</center>\n\t</div>\n\t\n\t<script>\n\t\n\tvar x_SavePostMasterForm= function (obj) {\n\t\tvar results=trim(obj.responseText);\n\t\tif(results.length>0){alert(results);}\n\t}\t\n\t\n\tfunction SavePostMasterForm(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('postmaster',document.getElementById('postmaster_email').value+'@'+document.getElementById('postmaster_domain').value);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SavePostMasterForm);\n\t}\n\t\t\n\t\n\t</script>\t\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例3: page_localdomains_search
function page_localdomains_search()
{
$conf = new dnsmasq();
$tpl = new templates();
$page = CurrentPageName();
$Params = $conf->ARTICA_ARRAY["LOCALNET"];
if (count($Params) == 0) {
$ldap = new clladp();
$hash = $ldap->AllDomains();
$hash["localdomain"] = "localdomain";
$hash["localhost.localdomain"] = "localhost.localdomain";
while (list($key, $line) = each($hash)) {
$conf->ARTICA_ARRAY["LOCALNET"][$key] = 0;
}
$conf->SaveConf();
}
$data = array();
$data['page'] = 0;
$data['total'] = count($conf->ARTICA_ARRAY["LOCALNET"]);
$data['rows'] = array();
$search = null;
ksort($conf->ARTICA_ARRAY["LOCALNET"]);
$search = string_to_flexregex();
while (list($domain, $enabled) = each($conf->ARTICA_ARRAY["LOCALNET"])) {
if ($search != null) {
if (!preg_match("#{$search}#", $domain)) {
continue;
}
}
$domain_plus = null;
$md5 = md5($domain);
$enable = Field_checkbox($md5, 1, $enabled, "DnsMasqLocalDomainEnable('{$domain}','{$md5}')");
$delete = imgtootltip("delete-32.png", "{delete} {$domain}", "DnsMasqLocalDomainDelete('{$domain}')");
$color = "black";
if ($enabled == 0) {
$color = "#D0D0D0";
}
if (isset($conf->ARTICA_ARRAY["RRDNS"][$domain])) {
$domain_plus = " »»<i>{$conf->ARTICA_ARRAY["RRDNS"][$domain]}</i>";
}
$data['rows'][] = array('id' => $md5, 'cell' => array("<span style='font-size:22px;color:{$color}'>{$domain}{$domain_plus}</span>", $enable, $delete));
}
echo json_encode($data);
}
示例4: TESTKeyView
function TESTKeyView()
{
$unix = new unix();
$opendkim = $unix->find_program("opendkim-testkey");
$dig = $unix->find_program("dig");
$chmod = $unix->find_program("chmod");
if (!is_file($opendkim)) {
return;
}
$ldap = new clladp();
$domainsH = $ldap->AllDomains();
if (is_array($domainsH)) {
while (list($num, $DOMAIN) = each($domainsH)) {
unset($results);
shell_exec("{$chmod} -R 0770 /etc/mail/dkim/keys/{$DOMAIN}");
$results[] = "\n\n{$dig} TXT +short default._domainkey.{$DOMAIN} :\n-------------------------------\n";
exec("{$dig} TXT +short default._domainkey.{$DOMAIN} 2>&1", $results);
$results[] = "\n\n";
exec("{$opendkim} -d {$DOMAIN} -s default -k /etc/mail/dkim/keys/{$DOMAIN}/default 2>&1", $results);
$array[$DOMAIN] = @implode("\n", $results);
}
}
@file_put_contents("/etc/mail/dkim.domains.tests.key", base64_encode(serialize($array)));
}
示例5: page_localdomains_search
function page_localdomains_search()
{
$conf = new dnsmasq();
$tpl = new templates();
$page = CurrentPageName();
$Params = $conf->ARTICA_ARRAY["LOCALNET"];
if (count($Params) == 0) {
$ldap = new clladp();
$hash = $ldap->AllDomains();
$hash["localdomain"] = "localdomain";
$hash["localhost.localdomain"] = "localhost.localdomain";
while (list($key, $line) = each($hash)) {
$conf->ARTICA_ARRAY["LOCALNET"][$key] = 0;
}
$conf->SaveConf();
}
$data = array();
$data['page'] = 0;
$data['total'] = count($conf->ARTICA_ARRAY["LOCALNET"]);
$data['rows'] = array();
$search = null;
ksort($conf->ARTICA_ARRAY["LOCALNET"]);
if ($_POST["query"] != null) {
$_POST["query"] = "*" . $_POST["query"] . "*";
$_POST["query"] = str_replace("**", "*", $_POST["query"]);
$_POST["query"] = str_replace("**", "*", $_POST["query"]);
$_POST["query"] = str_replace("*", ".*?", $_POST["query"]);
$search = $_POST["query"];
}
while (list($domain, $enabled) = each($conf->ARTICA_ARRAY["LOCALNET"])) {
if ($search != null) {
if (!preg_match("#{$search}#", $domain)) {
continue;
}
}
$md5 = md5($domain);
$enable = Field_checkbox($md5, 1, $enabled, "DnsMasqLocalDomainEnable('{$domain}','{$md5}')");
$delete = imgtootltip("delete-24.png", "{delete} {$domain}", "DnsMasqLocalDomainDelete('{$domain}')");
$color = "black";
if ($enabled == 0) {
$color = "#D0D0D0";
}
writelogs("{$ligne["ID"]} => {$ligne["rulename"]}", __FUNCTION__, __FILE__, __LINE__);
$data['rows'][] = array('id' => $ligne['ID'], 'cell' => array("<span style='font-size:18px;color:{$color}'>{$domain}</span>", $enable, $delete));
}
echo json_encode($data);
}
示例6: main_cyrusconf
function main_cyrusconf()
{
$cyrus = new cyrus_conf();
$page = CurrentPageName();
$tpl = new templates();
$impad_form = "\n\t<table style='width:99%'>\n\t\n\t<tr>\n\t<td align='right' class=legend>{allowallsubscribe}:</stong></td>\n\t<td>" . Field_checkbox('allowallsubscribe', 1, $cyrus->impad_array["allowallsubscribe"]) . "</td>\n\t<td width=1%>" . help_icon("{allowallsubscribe_text}") . "</td>\n\t</tr>\n\n\t<tr>\n\t<td align='right' class=legend>{allowanonymouslogin}:</stong></td>\n\t<td>" . Field_checkbox('allowanonymouslogin', 1, $cyrus->impad_array["allowanonymouslogin"]) . "</td>\n\t<td width=1%>" . help_icon("{allowanonymouslogin_text}") . "</td>\n\t</tr>\t\t\n\t\n\t\n\t\n\t<tr>\n\t<td align='right' class=legend>{createonpost}:</stong></td>\n\t<td>" . Field_checkbox('createonpost', 1, $cyrus->impad_array["createonpost"]) . "</td>\n\t<td width=1%>" . help_icon("{createonpost_text}") . "</td>\n\t</tr>\t\t\n\t\n\t<tr>\n\t<td align='right' class=legend>{duplicatesuppression}:</stong></td>\n\t<td>" . Field_checkbox('duplicatesuppression', 1, $cyrus->impad_array["duplicatesuppression"]) . "</td>\n\t<td width=1%>" . help_icon("{duplicatesuppression_text}") . "</td>\n\t</tr>\t\n\t\n\t\n\t\n\t<tr>\n\t<td align='right' class=legend>{autocreateinboxfolders}:</stong></td>\n\t<td>" . Field_text("autocreateinboxfolders", $cyrus->impad_array["autocreateinboxfolders"], 'width:190px', null, null, null) . "</td>\n\t<td width=1%>" . help_icon("{autocreateinboxfolders_text}") . "</td>\n\t</tr>\t\t\n\t\n\t<tr>\n\t<td align='right' class=legend>{autocreatequota}:</stong></td>\n\t<td>" . Field_text("autocreatequota", $cyrus->impad_array["autocreatequota"], 'width:90px', null, null) . "</td>\n\t<td width=1%>" . help_icon("{autocreatequota_text}") . "</td>\n\t</tr>\t\n\t\t\n\t\n\t<tr>\n\t<td align='right' class=legend>{maxmessagesize}:</stong></td>\n\t<td>" . Field_text("maxmessagesize", $cyrus->impad_array["maxmessagesize"], 'width:90px', null, null) . "</td>\n\t<td width=1%>" . help_icon("{maxmessagesize_text}") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t<td align='right' class=legend>{popminpoll}:</stong></td>\n\t<td>" . Field_text("popminpoll", $cyrus->impad_array["popminpoll"], 'width:25px', null, null) . " mn</td>\n\t<td width=1%>" . help_icon("{popminpoll_text}") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t<td align='right' class=legend>{quotawarn}:</stong></td>\n\t<td>" . Field_text("quotawarn", $cyrus->impad_array["quotawarn"], 'width:25px', null, null) . " %</td>\n\t<td width=1%>" . help_icon("{quotawarn_text}") . "</td>\n\t</tr>\t\n\t\n\t<tr><td colspan=3 align='right'>\n\t<hr>\n\t " . button("{apply}", "CyrusMasterSaveConfig()") . "\n\t</td></tr>\n\t\n\t\n\t</table>\n\t</form>\n\t";
$ldap = new clladp();
$hash = $ldap->AllDomains();
$hash[null] = "None";
$defaultsDomain = Field_array_Hash($hash, 'defaultdomain', $cyrus->impad_array["defaultdomain"]);
$html = "\n\t<p class=caption>{services_settings_text}</p>\n\t<div style='width:100%;'>\n\t<div id='cyrusconf'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td valign='top' width=1%></td>\n\t\t\t<td valign='top'>\n\t\t<table style='width:99%'>\n\t\t<tr>\n\t\t\t<th>{service}</th>\n\t\t\t<th>{enable}</th>\n\t\t\t<th>{port}</th>\n\t\t\t<th>{maxchild}</th>\n\t\t\t<th> </th>\n\t\t</tr>\n\t\t<tr " . CellRollOver() . ">\n\t\t\t<td align='right' class=legend>IMAP:</stong></td>\n\t\t\t<td width=1%><img src='img/status_ok-grey.gif'></td>\n\t\t\t<td><input type='hidden' name='service_imap_listen' value='{$cyrus->main_array["CYRUS"]["service_imap_listen"]}'><strong>imap:143</strong></td>\n\t\t\t<td>" . Field_text("service_imap_maxchild", $cyrus->main_array["CYRUS"]["service_imap_maxchild"], 'width:80px') . "</td>\n\t\t\t<td width=1%>" . help_icon('{maxchild_text}') . "</td>\n\t\t</tr>\t\n\t\n\t\n\t<tr " . CellRollOver() . ">\n\t<td align='right' class=legend>IMAP SSL:</stong></td>\n\t<td width=1%>" . Field_checkbox("service_imapssl_enabed", 1, $cyrus->main_array["CYRUS"]["service_imapssl_enabed"]) . "</td>\n\t<td>" . Field_text("service_imapssl_listen", $cyrus->main_array["CYRUS"]["service_imapssl_listen"], 'width:150px') . "</td>\n\t<td>" . Field_text("service_imapssl_maxchild", $cyrus->main_array["CYRUS"]["service_imapssl_maxchild"], 'width:80px') . "</td>\n\t<td width=1%>" . help_icon('{howto_cyrus_service}') . "</td>\n\t</tr>\n\t\n\t<tr " . CellRollOver() . ">\n\t<td align='right' class=legend>POP3:</stong></td>\n\t<td width=1%>" . Field_checkbox("service_pop3_enabed", 1, $cyrus->main_array["CYRUS"]["service_pop3_enabed"]) . "</td>\n\t<td>" . Field_text("service_pop3_listen", $cyrus->main_array["CYRUS"]["service_pop3_listen"], 'width:150px') . "</td>\n\t<td>" . Field_text("service_pop3_maxchild", $cyrus->main_array["CYRUS"]["service_pop3_maxchild"], 'width:80px') . "</td>\n\t<td width=1%>" . help_icon('{howto_cyrus_service}') . "</td>\n\t</tr>\n\n\t\n\t<tr " . CellRollOver() . ">\n\t<td align='right' class=legend>POP3 SSL:</stong></td>\n\t<td width=1%>" . Field_checkbox("service_pop3ssl_enabed", 1, $cyrus->main_array["CYRUS"]["service_pop3ssl_enabed"]) . "</td>\n\t<td>" . Field_text("service_pop3ssl_listen", $cyrus->main_array["CYRUS"]["service_pop3ssl_listen"], 'width:150px') . "</td>\n\t<td>" . Field_text("service_pop3ssl_maxchild", $cyrus->main_array["CYRUS"]["service_pop3ssl_maxchild"], 'width:80px') . "</td>\n\t<td width=1%>" . help_icon('{howto_cyrus_service}') . "</td>\n\t</tr>\t\n\n\t<tr " . CellRollOver() . ">\n\t<td align='right' class=legend>NNTP:</stong></td>\n\t<td width=1%>" . Field_checkbox("service_nntpd_enabed", 1, $cyrus->main_array["CYRUS"]["service_nntpd_enabed"]) . "</td>\n\t<td>" . Field_text("service_nntpd_listen", $cyrus->main_array["CYRUS"]["service_nntpd_listen"], 'width:150px') . "</td>\n\t<td> </td>\n\t<td width=1%>" . help_icon('{howto_cyrus_service}') . "</td>\n\t</tr>\t\n\t\n\t<tr " . CellRollOver() . ">\n\t<td align='right' class=legend>NNTP SSL:</stong></td>\n\t<td width=1%>" . Field_checkbox("service_nntpds_enabed", 1, $cyrus->main_array["CYRUS"]["service_nntpds_enabed"]) . "</td>\n\t<td>" . Field_text("service_nntpds_listen", $cyrus->main_array["CYRUS"]["service_nntpds_listen"], 'width:150px') . "</td>\n\t<td> </td>\n\t<td width=1%>" . help_icon('{howto_cyrus_service}') . "</td>\n\t</tr>\t\n\t<tr " . CellRollOver() . ">\n\t<td align='right' class=legend>{defaultdomain}:</stong></td>\n\t<td width=1%></td>\n\t<td>{$defaultsDomain}</td>\n\t<td> </td>\n\t<td width=1%>" . help_icon('{defaultdomain_text}') . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td colspan=5 align='right'>\n\t\t<hr>\n\t\t " . button("{apply}", "CyrusMasterSaveConfig()") . "\n\t\t</td>\n\t</tr>\n\t</table>\n\t</form>\n\t</div>\n\t</td>\n\t</tr>\n\t</table>\n\t{$impad_form}\n\t\n\t\n\t</div>\n\t</div>\n\t<script>\n\t\nvar x_CyrusMasterSaveConfig= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\tRefreshTab('main_config_cyrus');\n}\n\n\nfunction CyrusMasterSaveConfig(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('allowallsubscribe').checked){XHR.appendData('allowallsubscribe',1);}else{XHR.appendData('allowallsubscribe',0);}\n\tif(document.getElementById('allowanonymouslogin').checked){XHR.appendData('allowanonymouslogin',1);}else{XHR.appendData('allowanonymouslogin',0);}\n\tif(document.getElementById('createonpost').checked){XHR.appendData('createonpost',1);}else{XHR.appendData('createonpost',0);}\n\tif(document.getElementById('duplicatesuppression').checked){XHR.appendData('duplicatesuppression',1);}else{XHR.appendData('duplicatesuppression',0);}\n\t\n\tif(document.getElementById('service_imapssl_enabed').checked){XHR.appendData('service_imapssl_enabed',1);}else{XHR.appendData('service_imapssl_enabed',0);}\n\tif(document.getElementById('service_pop3_enabed').checked){XHR.appendData('service_pop3_enabed',1);}else{XHR.appendData('service_pop3_enabed',0);}\n\tif(document.getElementById('service_pop3ssl_enabed').checked){XHR.appendData('service_pop3ssl_enabed',1);}else{XHR.appendData('service_pop3ssl_enabed',0);}\n\tif(document.getElementById('service_nntpd_enabed').checked){XHR.appendData('service_nntpd_enabed',1);}else{XHR.appendData('service_nntpd_enabed',0);}\n\tif(document.getElementById('service_nntpds_enabed').checked){XHR.appendData('service_nntpds_enabed',1);}else{XHR.appendData('service_nntpds_enabed',0);}\n\t\n\tXHR.appendData('autocreateinboxfolders',document.getElementById('autocreateinboxfolders').value);\n\tXHR.appendData('autocreatequota',document.getElementById('autocreatequota').value);\n\tXHR.appendData('maxmessagesize',document.getElementById('maxmessagesize').value);\n\tXHR.appendData('popminpoll',document.getElementById('popminpoll').value);\n\tXHR.appendData('quotawarn',document.getElementById('quotawarn').value);\n\tXHR.appendData('service_imap_maxchild',document.getElementById('service_imap_maxchild').value);\n\tXHR.appendData('service_imapssl_listen',document.getElementById('service_imapssl_listen').value);\n\tXHR.appendData('service_imapssl_maxchild',document.getElementById('service_imapssl_maxchild').value);\n\tXHR.appendData('service_pop3_listen',document.getElementById('service_pop3_listen').value);\n\tXHR.appendData('service_pop3_maxchild',document.getElementById('service_pop3_maxchild').value);\n\tXHR.appendData('service_pop3ssl_listen',document.getElementById('service_pop3ssl_listen').value);\n\tXHR.appendData('service_pop3ssl_maxchild',document.getElementById('service_pop3ssl_maxchild').value);\n\tXHR.appendData('service_nntpd_listen',document.getElementById('service_nntpd_listen').value);\n\tXHR.appendData('service_nntpds_listen',document.getElementById('service_nntpds_listen').value);\n\tdocument.getElementById('cyrusconf').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n\t\n\t\n\tXHR.sendAndLoad('{$page}', 'GET',x_CyrusMasterSaveConfig);\n\t\n\t}\t\n\t\n\t</script>\n\t";
return $tpl->_ENGINE_parse_body($html);
}