本文整理汇总了PHP中maincf_multi类的典型用法代码示例。如果您正苦于以下问题:PHP maincf_multi类的具体用法?PHP maincf_multi怎么用?PHP maincf_multi使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了maincf_multi类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: save
function save()
{
$main = new maincf_multi($_POST["hostname"]);
$main->SET_VALUE("EnablePostfixHaProxy", $_POST["EnablePostfixHaProxy"]);
$sock = new sockets();
$sock->getFrameWork("postfix.php?happroxy=yes&hostname={$_POST["hostname"]}");
}
开发者ID:articatech,项目名称:artica,代码行数:7,代码来源:postfix.haproxy.php
示例2: save
function save()
{
$main = new maincf_multi($_POST["hostname"], $_POST["ou"]);
$main->SET_VALUE("smtpd_banner", $_POST["SMTP_BANNER"]);
$sock = new sockets();
$sock->getFrameWork("cmd.php?postfix-others-values=yes&hostname={$_POST["hostname"]}");
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:7,代码来源:postfix.banner.php
示例3: popup
function popup()
{
$sock = new sockets();
$PostfixMultiCreateBubble = $sock->GET_INFO("PostfixMultiCreateBubble");
if (!is_numeric($PostfixMultiCreateBubble)) {
$PostfixMultiCreateBubble = 0;
}
$main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
$EnableSubmission = $main->GET("EnableSubmission");
$TrustMyNetwork = $main->GET("TrustMyNetwork");
if (!is_numeric($TrustMyNetwork)) {
$TrustMyNetwork = 1;
}
$EnableSasl = $main->GET("EnableSasl");
$sasl = Paragraphe_switch_img('{sasl_title}', '{sasl_intro}', 'EnableSasl', $EnableSasl, '{enable_disable}', 300);
if ($PostfixMultiCreateBubble == 1) {
$TrustMyNetwork = "<input type=hidden id='TrustMyNetwork' name=\"TrustMyNetwork\" value='{$TrustMyNetwork}'>" . Paragraphe_switch_disable('{TrustMyNetwork}', '{TrustMyNetwork_text}<hr><i style=color:#9E0000>{PostfixMultiCreateBubbleIsEnabled}</i>', '{TrustMyNetwork_text}', 300);
} else {
$TrustMyNetwork = Paragraphe_switch_img('{TrustMyNetwork}', '{TrustMyNetwork_text}', 'TrustMyNetwork', $TrustMyNetwork, '{enable_disable}', 300);
}
$PostfixEnableSubmission_field = Paragraphe_switch_img('{PostfixEnableSubmission}', '{PostfixEnableSubmission_text}', 'EnableSubmission', $EnableSubmission, '{enable_disable}', 300);
$old = "" . Paragraphe("64-settings-black.png", "{SASL_STATUS}", "{SASL_STATUS_TEXT}", "javascript:SaslStatus();") . "\n\t\t\t{$settings}\n\t\t\t{$smtpd_sasl_exceptions_networks}";
$html = "\n\t<div id='sasl-id'>\n\t<table style='width:99%' class=form>\n\t<tbody>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t{$sasl}\n\t\t\t<div style='text-align:right'><hr>" . button("{apply}", "postfix_multi_enable_auth()", 16) . "</div>\n\t\t</td>\n\t<td valign='top'>\n\t\t{$TrustMyNetwork}\n\t\t<div style='text-align:right'><hr>" . button("{apply}", "postfix_multi_enable_auth()", 16) . "</div>\n\t</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2>\n\t\t{$PostfixEnableSubmission_field}\n\t\t<div style='text-align:right'><hr>" . button("{apply}", "postfix_multi_enable_auth()", 16) . "</div>\n\t</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, 'postfix.sasl.php');
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:domains.postfix.multi.sasl.php
示例4: save_transport
function save_transport()
{
$main = new maincf_multi($_POST["hostname"]);
$main->SET_VALUE("mailbox_transport", trim(strtolower($_POST["mailbox_transport"])));
$sock = new sockets();
$sock->getFrameWork("postfix.php?mailbox-transport=yes&hostname={$_POST["hostname"]}");
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:7,代码来源:postfix.mailbox_transport.php
示例5: save
function save(){
$page=CurrentPageName();
$tpl=new templates();
$main=new maincf_multi($_GET["hostname"],$_GET["ou"]);
if($_GET["freeze_delivery_queue"]==1){$main->SET_VALUE("freeze_delivery_queue",0);}else{$main->SET_VALUE("freeze_delivery_queue",1);}
$sock=new sockets();
$sock->getFrameWork("cmd.php?postfix-freeze=yes&hostname={$_GET["hostname"]}");
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:8,代码来源:postfix.freeze.queue.php
示例6: SAVE
function SAVE()
{
$ou = base64_decode($_GET["ou"]);
$main = new maincf_multi($_GET["hostname"], $ou);
$main->SET_VALUE("PostfixHideClientMua", $_GET["PostfixHideClientMua"]);
$sock = new sockets();
$sock->getFrameWork("cmd.php?postfix-multi-settings={$_GET["hostname"]}");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:8,代码来源:domains.postfix.hide.headers.php
示例7: SaveForm
function SaveForm()
{
$main = new maincf_multi($_POST["hostname"]);
$main->SET_VALUE("enable_original_recipient", $_POST["enable_original_recipient"]);
$main->SET_VALUE("undisclosed_recipients_header", $_POST["undisclosed_recipients_header"]);
$main->SET_VALUE("smtpd_discard_ehlo_keywords", $_POST["smtpd_discard_ehlo_keywords"]);
$sock = new sockets();
$sock->getFrameWork("cmd.php?postfix-others-values=yes&hostname={$_POST["hostname"]}");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:postfix.other.php
示例8: save
function save()
{
$main = new maincf_multi($_POST["hostname"]);
if ($_POST["myorigin2"] != null) {
$_POST["myorigin"] = $_POST["myorigin2"];
}
$main->SET_VALUE("myorigin", $_POST["myorigin"]);
$sock = new sockets();
$sock->getFrameWork("cmd.php?postfix-multi-reconfigure={$_POST["hostname"]}");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:domains.postfix.multi.myorigin.php
示例9: save
function save()
{
$main = new maincf_multi($_POST["hostname"], $_POST["ou"]);
$main->SET_VALUE("detect_8bit_encoding_header", $_POST["detect_8bit_encoding_header"]);
$main->SET_VALUE("disable_mime_output_conversion", $_POST["disable_mime_output_conversion"]);
$main->SET_VALUE("disable_mime_input_processing", $_POST["disable_mime_input_processing"]);
$main->SET_VALUE("mime_nesting_limit", $_POST["mime_nesting_limit"]);
$sock = new sockets();
$sock->getFrameWork("cmd.php?postfix-others-values=yes&hostname={$_POST["hostname"]}");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:postfix.mime.php
示例10: popup
function popup(){
$ssl=new ssl_certificate();
$array=$ssl->array_ssl;
$styleF="font-size:13px;padding:3px";
$main=new maincf_multi($_GET["hostname"],base64_decode($_GET["ou"]));
$conf=unserialize(base64_decode($main->GET_BIGDATA("certificate_smtp_parameters")));
if($conf["organizationName"]==null){$conf["organizationName"]=base64_decode($_GET["ou"]);}
$users=new usersMenus();
$tpl=new templates();
$country_name=Field_array_Hash($ssl->array_country_codes,'countryName',$conf["countryName"],null,null,0,$styleF);
$html="<div id='PostfixMultiCertificateDiv'>
<table style='width:100%'>
<tr>
<td class=legend style='font-size:13px'>{countryName}:</td>
<td>$country_name</td>
</tr>
<tr>
<td class=legend style='font-size:13px'>{localityName}:</td>
<td>". Field_text("localityName",$conf["localityName"],$styleF)."</td>
</tr>
<tr>
<td class=legend style='font-size:13px'>{organizationalUnitName}:</td>
<td>". Field_text("organizationalUnitName",$conf["organizationalUnitName"],$styleF)."</td>
</tr>
<tr>
<td class=legend style='font-size:13px'>{organizationName}:</td>
<td>". Field_text("organizationName",$conf["organizationName"],$styleF)."</td>
</tr>
<tr>
<td class=legend style='font-size:13px'>{emailAddress}:</strong></td>
<td align='left'>" . Field_text("emailAddress",$conf["emailAddress"],$styleF) . "</td>
</tr>
<tr>
<td colspan=2 align=right>
<hr>
". button("{apply}","PostfixMultiCertificateSave()")."
</td>
</tr>
</table>
</div>
";
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:51,代码来源:domains.postfix.multi.certificate.php
示例11: popup
function popup(){
$page=CurrentPageName();
$ou=$_GET["ou"];
$hostname=$_GET["hostname"];
$main=new maincf_multi($hostname,$ou);
$array=unserialize(base64_decode($main->GET_BIGDATA("PostfixMultiFetchMail")));
$schedule=array(2=>2,5=>5,10=>10,15=>15,20=>20,30=>30,40=>40,50=>50,55=>55);
if($array[$hostname]["schedule"]==null){$array[$hostname]["schedule"]=10;}
$enabled=$array[$hostname]["enabled"];
$fetchmail_enabled=Paragraphe_switch_img('{enable_fetchmail}','{enable_fetchmail_text}','enable_fetchmail',$enabled,null,270);
$forms="<table style='width:100%'>
<tr>
<td colspan=2>$fetchmail_enabled</td>
</tr>
<tr>
<td class=legend style='font-size:14px'>{fetch_messages_every}:</td>
<td style='font-size:14px'>
". Field_array_Hash($schedule,
"schedule",$array[$hostname]["schedule"],null,null,0,"font-size:14px;padding:3px")." (minutes)</td>
</tr>
</table>
";
$html="
<table style='width:100%'>
<tr>
<td valign='top' width=1%><img src='img/bg_fetchmail2.png'></td>
<td valign='top'>$forms</td>
</tr>
<tr>
<td colspan=2 align='right'><hr>". button("{apply}","postfix_multi_fetchmail_save()")."</td>
</tr>
</table>
";
$tpl=new templates();
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:47,代码来源:domains.postfix.multi.fetchmail.php
示例12: popup
function popup()
{
$ou = base64_decode($_GET["ou"]);
$main = new maincf_multi($_GET["hostname"], $ou);
$page = CurrentPageName();
$tpl = new templates();
$PostFixEnableQueueInMemory = $main->GET("PostFixEnableQueueInMemory");
$PostFixQueueInMemory = $main->GET("PostFixQueueInMemory");
$enable = Paragraphe_switch_img("{PostFixEnableQueueInMemory}", "{PostFixEnableQueueInMemory_text}", "PostFixEnableQueueInMemory", $PostFixEnableQueueInMemory, null, 350);
if ($PostFixQueueInMemory == null) {
$PostFixQueueInMemory = 0;
}
$sock = new sockets();
$datas = unserialize(base64_decode($sock->getFrameWork("cmd.php?postfix-mem-disk-status={$_GET["hostname"]}")));
$MOUTED = $datas["MOUTED"];
$TOTAL_MEMORY_MB = $datas["TOTAL_MEMORY_MB"];
$TOTAL_MEMORY_MB_FREE = $datas["TOTAL_MEMORY_MB_FREE"];
$html = "\n<table style='width:100%'>\n<td valign='top' width=1%>\n<center>\n\t<img src='img/bg_memory-150.png' id='bg_memory-150'>\n\t<div id='postfix-mem-status'></div>\n</center>\n</td>\n<td valign='top' width=99%>\n{$enable}\n<hr>\n\n<table style='width:100%'>\n<tr>\n<td class=legend style='font-size:16px'>{memory}:</td>\n<td style='font-size:16px'>" . Field_text("PostFixQueueInMemory", $PostFixQueueInMemory, "font-size:16px;padding:5px;width:120px") . " MB/{$TOTAL_MEMORY_MB_FREE}MB</td>\n</tr>\n</table>\n\n<div style='margin:12px;text-align:right'>\t\n\t" . button("{apply}", "PostFixEnableQueueInMemorySave()") . "<hr>\n</div>\n<script>\n\nvar x_PostFixEnableQueueInMemorySave= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\tdocument.getElementById('bg_memory-150').src='img/bg_memory-150.png';\n\tmem_status();\n\t}\n\t\n\t\n\tfunction PostFixEnableQueueInMemorySave(){\n\t\tvar TOTAL_MEMORY_MB_FREE={$TOTAL_MEMORY_MB_FREE};\n\t\tvar mem=document.getElementById('PostFixQueueInMemory').value;\n\t\tif(mem>TOTAL_MEMORY_MB_FREE){\n\t\t\talert(mem+'M >'+TOTAL_MEMORY_MB_FREE+' M');\n\t\t\treturn;\n\t\t}\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('PostFixEnableQueueInMemory',document.getElementById('PostFixEnableQueueInMemory').value);\n\t\tXHR.appendData('PostFixQueueInMemory',document.getElementById('PostFixQueueInMemory').value);\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tdocument.getElementById('bg_memory-150').src='img/wait_verybig.gif';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_PostFixEnableQueueInMemorySave);\n\t\n\t}\n\t\n\tfunction mem_status(){\n\t\tLoadAjax('postfix-mem-status','{$page}?mem-status&hostname={$_GET["hostname"]}&ou={$_GET["ou"]}');\n\t}\n\tmem_status();\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:20,代码来源:domains.postfix.memory.php
示例13: servers_list
function servers_list()
{
$tpl = new templates();
$main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
$hash = unserialize(base64_decode($main->GET_BIGDATA("check_client_access")));
if (!is_array($hash) or count($hash) == 0) {
json_error_show("no rule");
}
$page = 1;
$search = string_to_flexregex();
$c = 0;
while (list($ipaddr, $action) = each($hash)) {
if (trim($ipaddr) == null) {
continue;
}
if (isset($aL[$ipaddr])) {
continue;
}
$md5 = md5("{$ipaddr}{$action}");
if ($search != null) {
if (!preg_match("#{$search}#", $ipaddr)) {
continue;
}
}
$aL[$md5] = true;
$img = "48-server.png";
if ($action == "REJECT") {
$img = '48-server-ban.png';
}
$c++;
$delete = imgsimple('delete-48.png', '{delete}', "DeleteServer{$_GET["t"]}('{$ipaddr}');");
$data['rows'][] = array('id' => $md5, 'cell' => array("<span style='font-size:16px;font-weight:bold'><img src='img/{$img}'></a></span>", "<span style='font-size:32px'>{$ipaddr} ({$action})</a></span>", $delete));
}
$data['page'] = $page;
$data['total'] = $c;
echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:37,代码来源:domains.postfix.multi.reject.php
示例14: SaveDNSSettings
function SaveDNSSettings()
{
$main = new maincf_multi("master", "master");
$sock = new sockets();
$sock->SET_INFO("myhostname", $_GET["myhostname"]);
$main->SET_VALUE("ignore_mx_lookup_error", $_GET["ignore_mx_lookup_error"]);
$main->SET_VALUE("disable_dns_lookups", $_GET["disable_dns_lookups"]);
$sock->getFrameWork("cmd.php?postfix-others-values=yes");
}
开发者ID:articatech,项目名称:artica,代码行数:9,代码来源:postfix.network.php
示例15: main_search
function main_search()
{
$MyPage = CurrentPageName();
$main = new maincf_multi();
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$q = new mysql();
$t = $_GET["t"];
$table = "sender_dependent_relay_host";
$searchstring = string_to_flexquery();
$page = 1;
$table = "(SELECT * FROM sender_dependent_relay_host WHERE `hostname`='{$_GET["hostname"]}' ORDER by zOrders) as t";
if (isset($_POST["sortname"])) {
if ($_POST["sortname"] != null) {
$ORDER = "ORDER BY `{$_POST["sortname"]}` {$_POST["sortorder"]}";
}
}
if (isset($_POST['page'])) {
$page = $_POST['page'];
}
if ($searchstring != null) {
$sql = "SELECT COUNT( * ) AS tcount FROM {$table} WHERE 1 {$searchstring}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
if (!$q->ok) {
json_error_show("Mysql Error [" . __LINE__ . "]: <br>{$q->mysql_error}.<br>{$sql}", 1);
}
$total = $ligne["tcount"];
} else {
$sql = "SELECT COUNT( * ) AS tcount FROM {$table} WHERE 1 {$searchstring}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
if (!$q->ok) {
json_error_show("Mysql Error [" . __LINE__ . "]: <br>{$q->mysql_error}.<br>{$sql}", 1);
}
$total = $ligne["tcount"];
}
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
if (!is_numeric($rp)) {
$rp = 50;
}
$pageStart = ($page - 1) * $rp;
$limitSql = "LIMIT {$pageStart}, {$rp}";
$sql = "SELECT * FROM {$table} WHERE 1 {$searchstring} {$ORDER} {$limitSql} ";
$results = $q->QUERY_SQL($sql, "artica_backup");
if (!$q->ok) {
if ($q->mysql_error != null) {
json_error_show(date("H:i:s") . "<br>SORT:{$_POST["sortname"]}:<br>Mysql Error [L." . __LINE__ . "]: {$q->mysql_error}<br>{$sql}", 1);
}
}
if (mysql_num_rows($results) == 0) {
json_error_show("no data", 1);
}
$data = array();
$data['page'] = $page;
$data['total'] = $total;
$data['rows'] = array();
$fontsize = "22";
$free_text = $tpl->javascript_parse_text("{free}");
$computers = $tpl->javascript_parse_text("{computers}");
$overloaded_text = $tpl->javascript_parse_text("{overloaded}");
$orders_text = $tpl->javascript_parse_text("{orders}");
$directories_monitor = $tpl->javascript_parse_text("{directories_monitor}");
$dns_destination = $tpl->javascript_parse_text("{direct_mode}");
$all_others_domains = $tpl->javascript_parse_text("{all_others_domains}");
while ($ligne = mysql_fetch_assoc($results)) {
$LOGSWHY = array();
$overloaded = null;
$loadcolor = "black";
$StatHourColor = "black";
$ColorTime = "black";
$hostname = $ligne["hostname"];
$domain = $ligne["domain"];
$zmd5 = $ligne["zmd5"];
$relay = $ligne["relay"];
$relay_port = $ligne["relay_port"];
$lookups = $ligne["lookups"];
$relay_text = $main->RelayToPattern($relay, $relay_port, $lookups);
$icon_grey = "ok32-grey.png";
$icon_warning_32 = "warning32.png";
$icon_red_32 = "32-red.png";
$icon = "ok-32.png";
$icon_f = $icon_grey;
if ($ligne["enabled"] == 0) {
$ColorTime = "#8a8a8a";
}
$styleHref = " style='font-size:{$fontsize}px;text-decoration:underline;color:{$ColorTime}'";
$style = " style='font-size:{$fontsize}px;color:{$ColorTime}'";
$urijs = "Loadjs('{$MyPage}?item-js=yes&zmd5={$zmd5}&hostname={$hostname}');";
$link = "<a href=\"javascript:blur();\" OnClick=\"javascript:{$urijs}\" {$styleHref}>";
$orders = imgtootltip("48-settings.png", null, "Loadjs('artica-meta.menus.php?gpid={$ligne["ID"]}');");
$delete = imgtootltip("delete-32.png", null, "Loadjs('{$MyPage}?item-delete-js={$zmd5}')");
$up = imgsimple("arrow-up-32.png", null, "MoveSubRuleLinks{$t}('{$zmd5}','up')");
$down = imgsimple("arrow-down-32.png", null, "MoveSubRuleLinks{$t}('{$zmd5}','down')");
if ($ligne["directmode"] == 1) {
$relay_text = "{$dns_destination}";
}
if ($ligne["enabledauth"] == 1) {
$icon_f = $icon;
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:postfix.routing.sender.table.php
示例16: EnablePostScreen_edit
function EnablePostScreen_edit(){
writelogs("Saving PostScreen service {$_GET["hostname"]}/{$_GET["ou"]}={$_GET["EnablePostScreen"]}",__FUNCTION__,__FILE__,__LINE__);
$page=CurrentPageName();
$tpl=new templates();
$main=new maincf_multi($_GET["hostname"],$_GET["ou"]);
$main->SET_VALUE("EnablePostScreen",$_GET["EnablePostScreen"]);
$sock=new sockets();
$sock->getFrameWork("cmd.php?postscreen=yes&hostname={$_GET["hostname"]}");
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:11,代码来源:postscreen.php
示例17: server_list
function server_list()
{
$sock = new sockets();
$maxSearch = 4;
$uuid = base64_decode($sock->getFrameWork("cmd.php?system-unique-id=yes"));
$search_org = $_GET["search-instance"];
if (preg_match("#(.+?):([0-9]+)#", $search_org, $re)) {
$search_org = trim($re[1]);
$maxSearch = $re[2];
}
if (strlen($_GET["search-instance"]) > 2) {
$_GET["search-instance"] = "*{$_GET["search-instance"]}*";
$_GET["search-instance"] = str_replace("*", "%", $_GET["search-instance"]);
$_GET["search-instance"] = str_replace("%%", "%", $_GET["search-instance"]);
$searchq = "AND value LIKE '{$_GET["search-instance"]}'";
}
$sql = "SELECT `value`,ip_address FROM postfix_multi WHERE `uuid`='{$uuid}' AND `ou`='{$_GET["ou"]}' AND `key`='myhostname' {$searchq}";
$q = new mysql();
$results = $q->QUERY_SQL($sql, "artica_backup");
$count = mysql_num_rows($results);
$formsaerch = "\n\t\t<table style='width:99%' class=form>\n\t\t<tbody>\n\t\t<tr>\n\t\t\t<td class=legend>{search}:</td>\n\t\t\t<td>" . Field_text('instances-search-ou', $search_org, 'font-size:13px;width:110px', null, null, null, false, "InstanceSearchOuCheck(event)") . "</td>\n\t\t</tr>\n\t\t</tbody>\n\t\t</table>\n\t\t\n\t\t";
if ($searchq == null) {
if ($count < 5) {
$formsaerch = null;
}
}
$html = $html . "{$formsaerch}";
$c = 0;
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$c++;
if ($c > $maxSearch) {
break;
}
$main = new maincf_multi($ligne["value"], $_GET["ou"]);
$VirtualHostNameToChange = $main->GET("VirtualHostNameToChange");
$PostFixEnableAiguilleuse = $main->GET("PostFixEnableAiguilleuse");
$freeze_delivery_queue = $main->GET('freeze_delivery_queue');
if ($VirtualHostNameToChange != null) {
$VirtualHostNameToChange = "<br>{$VirtualHostNameToChange}";
}
$img = "48-network-server.png";
if ($PostFixEnableAiguilleuse == 1) {
$img = "48-network-server-star.png";
$server_text = "{router}";
}
if ($freeze_delivery_queue == 1) {
$img = "48-network-server-paused.png";
$server_text = "{WARN_QUEUE_FREEZE}";
}
$servername = $ligne["value"];
if (strlen($servername) > 17) {
$servername = substr($servername, 0, 14) . "...";
}
$js = "PostfixMultiServerParamsSection('{$ligne["value"]}')";
$html = $html . "\n\t\t<table style='width:99%;margin-top:10px;padding:10px' class=form>\n\t\t<tbody>\n\t\t<tr >\n\t\t\t<td valign=top width=1% style='padding:5px'>" . imgtootltip($img, "{apply}", $js) . "</td>\n\t\t\t<td valign='top' style='padding:5px'>\n\t\t\t<div>\n\t\t\t\t<strong style='font-size:13px;text-decoration:underline' OnClick=\"javascript:{$js}\" OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\" >{$servername}</strong>\n\t\t\t</div>\n\t\t\t<div style='text-align:right'>\n\t\t\t\t<i style='font-size:11px'>{$server_text} - {$ligne["ip_address"]}{$VirtualHostNameToChange}</i></div>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t</table>\n\t\t<script>RefreshRTMMTable()</script>\n\t\t";
}
$ips = GetFreeIps();
if (is_array($ips)) {
$html = $html . "\n\t\t<table style='width:99%;margin-top:10px;padding:10px' class=form>\n\t\t<tr " . CellRollOver("AddPostfixMulti()") . ">\n\t\t\t<td valign=top width=1% style='padding:5px'><img src='img/48-network-server-add.png'></td>\n\t\t\t<td valign='top' style='padding:5px'>\n\t\t\t<div>\n\t\t\t\t<strong style='font-size:13px'>{add_mail_server}</strong>\n\t\t\t</div>\n\t\t\t<div><i style='font-size:11px'>{postfix_multi_add_mailserver}</i></div>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<script>RefreshRTMMTable()</script>\n\t\t";
} else {
$html = $html . "\n\t\t<table style='width:99%;margin-top:10px;padding:10px' class=form>\n\t\t<tr>\n\t\t\t<td valign=top width=1% style='padding:5px'><img src='img/48-network-server-add-grey.png'></td>\n\t\t\t<td valign='top' style='padding:5px'>\n\t\t\t<div>\n\t\t\t\t<strong style='font-size:13px'>{add_mail_server}</strong>\n\t\t\t</div>\n\t\t\t<div><i style='font-size:11px'>{postfix_multi_add_mailserver_no_ips}</i></div>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>";
}
$html = $html . "\n\t\n\t<script>\n\t\tfunction InstanceSearchOuCheck(e){\n\t\t\tif(checkEnter(e)){InstanceSearchOu();}\n\t\t}\n\t\t\n\t\tfunction InstanceSearchOu(){\n\t\t\tRefreshPostfixMultiList();\n\t\t\n\t\t\n\n\t\t}\n\t</script>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:66,代码来源:domains.postfix.multi.php
示例18: MultiplesInstances_status
function MultiplesInstances_status()
{
$unix = new unix();
$users = new usersMenus();
$sock = new sockets();
if (!$users->MILTERGREYLIST_INSTALLED) {
if ($GLOBALS["DEBUG"]) {
echo __FUNCTION__ . " NoT installed\n";
}
return null;
}
$main = new maincf_multi($GLOBALS["hostname"], $GLOBALS["ou"]);
$array_filters = unserialize(base64_decode($main->GET_BIGDATA("PluginsEnabled")));
$enabled = $array_filters["APP_MILTERGREYLIST"];
$pid_path = "/var/spool/postfix/var/run/milter-greylist/{$GLOBALS["hostname"]}/greylist.pid";
if ($GLOBALS["DEBUG"]) {
echo __FUNCTION__ . "{$GLOBALS["hostname"]} ({$GLOBALS["ou"]}) -> enabled={$enabled}\n";
}
$master_pid = trim(@file_get_contents($pid_path));
if ($GLOBALS["DEBUG"]) {
echo __FUNCTION__ . "master_pid={$master_pid}\n";
}
$l[] = "[MILTER_GREYLIST]";
$l[] = "service_name=APP_MILTERGREYLIST";
$l[] = "master_version=" . GetVersionOf("milter-greylist");
$l[] = "service_cmd=mgreylist";
$l[] = "service_disabled={$enabled}";
$l[] = "pid_path={$pid_path}";
$l[] = "remove_cmd=--milter-grelist-remove";
if (!$unix->process_exists($master_pid)) {
$l[] = "running=0";
$l[] = "";
echo implode("\n", $l);
exit;
}
$l[] = "running=1";
$l[] = GetMemoriesOf($master_pid);
$l[] = "";
if ($GLOBALS["DEBUG"]) {
echo __FUNCTION__ . "FINISH\n";
}
echo implode("\n", $l);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:43,代码来源:exec.milter-greylist.php
示例19: security_postfix
function security_postfix(){
$hostname=$_GET["hostname"];
$user=new usersMenus();
$user->LoadModulesEnabled();
$md=md5($hostname);
$tpl=new templates();
$sock=new sockets();
$page=CurrentPageName();
$q=new mysql();
$main=new maincf_multi($hostname);
$ou=$main->ou;
$ou_encoded=base64_encode($ou);
$spamass=new spamassassin();
$EnablePostfixMultiInstance=$sock->GET_INFO("EnablePostfixMultiInstance");
$SpamassassinMaxRCPTScore=$sock->GET_INFO("SpamassassinMaxRCPTScore");
if($hostname=="master"){
$message_size_limit=$sock->GET_INFO("message_size_limit");
$max_rcpt_to=$main->GET("max_rcpt_to");
}
$stylea="style='font-size:13px;text-decoration:underline;font-weight:bold'";
$GLOBALS["STYLEA"]=$stylea;
if(!is_numeric($SpamassassinMaxRCPTScore)){$SpamassassinMaxRCPTScore=10;}
if(!is_numeric($message_size_limit)){$message_size_limit=10240000;}
if($message_size_limit==0){$message_size_limit="{unlimited}";}else{
$message_size_limit=FormatBytes($message_size_limit/1024);
}
$js_messagelimit="Loadjs('postfix.messages.restriction.php?script=yes');";
if(!is_numeric($max_rcpt_to)){$max_rcpt_to=0;}
if($max_rcpt_to==0){$max_rcpt_to="{unlimited}";}
//regex
$data=unserialize(base64_decode($main->GET_BIGDATA("header_check")));
$header_content_filters_rules=0;
if(is_array($data)){while (list ($num, $ligne) = each ($data)){if($ligne==null){continue;}$header_content_filters_rules++;}}
if($header_content_filters_rules==0){$header_content_filters_rules="{no_rules}";}else{$header_content_filters_rules="$header_content_filters_rules {rules}";}
$check_client_access=0;
$data=unserialize(base64_decode($main->GET_BIGDATA("check_client_access")));
if(is_array($data)){while (list ($num, $ligne) = each ($data)){if($ligne==null){continue;}$check_client_access++;}}
if($check_client_access==0){$check_client_access="{no_rules}";}else{$check_client_access="$check_client_access {rules}";}
$EnableBodyChecks=$main->GET("EnableBodyChecks");
if(!is_numeric($EnableBodyChecks)){$EnableBodyChecks=0;}
$EnableBodyChecks_text="{disabled}";
if($EnableBodyChecks==1){$EnableBodyChecks_text="{enabled}";}
$sql="SELECT COUNT(*) as tcount FROM postfix_regex_words WHERE `hostname`='{$_GET["hostname"]}' AND enabled=1";
$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
if($ligne["tcount"]==0){$EnableBodyChecks_rules="{no_rules}";}else{$EnableBodyChecks_rules="{$ligne["tcount"]} {rules}";}
$js_iptables="Loadjs('postfix.iptables.php');";
$js_regex="Loadjs('domains.postfix.multi.regex.php?ou=$ou&hostname=$hostname');";
$EnablePostfixAutoBlock=$sock->GET_INFO("EnablePostfixAutoBlock");
if(!is_numeric($EnablePostfixAutoBlock)){$EnablePostfixAutoBlock=0;}
$EnablePostfixAutoBlock_text="{disabled}";
if($EnablePostfixAutoBlock==1){$EnablePostfixAutoBlock_text="{enabled}";}
$sql="SELECT COUNT(*) AS tcount FROM iptables WHERE local_port=25 AND flux='INPUT' AND disable=0";
$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
if($ligne["tcount"]==0){$PostfixAutoBlock_rules="{no_rules}";}else{$PostfixAutoBlock_rules="{$ligne["tcount"]} {rules}";}
$smtpd_client_restrictions_js="Loadjs('postfix.smtpd_client_restrictions.php');";
$EnablePostfixAntispamPack_value=$sock->GET_INFO('EnablePostfixAntispamPack');
$EnableGenericrDNSClients=$sock->GET_INFO("EnableGenericrDNSClients");
$reject_forged_mails=$sock->GET_INFO('reject_forged_mails');
$PostfixHideClientMua=$sock->GET_INFO("PostfixHideClientMua");
$PostfixHideClientMua_js="Loadjs('postfix.hide.headers.php')";
$EnablePostfixInternalDomainsCheck=$sock->GET_INFO('EnablePostfixInternalDomainsCheck');
$RestrictToInternalDomains=$sock->GET_INFO('RestrictToInternalDomains');
$reject_unknown_client_hostname=$sock->GET_INFO('reject_unknown_client_hostname');
$reject_unknown_reverse_client_hostname=$sock->GET_INFO('reject_unknown_reverse_client_hostname');
$reject_unknown_sender_domain=$sock->GET_INFO('reject_unknown_sender_domain');
$reject_invalid_hostname=$sock->GET_INFO('reject_invalid_hostname');
$reject_non_fqdn_sender=$sock->GET_INFO('reject_non_fqdn_sender');
if($reject_unknown_client_hostname==1){$reject_unknown_client_hostname="{enabled}";}else{$reject_unknown_client_hostname="{disabled}";}
if($reject_unknown_reverse_client_hostname==1){$reject_unknown_reverse_client_hostname="{enabled}";}else{$reject_unknown_reverse_client_hostname="{disabled}";}
if($reject_unknown_sender_domain==1){$reject_unknown_sender_domain="{enabled}";}else{$reject_unknown_sender_domain="{disabled}";}
if($reject_invalid_hostname==1){$reject_invalid_hostname="{enabled}";}else{$reject_invalid_hostname="{disabled}";}
if($reject_non_fqdn_sender==1){$reject_non_fqdn_sender="{enabled}";}else{$reject_non_fqdn_sender="{disabled}";}
if($RestrictToInternalDomains==1){$RestrictToInternalDomains="{enabled}";}else{$RestrictToInternalDomains="{disabled}";}
if($PostfixHideClientMua==1){$PostfixHideClientMua="{enabled}";}else{$PostfixHideClientMua="{disabled}";}
//Postscreen ------------------------------------------------------------------------------------
$postscreen_js="Loadjs('postscreen.php?hostname=$hostname&ou=$ou');";
$EnablePostScreen=$main->GET("EnablePostScreen");
//.........这里部分代码省略.........
开发者ID:rsd,项目名称:artica-1.5,代码行数:101,代码来源:postfix.synthesis.php
示例20: instances_duplicate_perform
function instances_duplicate_perform(){
$tpl=new templates();
$tcp=new IP();
$q=new mysql();
$sock=new sockets();
$instance_hostname=$_GET["hostname"];
$instance_src_hostname=$_GET["src"];
$main=new maincf_multi($instance_src_hostname);
$novirtual=false;
$instance_ip=$_GET["ip"];
$instance_ip_src=$main->ip_addr;
if($instance_ip_src==null){echo $tpl->javascript_parse_text("\"$instance_src_hostname\" No such instance");return;}
$organization=$_GET["ou"];
if($organization==null){
echo $tpl->javascript_parse_text("{error_choose_organization}");return;}
if(trim($instance_hostname)==null){echo $tpl->javascript_parse_text("{instance_server_name}: NULL");return;}
if(!$tcp->isValid($instance_ip)){echo $tpl->javascript_parse_text("{ipaddr}: \"$instance_ip\" Invalid");return;}
if(!$tcp->isValid($instance_ip_src)){echo $tpl->javascript_parse_text("{ipaddr}: \"$instance_ip_src\" Invalid");return;}
$main=new maincf_multi(null,null,$instance_ip);
if($main->myhostname<>null){echo $tpl->javascript_parse_text("{ipaddr}: \"$instance_ip\" {already_used} -> $main->myhostname");return;}
$main=new maincf_multi($instance_hostname,null,null);
if($main->ip_addr<>null){echo $tpl->javascript_parse_text("{hostname}: \"$instance_hostname\" {already_used} -> $main->ip_addr");return;}
$sql="SELECT ipaddr FROM nics_virtuals WHERE ipaddr='$instance_ip'";
$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
if($ligne["ipaddr"]<>null){echo $tpl->javascript_parse_text("{ipaddr}: \"$instance_ip\" {already_used} -> {virtual_interfaces}");return;}
$sql="SELECT ipaddr FROM nics_vlan WHERE ipaddr='$instance_ip'";
$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
if($ligne["ipaddr"]<>null){
writelogs("Associated to a vlan -> unset Contruct virtuals addresses",__FUNCTION__,__FILE__,__LINE__);
$novirtual=true;
}
$PING=trim($sock->getFrameWork("cmd.php?ping=".urlencode($instance_ip)));
if($PING=="TRUE"){
echo $tpl->javascript_parse_text("$instance_ip:\n{ip_already_exists_in_the_network}");
return;
}
if(!$novirtual){
writelogs("No virtual: FALSE",__FUNCTION__,__FILE__,__LINE__);
$instance_ip_tbl=explode(".",$instance_ip);
unset($instance_ip_tbl[count($instance_ip_tbl)-1]);
$net=@implode(".",$instance_ip_tbl);
writelogs("virtual: net -&
|
请发表评论