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


PHP clladp::hash_get_relay_recipients方法代码示例

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


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

示例1: RelayRecipientsTable

function RelayRecipientsTable($echo=0){
	
	
$html="
<div style='text-align:right;margin:5px;margin-top:0px'>". button("{add_routing_relay_recipient_rule}","PostfixAddRelayRecipientTable()")."</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'>&nbsp;</th>
		<th style='font-size:12px'><strong>{recipient}</strong></th>
		<th style='font-size:12px'><strong>&nbsp;</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'>&nbsp;</th>
	</tr>";	
	$ldap=new clladp();
	$hash=$ldap->hash_get_relay_recipients();	
if(is_array($hash)){
while (list ($domain, $ligne) = each ($hash) ){
		$delete=imgtootltip("delete-24.png",'{delete}',"PostfixDeleteRelayRecipient('$domain')");
		if($domain=="@localhost.localdomain"){$delete=null;}
		$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:13px'><code></code></td>
		<td align='center' style='font-size:13px'><code></code></td>
		<td align='center' style='font-size:13px' width=1%>$delete</td>
		</tr>";
	}
}
$html=$html . "</table>";
$html="<div style='width:99%;height:350px;overflow:auto' id='routing-table'>$html</div>".ArticaSyncTable($echo);

$tpl=new templates();
if($echo==1){echo $tpl->_ENGINE_parse_body($html);exit;}
return $tpl->_ENGINE_parse_body($html);
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:42,代码来源:postfix.routing.table.php

示例2: ArticaSyncTable_list

function ArticaSyncTable_list($echo = 0)
{
    $page = CurrentPageName();
    $ldap = new clladp();
    if ($_POST["query"] != null) {
        $searchZ = str_replace("*", ".*?", $_POST["query"]);
    }
    $ttime = $_GET["t"];
    $dn = "cn=artica_smtp_sync,cn=artica,{$ldap->suffix}";
    $filter = array("cn");
    $sr = @ldap_search($ldap->ldap_connection, $dn, '(&(objectclass=ArticaSMTPSyncDB)(cn=*))', $filter);
    if ($sr) {
        $hash = ldap_get_entries($ldap->ldap_connection, $sr);
        if (!is_array($hash)) {
            return null;
        }
        for ($i = 0; $i < $hash["count"]; $i++) {
            $cn = $hash[$i]["cn"][0];
            if (preg_match("#(.+?):(.+)#", $cn, $re)) {
                $mailserver = $re[1];
            }
            $cn_dn = "cn=table,cn={$cn},cn=artica_smtp_sync,cn=artica,{$ldap->suffix}";
            $search = @ldap_search($ldap->ldap_connection, $dn, '(&(objectclass=InternalRecipients)(cn=*))', array("cn"));
            if ($search) {
                $hash2 = ldap_get_entries($ldap->ldap_connection, $search);
                for ($t = 0; $t < $hash2["count"]; $t++) {
                    $cn_email = $hash2[$t]["cn"][0];
                    $dn = base64_encode($hash2[$t]["dn"]);
                    if ($searchZ != null) {
                        if (!preg_match("#{$searchZ}#", $cn_email)) {
                            continue;
                        }
                    }
                    $m5 = md5($cn_email);
                    $data['rows'][] = array('id' => "dom{$m5}", 'cell' => array("\n\t\t\t\t\t<a href=\"javascript:blur();\" \n\t\t\t\t\t\tOnClick=\"\" \n\t\t\t\t\t\tstyle='font-size:16px;font-weight:bold;text-decoration:'>{$cn_email}</span>", "<span style='font-size:14px'>{$mailserver}:25</span>", imgtootltip('delete-32.png', '{delete}', "ArticaSyncTableDelete{$ttime}('{$dn}','{$m5}');")));
                    if ($c > $_POST["rp"]) {
                        break;
                    }
                    $c++;
                }
            }
        }
    }
    $hash = $ldap->hash_get_relay_recipients();
    if (is_array($hash)) {
        while (list($domain, $ligne) = each($hash)) {
            $m5 = md5($domain);
            if ($searchZ != null) {
                if (!preg_match("#{$searchZ}#", $domain)) {
                    continue;
                }
            }
            if ($c > $_POST["rp"]) {
                break;
            }
            $c++;
            $data['rows'][] = array('id' => "dom{$m5}", 'cell' => array("\n\t\t\t\t\t<a href=\"javascript:blur();\" \n\t\t\t\t\t\tOnClick=\"\" \n\t\t\t\t\t\tstyle='font-size:16px;font-weight:bold;text-decoration:'>{$domain}</span>", "<span style='font-size:14px'>&nbsp;</span>", imgtootltip('delete-32.png', '{delete}', "PostfixDeleteRelayRecipient{$ttime}('{$domain}','{$m5}');")));
        }
    }
    $data['page'] = 1;
    $data['total'] = $c;
    echo json_encode($data);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:63,代码来源:postfix.routing.table.php


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