本文整理汇总了PHP中maincf_multi类的典型用法代码示例。如果您正苦于以下问题:PHP maincf_multi类的具体用法?PHP maincf_multi怎么用?PHP maincf_multi使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了maincf_multi类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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"]}");
}
示例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"]}");
}
示例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');
}
示例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"]}");
}
示例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"]}");
}
示例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"]}");
}
示例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"]}");
}
示例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"]}");
}
示例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"]}");
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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;
//.........这里部分代码省略.........