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


PHP clladp::organization_name_from_transporttable方法代码示例

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


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

示例1: PostfixAddRoutingRuleTable

function PostfixAddRoutingRuleTable()
{
    $page = CurrentPageName();
    $main = new main_cf();
    $users = new usersMenus();
    $tpl = new templates();
    if (!$users->AsPostfixAdministrator) {
        echo "<script>alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');</script>";
        die;
    }
    $service = $main->HashGetMasterCfServices();
    $service["smtp"] = "smtp";
    $ldap = new clladp();
    $ORG = $ldap->hash_get_ou(true);
    ksort($service);
    $ORG[null] = '{select}';
    if (isset($_GET["domainName"])) {
        $Table = $ldap->hash_load_transport();
        $t = new DomainsTools();
        $domainName = $_GET["domainName"];
        $line = $Table[$domainName];
        writelogs("LINE={$line} for {$domainName}", __FUNCTION__, __FILE__);
        $conf = $t->transport_maps_explode($Table[$domainName]);
        $relay_address = $conf[1];
        $smtp_port = $conf[2];
        $MX_lookups = $conf[3];
        $relay_service = $conf[0];
        $orgfound = $ldap->organization_name_from_transporttable($domainName);
    }
    $organization = Field_array_Hash($ORG, 'org', $orgfound, "style:font-size:14px;padding:3px");
    if ($relay_service == null) {
        $relay_service = "smtp";
    }
    $html = "\n\t<div style='font-size:16px'>{routing_rule}::{$domainName}</div>\n\t";
    $form = "\n\t\n\t<form name='FFM3'>\n\t<input type='hidden' name='PostfixAddRoutingRuleTableSave' value='yes'>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t<td align='right' class=legend>{organization}:</strong></td>\n\t<td style='font-size:14px'>{$organization}</td>\n\t</tr>\t\n\t<tr>\n\t<td align='right' class=legend>{pattern}:</strong></td>\n\t<td style='font-size:14px'>" . Field_text('domain', $domainName, 'font-size:14px;width:50%', null, null, '{transport_maps_pattern_explain}') . "</td>\n\t</tr>\n\t<tr>\n\t<td align='right' class=legend>{service}:</strong></td>\n\t<td style='font-size:14px'>" . Field_array_Hash($service, 'service', $relay_service, "style:font-size:14px") . "</td>\n\t</tr>\t\n\t<td align='right' nowrap class=legend>{address}:</strong></td>\n\t<td style='font-size:14px'>" . Field_text('relay_address', $relay_address, "font-size:16px;width:120px") . "</td>\t\n\t</tr>\n\t</tr>\n\t<td align='right' nowrap class=legend>{port}:</strong></td>\n\t<td style='font-size:14px'>" . Field_text('relay_port', $smtp_port, "font-size:16px;width:55px") . "</td>\t\n\t</tr>\t\n\t<tr>\n\t<td align='right' nowrap>" . Field_yesno_checkbox_img('MX_lookups', $MX_lookups, '{enable_disable}') . "</td>\n\t<td style='font-size:14px'>{MX_lookups}</td>\t\n\t</tr>\n\t{$sasl}\n\t<tr>\n\t<td align='right' colspan=2>" . button("{apply}", "PostfixAddNewRoutingTable()") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t<td align='left' colspan=2><hr><div class=text-info><strong>{MX_lookups}</strong><br>{MX_lookups_text}</div></td>\n\t</tr>\t\t\t\n\t\t\n\t</table>\n\t</FORM>\n<script>\nvar X_PostfixAddNewRoutingTable= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif (results.length>0){alert(results);}\n\t\tif(document.getElementById('container-tabs')){\n\t\t\t\$('#container-tabs').tabs( 'load' ,1 );\n\t\t}\n\t\tYahooWinHide();\n\t}\t\t\nfunction PostfixAddNewRoutingTable(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('PostfixAddRoutingRuleTableSave','yes');\n\t\tXHR.appendData('org',document.getElementById('org').value);\n\t\tXHR.appendData('domain',document.getElementById('domain').value);\n\t\tXHR.appendData('service',document.getElementById('service').value);\n\t\tXHR.appendData('relay_address',document.getElementById('relay_address').value);\n\t\tXHR.appendData('relay_port',document.getElementById('relay_port').value);\n\t\tXHR.appendData('MX_lookups',document.getElementById('MX_lookups').value);\t\t\t\t\n\t\tXHR.sendAndLoad('{$page}', 'GET',X_PostfixAddNewRoutingTable);\n\t}\t\t\n\t\n</script>\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body("{$html}{$form}");
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:37,代码来源:postfix.routing.table.php

