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


PHP clladp::AddDomainTransport方法代码示例

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


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

示例1: PostfixAddRoutingTableSave

function PostfixAddRoutingTableSave(){
	$tpl=new templates();
	if($_GET["relay_port"]==null){$_GET["relay_port"]=25;}
	if($_GET["domain"]==null){echo $tpl->_ENGINE_parse_body("{error_no_domain_specified}");exit;}	
	if($_GET["relay_address"]==null){echo $tpl->_ENGINE_parse_body("{error_no_server_specified}");exit;}

	$ldap=new clladp();
	$ldap->AddDomainTransport($_GET["org"],$_GET["domain"],$_GET["relay_address"],$_GET["relay_port"],'relay',$_GET["MX_lookups"]);
	$ldap->smtp_tls_policy_maps_add($_GET["relay_address"],$_GET["relay_port"],$_GET["MX_lookups"],$_GET["smtp_tls_policy_maps"]);
	$ldap->AddRecipientRelayTable("@{$_GET["domain"]}");
	$ldap->AddDomainRelayTable($_GET["domain"]);
	$sock=new sockets();
	$sock->getFrameWork("services.php?postfix-single=yes");	
	}
开发者ID:rsd,项目名称:artica-1.5,代码行数:14,代码来源:postfix.routing.table.php

示例2: SaveTransportDomain

function SaveTransportDomain()
{
    $usr = new usersMenus();
    $tpl = new templates();
    if ($usr->AllowChangeDomains == false) {
        echo $tpl->_ENGINE_parse_body('{no_privileges}');
        exit;
    }
    $domain = $_GET["SaveTransportDomain"];
    $ou = $_GET["ou"];
    if ($_GET["transport_port"] == null) {
        $_GET["transport_port"] = 25;
    }
    if ($_GET["transport_type"] == null) {
        $_GET["transport_type"] = "smtp";
    }
    $tool = new DomainsTools();
    $ldap = new clladp();
    $ldap->AddDomainTransport($ou, $domain, $_GET["transport_ip"], $_GET["transport_port"], $_GET["transport_type"]);
    if ($ldap->ldap_last_error != null) {
        echo $ldap->ldap_last_error;
        return;
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:24,代码来源:domains.manage.org.index.php

示例3: TASK_ADD_DOMAIN

function TASK_ADD_DOMAIN($value)
{
    $meta = new artica_meta(true);
    events("{$value}:: get domain parameters from {$value}", __FUNCTION__, __FILE__, __LINE__);
    $http = new httpget();
    $datasToSend = base64_encode(serialize($meta->GLOBAL_ARRAY));
    $body = $http->send("{$meta->ArticaMetaHostname}/lic.query.server.php", "post", array("DATAS" => $datasToSend, "GET_SMTP_DOM_PARAMS" => $value));
    if (preg_match("#<RESULTS>(.+?)</RESULTS>#", $body, $re)) {
        $array = unserialize(base64_decode($re[1]));
    }
    if (!is_array($array)) {
        events("VALUE is not an array", __FUNCTION__, __FILE__, __LINE__);
        return false;
    }
    $domain = $array["domain"];
    $ou = $array["ou"];
    $transport = $array["transport"];
    events("{$value}:: Adding/editing domain {$domain} for {$ou} ({$transport})", __FUNCTION__, __FILE__, __LINE__);
    $ldap = new clladp();
    if ($transport == "LOCAL") {
        if ($ldap->AddDomainEntity($ou, $domain)) {
            $http = new httpget();
            $body = $http->send("{$meta->ArticaMetaHostname}/lic.query.server.php", "post", array("DATAS" => $datasToSend, "UNLOCK_DOMAIN" => $value));
            send_email_events("Domain [{$domain}] was successfully added", null, "CLOUD");
            return true;
        }
    }
    if ($transport == null) {
        send_email_events("Domain [{$domain}] was failed to be added, transport type is null", null, "CLOUD");
        events("{$value}:: Adding/editing domain {$domain} failed, no such transport", __FUNCTION__, __FILE__, __LINE__);
        return true;
    }
    if (!preg_match("#\\[(.+?)\\]:([0-9]+)#", $transport, $re)) {
        send_email_events("Domain [{$domain}] was failed to be added, \"{$transport}\" pattern is corrupted", null, "CLOUD");
        return true;
    }
    if ($ldap->AddDomainTransport($ou, $domain, $re[1], $re[2])) {
        $http = new httpget();
        $body = $http->send("{$meta->ArticaMetaHostname}/lic.query.server.php", "post", array("DATAS" => $datasToSend, "UNLOCK_DOMAIN" => $value));
        events("{$value}:: Adding/editing domain {$domain} ({$transport}) success", __FUNCTION__, __FILE__, __LINE__);
        send_email_events("Domain [{$domain}] -> {$transport} was successfully added", null, "CLOUD");
        return true;
    } else {
        events("{$value}:: Adding/editing domain {$domain} failed", __FUNCTION__, __FILE__, __LINE__);
        return false;
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:47,代码来源:exec.artica.meta.tasks.php

示例4: finish

function finish()
{
    include_once 'ressources/class.artica.inc';
    $company_name = $_GET["company_name"];
    $domain_name = $_GET["domain_name"];
    $relay_behavior = $_GET["relay"];
    $relay_infos = $_GET["relay_infos"];
    $artica = new artica_general();
    $artica->RelayType = $relay_behavior;
    $artica->Save();
    $ldap = new clladp();
    $ldap->AddOrganization($company_name);
    if ($relay_behavior == "single") {
        if ($relay_infos == null) {
            $relay_infos = "127.0.0.1";
        }
        $ldap->AddDomainTransport($company_name, $domain_name, $relay_infos, '25', 'smtp');
    } else {
        $ldap->AddDomainEntity($company_name, $domain_name);
    }
    $html = "<div style='padding:5px;margin:5px'>\n\t\t<H2>{finish}</H2>\n\t<table>\n\t<tr>\n\t<td><img src='img/150-org.jpg'></td>\n\t<td valign='top'>\t\n\t<table>\n\t<tr>\n\t\t<td width=60% class='caption' nowrap align='right'><strong>{all_settings_saved}:</strong></td >\n\t\t\n\t</tr>\t\n\t</table>\n\t</div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:24,代码来源:artica.wizard.php


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