本文整理汇总了PHP中clladp::hash_get_relay_domains方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::hash_get_relay_domains方法的具体用法?PHP clladp::hash_get_relay_domains怎么用?PHP clladp::hash_get_relay_domains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clladp
的用法示例。
在下文中一共展示了clladp::hash_get_relay_domains方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: restrict_relay_domains
function restrict_relay_domains()
{
@file_put_contents("/etc/postfix/relay_domains_restricted", "\n");
$ldap = new clladp();
$q = new mysql();
$f = array();
$relaysdomains = $ldap->hash_get_relay_domains();
$main = new maincf_multi("master", "master");
$relay_domains_restricted = $main->relay_domains_restricted();
echo "Starting......: " . date("H:i:s") . " Postfix " . count($relay_domains_restricted) . " restricted defined domains\n";
if (count($relaysdomains) > 0) {
while (list($domain, $ligne) = each($relaysdomains)) {
if (preg_match("#^@(.+)#", $domain, $re)) {
$domain = $re[1];
}
if (!isset($relay_domains_restricted[$domain])) {
continue;
}
$f[] = "{$domain}\tartica_restrict_relay_domains";
echo "Starting......: " . date("H:i:s") . " Postfix `{$domain}` will be restricted\n";
}
}
echo "Starting......: " . date("H:i:s") . " Postfix " . count($f) . " restricted relayed domains\n";
@file_put_contents("/etc/postfix/relay_domains_restricted", implode("\n", $f));
shell_exec("{$GLOBALS["postmap"]} hash:/etc/postfix/relay_domains_restricted >/dev/null 2>&1");
}
示例2: RelayDomainsTable
function RelayDomainsTable($echo=0){
$ldap=new clladp();
$hash=$ldap->hash_get_relay_domains();
//$add_routing_relay_domain_rule=Paragraphe("routing-domain-relay.png","{add_routing_relay_domain_rule}","{add_routing_relay_domain_rule}","PostfixAddRelayTable()");
$html="
<div style='text-align:right;margin:5px;margin-top:0px'>". button("{add_routing_relay_domain_rule}","PostfixAddRelayTable()")."</div>
<table style='width:99%;padding:5px;border:2px solid #8E8785;' align='center' class=table_form>
<tr style='background-color:#CCCCCC'>
<th style='font-size:12px'> </th>
<th style='font-size:12px'><strong>{domain}</strong></th>
<th style='font-size:12px'><strong> </strong></th>
<th align='center' style='font-size:12px'><strong>-</strong></th>
<th style='font-size:12px'><strong>-</strong></td>
<th align='center' style='font-size:12px'><strong>-</strong></th>
<th align='center' style='font-size:12px'><strong-</strong></th>
<th style='font-size:12px'> </th>
</tr>";
if(is_array($hash)){
while (list ($domain, $ligne) = each ($hash) ){
$delete=imgtootltip("ed_delete.gif",'{delete}',"PostfixDeleteRelayDomain('$domain')");
if($domain=="localhost.localdomain"){$delete=" ";}
$html=$html . "<tr>
<td width=1%><img src='img/internet.png'></td>
<td style='font-size:13px'><code>$domain</a></strong></code></td>
<td width=1%><img src='img/fw_bold.gif'></td>
<td align='center' style='font-size:12px'>{relay}</td>
<td ><code></td>
<td align='center' style='font-size:12px'><code></code></td>
<td align='center' style='font-size:12px'><code></code></td>
<td align='center' style='font-size:12px' width=1%>$delete</td>
</tr>";
}
}
$html=$html . "</table>";
$html=RoundedLightWhite("<div style='width:99%;height:350px;overflow:auto' id='routing-table'>$html</div>");
$tpl=new templates();
if($echo==1){echo $tpl->_ENGINE_parse_body($html);exit;}
return $tpl->_ENGINE_parse_body($html);
}