示例2: PostfixAddRoutingRuleTable

function PostfixAddRoutingRuleTable(){
	$page=CurrentPageName();
	$main=new main_cf();
	$service=$main->HashGetMasterCfServices();
	$service["smtp"]="smtp";
	$ldap=new clladp();
	$ORG=$ldap->hash_get_ou(true);
	ksort($service);
	$ORG[null]='{select}';
	
	if(isset($_GET["domainName"])){
		
		$Table=$ldap->hash_load_transport();
		$t=new DomainsTools();
		$domainName=$_GET["domainName"];
		$line=$Table[$domainName];
		writelogs("LINE=$line for $domainName",__FUNCTION__,__FILE__);
		$conf=$t->transport_maps_explode($Table[$domainName]);		
		$relay_address=$conf[1];
		$smtp_port=$conf[2];
		$MX_lookups=$conf[3];
		$relay_service=$conf[0];
		$orgfound=$ldap->organization_name_from_transporttable($domainName);
	}
	
	$organization=Field_array_Hash($ORG,'org',$orgfound);
	
	
	if($relay_service==null){$relay_service="smtp";}
	
$html="
	<h1>{routing_rule}</H1>
	";
$form="
	<br>" . RoundedLightWhite("
	<form name='FFM3'>
	<input type='hidden' name='PostfixAddRoutingRuleTableSave' value='yes'>
	<table style='width:100%'>
	<tr>
	<td align='right' class=legend>{organization}:</strong></td>
	<td style='font-size:12px'>$organization</td>
	</tr>	
	<tr>
	<td align='right' class=legend>{pattern}:</strong></td>
	<td style='font-size:12px'>" . Field_text('domain',$domainName,'width:50%',null,null,'{transport_maps_pattern_explain}') . "</td>
	</tr>
	<tr>
	<td align='right' class=legend>{service}:</strong></td>
	<td style='font-size:12px'>" . Field_array_Hash($service,'service',$relay_service) . "</td>
	</tr>	
	<td align='right' nowrap class=legend>{address}:</strong></td>
	<td style='font-size:12px'>" . Field_text('relay_address',$relay_address) . "</td>	
	</tr>
	</tr>
	<td align='right' nowrap class=legend>{port}:</strong></td>
	<td style='font-size:12px'>" . Field_text('relay_port',$smtp_port) . "</td>	
	</tr>	
	<tr>
	<td align='right' nowrap>" . Field_yesno_checkbox_img('MX_lookups',$MX_lookups,'{enable_disable}')."</td>
	<td style='font-size:12px'>{MX_lookups}</td>	
	</tr>
	$sasl
	<tr>
	<td align='right' colspan=2>". button("{apply}","PostfixAddNewRoutingTable()")."</td>
	</tr>		
	<tr>
	<td align='left' colspan=2><hr><p class=caption{MX_lookups}</strong><br>{MX_lookups_text}</p></td>
	</tr>			
		
	</table>
	</FORM>
<script>
var X_PostfixAddNewRoutingTable= function (obj) {
		var results=obj.responseText;
		if (results.length>0){alert(results);}
		if(document.getElementById('container-tabs')){
			$('#container-tabs').tabs( 'load' ,1 );
		}
		YahooWinHide();
	}		
function PostfixAddNewRoutingTable(){
		var XHR = new XHRConnection();
		XHR.appendData('PostfixAddRoutingRuleTableSave','yes');
		XHR.appendData('org',document.getElementById('org').value);
		XHR.appendData('domain',document.getElementById('domain').value);
		XHR.appendData('service',document.getElementById('service').value);
		XHR.appendData('relay_address',document.getElementById('relay_address').value);
		XHR.appendData('relay_port',document.getElementById('relay_port').value);
		XHR.appendData('MX_lookups',document.getElementById('MX_lookups').value);				
		XHR.sendAndLoad('$page', 'GET',X_PostfixAddNewRoutingTable);
	}		
	
</script>	
	
	");
	
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body("$html$form");		
	
	
//.........这里部分代码省略.........
开发者ID:rsd,项目名称:artica-1.5,代码行数:101,代码来源:postfix.routing.table.php

示例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} -&raquo; 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);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:68,代码来源:postfix.transport.table.php


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