コード例 #1
0
ファイル: postfix.mime.php プロジェクト: BillTheBest/1.6.x
function popup()
{
    $hostname = $_GET["hostname"];
    $page = CurrentPageName();
    $users = new usersMenus();
    $tpl = new templates();
    $t = time();
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $detect_8bit_encoding_header = $main->GET("detect_8bit_encoding_header");
    $disable_mime_input_processing = $main->GET("disable_mime_input_processing");
    $disable_mime_output_conversion = $main->GET("disable_mime_output_conversion");
    $mime_nesting_limit = $main->GET("mime_nesting_limit");
    if (!is_numeric($detect_8bit_encoding_header)) {
        $detect_8bit_encoding_header = 1;
    }
    if (!is_numeric($disable_mime_input_processing)) {
        $disable_mime_input_processing = 0;
    }
    if (!is_numeric($disable_mime_output_conversion)) {
        $disable_mime_output_conversion = 0;
    }
    if (!is_numeric($mime_nesting_limit)) {
        $mime_nesting_limit = 100;
    }
    $html = "\n\t<div id='{$t}'></div>\n\t\n\t<div style='width:98%' class=form>\n\t<table>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{detect_8bit_encoding_header}:</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_checkbox("detect_8bit_encoding_header-{$t}", 1, $detect_8bit_encoding_header) . "</td>\n\t\t<td width=1%>" . help_icon("{detect_8bit_encoding_header_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{disable_mime_output_conversion}:</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_checkbox("disable_mime_output_conversion-{$t}", 1, $disable_mime_output_conversion) . "</td>\n\t\t<td width=1%>" . help_icon("{disable_mime_output_conversion_text}") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{disable_mime_input_processing}:</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_checkbox("disable_mime_input_processing-{$t}", 1, $disable_mime_input_processing) . "</td>\n\t\t<td width=1%>" . help_icon("{disable_mime_input_processing_text}") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{mime_nesting_limit}</strong>:</td>\n\t\t<td>" . Field_text("mime_nesting_limit-{$t}", $mime_nesting_limit, 'width:70px;font-size:16px;padding:3px;text-align:right') . " </td>\n\t\t<td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td align='right' colspan=2><hr>" . button("{apply}", "Save{$t}()", "18px") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar X_Save{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\t}\t\t\n\t\n\tfunction Save{$t}(){\n\t\tdetect_8bit_encoding_header=0;\n\t\tdisable_mime_output_conversion=0;\n\t\tdisable_mime_input_processing=0;\n\t\t\n\t\tif(document.getElementById('detect_8bit_encoding_header-{$t}').checked){detect_8bit_encoding_header=1;}\n\t\tif(document.getElementById('disable_mime_output_conversion-{$t}').checked){disable_mime_output_conversion=1;}\n\t\tif(document.getElementById('disable_mime_input_processing-{$t}').checked){disable_mime_input_processing=1;}\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('hostname','{$hostname}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('detect_8bit_encoding_header',detect_8bit_encoding_header);\n\t\tXHR.appendData('disable_mime_output_conversion',disable_mime_output_conversion);\n\t\tXHR.appendData('disable_mime_input_processing',disable_mime_input_processing);\n\t\tXHR.appendData('mime_nesting_limit',document.getElementById('mime_nesting_limit-{$t}').value);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_Save{$t});\n\t}\n\t\n\t\n\t\n\t</script>\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #2
0
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');
}
コード例 #3
0
function popup_index()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $add_server_domain = $tpl->_ENGINE_parse_body("{add_server_domain}");
    $main = new maincf_multi($_GET["hostname"]);
    $smtp_connection_cache_on_demand = $main->GET("smtp_connection_cache_on_demand");
    $smtp_connection_cache_time_limit = $main->GET("smtp_connection_cache_time_limit");
    $smtp_connection_reuse_time_limit = $main->GET("smtp_connection_reuse_time_limit");
    $connection_cache_ttl_limit = $main->GET("connection_cache_ttl_limit");
    $connection_cache_status_update_time = $main->GET("connection_cache_status_update_time");
    if (!is_numeric($smtp_connection_cache_on_demand)) {
        $smtp_connection_cache_on_demand = 1;
    }
    if ($smtp_connection_cache_time_limit == null) {
        $smtp_connection_cache_time_limit = "2s";
    }
    if ($smtp_connection_reuse_time_limit == null) {
        $smtp_connection_reuse_time_limit = "300s";
    }
    if ($connection_cache_ttl_limit == null) {
        $connection_cache_ttl_limit = "2s";
    }
    if ($connection_cache_status_update_time == null) {
        $connection_cache_status_update_time = "600s";
    }
    $html = "\n<div id='smtp_connection_cache_on_demand_div'></div>\n<table style='width:99%' class=form>\n<tbody>\n\t<tr>\n\t\t<td class=legend nowrap><strong>{smtp_connection_cache_on_demand}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_checkbox('smtp_connection_cache_on_demand', 1, $smtp_connection_cache_on_demand) . "</td>\n\t\t<td width=1%>" . help_icon("{smtp_connection_cache_destinations_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{smtp_connection_cache_time_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connection_cache_time_limit', $smtp_connection_cache_time_limit, 'width:50px;font-size:14px', null, null, '') . "\n\t\t<td width=1%>" . help_icon("{smtp_connection_cache_time_limit_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{smtp_connection_reuse_time_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connection_reuse_time_limit', $smtp_connection_reuse_time_limit, 'width:50px;font-size:14px', null, null, '') . "\n\t\t<td width=1%>" . help_icon("{smtp_connection_reuse_time_limit_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{connection_cache_ttl_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('connection_cache_ttl_limit', $connection_cache_ttl_limit, 'width:50px;font-size:14px', null, null, '') . "\n\t\t<td width=1%>" . help_icon("{connection_cache_ttl_limit_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{connection_cache_status_update_time}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('connection_cache_status_update_time', $connection_cache_status_update_time, 'width:50px;font-size:14px', null, null) . "\n\t\t<td width=1%>" . help_icon("{connection_cache_status_update_time_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap colspan='3' align='right'><hr>\n\t\t" . button("{apply}", "smtp_connection_cache_on_demand_save()") . "\n\t</td>\n\t\t\n\t</tr>\t\t\t\n\t</tbody>\n</table>\t\t\t\t\n\n<table style='width:99%' class=form>\n<tbody>\n\t<tr>\n\t\n\t\n\t\t<td class=legend nowrap><strong>{smtp_connection_cache_destinations_field}&nbsp;:</strong></td>\n\t\t<td align='left'><input type='button' value='{add_server_domain}&nbsp;&raquo;' OnClick=\"javascript:PostFixAddServerCache();\">\n\t</tr>\n</tbody>\n</table>\t\n\n\n</td>\n</tr>\n</table><div id='ServerCacheList'>" . PostFixServerCacheList() . "</div>\n\n<script>\n\n\tvar x_smtp_connection_cache_on_demand_save=function(obj){\n    \tvar tempvalue=trim(obj.responseText);\n\t  \tif(tempvalue.length>3){alert(tempvalue);}\n\t\tdocument.getElementById('smtp_connection_cache_on_demand_div').innerHTML='';\n\t\t}\n\nfunction smtp_connection_cache_on_demand_save(){\n\tvar XHR = new XHRConnection();\t\n\tif(document.getElementById('smtp_connection_cache_on_demand').checked){XHR.appendData('smtp_connection_cache_on_demand','1');}else{XHR.appendData('smtp_connection_cache_on_demand','0');}\n\tXHR.appendData('smtp_connection_cache_time_limit',document.getElementById('smtp_connection_cache_time_limit').value);\n\tXHR.appendData('smtp_connection_reuse_time_limit',document.getElementById('smtp_connection_reuse_time_limit').value);\n\tXHR.appendData('connection_cache_ttl_limit',document.getElementById('connection_cache_ttl_limit').value);\n\tXHR.appendData('connection_cache_status_update_time',document.getElementById('connection_cache_status_update_time').value);\n\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\tAnimateDiv('smtp_connection_cache_on_demand_div');\n\tXHR.sendAndLoad('{$page}', 'POST',x_smtp_connection_cache_on_demand_save);\t\n}\nfunction PostFixAddServerCache(){\n\tYahooWin3(550,'{$page}?PostFixAddServerCache=yes&hostname={$_GET["hostname"]}','{$add_server_domain}');\n\t}\n\t\nfunction CacheReloadList(){\n\tLoadAjax('ServerCacheList','{$page}?CacheReloadList=yes&hostname={$_GET["hostname"]}');\n\t}\t\n\tCacheReloadList();\n</script>\n\n\n";
    $tpl = new Templates();
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #4
0
function popup()
{
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $EnableSubmission = $main->GET("EnableSubmission");
    $EnableSasl = $main->GET("EnableSasl");
    $sasl = Paragraphe_switch_img('{sasl_title}', '{sasl_intro}', 'EnableSasl', $EnableSasl, '{enable_disable}', 390);
    $PostfixEnableSubmission_field = Paragraphe_switch_img('{PostfixEnableSubmission}', '{PostfixEnableSubmission_text}', 'EnableSubmission', $EnableSubmission, '{enable_disable}', 390);
    $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:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t{$sasl}\n\t\t\t<hr>{$PostfixEnableSubmission_field}\n\t\t\t<div style='text-align:right'>\n\t\t\t<hr>" . button("{edit}", "postfix_multi_enable_auth()") . "\n\t\t\t</div>\n\t\t</td>\n\t<td valign='top'>\n\t\t\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'postfix.sasl.php');
}
コード例 #5
0
ファイル: postfix.notifs.php プロジェクト: brucewu16899/1.6.x
function id_sender()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $main = new maincf_multi($_GET["hostname"]);
    $double_bounce_sender = $main->GET("double_bounce_sender");
    $address_verify_sender = $main->GET("address_verify_sender");
    $twobounce_notice_recipient = $main->GET("2bounce_notice_recipient");
    $error_notice_recipient = $main->GET("error_notice_recipient");
    $delay_notice_recipient = $main->GET("delay_notice_recipient");
    $empty_address_recipient = $main->GET("empty_address_recipient");
    $sock = new sockets();
    $PostfixPostmaster = $sock->GET_INFO("PostfixPostmaster");
    if (trim($PostfixPostmaster) == null) {
        $PostfixPostmaster = "postmaster";
    }
    if ($double_bounce_sender == null) {
        $double_bounce_sender = "double-bounce";
    }
    if ($address_verify_sender == null) {
        $address_verify_sender = "\$double_bounce_sender";
    }
    if ($twobounce_notice_recipient == null) {
        $twobounce_notice_recipient = "postmaster";
    }
    if ($error_notice_recipient == null) {
        $error_notice_recipient = $PostfixPostmaster;
    }
    if ($delay_notice_recipient == null) {
        $delay_notice_recipient = $PostfixPostmaster;
    }
    if ($empty_address_recipient == null) {
        $empty_address_recipient = $PostfixPostmaster;
    }
    $notify_class = unserialize(base64_decode($main->GET_BIGDATA("notify_class")));
    if (!is_array($notify_class)) {
        $notify_class["notify_class_resource"] = 1;
        $notify_class["notify_class_software"] = 1;
    }
    $notify_class_software = $notify_class["notify_class_software"];
    $notify_class_resource = $notify_class["notify_class_resource"];
    $notify_class_policy = $notify_class["notify_class_policy"];
    $notify_class_delay = $notify_class["notify_class_delay"];
    $notify_class_2bounce = $notify_class["notify_class_2bounce"];
    $notify_class_bounce = $notify_class["notify_class_bounce"];
    $notify_class_protocol = $notify_class["notify_class_protocol"];
    $html = "<div class=text-info>{POSTFIX_SMTP_NOTIFICATIONS_TEXT}</div>\n\t<div id='ffm1notif'>\n\t<table style='width:99%' class=form>\t\n\t<tr>\n\t\t<td class=legend nowrap>{double_bounce_sender}:</td>\n\t\t<td>" . Field_text('double_bounce_sender', $double_bounce_sender, 'font-size:13px;padding:3px;width:160px') . "</td>\n\t\t<td>" . help_icon("{double_bounce_sender_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap nowrap>{address_verify_sender}:</td>\n\t\t<td>" . Field_text('address_verify_sender', $address_verify_sender, 'font-size:13px;padding:3px;width:160px') . "</td>\n\t\t<td>" . help_icon("{address_verify_sender_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{2bounce_notice_recipient}:</td>\n\t\t<td>" . Field_text('2bounce_notice_recipient', $twobounce_notice_recipient, 'font-size:13px;padding:width:160px') . "</td>\n\t\t<td>" . help_icon("{2bounce_notice_recipient_text}") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend nowrap>{error_notice_recipient}:</td>\n\t\t<td>" . Field_text('error_notice_recipient', $error_notice_recipient, 'font-size:13px;padding:width:160px') . "</td>\n\t\t<td>" . help_icon("{error_notice_recipient_text}") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend nowrap>{delay_notice_recipient}:</td>\n\t\t<td>" . Field_text('delay_notice_recipient', $delay_notice_recipient, 'font-size:13px;padding:width:160px') . "</td>\n\t\t<td>" . help_icon("{delay_notice_recipient_text}") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend nowrap>{empty_address_recipient}:</td>\n\t\t<td>" . Field_text('empty_address_recipient', $empty_address_recipient, 'font-size:13px;padding:width:160px') . "</td>\n\t\t<td>" . help_icon("{empty_address_recipient_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{empty_address_recipient}:</td>\n\t\t<td>" . Field_text('empty_address_recipient', $empty_address_recipient, 'font-size:13px;padding:width:160px') . "</td>\n\t\t<td>" . help_icon("{empty_address_recipient_text}") . "</td>\n\t</tr>\n\t</table>\n<div style='font-size:16px;margin:10px'>{notify_class}</div>\n<table style='width:99%' class=form>\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{notify_class_bounce}:</td>\n\t\t<td>" . Field_checkbox('notify_class_bounce', 1, $notify_class_bounce) . "</td>\n\t\t<td>" . help_icon("{notify_class_bounce_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap>{notify_class_2bounce}:</td>\n\t\t<td>" . Field_checkbox('notify_class_2bounce', 1, $notify_class_2bounce) . "</td>\n\t\t<td>" . help_icon("{notify_class_2bounce_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{notify_class_delay}:</td>\n\t\t<td>" . Field_checkbox('notify_class_delay', 1, $notify_class_delay) . "</td>\n\t\t<td>" . help_icon("{notify_class_delay_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap>{notify_class_policy}:</td>\n\t\t<td>" . Field_checkbox('notify_class_policy', 1, $notify_class_policy) . "</td>\n\t\t<td>" . help_icon("{notify_class_policy_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap>{notify_class_protocol}:</td>\n\t\t<td>" . Field_checkbox('notify_class_protocol', 1, $notify_class_protocol) . "</td>\n\t\t<td>" . help_icon("{notify_class_protocol_text}") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend nowrap>{notify_class_resource}:</td>\n\t\t<td>" . Field_checkbox('notify_class_resource', 1, $notify_class_resource) . "</td>\n\t\t<td>" . help_icon("{notify_class_resource_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{notify_class_software}:</td>\n\t\t<td>" . Field_checkbox('notify_class_software', 1, $notify_class_software) . "</td>\n\t\t<td>" . help_icon("{notify_class_software_text}") . "</td>\n\t</tr>\n\t\n\n\t\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t<hr>\n\t\t" . button("{apply}", "SavePostfixNotificationsForm()") . "\n\t\t</td>\n\t</tr>\t\t\n</table>\t\n</div>\n\t<script>\n\t\n\tvar x_SavePostfixNotificationsForm= function (obj) {\n\t\tvar results=trim(obj.responseText);\n\t\tif(results.length>0){alert(results);}\n\t\tRefreshTab('main_config_postfix_notifs');\n\t}\t\n\t\n\tfunction SavePostfixNotificationsForm(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('double_bounce_sender',document.getElementById('double_bounce_sender').value);\n\t\tXHR.appendData('address_verify_sender',document.getElementById('address_verify_sender').value);\n\t\tXHR.appendData('2bounce_notice_recipient',document.getElementById('2bounce_notice_recipient').value);\n\t\tXHR.appendData('error_notice_recipient',document.getElementById('error_notice_recipient').value);\n\t\tXHR.appendData('delay_notice_recipient',document.getElementById('delay_notice_recipient').value);\n\t\tXHR.appendData('empty_address_recipient',document.getElementById('empty_address_recipient').value);\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tif(document.getElementById('notify_class_software').checked){XHR.appendData('notify_class_software','1');}else{XHR.appendData('notify_class_software','0');}\n\t\tif(document.getElementById('notify_class_resource').checked){XHR.appendData('notify_class_resource','1');}else{XHR.appendData('notify_class_resource','0');}\n\t\tif(document.getElementById('notify_class_policy').checked){XHR.appendData('notify_class_policy','1');}else{XHR.appendData('notify_class_policy','0');}\n\t\tif(document.getElementById('notify_class_delay').checked){XHR.appendData('notify_class_delay','1');}else{XHR.appendData('notify_class_delay','0');}\n\t\tif(document.getElementById('notify_class_2bounce').checked){XHR.appendData('notify_class_2bounce','1');}else{XHR.appendData('notify_class_2bounce','0');}\n\t\tif(document.getElementById('notify_class_bounce').checked){XHR.appendData('notify_class_bounce','1');}else{XHR.appendData('notify_class_bounce','0');}\n\t\tif(document.getElementById('notify_class_protocol').checked){XHR.appendData('notify_class_protocol','1');}else{XHR.appendData('notify_class_protocol','0');}\n\t\n\t\tdocument.getElementById('ffm1notif').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SavePostfixNotificationsForm);\n\t}\n\t\t\n\t\n\t</script>\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #6
0
function settings_perfs()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $master = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $in_flow_delay = $master->GET("in_flow_delay");
    $minimal_backoff_time = $master->GET("minimal_backoff_time");
    $maximal_backoff_time = $master->GET("maximal_backoff_time");
    $bounce_queue_lifetime = $master->GET("bounce_queue_lifetime");
    $default_process_limit = $master->GET("default_process_limit");
    $maximal_queue_lifetime = $master->GET("maximal_queue_lifetime");
    $queue_run_delay = $master->GET("queue_run_delay");
    if ($in_flow_delay == null) {
        $in_flow_delay = "1s";
    }
    if ($minimal_backoff_time == null) {
        $minimal_backoff_time = "300s";
    }
    if ($maximal_backoff_time == null) {
        $maximal_backoff_time = "4000s";
    }
    if ($default_process_limit == null) {
        $default_process_limit = "100";
    }
    if ($bounce_queue_lifetime == null) {
        $bounce_queue_lifetime = "5d";
    }
    if ($maximal_queue_lifetime == null) {
        $maximal_queue_lifetime = "5d";
    }
    if ($queue_run_delay == null) {
        $queue_run_delay = "5m";
    }
    $qmgr_message_active_limit = $master->GET("qmgr_message_active_limit");
    $qmgr_message_recipient_limit = $master->GET("qmgr_message_recipient_limit");
    $qmgr_message_recipient_minimum = $master->GET("qmgr_message_recipient_minimum");
    if (!is_numeric($qmgr_message_active_limit)) {
        $qmgr_message_active_limit = 20000;
    }
    if (!is_numeric($qmgr_message_recipient_limit)) {
        $qmgr_message_recipient_limit = 20000;
    }
    if (!is_numeric($qmgr_message_recipient_minimum)) {
        $qmgr_message_recipient_minimum = 10;
    }
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'><img src='img/global-settings-128.png' id='global-settings-128'></td>\n\t\t<td valign='top'>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{in_flow_delay}:</td>\n\t\t\t\t<td>" . Field_text("in_flow_delay", $in_flow_delay, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{in_flow_delay_text}") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{queue_run_delay}:</td>\n\t\t\t\t<td>" . Field_text("queue_run_delay", $queue_run_delay, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{queue_run_delay_text}") . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{minimal_backoff_time}:</td>\n\t\t\t\t<td>" . Field_text("minimal_backoff_time", $minimal_backoff_time, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{minimal_backoff_time_text}") . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{maximal_backoff_time}:</td>\n\t\t\t\t<td>" . Field_text("maximal_backoff_time", $maximal_backoff_time, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{maximal_backoff_time_text}") . "</td>\n\t\t\t</tr>\n\n\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{default_process_limit}:</td>\n\t\t\t\t<td>" . Field_text("default_process_limit", $default_process_limit, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{default_process_limit_text}") . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td colspan=3 style='font-size:16px;font-weight:bold'>{parameters}:&nbsp;&laquo;&nbsp;{queue}&nbsp;&raquo;<hr></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{bounce_queue_lifetime}:</td>\n\t\t\t\t<td>" . Field_text("bounce_queue_lifetime", $bounce_queue_lifetime, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{bounce_queue_lifetime_text}") . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend valign='top' nowrap>{maximal_queue_lifetime}&nbsp;:</strong></td>\n\t\t\t\t<td>" . Field_text("maximal_queue_lifetime", $maximal_queue_lifetime, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{maximal_queue_lifetime_text}") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend valign='top' nowrap>{qmgr_message_active_limit}&nbsp;:</strong></td>\n\t\t\t\t<td>" . Field_text("qmgr_message_active_limit", $qmgr_message_active_limit, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%></td>\n\t\t\t</tr>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\n\t\t\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_limit}&nbsp;:</strong></td>\n\t\t\t\t<td>" . Field_text("qmgr_message_recipient_limit", $qmgr_message_recipient_limit, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{qmgr_message_recipient_limit_text}") . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\t\t\t\t\t\t\t\t\n\t\t\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_minimum}&nbsp;:</strong></td>\n\t\t\t\t<td>" . Field_text("qmgr_message_recipient_minimum", $qmgr_message_recipient_minimum, "width:90px;padding:3px;font-size:13px") . "</td>\n\t\t\t\t<td width=1%>" . help_icon("{qmgr_message_recipient_minimum_text}") . "</td>\n\t\t\t</tr>\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td colspan=3 align='right'>\n\t\t\t\t<hr>\n\t\t\t\t" . button("{apply}", "SaveHostTunePostfix()") . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\n\t<script>\n\tvar x_SaveHostTunePostfix= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tdocument.getElementById('global-settings-128').src='img/global-settings-128.png';\n\t}\t\n\t\n\t\n\t\tfunction SaveHostTunePostfix(){\t\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('settings-perfs-save','yes');\n\t\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\t\tXHR.appendData('in_flow_delay',document.getElementById('in_flow_delay').value);\n\t\t\tXHR.appendData('minimal_backoff_time',document.getElementById('minimal_backoff_time').value);\n\t\t\tXHR.appendData('maximal_backoff_time',document.getElementById('maximal_backoff_time').value);\n\t\t\tXHR.appendData('bounce_queue_lifetime',document.getElementById('bounce_queue_lifetime').value);\n\t\t\tXHR.appendData('default_process_limit',document.getElementById('default_process_limit').value);\n\t\t\tXHR.appendData('maximal_queue_lifetime',document.getElementById('maximal_queue_lifetime').value);\n\t\t\t\n\t\t\t\n\t\t\tXHR.appendData('queue_run_delay',document.getElementById('queue_run_delay').value);\n\t\t\tXHR.appendData('qmgr_message_active_limit',document.getElementById('qmgr_message_active_limit').value);\n\t\t\tXHR.appendData('qmgr_message_recipient_limit',document.getElementById('qmgr_message_recipient_limit').value);\n\t\t\tXHR.appendData('qmgr_message_recipient_minimum',document.getElementById('qmgr_message_recipient_minimum').value);\n\t\t\t\n\t\t\tdocument.getElementById('global-settings-128').src='img/wait_verybig.gif';\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveHostTunePostfix);\t\n\t\t\t}\t\n\t\n\t\n\t</script>\n\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #7
0
ファイル: postfix.haproxy.php プロジェクト: articatech/artica
function popup()
{
    $hostname = $_GET["hostname"];
    $page = CurrentPageName();
    $users = new usersMenus();
    $tpl = new templates();
    $t = time();
    if (preg_match("#^([0-9]+)\\.([0-9]+)#", $users->POSTFIX_VERSION, $re)) {
        $major = intval($re[1]);
        $minor = intval($re[2]);
        $binver = "{$major}{$minor}";
        if ($binver < 210) {
            echo error_not_compatible();
            die;
        }
    }
    $main = new maincf_multi($hostname);
    $EnablePostfixHaProxy = $main->GET("EnablePostfixHaProxy");
    if (!is_numeric($EnablePostfixHaProxy)) {
        $EnablePostfixHaProxy = 0;
    }
    $p = Paragraphe_switch_img("{enable_smtp_haproxy}", "{enable_smtp_haproxy_explain}", "EnablePostfixHaProxy-{$t}", $EnablePostfixHaProxy, null, 880);
    $html = "\n\t<div id='{$t}'>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td>{$p}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right'>" . button("{apply}", "SaveHapProxyCompliant{$t}()", "16px") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar X_SaveHapProxyCompliant{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tYahooWin5Hide();\n\t\t}\t\t\n\t\n\tfunction SaveHapProxyCompliant{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('hostname','{$hostname}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('EnablePostfixHaProxy',document.getElementById('EnablePostfixHaProxy-{$t}').value);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_SaveHapProxyCompliant{$t});\n\t}\n\t\n\t</script>\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #8
0
ファイル: postfix.other.php プロジェクト: BillTheBest/1.6.x
function otherpage()
{
    $page = CurrentPageName();
    $main = new maincf_multi($_GET["hostname"]);
    $enable_original_recipient = $main->GET("enable_original_recipient");
    $smtpd_discard_ehlo_keywords = $main->GET("smtpd_discard_ehlo_keywords");
    if (!is_numeric($enable_original_recipient)) {
        $enable_original_recipient = 1;
    }
    $undisclosed_recipients_header = $main->GET("undisclosed_recipients_header");
    if ($undisclosed_recipients_header == null) {
        $undisclosed_recipients_header = "To: undisclosed-recipients:;";
    }
    $t = time();
    $html = "\n<div id='otherpagedvi' style='width:98%' class=form>\n\t\t\n<table style='width:99%'>\n<tr>\n\t<td class=legend nowrap style='font-size:22px'>{undisclosed_recipients_header}:</td>\n\t<td>" . Field_text("undisclosed_recipients_header-{$t}", $undisclosed_recipients_header, 'width:90%;font-size:22px') . "</td>\n\t<td>" . help_icon("{undisclosed_recipients_header_text}") . "</td>\n</tr>\n<tr>\n\t<td class=legend nowrap style='font-size:22px'>{smtpd_discard_ehlo_keywords}:</td>\n\t<td>" . Field_text("smtpd_discard_ehlo_keywords-{$t}", $smtpd_discard_ehlo_keywords, 'width:90%;font-size:22px') . "</td>\n\t<td>" . help_icon("{smtpd_discard_ehlo_keywords_text}") . "</td>\n</tr>\t\t\t\n\t\t\t\n\t\t\t\n<tr>\n\t<td class=legend nowrap style='font-size:22px'>{enable_original_recipient}:</td>\n\t<td>" . Field_checkbox_design('enable_original_recipient', 1, $enable_original_recipient) . "</td>\n\t<td>" . help_icon("{enable_original_recipient_text}") . "</td>\n</tr>\n\n\n\n<tr><td colspan=2 align='right'><hr>" . button("{apply}", "SavePostfixOtherSection{$t}()", "36") . "</td></tr>\n</table>\n</div>\n<script>\n\tvar x_SavePostfixOtherSection= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t\t\n\t}\t\n\t\n\tfunction SavePostfixOtherSection(){\n\t\tvar undisclosed_recipients_header=document.getElementById('undisclosed_recipients_header').value;\n\t\tvar enable_original_recipient=document.getElementById('enable_original_recipient').value;\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tXHR.appendData('enable_original_recipient',document.getElementById('enable_original_recipient-{$t}').value);\n\t\tXHR.appendData('undisclosed_recipients_header',document.getElementById('undisclosed_recipients_header-{$t}').value);\n\t\tXHR.appendData('smtpd_discard_ehlo_keywords',document.getElementById('smtpd_discard_ehlo_keywords-{$t}').value);\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SavePostfixOtherSection{$t});\t\t  \n\t}\n</script>\t\t\n";
    $tpl = new Templates();
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #9
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $main = new maincf_multi($_GET["hostname"]);
    $t = time();
    $html = "\n\t<div id='{$t}'></div>\n\t<div class=text-info style='font-size:14px'>{postfix_mailbox_transport_art_expl}</div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{agent_address}:</td>\n\t\t<td class=legend>" . Field_text("mailbox_transport-{$t}", $main->GET("mailbox_transport"), "font-size:16px;width:300px", null, null, null, false, "SaveMailBoxTransportCK{$t}(event)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "SaveMailBoxTransport{$t}()", "18px") . "</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\tvar X_SaveMailBoxTransport{$t}= function (obj) {\n\t\t\t\tvar results=obj.responseText;\n\t\t\t\tif (results.length>0){alert(results);}\n\t\t\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\t\n\t\tfunction SaveMailBoxTransportCK{$t}(e){\n\t\t\tif(checkEnter(e)){SaveMailBoxTransport{$t}();}\n\t\t}\n\t\t\n\t\tfunction SaveMailBoxTransport{$t}(){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\t\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\t\t\tXHR.appendData('mailbox_transport',document.getElementById('mailbox_transport-{$t}').value);\n\t\t\t\tAnimateDiv('{$t}');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',X_SaveMailBoxTransport{$t});\n\t\t\t\t\n\t\t\t}\t\n\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #10
0
function popup_index()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $main = new maincf_multi($_GET["hostname"]);
    $address_verify_map = $main->GET("address_verify_map");
    $address_verify_negative_cache = $main->GET("address_verify_negative_cache");
    $address_verify_poll_count = $main->GET("address_verify_poll_count");
    $address_verify_poll_delay = $main->GET("address_verify_poll_delay");
    $address_verify_sender = $main->GET("address_verify_sender");
    $address_verify_negative_expire_time = $main->GET("address_verify_negative_expire_time");
    $address_verify_negative_refresh_time = $main->GET("address_verify_negative_refresh_time");
    $address_verify_positive_expire_time = $main->GET("address_verify_positive_expire_time");
    $address_verify_positive_refresh_time = $main->GET("address_verify_positive_refresh_time");
    if ($address_verify_map == null) {
        if ($_GET["hostname"] == "master") {
            $address_verify_map = "btree:/var/lib/postfix/verify";
        } else {
            $address_verify_map = "btree:/var/lib/postfix-{$_GET["hostname"]}/verify";
        }
    }
    if (!is_numeric($address_verify_negative_cache)) {
        $address_verify_negative_cache = 1;
    }
    if (!is_numeric($address_verify_poll_count)) {
        $address_verify_poll_count = 3;
    }
    if ($address_verify_poll_delay == null) {
        $address_verify_poll_delay = "3s";
    }
    if ($address_verify_sender == null) {
        $address_verify_sender = "double-bounce";
    }
    if ($address_verify_negative_expire_time == null) {
        $address_verify_negative_expire_time = "3d";
    }
    if ($address_verify_negative_refresh_time == null) {
        $address_verify_negative_refresh_time = "3h";
    }
    if ($address_verify_positive_expire_time == null) {
        $address_verify_positive_expire_time = "31d";
    }
    if ($address_verify_positive_refresh_time == null) {
        $address_verify_positive_refresh_time = "7d";
    }
    $html = "\n<span id='PostFixVerifyDatabaseSaveDiv'></span>\n<div style='font-size:16px'>{address_verify_map_minitext}</div><div class=explain>{address_verify_map_text}</div><br>\n\n\t\t<table style='width:99%;margin:10px;' class='form'>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_map_field}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_map', $address_verify_map, "font-size:14px;width:220px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_negative_cache}:</strong></td>\n\t\t\t\t<td>" . Field_checkbox('address_verify_negative_cache', 1, $address_verify_negative_cache, '{address_verify_negative_cache_text}') . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_poll_count}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_poll_count', $address_verify_poll_count, 'width:60px;font-size:14px', null, null, '{address_verify_poll_count_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_poll_delay}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_poll_delay', $address_verify_poll_delay, 'width:60px;font-size:14px', null, null, '{address_verify_poll_delay_text}') . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_sender}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_sender', $address_verify_sender, 'width:160px;font-size:14px', null, null, '{address_verify_sender_text}') . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_negative_expire_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_negative_expire_time', $address_verify_negative_expire_time, 'width:60px;font-size:14px', null, null, '{address_verify_negative_expire_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_negative_refresh_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_negative_refresh_time', $address_verify_negative_refresh_time, 'width:60px;font-size:14px', null, null, '{address_verify_negative_refresh_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_positive_expire_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_positive_expire_time', $address_verify_positive_expire_time, 'width:60px;font-size:14px', null, null, '{address_verify_positive_expire_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_positive_refresh_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_positive_refresh_time', $address_verify_positive_refresh_time, 'width:60px;font-size:14px', null, null, '{address_verify_positive_refresh_time_text}') . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right' colspan=2>\n\t\t\t\t<hr>\n\t\t\t\t" . button("{apply}", "PostFixVerifyDatabaseSave()") . "\n\t\t\t\t</td>\n\t\t\t\t\n\t\t\t</tr>\n\t\t\t</tbody>\t\t\t\t\n\t\t</table>\n\t<script>\n\t\n\tvar x_PostFixVerifyDatabaseSave=function(obj){\n    \tvar tempvalue=trim(obj.responseText);\n\t  \tif(tempvalue.length>3){alert(tempvalue);}\n\t\tdocument.getElementById('PostFixVerifyDatabaseSaveDiv').innerHTML='';\n\t\t}\t\n\t\n\t\tfunction PostFixVerifyDatabaseSave(){\n\t\t\tvar XHR = new XHRConnection();\t\n\t\t\tif(document.getElementById('address_verify_negative_cache').checked){XHR.appendData('address_verify_negative_cache','1');}else{XHR.appendData('address_verify_negative_cache','0');}\n\t\t\tXHR.appendData('address_verify_map',document.getElementById('address_verify_map').value);\n\t\t\tXHR.appendData('address_verify_poll_count',document.getElementById('address_verify_poll_count').value);\n\t\t\tXHR.appendData('address_verify_poll_delay',document.getElementById('address_verify_poll_delay').value);\n\t\t\tXHR.appendData('address_verify_sender',document.getElementById('address_verify_sender').value);\n\t\t\tXHR.appendData('address_verify_negative_expire_time',document.getElementById('address_verify_negative_expire_time').value);\n\t\t\tXHR.appendData('address_verify_negative_refresh_time',document.getElementById('address_verify_negative_refresh_time').value);\n\t\t\tXHR.appendData('address_verify_positive_expire_time',document.getElementById('address_verify_positive_expire_time').value);\n\t\t\tXHR.appendData('address_verify_positive_refresh_time',document.getElementById('address_verify_positive_refresh_time').value);\n\t\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\t\tAnimateDiv('PostFixVerifyDatabaseSaveDiv');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_PostFixVerifyDatabaseSave);\t\t\t\t\n\t\t\n\t\t}\n\t</script>\t\t\n\t\t";
    $tpl = new Templates();
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #11
0
function popup()
{
    $enabled = 0;
    $master = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $form = Paragraphe_switch_img('{ENABLE_SMTPS}', '{SMTPS_TEXT}', 'enable_smtps', $master->GET("PostfixMasterEnableSSL"), null, 450);
    $page = CurrentPageName();
    $html = "\n\t<div id='smtpsmulti'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\n\t\t<td align='left' width=99%>{$form}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right'><hr>" . button("{save}", "SaveMasterMultiCFSSL()") . "</td>\n\t</tr>\n\t</table>\n\t</div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #12
0
function popup()
{
    $ou = base64_decode($_GET["ou"]);
    $main = new maincf_multi($_GET["hostname"], $ou);
    $page = CurrentPageName();
    $tpl = new templates();
    $PostFixEnableAiguilleuse = $main->GET("PostFixEnableAiguilleuse");
    $enable = Paragraphe_switch_img("{PostFixEnableAiguilleuse}", "{PostFixEnableAiguilleuse_text}", "PostFixEnableAiguilleuse", $PostFixEnableAiguilleuse, null, 350);
    $html = "\n<table style='width:100%'>\n<td valign='top' width=1%>\n<center>\n\t<img src='img/128-nodes.png' id='128-nodes'>\n</center>\n\t\t<table style='width:100%;margin-top:10px;padding:10px;width:220px'>\n\t\t<tr " . CellRollOver("PostFixEnableAiguilleuseAdd()") . ">\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_aiguilleuse_server}</i></div>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n</td>\n<td valign='top' width=99%>\n{$enable}\n<div style='margin:12px;text-align:right'>\t\n\t" . button("{apply}", "PostFixEnableAiguilleuseSave()") . "<hr>\n</div>\n<div id='PostFixEnableAiguilleuse-list' style='height:250px;width:100%;overflow:auto'>\t\n\n\n\n<script>\n\nvar x_PostFixEnableAiguilleuseSave= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\tdocument.getElementById('PostFixEnableAiguilleuse').src='img/128-nodes.png';\n\t}\n\t\n\t\n\tfunction PostFixEnableAiguilleuseSave(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('PostFixEnableAiguilleuse',document.getElementById('PostFixEnableAiguilleuse').value);\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tdocument.getElementById('PostFixEnableAiguilleuse').src='img/img/wait_verybig.gif';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_PostFixEnableAiguilleuseSave);\n\t\n\t}\n\n\tfunction RefreshPostfixAiguilleuseList(){\n\t\tLoadAjax('PostFixEnableAiguilleuse-list','{$page}?PostFixEnableAiguilleuse-list=yes&ou={$_GET["ou"]}&hostname={$_GET["hostname"]}');\n\t}\n\t\n\tRefreshPostfixAiguilleuseList();\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #13
0
function popup()
{
    $ou = base64_decode($_GET["ou"]);
    $main = new maincf_multi($_GET["hostname"], $ou);
    $page = CurrentPageName();
    $tpl = new templates();
    $PostfixHideClientMua = $main->GET("PostfixHideClientMua");
    $enable = Paragraphe_switch_img("{ENABLE_HIDE_CLIENT_MUA}", "{HIDE_CLIENT_MUA_TEXT}", "PostfixHideClientMua", $PostfixHideClientMua, null, 330);
    $html = "\n\t<div id='PostfixHideClientMuaDiv'>\n\t\t{$enable}\n\t<hr>\n\t\t<div style='text-align:right'>" . button("{apply}", "PostfixHideClientMuaMultiSave()") . "</div>\t\n\t\t\n\t</div>\n\t\n\t<script>\nvar x_PostfixHideClientMua= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\tLoadjs('{$page}?ou={$_GET["ou"]}&hostname={$_GET["hostname"]}');\n\t}\n\t\n\t\n\tfunction PostfixHideClientMuaMultiSave(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('PostfixHideClientMua',document.getElementById('PostfixHideClientMua').value);\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_PostfixHideClientMua);\n\t\n\t}\t\t\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #14
0
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") . "&nbsp;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);
}
コード例 #15
0
function popup()
{
    $ou = $_GET["ou"];
    $hostname = $_GET["hostname"];
    $main = new maincf_multi($hostname, $ou);
    $relayhost = $main->GET("relayhost");
    if (preg_match("#(.+?):(.+)#", $main->GET("relayhost_authentication"), $re)) {
        $username = $re[1];
        $password = $re[2];
    }
    $page = CurrentPageName();
    if ($relayhost != null) {
        $tools = new DomainsTools();
        $relayhost = "smtp:{$relayhost}";
        $relayT = $tools->transport_maps_explode($relayhost);
    }
    if ($relayT[1] != null) {
        $delete = imgtootltip("delete-48.png", "{delete}", "RelayHostDelete()");
    }
    $form = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t<div class=explain>{relayhost_text}</div>\n\t\t\t<div id='relayhostdiv'>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<td align='right' nowrap class=legend style='font-size:14px'>{relay_address}:</strong></td>\n\t\t\t\t\t\t<td style='font-size:12px'>" . Field_text('relay_address', $relayT[1], "font-size:14px;padding:3px") . "</td>\t\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<td align='right' nowrap class=legend style='font-size:14px'>{smtp_port}:</strong></td>\n\t\t\t\t\t\t\t<td style='font-size:12px'>" . Field_text('relay_port', $relayT[2], ";font-size:14px;padding:3px;width:90px") . "</td>\t\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap style='font-size:14px'>" . Field_yesno_checkbox_img('MX_lookups', $relayT[3], '{enable_disable}') . "</td>\n\t\t\t\t\t\t\t<td style='font-size:12px'>{MX_lookups}</td>\t\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<td align='right' nowrap class=legend style='font-size:14px'>{username}:</strong></td>\n\t\t\t\t\t\t\t<td style='font-size:12px'>" . Field_text('username', $username, "font-size:14px;padding:3px") . "</td>\t\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<td align='right' nowrap class=legend style='font-size:14px'>{password}:</strong></td>\n\t\t\t\t\t\t\t<td style='font-size:12px'>" . Field_password('password', $password, "font-size:14px;padding:3px") . "</td>\t\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td align='right' colspan=2 align='right'>" . button("{apply}", "PostfixSaveRelayHost()") . "</td>\n\t\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td align='left' colspan=2><hr><div class=explain>{MX_lookups}<br>{MX_lookups_text}</div></td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t\t<td valign='top'>{$delete}</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t</div>\n\t\t</td>\n\t</tr>\n</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body("{$form}");
}
コード例 #16
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $freeze_delivery_queue = $main->GET('freeze_delivery_queue');
    if ($freeze_delivery_queue == 1) {
        $value = 0;
    } else {
        $value = 1;
    }
    $html = "\n\t<div id='freeze-id'>\n\t" . Paragraphe_switch_img("{pause_the_queue}", "{pause_the_queue_explain}", "freeze", $value, null, 320) . "<hr>\n\t<div style='text-align:right'>" . button("{apply}", "SaveFreeze()") . "</div>\n\t</div>\n\t<script>\n\t\tvar x_SaveFreeze= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\t\tYahooWin3Hide();\n\t\t\tif(document.getElementById('postfix-multi-servers-listed')){\n\t\t\t\tRefreshPostfixMultiList();\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\t\n\t\t\tfunction SaveFreeze(site){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\t\tXHR.appendData('freeze_delivery_queue',document.getElementById('freeze').value);\n\t\t\tdocument.getElementById('freeze-id').innerHTML=\"<center style='margin:10px'><img src='img/wait_verybig.gif'></center>\";\n\t\t\tXHR.sendAndLoad(\"{$page}\", 'GET',x_SaveFreeze);\t\t\n\t\t}\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #17
0
function build_single_instance($ip)
{
    $sql = "SELECT `value`,`ou` FROM postfix_multi WHERE `key`='myhostname' AND `ip_address`='{$ip}'";
    $q = new mysql();
    $unix = new unix();
    $ldap = new clladp();
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
    $ou = $ligne["ou"];
    $hostname = $ligne["value"];
    $main = new maincf_multi($hostname, $ou);
    echo "Starting......: dkimproxy {$hostname}\n";
    $freeport = $main->GET("dkimproxy_listenport");
    $array = unserialize(base64_decode($main->GET_BIGDATA("dkimproxy_datas")));
    $unix = new unix();
    $key = "/etc/dkimproxy/{$hostname}/private.key";
    @mkdir("/etc/dkimproxy/{$hostname}", 640, true);
    if (!is_file($key)) {
        echo "Starting......: dkimproxy {$hostname} generating public and private key\n";
        $openssl = $unix->find_program("openssl");
        @mkdir("/etc/dkimproxy/{$hostname}", 640, true);
        shell_exec("{$openssl} genrsa -out /etc/dkimproxy/{$hostname}/private.key 1024");
        shell_exec("{$openssl} rsa -in /etc/dkimproxy/{$hostname}/private.key -pubout -out /etc/dkimproxy/{$hostname}/public.key");
    }
    if ($hostname == "master") {
        $domains = $ldap->AllDomains();
    } else {
        $domains = $ldap->hash_get_domains_ou($ou);
    }
    while (list($dom, $nil) = each($domains)) {
        $dd[] = $dom;
    }
    $conf[] = "# specify what address/port DKIMproxy should listen on";
    $conf[] = "listen    {$ip}:{$freeport}";
    $conf[] = "# specify what address/port DKIMproxy forwards mail to";
    $conf[] = "relay     {$ip}:33560";
    $conf[] = "# specify what domains DKIMproxy can sign for (comma-separated, no spaces)";
    $conf[] = "domain    " . @implode(",", $dd);
    $conf[] = "# specify what signatures to add";
    $conf[] = "signature dkim(c=relaxed)";
    $conf[] = "signature domainkeys(c=nofws)";
    $conf[] = "# specify location of the private key";
    $conf[] = "keyfile   /etc/dkimproxy/{$hostname}/private.key";
    $conf[] = "# specify the selector (i.e. the name of the key record put in DNS)";
    $conf[] = "selector  {$array["selector_name"]}";
    $conf[] = "min_servers 5";
    $conf[] = "min_spare_servers 2";
    $conf[] = "";
    echo "Starting......: dkimproxy {$hostname} generating {$hostname}.conf " . count($dd) . " domain(s)\n";
    @file_put_contents("/etc/dkimproxy/{$hostname}.conf", @implode("\n", $conf));
}
コード例 #18
0
ファイル: postfix.banner.php プロジェクト: brucewu16899/1.6.x
function popup()
{
    $hostname = $_GET["hostname"];
    $page = CurrentPageName();
    $users = new usersMenus();
    $tpl = new templates();
    $t = time();
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $smtpd_banner = $main->GET('smtpd_banner');
    if ($smtpd_banner == null) {
        $smtpd_banner = "\$myhostname ESMTP \$mail_name";
    }
    $html = "\n\t<div id='{$t}'></div>\n\t<div class=text-info style='font-size:14px'>{SMTP_BANNER_TEXT}</div>\n\t\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{SMTP_BANNER}:</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_text("SMTP_BANNER-{$t}", $smtpd_banner, "font-size:16px;width:300px;font-weight:bold") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2><hr>" . button("{apply}", "Save{$t}()", "18px") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar X_Save{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\t}\t\t\n\t\n\tfunction Save{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('hostname','{$hostname}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('SMTP_BANNER',document.getElementById('SMTP_BANNER-{$t}').value);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_Save{$t});\n\t}\n\t\n\t\n\t\n\t</script>\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #19
0
function popup()
{
    $ou = $_GET["ou"];
    $hostname = $_GET["hostname"];
    $maincf = new maincf_multi($hostname, $ou);
    $message_size_limit = $maincf->GET("message_size_limit");
    $default_destination_recipient_limit = $maincf->GET("default_destination_recipient_limit");
    $smtpd_recipient_limit = $maincf->GET("smtpd_recipient_limit");
    $mime_nesting_limit = $maincf->GET("mime_nesting_limit");
    $header_address_token_limit = $maincf->GET("header_address_token_limit");
    $virtual_mailbox_limit = $maincf->GET("virtual_mailbox_limit");
    $message_size_limit = $maincf->GET("message_size_limit") / 1024 / 1000;
    $virtual_mailbox_limit = $maincf->GET("virtual_mailbox_limit") / 1024 / 1000;
    $max_rcpt_to = $maincf->GET("max_rcpt_to");
    if ($message_size_limit == null) {
        $message_size_limit = 10240000 / 1024 / 1000;
    }
    if ($virtual_mailbox_limit == null) {
        $virtual_mailbox_limit = 10240000 / 1024 / 1000;
    }
    if ($default_destination_recipient_limit == null) {
        $default_destination_recipient_limit = 50;
    }
    if ($smtpd_recipient_limit == null) {
        $smtpd_recipient_limit = 1000;
    }
    if ($mime_nesting_limit == null) {
        $mime_nesting_limit = 100;
    }
    if ($header_address_token_limit == null) {
        $header_address_token_limit = 10240;
    }
    if (!is_numeric($max_rcpt_to)) {
        $max_rcpt_to = 0;
    }
    $html = "\n\t\t\n\t\t<div id='messages_restriction_id'>\n\t\t<div style='font-size:16px'><strong>{restrictions}</strong></div>\n\t\t<table class=form style='width:100%'>\n\t\t<tr>\n\t\t\t    <td nowrap class=legend style='font-size:13px'>{message_size_limit}</strong>:</td>\n\t\t\t    <td style='font-size:13px'>" . Field_text('message_size_limit', $message_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "&nbsp;MB</td>\n\t\t\t    <td>" . help_icon('{message_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t    <td nowrap class=legend style='font-size:13px'>{virtual_mailbox_limit}</strong>:</td>\n\t\t\t    <td style='font-size:13px'>" . Field_text('virtual_mailbox_limit', $virtual_mailbox_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "&nbsp;MB </td>\n\t\t\t    <td>" . help_icon('{virtual_mailbox_limit_text}') . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t    <td nowrap class=legend style='font-size:13px'>{max_rcpt_to}</strong>:</td>\n\t\t\t    <td style='font-size:13px'>" . Field_text('max_rcpt_to', $max_rcpt_to, 'width:60px;font-size:13px;padding:3px;text-align:right') . "&nbsp;MB</td>\n\t\t\t    <td>" . help_icon('{max_rcpt_to_text}') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t    <td nowrap class=legend style='font-size:13px'>{mime_nesting_limit}</strong>:</td>\n\t\t\t    <td>" . Field_text('mime_nesting_limit', $mime_nesting_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t     <td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t    <td nowrap class=legend style='font-size:13px'>{header_address_token_limit_field}</strong>:</td>\n\t\t\t    <td>" . Field_text('header_address_token_limit', $header_address_token_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t     <td>" . help_icon('{header_address_token_limit_explain}') . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t\t\t\t\n\t\t\n\t\t<div style='font-size:16px'><strong>{performances}</strong></div>\n\t\t<table class=form style='width:100%'>\n\t\t<tr>\n\t\t\t    <td nowrap class=legend style='font-size:13px'>{default_destination_recipient_limit}</strong>:</td>\n\t\t\t    <td>" . Field_text('default_destination_recipient_limit', $default_destination_recipient_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t     <td>" . help_icon('{default_destination_recipient_limit_text}') . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t\t    <td nowrap class=legend style='font-size:13px'>{smtpd_recipient_limit}</strong>:</td>\n\t\t\t    <td>" . Field_text('smtpd_recipient_limit', $smtpd_recipient_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t     <td>" . help_icon('{smtpd_recipient_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr><td colspan=2 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t<hr>" . button("{apply}", "MainMultiSaveMessagesRestrictions()") . "\n\t\t</td></tr>\n\t</table>\n\t</div>";
    $tpl = new templates();
    echo $tpl->_parse_body($html);
}
コード例 #20
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $t = time();
    $ldap = new clladp();
    $main = new maincf_multi($_GET["hostname"]);
    $myorigin = $main->GET("myorigin");
    $domains = $ldap->Hash_domains_table($_GET["ou"]);
    while (list($key, $line) = each($tr)) {
        $domainz[$key] = $key;
    }
    if ($myorigin == null) {
        $myorigin = '$mydomain';
    }
    if ($myorigin != '$mydomain') {
        $domainz[$myorigin] = $myorigin;
    }
    $domainz['$myhostname'] = '$myhostname';
    $domainz['$mydomain'] = '$mydomain';
    $html = "\n<div id='{$t}'>\n<div class=explain style='font-size:13px'>{myorigin_text}</div>\n<table style='width:99%' class=form>\n<tr>\n\t<td class=legend style='font-size:16px'>myorigin:</td>\n\t<td>" . Field_array_Hash($domainz, "domainz-{$t}", $myorigin, "style:font-size:16px") . "</td>\n</tr>\n<tr>\n\t<td class=legend style='font-size:16px'>{or}:</td>\n\t<td>" . Field_text("free-{$t}", null, "font-size:16px;width:210px") . "</td>\n</tr>\n<tr>\n\t<td colspan=2 align='right'><hr>" . button("{apply}", "SaveMyOrginin{$t}()", 16) . "</td>\n</tr>\n</table>\n</div>\n<script>\n\tvar xSaveMyOrginin{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert('\"'+results+'\"'+results.length);}\n\t\tYahooWinSHide();\n\t\tRefreshTab('main_multi_config_postfix{$_GET["t"]}')\n\t\t}\n\t\t\n\t\n\t\tfunction SaveMyOrginin{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('myorigin',document.getElementById('domainz-{$t}').value);\n\t\t\tXHR.appendData('myorigin2',document.getElementById('free-{$t}').value);\n\t\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\t\tAnimateDiv('{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',xSaveMyOrginin{$t});\t\n\t\t\t\n\t\t}\n\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #21
0
ファイル: postfix.network.php プロジェクト: articatech/artica
function QueryDNSForm()
{
    $sock = new sockets();
    $main = new main_cf(0);
    $page = CurrentPageName();
    $ldap = new clladp();
    $tpl = new templates();
    $domains = $ldap->hash_get_all_domains();
    $myhostname = $sock->GET_INFO("myhostname");
    $warn_disable_dns_lookups = $tpl->javascript_parse_text("{warn_disable_dns_lookups}");
    $main = new maincf_multi("master", "master");
    $domains["\$mydomain"] = "\$mydomain";
    //$myorigin=Field_array_Hash($domains,"myorigin",$main->main_array["myorigin"]);
    $myorigin = "<strong>\$mydomain</strong><input type='hidden' name='myorigin' value='\$mydomain' id='myorigin'>";
    $styleadd = "style='font-size:26px;padding:4px'";
    $html = "<div id='QueryDNSFormSaveid'>\n<span style='font-size:32px;'>{DNS_SETTINGS} & {hostname}</span>\n<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t<td align='right' valign='top' nowrap class=legend {$styleadd}>{myhostname}&nbsp;:</strong></td>\n\t<td align='left' width=1% {$styleadd}>" . Field_text('myhostname', $myhostname, 'width:500px;font-size:26px;padding:3px') . "</td>\n\t<td valign='top' width=1% {$styleadd}>" . help_icon('{myhostname_text}') . "</td>\n\t<tr>\n\t<tr>\n\t<td align='right' valign='top' nowrap class=legend {$styleadd}>{myorigin}&nbsp;:</strong></td>\n\t<td align='left' width=1% {$styleadd}> {$myorigin}</td>\n\t<td valign='top' width=1% {$styleadd}>" . help_icon('{myorigin_text}') . "</td>\n\t<tr>\t\n\t<td align='right' valign='top' nowrap class=legend {$styleadd}>{ignore_mx_lookup_error}&nbsp;:</strong></td>\n\t<td align='left' width=1% {$styleadd}>" . Field_checkbox_design('ignore_mx_lookup_error', '1', $main->GET("ignore_mx_lookup_error")) . "</td>\n\t<td valign='top' width=1% {$styleadd}>" . help_icon('{ignore_mx_lookup_error_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<tr>\n\t<td align='right' valign='top' nowrap class=legend {$styleadd}>{disable_dns_lookups}&nbsp;:</strong></td>\n\t<td align='left'  width=1% {$styleadd}>" . Field_checkbox_design('disable_dns_lookups', '1', $main->GET("disable_dns_lookups")) . "</td>\n\t<td valign='top' width=1% {$styleadd}>" . help_icon('{disable_dns_lookups_text}') . "</td>\n\t</tr>\n\t<tr><td colspan=3 align='right'><hr>" . button("{apply}", "QueryDNSFormSave()", 40) . "</td></tr>\n\t</table>\n\t</div>\n\t\n\t\n\t<script>\n\t\n\tvar x_QueryDNSFormSave= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert('\"'+results+'\"'+results.length);}\n\t\tRefreshTab('main_config_postfix_net');\n\t\t}\n\t\t\n\t\n\t\tfunction QueryDNSFormSave(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('myhostname',document.getElementById('myhostname').value);\n\t\t\t\n\t\t\t\n\t\t\tif(document.getElementById('ignore_mx_lookup_error').checked){XHR.appendData('ignore_mx_lookup_error','1');}else{\n\t\t\t\tXHR.appendData('ignore_mx_lookup_error','0');\n\t\t\t}\n\t\t\t\n\t\t\tif(document.getElementById('disable_dns_lookups').checked){\n\t\t\t\tif(!confirm('{$warn_disable_dns_lookups}')){return;}\n\t\t\t\tXHR.appendData('disable_dns_lookups','1');}else{\n\t\t\t\tXHR.appendData('disable_dns_lookups','0');\n\t\t\t}\t\t\t\n\t\t\tAnimateDiv('QueryDNSFormSaveid');\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_QueryDNSFormSave);\t\n\t\t\t\n\t\t}\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #22
0
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);
}
コード例 #23
0
ファイル: postscreen.php プロジェクト: rsd/artica-1.5
function index(){
	$page=CurrentPageName();
	$tpl=new templates();
	$main=new maincf_multi($_GET["hostname"],$_GET["ou"]);
	
	$html="
	<div id='postscreen-intro'>
	<table style='width:100%'>
	<tr>
	<td valign='top'><img src='img/postscreen-128.png'></td>
	
		<td valign='top'>". Paragraphe_switch_img("{ENABLE_POSTSCREEN}","{POSTSCREEN_TEXT}","EnablePostScreen",$main->GET("EnablePostScreen"),null,390)."
		<hr>
		<div style='text-align:right'>". button("{apply}","SaveEnablePostScreen()")."</div>
		</td>
	</tr>
	</table>
	</div>
	<script>
	
	var x_SaveEnablePostScreen= function (obj) {
		var tempvalue=obj.responseText;
		if(tempvalue.length>0){alert(tempvalue);}
		RefreshTab('main_postscreen_config');
	}	
	
		function SaveEnablePostScreen(){
		var XHR = new XHRConnection();
		XHR.appendData('hostname','{$_GET["hostname"]}');
		XHR.appendData('ou','{$_GET["ou"]}');
		XHR.appendData('EnablePostScreen',document.getElementById('EnablePostScreen').value);
		document.getElementById('postscreen-intro').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';
		XHR.sendAndLoad('$page', 'GET',x_SaveEnablePostScreen);
		
		}
	
	</script>
			
			
		
";
	
	echo $tpl->_ENGINE_parse_body($html);
}
コード例 #24
0
ファイル: dkimproxy.php プロジェクト: BillTheBest/1.6.x
function save()
{
    $ou = base64_decode($_GET["ou"]);
    if ($_GET["hostname"] == "master") {
        $ipstr = "127.0.0.1";
    }
    $page = CurrentPageName();
    $main = new maincf_multi($_GET["hostname"], $ou, $ipstr);
    $myhostname = $main->GET("myhostname");
    if ($myhostname == null) {
        $main->SET_VALUE("myhostname", $_GET["hostname"]);
        $main = new maincf_multi($_GET["hostname"], $ou);
    }
    $main->SET_VALUE("dkimproxyEnabled", $_GET["dkimproxyEnabled"]);
    $main->SET_VALUE("dkimproxy_listenport", $_GET["listen_port"]);
    $main->SET_BIGDATA("dkimproxy_datas", base64_encode(serialize($_GET)));
}
コード例 #25
0
ファイル: postfix.synthesis.php プロジェクト: rsd/artica-1.5
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&nbsp;{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&nbsp;{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"]}&nbsp;{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"]}&nbsp;{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");
	if(!$user->POSTSCREEN_INSTALLED){$EnablePostScreen=0;}
	$postscreen_dnsbl_action=$main->GET("postscreen_dnsbl_action");
	if($EnablePostScreen==1){$EnablePostScreen="{enabled}";$postscreen_dnsbl_action="$postscreen_dnsbl_action";}else{$EnablePostScreen="{disabled}";$postscreen_dnsbl_action="{disabled}";}
	$data=unserialize(base64_decode($main->GET_BIGDATA("postscreen_dnsbl_sites")));
	$postscreen_dnsbl_count=0;
	while (list ($num, $ligne) = each ($data)){if($ligne==null){continue;}$postscreen_dnsbl_count++;}
	if($postscreen_dnsbl_count==0){$postscreen_dnsbl_count="{no_rules}";}else{$postscreen_dnsbl_count="$postscreen_dnsbl_count&nbsp;{rules}";}
	
	
	//milter-greylist {gl_YES-QUICK} ------------------------------------------------------------------------------------
	$mgreylist_js="Loadjs('milter.greylist.index.php?js=yes');";
	$mgreylist=new milter_greylist(true,$hostname,$ou);
	$MilterGreyListEnabled=$mgreylist->MilterGreyListEnabled;
	if(!$user->MILTERGREYLIST_INSTALLED){$MilterGreyListEnabled=0;}
	$mgreylist_delay="{$mgreylist->main_array["greylist"]}&nbsp;{$mgreylist->main_array["greylist_TIME"]}";
	if($MilterGreyListEnabled==1){$MilterGreyListEnabled="{enabled}&nbsp;$mgreylist_delay";}else{$MilterGreyListEnabled="{disabled}";}

	//Blacklist: ------------------------------------------------------------------------------------
	$Blacklist_js="Loadjs('whitelists.admin.php?js=yes')";
	$sql="SELECT COUNT(*) as tcount FROM postfix_global_blacklist WHERE enabled=1";
	$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
	if($ligne["tcount"]==0){$Blacklist_rules="{no_rules}";}else{$Blacklist_rules="{$ligne["tcount"]}&nbsp;{rules}";}
	
	//Attachments ------------------------------------------------------------------------------------
	$enable_attachment_blocking_postfix=$main->GET("enable_attachment_blocking_postfix");
	$attachs_js="Loadjs('domains.edit.attachblocking.ou.php?ou=$ou_encoded&hostname=$hostname');";
	if($EnablePostfixMultiInstance){$hostnameq=" AND hostname='$hostname'";}
	$ou_q=$ou;
	if($hostname=="master"){$ou_q="_Global";}
	$sql="SELECT count(*) as tcount FROM smtp_attachments_blocking WHERE ou='$ou_q'$hostnameq";
	$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));	
	if($ligne["tcount"]==0){$attachs_rules="{no_rules}";}else{$attachs_rules="{$ligne["tcount"]}&nbsp;{rules}";}
	if($enable_attachment_blocking_postfix==1){$enable_attachment_blocking_postfix="{enabled}";}else{$enable_attachment_blocking_postfix="{disabled}";}	
	
	//Kas3 ------------------------------------------------------------------------------------
	$ou_kas=$ou;
	if($hostname=="master"){$ou_q=base64_encode("default");$ou_kas="default";}
	$kas_js="Loadjs('domains.edit.kas.php?ou=$ou_q');";
	$kas=new kas_mysql($ou_kas);
	$KasxFilterEnabled=$sock->GET_INFO("KasxFilterEnabled");
	$OPT_FILTRATION_ON=$kas->GET_KEY("OPT_FILTRATION_ON");
	$OPT_PROBABLE_SPAM_ON=$kas->GET_KEY("OPT_PROBABLE_SPAM_ON");
	$ACTION_SPAM_MODE=$kas->GET_KEY("ACTION_SPAM_MODE");
	$ACTION_PROBABLE_MODE=$kas->GET_KEY("ACTION_PROBABLE_MODE");	
	if(!$user->kas_installed){$KasxFilterEnabled=0;}
	if($KasxFilterEnabled==0){$OPT_FILTRATION_ON=0;$OPT_PROBABLE_SPAM_ON=0;}
	$OPT_SPAM_RATE_LIMIT=$kas->GET_KEY("OPT_SPAM_RATE_LIMIT");
	$OPT_SPAM_RATE_LIMIT_TABLE=array(4=>"{maximum}",3=>"{high}",2=>"{normal}",1=>"{minimum}");
	if(!is_numeric($OPT_SPAM_RATE_LIMIT)){$OPT_SPAM_RATE_LIMIT=3;}
	if($OPT_FILTRATION_ON==1){$kas_text="{level}:{$OPT_SPAM_RATE_LIMIT_TABLE[$OPT_SPAM_RATE_LIMIT]}";}else{$kas_text="{disabled}";$ACTION_SPAM_MODE=-4;$ACTION_PROBABLE_MODE=-4;}
	if($OPT_PROBABLE_SPAM_ON==1){$kas_probable="{enabled}";}else{$kas_probable="{disabled}";}	
	$kas_action_message=array(0=>"{acceptmessage}",1=>"{kassendcopy}",2=>"{quarantine}",-1=>"{kasreject}",-3=>"{kasdelete}",-4=>"{disabled}");
	$ACTION_SPAM_MODE=$kas_action_message[$ACTION_SPAM_MODE];
	$ACTION_PROBABLE_MODE=$kas_action_message[$ACTION_PROBABLE_MODE];
	
	

	
	//Amavis - spamassassin
	$EnableAmavisDaemon=$user->EnableAmavisDaemon;
	if(!$user->AMAVIS_INSTALLED){$EnableAmavisDaemon=0;}
	$amavis_js="Loadjs('amavis.index.php?ajax=yes');";
	if($EnablePostfixMultiInstance){$hostnameq=" AND hostname='$hostname'";}
	$ou_q=$ou;
	if($hostname=="master"){$ou_q="_Global";}
	$sql="SELECT count(*) as tcount FROM smtp_attachments_blocking WHERE ou='$ou_q'$hostnameq";
	$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));	
	if($ligne["tcount"]==0){$amavis_attachs_rules="{no_rules}";}else{$amavis_attachs_rules="{$ligne["tcount"]}&nbsp;{rules}";}	
	if($EnableAmavisDaemon==0){$EnableAmavisDaemon_text="{disabled}";}else{$EnableAmavisDaemon_text="{enabled}";}
	
	//Spamassassin - keywords
	$sql="SELECT count(*) as tcount FROM spamassassin_keywords WHERE enabled=1 and score>0";
	$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
	if($ligne["tcount"]==0){$spamassassin_keywords="$EnableAmavisDaemon_text&nbsp;{no_rules}";}else{$spamassassin_keywords="$EnableAmavisDaemon_text&nbsp;{$ligne["tcount"]}&nbsp;{rules}";}	
	$spamassassin_keywords_js="Loadjs('spamassassin.keywords.php');";
	
	//spamassassin_backscatter
	$spamassassin_backscatter_js="Loadjs('spamassassin.backscatter.php');";
	$spamassassin_backscatter=$sock->GET_INFO("SpamAssassinVirusBounceEnabled");
	if($EnableAmavisDaemon==0){$spamassassin_backscatter=0;}
	if($spamassassin_backscatter==0){$spamassassin_backscatter="{disabled}";}else{$spamassassin_backscatter="{enabled}";}
	
	$DecodeShortURLs_js="Loadjs('spamassassin.DecodeShortURLs.php');";
	$sql="SELECT COUNT(*) as tcount FROM  spamassassin_table WHERE spam_type='DecodeShortURLs' AND enabled=1";
	$ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
	if($ligne["tcount"]==0){$DecodeShortURLs="$EnableAmavisDaemon_text&nbsp;{no_rules}";}else{$DecodeShortURLs="$EnableAmavisDaemon_text&nbsp;{$ligne["tcount"]}&nbsp;{rules}";}	
		
	
	//plugins, wrongx, pyzor,razor...
	$spamassassin_js="Loadjs('spamassassin.index.php')";
	$EnableSpamassassinWrongMX=$sock->GET_INFO("EnableSpamassassinWrongMX");
	if(!is_numeric($EnableSpamassassinWrongMX)){$EnableSpamassassinWrongMX=1;}
	if($EnableAmavisDaemon==0){$EnableSpamassassinWrongMX=0;}
	if($EnableSpamassassinWrongMX==0){$EnableSpamassassinWrongMX="{disabled}";}else{$EnableSpamassassinWrongMX="{enabled}";}
	
	$use_razor2=$spamass->main_array["use_razor2"];
	if($EnableAmavisDaemon==0){$use_razor2=0;}
	if($use_razor2==0){$use_razor2="{disabled}";}else{$use_razor2="{enabled}";}
	
	$use_pyzor=$spamass->main_array["use_pyzor"];
	if($EnableAmavisDaemon==0){$use_pyzor=0;}
	if($use_pyzor==0){$use_pyzor="{disabled}";}else{$use_pyzor="{enabled}";}	
	
	$amavis=new amavis();
	$amavis_action1="{pass}";
	$amavis_action2="{pass}";
	$amavis_spam="$EnableAmavisDaemon_text&nbsp;{score} >={$amavis->main_array["BEHAVIORS"]["sa_tag3_level_deflt"]}";
	if($amavis->EnableQuarantineSpammy2==1){$amavis_action1="{quarantine}";}

	$amavis_probable="$EnableAmavisDaemon_text&nbsp;{score} >={$amavis->main_array["BEHAVIORS"]["sa_tag2_level_deflt"]}";
	if($amavis->EnableQuarantineSpammy==1){$amavis_action2="{quarantine}";}
	
	$clamav_unofficial_js="Loadjs('clamav.unofficial.php')";
	
	
	$html="
	<div style='text-align:right'>". imgtootltip("refresh-24.png","{refresh}","RefreshTab('main_config_postfix_synthesis_$md')")."</div>
	<H3 style='font-size:16px'>{APP_POSTFIX} &raquo; {filters_connect}</h3>
	<table style='width:665px' class=form>
		<tr>
			<td class=legend width='350px'>{postfix_autoblock}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_iptables\" $stylea>$EnablePostfixAutoBlock_text&nbsp;$PostfixAutoBlock_rules</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{firewall}</td>
		</tr>	
		<tr>
			<td class=legend width='350px'>{black list}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$Blacklist_js\" $stylea>$Blacklist_rules</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>				
		<tr>
			<td class=legend width='350px'>PostScreen:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$postscreen_js\" $stylea>$EnablePostScreen</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>		
		<tr>
			<td class=legend width='350px'>PostScreen RBL:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$postscreen_js\" $stylea>$postscreen_dnsbl_action&nbsp;$postscreen_dnsbl_count</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>			
		<tr>
			<td class=legend width='350px'>{blockips}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_regex\" $stylea>$check_client_access</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>
		
		<tr>
			<td class=legend width='350px'>{reject_unknown_client_hostname}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_unknown_client_hostname</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>
		<tr>
			<td class=legend width='350px'>{reject_unknown_reverse_client_hostname}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_unknown_reverse_client_hostname</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>		
		<tr>
			<td class=legend width='350px'>{reject_unknown_sender_domain}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_unknown_sender_domain</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>			
		<tr>
			<td class=legend width='350px'>{reject_invalid_hostname}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_invalid_hostname</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>		
		<tr>
			<td class=legend width='350px'>{reject_non_fqdn_sender}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_non_fqdn_sender</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>	
		<tr>
			<td class=legend width='350px'>{RestrictToInternalDomains}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$RestrictToInternalDomains</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
		</tr>
	</table>
	
	<H3 style='font-size:16px'>{filters_connect}</h3>
	<table style='width:665px' class=form>
		<tr>
			<td class=legend width='350px'>{gl_YES-QUICK}:</td>
			<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$mgreylist_js\" $stylea>$MilterGreyListEnabled</a></td>
			<td width=1% nowrap><strong style='font-size:13px'>{delayed}</td>
		</tr>	
	</table>
	
	<H3 style='font-size:16px'>{APP_POSTFIX} &raquo; {messages_restriction}</h3>
	<table style='width:665px' class=form>
	". _MaxRcptTO($hostname)."
	<tr>
		<td class=legend width='350px'>{message_size_limit}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_messagelimit\" $stylea>$message_size_limit</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{HIDE_CLIENT_MUA}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$PostfixHideClientMua_js\" $stylea>$PostfixHideClientMua</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{pass}</td>
	</tr>
	
	
	</table>
	<H3 style='font-size:16px'>{APP_POSTFIX} &raquo; {content_filters}</h3>
	<table style='width:665px' class=form>
	<tr>
		<td class=legend width='350px'>{header_content_filters_rules}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_regex\" $stylea>$header_content_filters_rules</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{RegexSimpleWords}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_regex\" $stylea>$EnableBodyChecks_text&nbsp;$EnableBodyChecks_rules</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{attachment_blocking}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$attachs_js\" $stylea>$enable_attachment_blocking_postfix&nbsp;$attachs_rules</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{reject}</td>
	</tr>	
	</table>
	<H3 style='font-size:16px'>{content_filters} &raquo; {APP_KAS3}</h3>
	<table style='width:665px' class=form>
	<tr>
		<td class=legend width='350px'>{APP_KAS3}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$kas_text</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>&nbsp;</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{OPT_PROBABLE_SPAM_ON}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$kas_probable</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>&nbsp;</td>
	</tr>
	<tr>
		<td class=legend width='350px'>{spam option 2}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$ACTION_PROBABLE_MODE</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>&nbsp;</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{spam option 1}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$ACTION_SPAM_MODE</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>&nbsp;</td>
	</tr>		
	
</table>
	<H3 style='font-size:16px'>{content_filters} &raquo; {addons_bundle}</h3>
<table style='width:665px' class=form>
	<tr>
		<td class=legend width='350px'>{attachment_blocking}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$EnableAmavisDaemon_text&nbsp;$amavis_attachs_rules</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{quarantine}</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{block_keywords}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_keywords_js\" $stylea>$spamassassin_keywords</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{score}+</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{Virus_Bounce_Ruleset}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_backscatter_js\" $stylea>$spamassassin_backscatter</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{score}+</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{DecodeShortURLs}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$DecodeShortURLs_js\" $stylea>$DecodeShortURLs</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{score}+</td>
	</tr>		
	<tr>
		<td class=legend width='350px'>WrongMX:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_js\" $stylea>$EnableSpamassassinWrongMX</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{score}+</td>
	</tr>		
	<tr>
		<td class=legend width='350px'>Razor:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_js\" $stylea>$use_razor2</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{score}+</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>Pyzor:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_js\" $stylea>$use_pyzor</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{score}+</td>
	</tr>	
	<tr>
		<td class=legend width='350px'>{spam option 2}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$amavis_js\" $stylea>$amavis_probable</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>$amavis_action2</td>
	</tr>			
	<tr>
		<td class=legend width='350px'>{spam option 1}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$amavis_js\" $stylea>$amavis_spam</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>$amavis_action1</td>
	</tr>
	<tr>
		<td class=legend width='350px'>{APP_CLAMAV}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$amavis_js\" $stylea>$EnableAmavisDaemon_text</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{quarantine}</td>
	</tr>		
	<tr>
		<td class=legend width='350px'>{clamav_unofficial}:</td>
		<td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$clamav_unofficial_js\" $stylea>$EnableAmavisDaemon_text</a></td>
		<td width=1% nowrap><strong style='font-size:13px'>{quarantine}</td>
	</tr>			

	

	
</table>	
	
	
	";
	
	echo $tpl->_ENGINE_parse_body($html);
	
}
コード例 #26
0
function ajax_pop()
{
    $sock = new sockets();
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $EnableAmavisDaemon = $users->EnableAmavisDaemon;
    if (!$users->AMAVIS_INSTALLED) {
        $EnableAmavisDaemon = 0;
    }
    if (!is_numeric($EnableAmavisDaemon)) {
        $EnableAmavisDaemon = 0;
    }
    $EnableArticaPolicyFilter = $sock->GET_INFO("EnableArticaPolicyFilter");
    $EnableArticaPolicyFilter = 0;
    if (!is_numeric($EnableArticaPolicyFilter)) {
        $EnableArticaPolicyFilter = 0;
    }
    $ArticaPolicyFilterMaxRCPTInternalDomainsOnly = $sock->GET_INFO("ArticaPolicyFilterMaxRCPTInternalDomainsOnly");
    $SpamassassinMaxRCPTScore = $sock->GET_INFO("SpamassassinMaxRCPTScore");
    $page = CurrentPageName();
    $main = new main_cf();
    $main->FillDefaults();
    $message_size_limit = $sock->GET_INFO("message_size_limit");
    $main->main_array["default_destination_recipient_limit"] = $sock->GET_INFO("default_destination_recipient_limit");
    $main->main_array["smtpd_recipient_limit"] = $sock->GET_INFO("smtpd_recipient_limit");
    $main->main_array["mime_nesting_limit"] = $sock->GET_INFO("mime_nesting_limit");
    $PostfixNotifyMessagesRestrictions = $sock->GET_INFO("PostfixNotifyMessagesRestrictions");
    $main = new maincf_multi("master", "master");
    $header_address_token_limit = $sock->GET_INFO("header_address_token_limit");
    $header_size_limit = $sock->GET_INFO("header_size_limit");
    $max_rcpt_to = $main->GET("max_rcpt_to");
    if (!is_numeric($message_size_limit)) {
        $message_size_limit = 10240000;
    }
    $main->main_array["virtual_mailbox_limit"] = $sock->GET_INFO("virtual_mailbox_limit");
    $message_size_limit = $message_size_limit / 1024 / 1000;
    $main->main_array["virtual_mailbox_limit"] = $main->main_array["virtual_mailbox_limit"] / 1024 / 1000;
    if (!is_numeric($header_address_token_limit)) {
        $header_address_token_limit = 10240;
    }
    if (!is_numeric($header_size_limit)) {
        $header_size_limit = 102400;
    }
    if (!is_numeric($max_rcpt_to)) {
        $max_rcpt_to = 0;
    }
    if (!is_numeric($PostfixNotifyMessagesRestrictions)) {
        $PostfixNotifyMessagesRestrictions = 0;
    }
    $header_size_limit = $header_size_limit / 1024;
    if (!is_numeric($SpamassassinMaxRCPTScore)) {
        $SpamassassinMaxRCPTScore = 10;
    }
    $html = "\n\t\t\n\t\t<div id='messages_restriction_id'>\n\t\t\n\t\t\n\n\t\n\n\n\t\t<div style='font-size:16px'><strong>{max_rcpt_to}</strong></div>\n\t\t<table class=form style='width:99%'>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{max_rcpt_to}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('max_rcpt_to', $max_rcpt_to, 'width:60px;font-size:13px;padding:3px;text-align:right') . "&nbsp;{recipients} </td>\n\t\t\t<td>" . help_icon('{max_rcpt_to_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{max_rcpt_to_onlyForLocalDomains}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_checkbox("ArticaPolicyFilterMaxRCPTInternalDomainsOnly", 1, $ArticaPolicyFilterMaxRCPTInternalDomainsOnly, "ArticaPolicyFilterMaxRCPTInternalDomainsOnlySave()") . "</td>\n\t\t\t<td>" . help_icon('{max_rcpt_to_onlyForLocalDomains_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{score}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('SpamassassinMaxRCPTScore', $SpamassassinMaxRCPTScore, 'width:40px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t<td>" . help_icon('{SpamassassinMaxRCPTScore_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t\t</tr>\n\t\t</table>\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t<div style='font-size:16px'><strong>{restrictions}</strong></div>\n\t\t<table class=form style='width:99%'>\n\n\t\t\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{message_size_limit}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('message_size_limit', $message_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "&nbsp;MB</td>\n\t\t\t<td>" . help_icon('{message_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{virtual_mailbox_limit}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('virtual_mailbox_limit', $main->main_array["virtual_mailbox_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "&nbsp;MB </td>\n\t\t\t<td>" . help_icon('{virtual_mailbox_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{mime_nesting_limit}</strong>:</td>\n\t\t\t<td>" . Field_text('mime_nesting_limit', $main->main_array["mime_nesting_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t<td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{header_address_token_limit_field}</strong>:</td>\n\t\t\t<td>" . Field_text('header_address_token_limit', $header_address_token_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t<td>" . help_icon('{header_address_token_limit_explain}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{header_size_limit}:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('header_size_limit', $header_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "&nbsp;KB </td>\n\t\t\t<td>" . help_icon('{header_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{notify}:</td>\n\t\t\t<td style='font-size:13px'>" . Field_checkbox("PostfixNotifyMessagesRestrictions", 1, $PostfixNotifyMessagesRestrictions, "PostfixNotifyMessagesRestrictionsSave()") . "</td>\n\t\t\t<td>" . help_icon('{PostfixNotifyMessagesRestrictions_text}') . "</td>\n\t\t</tr>\n\t<tr>\n\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t</tr>\t\t\n\t\t</table>\n\t\t\n\t\t\n\t<div style='font-size:16px'><strong>{performances}</strong></div>\n\t<table class=form style='width:99%'>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{default_destination_recipient_limit}</strong>:</td>\n\t\t<td>" . Field_text('default_destination_recipient_limit', $main->main_array["default_destination_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t<td>" . help_icon('{default_destination_recipient_limit_text}') . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtpd_recipient_limit}</strong>:</td>\n\t\t<td>" . Field_text('smtpd_recipient_limit', $main->main_array["smtpd_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t<td>" . help_icon('{smtpd_recipient_limit_text}') . "</td>\n\t</tr>\n\n\n\n\t<tr>\n\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\nvar x_SaveMessagesRestrictions=function (obj) {\n\ttempvalue=obj.responseText;\n\tYahooWinSHide();\n    }\t\n\t\nfunction SaveMessagesRestrictions(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('header_size_limit',document.getElementById('header_size_limit').value);\n\tXHR.appendData('message_size_limit',document.getElementById('message_size_limit').value);\n\tXHR.appendData('default_destination_recipient_limit',document.getElementById('default_destination_recipient_limit').value);\n\tXHR.appendData('smtpd_recipient_limit',document.getElementById('smtpd_recipient_limit').value);\n\tXHR.appendData('mime_nesting_limit',document.getElementById('mime_nesting_limit').value);\n\tXHR.appendData('header_address_token_limit',document.getElementById('header_address_token_limit').value);\n\tXHR.appendData('virtual_mailbox_limit',document.getElementById('virtual_mailbox_limit').value);\n\tXHR.appendData('max_rcpt_to',document.getElementById('max_rcpt_to').value);\n\tXHR.appendData('SpamassassinMaxRCPTScore',document.getElementById('SpamassassinMaxRCPTScore').value);\n\t\n\t\n\t\n\tdocument.getElementById('messages_restriction_id').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\tXHR.sendAndLoad('{$page}', 'GET',x_SaveMessagesRestrictions);\n}\t\n\nfunction PostfixNotifyMessagesRestrictionsSave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('PostfixNotifyMessagesRestrictions').checked){\n\t\tXHR.appendData('PostfixNotifyMessagesRestrictions',1);\n\t}else{\n\t\tXHR.appendData('PostfixNotifyMessagesRestrictions',0);\n\t}\n\tXHR.sendAndLoad('{$page}', 'GET');\n}\n\nfunction ArticaPolicyFilterMaxRCPTInternalDomainsOnlySave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('ArticaPolicyFilterMaxRCPTInternalDomainsOnly').checked){\n\t\tXHR.appendData('ArticaPolicyFilterMaxRCPTInternalDomainsOnly',1);\n\t}else{\n\t\tXHR.appendData('ArticaPolicyFilterMaxRCPTInternalDomainsOnly',0);\n\t}\n\tXHR.sendAndLoad('{$page}', 'GET');\n}\n\n\nfunction CheckRequiredRestrictionsFields(){\n\tvar EnableArticaPolicyFilter={$EnableAmavisDaemon};\n\tif(EnableArticaPolicyFilter==0){\n\t\tdocument.getElementById('ArticaPolicyFilterMaxRCPTInternalDomainsOnly').disabled=true;\n\t\tdocument.getElementById('SpamassassinMaxRCPTScore').disabled=true;\n\t}\n}\n\n\nCheckRequiredRestrictionsFields();\n</script>\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_parse_body($html);
}
コード例 #27
0
ファイル: postfix.index.php プロジェクト: brucewu16899/1.6.x
function bar_status()
{
    $page = CurrentPageName();
    $tpl = new templates();
    if (is_file("ressources/logs/global.status.ini")) {
        $ini = new Bs_IniHandler("ressources/logs/global.status.ini");
    } else {
        writelogs("ressources/logs/global.status.ini no such file");
        $sock = new sockets();
        $datas = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
        $ini = new Bs_IniHandler($datas);
    }
    $c = 0;
    $array = $array = array_postfix_status();
    while (list($num, $DAEMON_NAME) = each($array)) {
        if (!DAEMON_STATUS_IS_OK($DAEMON_NAME, $ini)) {
            $c++;
        }
    }
    if ($c > 0) {
        $status = ParagrapheTEXT("warn-red-48.png", "{$c} {SERVICESS_STOPPED}", "{$c} {SERVICESS_STOPPED_TEXT}", "javascript:Loadjs('postfix.status.allservices.php')", 90);
    } else {
        $status = ParagrapheTEXT("ok42.png", "{SERVICESS_OK}", "{SERVICESS_OK_TEXT}", "javascript:Loadjs('postfix.status.allservices.php')", 90);
    }
    $main = new maincf_multi("master", "master");
    $freeze_delivery_queue = $main->GET('freeze_delivery_queue');
    if ($freeze_delivery_queue == 1) {
        $warn1 = ParagrapheTEXT("warn-red-48.png", "{WARN_QUEUE_FREEZE}", "{WARN_QUEUE_FREEZE}");
    }
    $main = new main_cf();
    $count = 0;
    while (list($num, $ligne) = each($main->array_mynetworks)) {
        if ($ligne == "127.0.0.0/8") {
            continue;
        }
        if ($ligne == "127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128") {
            continue;
        }
        $count++;
    }
    if ($count == 0) {
        $nonet = ParagrapheTEXT('warn-red-48.png', "{NO_POSTFIX_NETWORK_SET}", '{NO_POSTFIX_NETWORK_SET_EXPLAIN}', "javascript:Loadjs('postfix.network.php?ajax=yes')", 90);
    }
    return $tpl->_ENGINE_parse_body($status . $nonet . $refresh . $warn1);
}
コード例 #28
0
function GROUP_PRIVILEGES($gid)
{
    $usr = new usersMenus();
    $sock = new sockets();
    $RemoveButton = false;
    $SambaEnabled = $sock->GET_INFO("SambaEnabled");
    $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
    if (!is_numeric($SambaEnabled)) {
        $SambaEnabled = 1;
    }
    if ($SambaEnabled == 0) {
        $usr->SAMBA_INSTALLED = false;
    }
    $EnableSambaVirtualsServers = $sock->GET_INFO("EnableSambaVirtualsServers");
    if (!is_numeric($EnableSambaVirtualsServers)) {
        $EnableSambaVirtualsServers = 0;
    }
    if (!is_numeric($EnablePostfixMultiInstance)) {
        $EnablePostfixMultiInstance = 0;
    }
    if (!isset($_GET["tab"])) {
        echo GROUP_PRIVILEGES_TABS($gid);
        return;
    }
    if (isset($_GET["start"])) {
        if ($gid == -1) {
            $oudiv = md5($_GET["ou"]);
        }
        if ($gid == -2) {
            $oudiv = md5($_GET["userid"]);
        }
        $div1 = "<div id='{$gid}{$oudiv}_priv'>";
        $div2 = "</div>";
    }
    if ($gid > 1) {
        $group = new groups($gid);
        $hash = $group->LoadDatas($gid);
        if ($usr->SAMBA_INSTALLED) {
            $group->TransformGroupToSmbGroup();
        }
        $ou = $hash["ou"];
        if ($gid == 544) {
            include_once dirname(__FILE__) . "/ressources/class.translate.rights.inc";
            $pp = new TranslateRights();
            $pt = $pp->GetPrivsArray();
            $RemoveButton = true;
            while (list($num, $ligne) = each($pt)) {
                $hash["ArticaGroupPrivileges"][$num] = "yes";
            }
        }
        $HashPrivieleges = $hash["ArticaGroupPrivileges"];
        $title_form = "{group}: &laquo;{$hash["cn"]}";
    }
    if ($gid == -1) {
        $ou = base64_decode($_GET["ou"]);
        $ldap = new clladp();
        $hash = $ldap->OUDatas($ou);
        $privs = $hash["ArticaGroupPrivileges"];
        $HashPrivieleges = $ldap->_ParsePrivieleges($privs, array());
        $organization_hidden = "<input type='hidden' name='ou' value='{$ou}'>";
        $title_form = "{organization}: &laquo;{$ou}";
    }
    if ($gid == -2) {
        $userclass = new user($_GET["userid"]);
        $ou = base64_decode($userclass->ou);
        $ldap = new clladp();
        $hash = $ldap->OUDatas($ou);
        $privs = $userclass->ArticaGroupPrivileges;
        $HashPrivieleges = $ldap->_ParsePrivieleges($privs, array());
        $organization_hidden = "<input type='hidden' name='userid' value='{$_GET["userid"]}'>";
        $title_form = "{member}: &laquo;{$_GET["userid"]}";
        $warn = "<div class=text-info>{privileges_users_warning}</div>";
    }
    if (strpos($gid, ",") > 0) {
        writelogs("GID is dn = {$gid}", __FUNCTION__, __FILE__, __LINE__);
        include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
        $gp = new external_ad_search();
        $ldap = new clladp();
        writelogs("->LoadGroupDataByDN({$gid})", __FUNCTION__, __FILE__, __LINE__);
        $hash = $gp->LoadGroupDataByDN($gid);
        $privs = $hash["ArticaGroupPrivileges"];
        $HashPrivieleges = $ldap->_ParsePrivieleges($privs, array());
        $title_form = "{group}: &laquo;{$hash["samaccountname"][0]}<div style='font-size:11px;padding:left:50px;margin-bottom:10px;float:right'>{$gid}</div>";
    }
    $priv = new usersMenus();
    $AllowAddGroup = Field_yesno_checkbox('AllowAddGroup', $HashPrivieleges["AllowAddGroup"]);
    $AllowAddUsers = Field_yesno_checkbox('AllowAddUsers', $HashPrivieleges["AllowAddUsers"]);
    $AsArticaAdministrator = Field_yesno_checkbox('AsArticaAdministrator', $HashPrivieleges["AsArticaAdministrator"]);
    $AllowChangeDomains = Field_yesno_checkbox('AllowChangeDomains', $HashPrivieleges["AllowChangeDomains"]);
    $AsSystemAdministrator = Field_yesno_checkbox('AsSystemAdministrator', $HashPrivieleges["AsSystemAdministrator"]);
    $AsSambaAdministrator = Field_yesno_checkbox('AsSambaAdministrator', $HashPrivieleges["AsSambaAdministrator"]);
    $AsDnsAdministrator = Field_yesno_checkbox('AsDnsAdministrator', $HashPrivieleges["AsDnsAdministrator"]);
    $AsQuarantineAdministrator = Field_yesno_checkbox('AsQuarantineAdministrator', $HashPrivieleges["AsQuarantineAdministrator"]);
    $AsMailManAdministrator = Field_yesno_checkbox('AsMailManAdministrator', $HashPrivieleges["AsMailManAdministrator"]);
    $AsOrgStorageAdministrator = Field_yesno_checkbox('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
    $AllowManageOwnComputers = Field_yesno_checkbox('AllowManageOwnComputers', $HashPrivieleges["AllowManageOwnComputers"]);
    $AsOrgPostfixAdministrator = Field_yesno_checkbox('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
    $AsDansGuardianGroupRule = Field_yesno_checkbox('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
    $AsMessagingOrg = Field_yesno_checkbox('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"], "CheckHasOrgAdmin()");
    $AsOrgAdmin = Field_yesno_checkbox('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"], "CheckHasOrgAdmin()");
    $AsInventoryAdmin = Field_yesno_checkbox('AsInventoryAdmin', $HashPrivieleges["AsInventoryAdmin"]);
    $AsJoomlaWebMaster = Field_yesno_checkbox('AsJoomlaWebMaster', $HashPrivieleges["AsJoomlaWebMaster"]);
    $AsVirtualBoxManager = Field_yesno_checkbox('AsVirtualBoxManager', $HashPrivieleges["AsVirtualBoxManager"]);
    $OverWriteRestrictedDomains = Field_yesno_checkbox('OverWriteRestrictedDomains', $HashPrivieleges["OverWriteRestrictedDomains"]);
    $AsWebMaster = Field_yesno_checkbox('AsWebMaster', $HashPrivieleges["AsWebMaster"]);
    $AsSystemWebMaster = Field_yesno_checkbox('AsSystemWebMaster', $HashPrivieleges["AsSystemWebMaster"]);
    $AsComplexPassword = Field_yesno_checkbox('AsComplexPassword', $HashPrivieleges["AsComplexPassword"]);
    $AllowAddGroup = Field_yesno_checkbox('AllowAddGroup', $HashPrivieleges["AllowAddGroup"]);
    $RestrictNabToGroups = Field_yesno_checkbox('RestrictNabToGroups', $HashPrivieleges["RestrictNabToGroups"]);
    $AsDansGuardianAdministrator = Field_yesno_checkbox('AsDansGuardianAdministrator', $HashPrivieleges["AsDansGuardianAdministrator"]);
    $AsWebFilterRepository = Field_yesno_checkbox('AsWebFilterRepository', $HashPrivieleges["AsWebFilterRepository"]);
    $AsWebStatisticsAdministrator = Field_yesno_checkbox('AsWebStatisticsAdministrator', $HashPrivieleges["AsWebStatisticsAdministrator"]);
    $AllowUserMaillog = Field_yesno_checkbox('AsWebStatisticsAdministrator', $HashPrivieleges["AllowUserMaillog"]);
    $AsProxyMonitor = Field_yesno_checkbox('AsProxyMonitor', $HashPrivieleges["AsProxyMonitor"]);
    $AsPostfixAdministrator = Field_yesno_checkbox('AsPostfixAdministrator', $HashPrivieleges["AsPostfixAdministrator"]);
    $AsSquidAdministrator = Field_yesno_checkbox('AsSquidAdministrator', $HashPrivieleges["AsSquidAdministrator"]);
    $AsMailBoxAdministrator = Field_yesno_checkbox('AsMailBoxAdministrator', $HashPrivieleges["AsMailBoxAdministrator"]);
    $AllowViewStatistics = Field_yesno_checkbox('AllowViewStatistics', $HashPrivieleges["AllowViewStatistics"]);
    $AllowEditOuSecurity = Field_yesno_checkbox('AllowEditOuSecurity', $HashPrivieleges["AllowEditOuSecurity"]);
    $AsHotSpotManager = Field_yesno_checkbox('AsHotSpotManager', $HashPrivieleges["AsHotSpotManager"]);
    $AsOwnMailBoxBackup = Field_yesno_checkbox('AsOwnMailBoxBackup', $HashPrivieleges["AsOwnMailBoxBackup"]);
    $AsOrgDNSAdmin = Field_yesno_checkbox('AsOrgDNSAdmin', $HashPrivieleges["AsOrgDNSAdmin"]);
    $ASDCHPAdmin = Field_yesno_checkbox('ASDCHPAdmin', $HashPrivieleges["ASDCHPAdmin"]);
    if ($priv->SAMBA_INSTALLED) {
        $VirtualSambaServerColor = "#B3B3B3";
        $VirtualSambaServerHidden = "<input type='hidden' id='VirtualSambaServer', value='{$HashPrivieleges["VirtualSambaServer"]}'><span style='font-size:13.5px'>{$HashPrivieleges["VirtualSambaServer"]}</span>";
        $VirtualSambaServer = $VirtualSambaServerHidden;
        if ($EnableSambaVirtualsServers == 1) {
            $q = new mysql();
            $sql = "SELECT hostname FROM samba_hosts WHERE ou='{$ou}'";
            $results = $q->QUERY_SQL($sql, "artica_backup");
            if (mysql_num_rows($results) == 0) {
                $VirtualSambaServerError = "{no_server_for_this_ou}:{$ou}";
            }
            if (!$q->ok) {
                $VirtualSambaServerError = $q->mysql_error;
            }
            $SAMBAHOSTS[null] = "{select}";
            while ($ligne = mysql_fetch_assoc($results)) {
                $SAMBAHOSTS[$ligne["hostname"]] = $ligne["hostname"];
            }
            $VirtualSambaServerField = Field_array_Hash($SAMBAHOSTS, "VirtualSambaServer", $HashPrivieleges["VirtualSambaServer"], null, null, 0, "font-size:11px");
        }
    }
    if ($priv->POSTFIX_INSTALLED) {
        if ($EnablePostfixMultiInstance == 1) {
            $q = new mysql();
            if (!class_exists("maincf_multi")) {
                include_once dirname(__FILE__) . "/ressources/class.maincf.multi.inc";
            }
            $sql = "SELECT `value`,ip_address FROM postfix_multi WHERE `ou`='{$ou}' AND `key`='myhostname'";
            $results = $q->QUERY_SQL($sql, "artica_backup");
            if (!$q->ok) {
                $VirtualPostfixError = $q->mysql_error;
            }
            $PostfixInstances[null] = "{select}";
            if (mysql_num_rows($results) > 0) {
                while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
                    $main = new maincf_multi($ligne["value"], $ou);
                    $servername = $ligne["value"];
                    $VirtualHostNameToChange = $main->GET("VirtualHostNameToChange");
                    $servernameTEXT = $servername;
                    if ($VirtualHostNameToChange != null) {
                        $servernameTEXT = $VirtualHostNameToChange;
                    }
                    $PostfixInstances[$servername] = $servernameTEXT;
                }
                $VirtualPostfixFieldColor = "#B3B3B3";
                $VirtualPostfixHidden = "<input type='hidden' id='PostfixInstance', value='{$HashPrivieleges["PostfixInstance"]}'><span style='font-size:13.5px'>{$HashPrivieleges["PostfixInstance"]}</span>";
                $VirtualPostfixField = Field_array_Hash($PostfixInstances, "PostfixInstance", $HashPrivieleges["PostfixInstance"], null, null, 0, "font-size:11px");
                $VirtualPostfix = $VirtualPostfixHidden;
            } else {
                $VirtualPostfixError = "{no_instance}:{$ou}";
            }
        } else {
            $VirtualPostfixError = "{feature_disabled}";
        }
    }
    if ($priv->AllowAddUsers == false) {
        $AllowAddUsers = "<img src='img/status_critical.png'>" . Field_hidden('AllowAddUsers', $HashPrivieleges["AllowAddUsers"]);
        $AsDansGuardianGroupRule = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
        $AsMessagingOrg = "<img src='img/status_critical.png'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
        $AsOrgAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
        $AsJoomlaWebMaster = "<img src='img/status_critical.png'>" . Field_hidden('AsJoomlaWebMaster', $HashPrivieleges["AsJoomlaWebMaster"]);
        $AsVirtualBoxManager = "<img src='img/status_critical.png'>" . Field_hidden('AsVirtualBoxManager', $HashPrivieleges["AsVirtualBoxManager"]);
        $AsComplexPassword = "******" . Field_hidden('AsComplexPassword', $HashPrivieleges["AsComplexPassword"]);
        $RestrictNabToGroups = "<img src='img/status_critical.png'>" . Field_hidden('RestrictNabToGroups', $HashPrivieleges["RestrictNabToGroups"]);
        $AsWebFilterRepository = "<img src='img/status_critical.png'>" . Field_hidden('AsWebFilterRepository', $HashPrivieleges["AsWebFilterRepository"]);
        $AsWebStatisticsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsWebStatisticsAdministrator', $HashPrivieleges["AsWebStatisticsAdministrator"]);
    }
    if ($priv->AsArticaAdministrator == false) {
        $AsArticaAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsArticaAdministrator', $HashPrivieleges["AsArticaAdministrator"]);
        $AsSambaAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsSambaAdministrator', $HashPrivieleges["AsSambaAdministrator"]);
        $AsDnsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsDnsAdministrator', $HashPrivieleges["AsDnsAdministrator"]);
        $AsQuarantineAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsQuarantineAdministrator', $HashPrivieleges["AsQuarantineAdministrator"]);
        $AsOrgStorageAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
        $AsOrgPostfixAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
        $AsDansGuardianGroupRule = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
        $AsMessagingOrg = "<img src='img/status_critical.png'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
        $AsOrgAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
        $AsInventoryAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsInventoryAdmin', $HashPrivieleges["AsInventoryAdmin"]);
        $AsVirtualBoxManager = "<img src='img/status_critical.png'>" . Field_hidden('AsVirtualBoxManager', $HashPrivieleges["AsVirtualBoxManager"]);
        $OverWriteRestrictedDomains = "<img src='img/status_critical.png'>" . Field_hidden('OverWriteRestrictedDomains', $HashPrivieleges["OverWriteRestrictedDomains"]);
        $AsDansGuardianAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianAdministrator', $HashPrivieleges["AsDansGuardianAdministrator"]);
        $AsWebFilterRepository = "<img src='img/status_critical.png'>" . Field_hidden('AsWebFilterRepository', $HashPrivieleges["AsWebFilterRepository"]);
        $AsWebStatisticsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsWebStatisticsAdministrator', $HashPrivieleges["AsWebStatisticsAdministrator"]);
        $AsPostfixAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsPostfixAdministrator', $HashPrivieleges["AsPostfixAdministrator"]);
        $AsSquidAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsSquidAdministrator', $HashPrivieleges["AsSquidAdministrator"]);
        $AsMailBoxAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsMailBoxAdministrator', $HashPrivieleges["AsMailBoxAdministrator"]);
        $AllowViewStatistics = "<img src='img/status_critical.png'>" . Field_hidden('AllowViewStatistics', $HashPrivieleges["AllowViewStatistics"]);
        $AllowEditOuSecurity = "<img src='img/status_critical.png'>" . Field_hidden('AllowEditOuSecurity', $HashPrivieleges["AllowEditOuSecurity"]);
        $AsHotSpotManager = "<img src='img/status_critical.png'>" . Field_hidden('AsHotSpotManager', $HashPrivieleges["AsHotSpotManager"]);
        $ASDCHPAdmin = "<img src='img/status_critical.png'>" . Field_hidden('ASDCHPAdmin', $HashPrivieleges["ASDCHPAdmin"]);
    }
    if (!$priv->AsOrgAdmin) {
        $AsWebMaster = "<img src='img/status_critical.png'>" . Field_hidden('AsWebMaster', $HashPrivieleges["AsWebMaster"]);
    }
    if (!$priv->AsProxyMonitor) {
        $AsProxyMonitor = "<img src='img/status_critical.png'>" . Field_hidden('AsProxyMonitor', $HashPrivieleges["AsProxyMonitor"]);
    }
    if ($priv->AllowAddGroup == false) {
        $AllowAddGroup = "<img src='img/status_critical.png'>" . Field_hidden('AllowAddGroup', $HashPrivieleges["AllowAddGroup"]);
        $AsDansGuardianGroupRule = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianGroupRule', $HashPrivieleges["AsDansGuardianGroupRule"]);
        $AsMessagingOrg = "<img src='img/status_critical.png'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
        $AsOrgAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
        $AsInventoryAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsInventoryAdmin', $HashPrivieleges["AsInventoryAdmin"]);
        $AsJoomlaWebMaster = "<img src='img/status_critical.png'>" . Field_hidden('AsJoomlaWebMaster', $HashPrivieleges["AsJoomlaWebMaster"]);
        $AsVirtualBoxManager = "<img src='img/status_critical.png'>" . Field_hidden('AsVirtualBoxManager', $HashPrivieleges["AsVirtualBoxManager"]);
        $AsDansGuardianAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianAdministrator', $HashPrivieleges["AsDansGuardianAdministrator"]);
        $AsWebFilterRepository = "<img src='img/status_critical.png'>" . Field_hidden('AsWebFilterRepository', $HashPrivieleges["AsWebFilterRepository"]);
    }
    if ($priv->AllowChangeDomains == false) {
        $AllowChangeDomains = "<img src='img/status_critical.png'>" . Field_hidden('AllowChangeDomains', $HashPrivieleges["AllowChangeDomains"]);
    }
    if ($priv->AsSystemAdministrator == false) {
        $AsSystemAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsSystemAdministrator', $HashPrivieleges["AsSystemAdministrator"]);
    }
    if ($priv->AsDnsAdministrator == false) {
        $AsDnsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsDnsAdministrator', $HashPrivieleges["AsDnsAdministrator"]);
    }
    if ($priv->AsQuarantineAdministrator == false) {
        $AsQuarantineAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsQuarantineAdministrator', $HashPrivieleges["AsQuarantineAdministrator"]);
    }
    if ($priv->AsOrgStorageAdministrator == false) {
        $AsOrgStorageAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
    }
    if ($priv->AsOrgPostfixAdministrator == false) {
        $AsOrgPostfixAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
    }
    if ($priv->AsMessagingOrg == false) {
        $AsMessagingOrg = "<img src='img/status_critical.png'>" . Field_hidden('AsMessagingOrg', $HashPrivieleges["AsMessagingOrg"]);
    }
    if ($priv->AsOrgAdmin == false) {
        $AsOrgAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgAdmin', $HashPrivieleges["AsOrgAdmin"]);
    }
    if ($priv->AsInventoryAdmin == false) {
        $AsInventoryAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsInventoryAdmin', $HashPrivieleges["AsInventoryAdmin"]);
    }
    if ($priv->AsJoomlaWebMaster == false) {
        $AsJoomlaWebMaster = "<img src='img/status_critical.png'>" . Field_hidden('AsJoomlaWebMaster', $HashPrivieleges["AsJoomlaWebMaster"]);
    }
    if ($priv->AsVirtualBoxManager == false) {
        $AsVirtualBoxManager = "<img src='img/status_critical.png'>" . Field_hidden('AsVirtualBoxManager', $HashPrivieleges["AsVirtualBoxManager"]);
    }
    if ($priv->AsDansGuardianAdministrator == false) {
        $AsVirtualBoxManager = "<img src='img/status_critical.png'>" . Field_hidden('AsDansGuardianAdministrator', $HashPrivieleges["AsDansGuardianAdministrator"]);
    }
    if ($priv->AsWebFilterRepository == false) {
        $AsWebFilterRepository = "<img src='img/status_critical.png'>" . Field_hidden('AsWebFilterRepository', $HashPrivieleges["AsWebFilterRepository"]);
    }
    if ($priv->AsWebStatisticsAdministrator == false) {
        $AsWebStatisticsAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsWebStatisticsAdministrator', $HashPrivieleges["AsWebStatisticsAdministrator"]);
    }
    if ($priv->AllowUserMaillog == false) {
        $AllowUserMaillog = "<img src='img/status_critical.png'>" . Field_hidden('AllowUserMaillog', $HashPrivieleges["AllowUserMaillog"]);
    }
    if ($priv->AllowEditOuSecurity == false) {
        $AllowEditOuSecurity = "<img src='img/status_critical.png'>" . Field_hidden('AllowEditOuSecurity', $HashPrivieleges["AllowEditOuSecurity"]);
    }
    if ($priv->AsMailManAdministrator == false) {
        $AsMailManAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsMailManAdministrator', $HashPrivieleges["AsMailManAdministrator"]);
    }
    if ($priv->AsPostfixAdministrator == false) {
        $AsPostfixAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsPostfixAdministrator', $HashPrivieleges["AsPostfixAdministrator"]);
    }
    if ($priv->AsSquidAdministrator == false) {
        $AsSquidAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsSquidAdministrator', $HashPrivieleges["AsSquidAdministrator"]);
    }
    if ($priv->AsMailBoxAdministrator == false) {
        $AsMailBoxAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsMailBoxAdministrator', $HashPrivieleges["AsMailBoxAdministrator"]);
    }
    if ($priv->AllowViewStatistics == false) {
        $AllowViewStatistics = "<img src='img/status_critical.png'>" . Field_hidden('AllowViewStatistics', $HashPrivieleges["AllowViewStatistics"]);
    }
    if ($priv->AllowEditOuSecurity == false) {
        $AllowEditOuSecurity = "<img src='img/status_critical.png'>" . Field_hidden('AllowEditOuSecurity', $HashPrivieleges["AllowEditOuSecurity"]);
    }
    if ($priv->AsWebMaster == false) {
        $AsWebMaster = "<img src='img/status_critical.png'>" . Field_hidden('AsWebMaster', $HashPrivieleges["AsWebMaster"]);
    }
    if ($priv->AsSystemWebMaster == false) {
        $AsSystemWebMaster = "<img src='img/status_critical.png'>" . Field_hidden('AsSystemWebMaster', $HashPrivieleges["AsSystemWebMaster"]);
    }
    if ($priv->AllowChangeDomains == false) {
        $AllowChangeDomains = "<img src='img/status_critical.png'>" . Field_hidden('AllowChangeDomains', $HashPrivieleges["AllowChangeDomains"]);
    }
    if ($priv->AsOrgPostfixAdministrator == false) {
        $AsOrgPostfixAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgPostfixAdministrator', $HashPrivieleges["AsOrgPostfixAdministrator"]);
    }
    if ($priv->AsOrgStorageAdministrator == false) {
        $AsOrgStorageAdministrator = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgStorageAdministrator', $HashPrivieleges["AsOrgStorageAdministrator"]);
    }
    if ($priv->OverWriteRestrictedDomains == false) {
        $OverWriteRestrictedDomains = "<img src='img/status_critical.png'>" . Field_hidden('OverWriteRestrictedDomains', $HashPrivieleges["OverWriteRestrictedDomains"]);
    }
    if ($priv->AsHotSpotManager == false) {
        $AsHotSpotManager = "<img src='img/status_critical.png'>" . Field_hidden('AsHotSpotManager', $HashPrivieleges["AsHotSpotManager"]);
    }
    if ($priv->AsOrgDNSAdmin == false) {
        $AsOrgDNSAdmin = "<img src='img/status_critical.png'>" . Field_hidden('AsOrgDNSAdmin', $HashPrivieleges["AsOrgDNSAdmin"]);
    }
    if ($priv->ASDCHPAdmin == false) {
        $ASDCHPAdmin = "<img src='img/status_critical.png'>" . Field_hidden('ASDCHPAdmin', $HashPrivieleges["ASDCHPAdmin"]);
    }
    if ($priv->AsOrgAdmin) {
        $VirtualSambaServerColor = "black";
        $VirtualSambaServer = $VirtualSambaServerField;
        $VirtualPostfix = $VirtualPostfixField;
        $VirtualPostfixFieldColor = "black";
    }
    $group_allow = "&nbsp;{groups_allow}</H3><br>\n<div style='width:98%' class=form>\n\t\t<table>\n\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right'><span style='font-size:13.5px'>{AllowAddUsers}:</span></td><td>{$AllowAddUsers}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right'><span style='font-size:13.5px'>{AsDansGuardianGroupRule}:</span></td><td>{$AsDansGuardianGroupRule}</td>\n\t\t\t</tr>\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t</table></div>\n";
    $user_allow = "&nbsp;{users_allow}</H3><br>\n\t\t<div style='width:98%' class=form>\n\t\t\t\t\t<table>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowChangeAntiSpamSettings}:</span></td><td>" . Field_yesno_checkbox('AllowChangeAntiSpamSettings', $HashPrivieleges["AllowChangeAntiSpamSettings"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowChangeUserPassword}:</span></td><td>" . Field_yesno_checkbox('AllowChangeUserPassword', $HashPrivieleges["AllowChangeUserPassword"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsComplexPassword}:</span></td><td>{$AsComplexPassword}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowFetchMails}:</span></td><td>" . Field_yesno_checkbox('AllowFetchMails', $HashPrivieleges["AllowFetchMails"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowUserMaillog}:</span></td><td>" . Field_yesno_checkbox('AllowUserMaillog', $HashPrivieleges["AllowUserMaillog"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsOwnMailBoxBackup}:</span></td><td>" . Field_yesno_checkbox('AsOwnMailBoxBackup', $HashPrivieleges["AsOwnMailBoxBackup"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowChangeUserKas}:</span></td><td>" . Field_yesno_checkbox('AllowChangeUserKas', $HashPrivieleges["AllowChangeUserKas"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowEditAliases}:</span></td><td>" . Field_yesno_checkbox('AllowEditAliases', $HashPrivieleges["AllowEditAliases"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowChangeMailBoxRules}:</span></td><td>" . Field_yesno_checkbox('AllowChangeMailBoxRules', $HashPrivieleges["AllowChangeMailBoxRules"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowSender_canonical}:</span></td><td>" . Field_yesno_checkbox('AllowSenderCanonical', $HashPrivieleges["AllowSenderCanonical"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowOpenVPN}:</span></td><td>" . Field_yesno_checkbox('AllowOpenVPN', $HashPrivieleges["AllowOpenVPN"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowDansGuardianBanned}:</span></td><td>" . Field_yesno_checkbox('AllowDansGuardianBanned', $HashPrivieleges["AllowDansGuardianBanned"]) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowXapianDownload}:</span></td><td>" . Field_yesno_checkbox('AllowXapianDownload', $HashPrivieleges["AllowXapianDownload"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowManageOwnComputers}:</span></td><td>" . Field_yesno_checkbox('AllowManageOwnComputers', $HashPrivieleges["AllowManageOwnComputers"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsJoomlaWebMaster}:</span></td><td>" . Field_yesno_checkbox('AsJoomlaWebMaster', $HashPrivieleges["AsJoomlaWebMaster"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{RestrictNabToGroups}:</span></td>\n\t\t\t\t\t\t<td>{$RestrictNabToGroups}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowEditAsWbl}:</span></td><td>" . Field_yesno_checkbox('AllowEditAsWbl', $HashPrivieleges["AllowEditAsWbl"]) . "</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t</table></div>";
    $org_allow = "&nbsp;{organization_allow}</H3><br>\n<div style='width:98%' class=form>\n<table >\t\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsOrgAdmin}:</span></td>\n\t\t<td>{$AsOrgAdmin}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsMessagingOrg}:</span></td>\n\t\t<td>{$AsMessagingOrg}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AllowEditOuSecurity}:</span></td>\n\t\t<td>{$AllowEditOuSecurity}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsOrgPostfixAdministrator}:</span></td>\n\t\t<td>{$AsOrgPostfixAdministrator}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsQuarantineAdministrator}:</span></td>\n\t\t<td>{$AsQuarantineAdministrator}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsMailManAdministrator}:</span></td>\n\t\t<td>{$AsMailManAdministrator}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{OverWriteRestrictedDomains}:</span></td>\n\t\t<td>{$OverWriteRestrictedDomains}</td>\n\t</tr>\t\t\n\t\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsOrgStorageAdministrator}:</span></td>\n\t\t<td>{$AsOrgStorageAdministrator}</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsWebMaster}:</span></td>\n\t\t<td>{$AsWebMaster}</td>\n\t</tr>\n\n\t\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px;color:{$VirtualSambaServerColor}'>{file_sharing_server}:</span></td>\n\t\t<td>{$VirtualSambaServer}<div>{$VirtualSambaServerError}</div></td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' nowrap><span style='font-size:13.5px;color:{$VirtualPostfixFieldColor}'>{postfix_instance}:</span></td>\n\t\t<td>{$VirtualPostfix}<div><div>{$VirtualPostfixError}</div></td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right'><span style='font-size:13.5px'>{AsOrgDNSAdmin}:</span></td><td>{$AsOrgDNSAdmin}</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td align='right'><span style='font-size:13.5px'>{AllowChangeDomains}:</span></td><td>{$AllowChangeDomains}</td>\n\t</tr>\t\n</table></div>\t\t\t\t\t\n";
    $admin_allow = "&nbsp;{administrators_allow}</H3><br>\n<div style='width:98%' class=form>\n<table>\n\t\t\t\t\n\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=2><strong style='font-size:16px'>Proxy</strong></td>\t\t\t\t\t\t\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsSquidAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsSquidAdministrator}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsDansGuardianAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsDansGuardianAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right'><span style='font-size:13.5px'>{AsHotSpotManager}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsHotSpotManager}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right'><span style='font-size:13.5px'>{AsProxyMonitor}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsProxyMonitor}</td>\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsWebStatisticsAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsWebStatisticsAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsWebFilterRepository}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsWebFilterRepository}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=2><strong style='font-size:16px'>{messaging}</strong></td>\t\t\t\t\t\t\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsPostfixAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsPostfixAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsMailBoxAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsMailBoxAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=2><strong style='font-size:16px'>{system}</td>\t\t\t\t\t\t\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsArticaAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsArticaAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsSystemAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsSystemAdministrator}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsWebMaster}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsSystemWebMaster}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{ASDCHPAdmin}:</span></td>\n\t\t\t\t\t\t\t<td>{$ASDCHPAdmin}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsDnsAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsDnsAdministrator}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsSambaAdministrator}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsSambaAdministrator}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsInventoryAdmin}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsInventoryAdmin}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><span style='font-size:13.5px'>{AsVirtualBoxManager}:</span></td>\n\t\t\t\t\t\t\t<td>{$AsVirtualBoxManager}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right' nowrap><strong style='font-size:13.5px'>{AllowViewStatistics}:</span></td>\n\t\t\t\t\t\t\t<td>{$AllowViewStatistics}</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</table></div>";
    $sufform = $_GET["tab"];
    switch ($_GET["tab"]) {
        case "G":
            $g = $group_allow;
            break;
        case "U":
            $g = $user_allow;
            break;
        case "A":
            $g = $admin_allow;
            break;
        case "O":
            $g = $org_allow;
            break;
        default:
            $g = $user_allow;
            break;
    }
    $t = time();
    $page = CurrentPageName();
    $BigButton = button("{apply}", "EditGroupPrivileges()", "16px");
    if ($RemoveButton) {
        $BigButton = null;
    }
    $html = "\n\t{$div1}\n\t{$warn}\n\t<div id='{$t}-div'></div>\n\t<div style='padding:20px' >\n\t<form name='{$sufform}_priv'>\n\t\t{$organization_hidden}\n\t\t<input type='hidden' name='PrivilegesGroup' value='{$gid}'><br>\n\t\t<H3>{$title_form}&raquo;\n\t\t{$g}\n\t\t\n\t\t</form>\n\t\t<div style='text-align:right;'>{$BigButton}</div>\n\n\t\t</div>{$div2}\n\n\t\t<script>\n\t\t\nvar x_EditGroupPrivileges{$t}= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue);}\n\tdocument.getElementById('{$t}-div').innerHTML='';\n\t}\n\t\t\n\tfunction EditGroupPrivileges(){\n\t\t\n\t\tvar XHR=ParseForm('{$sufform}_priv','{$page}',true,false,true);\n\t\tif(document.getElementById('groupprivileges')){document.getElementById('groupprivileges').innerHTML='';}\n\t\tAnimateDiv('{$t}-div');\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_EditGroupPrivileges{$t});\n\t}\n\t\t\n\t\tfunction CheckHasOrgAdmin(){\n\t\t\tCheckAsMessagingOrg();\t\n\t\t\tif(!document.getElementById('AsOrgAdmin')){return;}\t\t\n\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfunction CheckAsMessagingOrg(){\n\t\t\tif(!document.getElementById('AsMessagingOrg')){return;}\n\t\t\tif(document.getElementById('AsMessagingOrg').checked){\n\t\t\t\tdocument.getElementById('AsQuarantineAdministrator').disabled=true;\n\t\t\t\tdocument.getElementById('AsMailManAdministrator').disabled=true;\n\t\t\t\tdocument.getElementById('AllowChangeDomains').disabled=true;\n\t\t\t\tCheckAsOrgPostfixAdministrator();\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('AsQuarantineAdministrator').disabled=false;\n\t\t\t\tdocument.getElementById('AsMailManAdministrator').disabled=false;\n\t\t\t\tdocument.getElementById('AllowChangeDomains').disabled=false;\t\t\t\n\t\t\t\tCheckAsOrgPostfixAdministrator();\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tfunction CheckAsOrgPostfixAdministrator(){\n\t\t\tif(document.getElementById('AsOrgPostfixAdministrator').checked){\n\t\t\t\tdocument.getElementById('OverWriteRestrictedDomains').disabled=true;\n\t\t\t\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('OverWriteRestrictedDomains').disabled=false;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tCheckHasOrgAdmin();\n\t\t</script>\n\t\t\n\t\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
コード例 #29
0
function popup()
{
    $page = CurrentPageName();
    $ou = $_GET["ou"];
    $ou_js = $ou;
    $hostname = $_GET["hostname"];
    if ($ou == "_Global") {
        $global_pattern = button("{add_default_rules}", "AddPostFixDefaultRules()");
    }
    if ($hostname == null) {
        $hostname = "master";
        $ou_js = "master";
    }
    $main = new maincf_multi($hostname);
    $enable_attachment_blocking_postfix = $main->GET("enable_attachment_blocking_postfix");
    if (!is_numeric($enable_attachment_blocking_postfix)) {
        $enable_attachment_blocking_postfix = 0;
    }
    $html = "\n\t<table style='width:100%' class=form>\n\t<tr>\n\t\t<td valign='top' class=legend width=1% nowrap style='font-size:16px'>{enable}:</td>\n\t\t<td valign='top' align='left'>" . Field_checkbox("enable_attachment_blocking_postfix", 1, $enable_attachment_blocking_postfix, "enable_attachment_blocking_postfix_save()") . "</td>\n\t</tr>\n\t</table>\t\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=90% valign='top'>\n\t\t\t<p style='font-size:16px;padding:3px'>{attachment_blocking_text}</p>\n\t\t</td>\n\t\t<td valign='top'>" . imgtootltip("plus-24.png", "{add_attachment_blocking_text}", "AddAttachmentForm()") . "</td>\n\t\t<td valign='top'>" . imgtootltip("delete-24.png", "{delete_all}", "DeleteAllAttachments()") . "</td>\n\t</tr>\n\t</table>\n\t\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/bg_forbiden-attachmt.jpg'></td>\n\t\t<td valign='top'><div id='attachmentslist' style='width:100%;height:260px;overflow:auto'></div></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'>{$global_pattern}</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\tRefreshAttachementsList();\n\t\t\n\t\n\t\tvar x_enable_attachment_blocking_postfix_save= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t}\t\n\t\n\t\tfunction enable_attachment_blocking_postfix_save(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('ou','{$ou_js}');\n\t\t\t\tXHR.appendData('hostname','{$hostname}');\n\t\t\t\tif(document.getElementById('enable_attachment_blocking_postfix')){\n\t\t\t\t\tXHR.appendData('enable_attachment_blocking_postfix',1);}else{\n\t\t\t\t\tXHR.appendData('enable_attachment_blocking_postfix',0);}\n\t\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_enable_attachment_blocking_postfix_save);\n\t\t\n\t\t}\t\t\n\t\t\n\t\t\n\t</script>\n\t\t\n\t\n\t\n\t";
    $html = RoundedLightWhite($html);
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #30
0
function popup_form()
{
    $tpl = new templates();
    $main = new maincf_multi($_GET["hostname"]);
    $smtpd_error_sleep_time = $main->GET("smtpd_error_sleep_time");
    $smtpd_soft_error_limit = $main->GET("smtpd_soft_error_limit");
    $smtpd_hard_error_limit = $main->GET("smtpd_hard_error_limit");
    $smtpd_client_connection_count_limit = $main->GET("smtpd_client_connection_count_limit");
    $smtpd_client_connection_rate_limit = $main->GET("smtpd_client_connection_rate_limit");
    $smtpd_client_message_rate_limit = $main->GET("smtpd_client_message_rate_limit");
    $smtpd_client_recipient_rate_limit = $main->GET("smtpd_client_recipient_rate_limit");
    $smtpd_client_new_tls_session_rate_limit = $main->GET("smtpd_client_new_tls_session_rate_limit");
    $smtpd_client_event_limit_exceptions = $main->GET("smtpd_client_event_limit_exceptions");
    $in_flow_delay = $main->GET("in_flow_delay");
    $smtp_connect_timeout = $main->GET("smtp_connect_timeout");
    $smtp_helo_timeout = $main->GET("smtp_helo_timeout");
    $initial_destination_concurrency = $main->GET("initial_destination_concurrency");
    $default_destination_concurrency_limit = $main->GET("default_destination_concurrency_limit");
    $local_destination_concurrency_limit = $main->GET("local_destination_concurrency_limit");
    $smtp_destination_concurrency_limit = $main->GET("smtp_destination_concurrency_limit");
    $default_destination_recipient_limit = $main->GET("default_destination_recipient_limit");
    $smtpd_recipient_limit = $main->GET("smtpd_recipient_limit");
    $queue_run_delay = $main->GET("queue_run_delay");
    $minimal_backoff_time = $main->GET("minimal_backoff_time");
    $maximal_backoff_time = $main->GET("maximal_backoff_time");
    $maximal_queue_lifetime = $main->GET("maximal_queue_lifetime");
    $bounce_queue_lifetime = $main->GET("bounce_queue_lifetime");
    $qmgr_message_recipient_limit = $main->GET("qmgr_message_recipient_limit");
    $default_process_limit = $main->GET("default_process_limit");
    if ($smtpd_error_sleep_time == null) {
        $smtpd_error_sleep_time = "1s";
    }
    if (!is_numeric($smtpd_soft_error_limit)) {
        $smtpd_soft_error_limit = 10;
    }
    if (!is_numeric($smtpd_hard_error_limit)) {
        $smtpd_hard_error_limit = 20;
    }
    if (!is_numeric($smtpd_client_connection_count_limit)) {
        $smtpd_client_connection_count_limit = 50;
    }
    if (!is_numeric($smtpd_client_connection_rate_limit)) {
        $smtpd_client_connection_rate_limit = 0;
    }
    if (!is_numeric($smtpd_client_message_rate_limit)) {
        $smtpd_client_message_rate_limit = 0;
    }
    if (!is_numeric($smtpd_client_recipient_rate_limit)) {
        $smtpd_client_recipient_rate_limit = 0;
    }
    if (!is_numeric($smtpd_client_new_tls_session_rate_limit)) {
        $smtpd_client_new_tls_session_rate_limit = 0;
    }
    if (!is_numeric($initial_destination_concurrency)) {
        $initial_destination_concurrency = 5;
    }
    if (!is_numeric($default_destination_concurrency_limit)) {
        $default_destination_concurrency_limit = 20;
    }
    if (!is_numeric($smtp_destination_concurrency_limit)) {
        $smtp_destination_concurrency_limit = 20;
    }
    if (!is_numeric($local_destination_concurrency_limit)) {
        $local_destination_concurrency_limit = 2;
    }
    if (!is_numeric($default_destination_recipient_limit)) {
        $default_destination_recipient_limit = 50;
    }
    if (!is_numeric($smtpd_recipient_limit)) {
        $smtpd_recipient_limit = 1000;
    }
    if (!is_numeric($default_process_limit)) {
        $default_process_limit = 100;
    }
    if (!is_numeric($qmgr_message_recipient_limit)) {
        $qmgr_message_recipient_limit = 20000;
    }
    if ($smtpd_client_event_limit_exceptions == null) {
        $smtpd_client_event_limit_exceptions = "\$mynetworks";
    }
    if ($in_flow_delay == null) {
        $in_flow_delay = "1s";
    }
    if ($smtp_connect_timeout == null) {
        $smtp_connect_timeout = "30s";
    }
    if ($smtp_helo_timeout == null) {
        $smtp_helo_timeout = "300s";
    }
    if ($bounce_queue_lifetime == null) {
        $bounce_queue_lifetime = "5d";
    }
    if ($maximal_queue_lifetime == null) {
        $maximal_queue_lifetime = "5d";
    }
    if ($maximal_backoff_time == null) {
        $maximal_backoff_time = "4000s";
    }
    if ($minimal_backoff_time == null) {
        $minimal_backoff_time = "300s";
    }
    if ($queue_run_delay == null) {
        $queue_run_delay = "300s";
    }
    $page = CurrentPageName();
    $html = "<table style='width:100%' class=form>\n<tr>\n\t<td colspan=2><div style='font-size:16px'>{title_postfix_tuning_1}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_1_text}') . "</td>\n</tr>\n</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_error_sleep_time}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_error_sleep_time', $smtpd_error_sleep_time, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_error_sleep_time_text}') . "</td>\n\t</tr>\t\n\t<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\n</tbody></table>\n\n<br>\n\n\n<table style='width:100%' class=form>\n<tr>\n\t<td colspan=2 ><div style='font-size:16px'>{title_postfix_tuning_2}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_2_text}') . "</td>\n</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_soft_error_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_soft_error_limit', $smtpd_soft_error_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_soft_error_limit_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_hard_error_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_hard_error_limit', $smtpd_hard_error_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_soft_error_limit_text}') . "</td>\n\t</tr>\t\n<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\n</tbody></table><br>\n\n\n<table style='width:100%' class=form>\n<tr>\n\t<td colspan=2><div style='font-size:16px'>{title_postfix_tuning_3}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_3_text}') . "</td>\n</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_connection_count_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_connection_count_limit', $smtpd_client_connection_count_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_client_connection_count_limit_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_connection_rate_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_connection_rate_limit', $smtpd_client_connection_rate_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_client_connection_rate_limit_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_message_rate_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_message_rate_limit', $smtpd_client_message_rate_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_client_message_rate_limit_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_recipient_rate_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_recipient_rate_limit', $smtpd_client_recipient_rate_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_client_recipient_rate_limit_text}') . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_new_tls_session_rate_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_new_tls_session_rate_limit', $smtpd_client_new_tls_session_rate_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_client_new_tls_session_rate_limit_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_event_limit_exceptions}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_event_limit_exceptions', $smtpd_client_event_limit_exceptions, 'width:70%;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_client_event_limit_exceptions_text}') . "</td>\n\t</tr>\n<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\n</tbody></table><br>\n\n\n<table style='width:100%' class=form>\t\t\t\n<tr>\n\t<td colspan=2><div style='font-size:16px'>{title_postfix_tuning_4}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_4_text}') . "</td>\n</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{in_flow_delay}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('in_flow_delay', $in_flow_delay, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{in_flow_delay_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_connect_timeout}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connect_timeout', $smtp_connect_timeout, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtp_connect_timeout_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_helo_timeout}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_helo_timeout', $smtp_helo_timeout, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtp_helo_timeout_text}') . "</td>\n\t</tr>\t\n<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\t\t\t\t\t\n\n</tbody></table><br>\n<table style='width:100%' class=form>\n<tr>\n\t<td colspan=2><div style='font-size:16px'>{title_postfix_tuning_8}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_8_text}') . "</td>\n</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{initial_destination_concurrency}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('initial_destination_concurrency', $initial_destination_concurrency, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{initial_destination_concurrency_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_destination_concurrency_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('default_destination_concurrency_limit', $default_destination_concurrency_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{default_destination_concurrency_limit_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{local_destination_concurrency_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('local_destination_concurrency_limit', $local_destination_concurrency_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{local_destination_concurrency_limit_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_destination_concurrency_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_destination_concurrency_limit', $smtp_destination_concurrency_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtp_destination_concurrency_limit_text}') . "</td>\n\t</tr>\t\t\t\n<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\t\t\t\t\t\n</tbody></table>\n\n\n<table style='width:100%' class=form>\n<tr>\n\t<td colspan=2><div style='font-size:16px'>{title_postfix_tuning_5}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_5_text}') . "</td>\n</tr>\n\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_destination_recipient_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('default_destination_recipient_limit', $default_destination_recipient_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{default_destination_recipient_limit_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_recipient_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_recipient_limit', $smtpd_recipient_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{smtpd_recipient_limit_text}') . "</td>\n\t</tr>\t\t\n<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\t\t\t\t\n</tbody></table><br>\n\n<table style='width:100%' class=form>\n<tr>\n\t<td colspan=2><div style='font-size:16px'>{title_postfix_tuning_6}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_6_text}') . "</td>\n</tr>\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{queue_run_delay}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('queue_run_delay', $queue_run_delay, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{queue_run_delay_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{minimal_backoff_time}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('minimal_backoff_time', $minimal_backoff_time, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{minimal_backoff_time_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{queue_run_delay}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('maximal_backoff_time', $maximal_backoff_time, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{maximal_backoff_time_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{maximal_queue_lifetime}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('maximal_queue_lifetime', $maximal_queue_lifetime, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{maximal_queue_lifetime_text}') . "</td>\n\t\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{bounce_queue_lifetime}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('bounce_queue_lifetime', $bounce_queue_lifetime, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{bounce_queue_lifetime_text}') . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('qmgr_message_recipient_limit', $qmgr_message_recipient_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{qmgr_message_recipient_limit_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_minimum}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('qmgr_message_recipient_minimum', $qmgr_message_recipient_minimum, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{qmgr_message_recipient_minimum_text}') . "</td>\n\t</tr>\t\t\n<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\t\n</tbody></table><br>\n\n<table style='width:100%' class=form>\n<tr>\n<tr>\n\t<td colspan=2><div style='font-size:16px'>{title_postfix_tuning_7}</div></td>\n\t<td width=1%>" . help_icon('{title_postfix_tuning_7_text}') . "</td>\n</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_process_limit}&nbsp;:</strong></td>\n\t\t<td align='left'>" . Field_text('default_process_limit', $default_process_limit, 'width:60px;font-size:14px', null, null, '') . "</td>\n\t\t<td width=1%>" . help_icon('{default_process_limit_text}') . "</td>\n\t</tr>\t\t\n<tr><td align='right' colspan='3' ><hr>" . button("{apply}", "SavePerfTuning()") . "</td></tr>\t\t\t\t\n\n</tbody></table>\t\n\n<script>\n\tvar x_SavePerfTuning=function(obj){\n    \tvar tempvalue=trim(obj.responseText);\n\t  \tif(tempvalue.length>3){alert(tempvalue);}\n\t  \tLoadPostfixTuningForm();\n\t}\t\n\t\t\n\t\t\n\t\tfunction SavePerfTuning(){\n\t\t\tvar XHR = new XHRConnection();\t\n\t\t\tXHR.appendData('smtpd_error_sleep_time',document.getElementById('smtpd_error_sleep_time').value);\n\t\t\tXHR.appendData('smtpd_soft_error_limit',document.getElementById('smtpd_soft_error_limit').value);\n\t\t\tXHR.appendData('smtpd_hard_error_limit',document.getElementById('smtpd_hard_error_limit').value);\n\t\t\tXHR.appendData('smtpd_client_connection_count_limit',document.getElementById('smtpd_client_connection_count_limit').value);\n\t\t\tXHR.appendData('smtpd_client_connection_rate_limit',document.getElementById('smtpd_client_connection_rate_limit').value);\n\t\t\tXHR.appendData('smtpd_client_message_rate_limit',document.getElementById('smtpd_client_message_rate_limit').value);\n\t\t\tXHR.appendData('smtpd_client_recipient_rate_limit',document.getElementById('smtpd_client_recipient_rate_limit').value);\n\t\t\tXHR.appendData('smtpd_client_new_tls_session_rate_limit',document.getElementById('smtpd_client_new_tls_session_rate_limit').value);\n\t\t\tXHR.appendData('initial_destination_concurrency',document.getElementById('initial_destination_concurrency').value);\n\t\t\tXHR.appendData('default_destination_concurrency_limit',document.getElementById('default_destination_concurrency_limit').value);\n\t\t\tXHR.appendData('smtp_destination_concurrency_limit',document.getElementById('smtp_destination_concurrency_limit').value);\n\t\t\tXHR.appendData('local_destination_concurrency_limit',document.getElementById('local_destination_concurrency_limit').value);\n\t\t\tXHR.appendData('default_destination_recipient_limit',document.getElementById('default_destination_recipient_limit').value);\n\t\t\tXHR.appendData('smtpd_recipient_limit',document.getElementById('smtpd_recipient_limit').value);\n\t\t\tXHR.appendData('default_process_limit',document.getElementById('default_process_limit').value);\n\t\t\tXHR.appendData('qmgr_message_recipient_limit',document.getElementById('qmgr_message_recipient_limit').value);\n\t\t\tXHR.appendData('smtpd_client_event_limit_exceptions',document.getElementById('smtpd_client_event_limit_exceptions').value);\n\t\t\tXHR.appendData('in_flow_delay',document.getElementById('in_flow_delay').value);\n\t\t\tXHR.appendData('smtp_connect_timeout',document.getElementById('smtp_connect_timeout').value);\n\t\t\tXHR.appendData('smtp_helo_timeout',document.getElementById('smtp_helo_timeout').value);\n\t\t\tXHR.appendData('bounce_queue_lifetime',document.getElementById('bounce_queue_lifetime').value);\n\t\t\tXHR.appendData('maximal_queue_lifetime',document.getElementById('maximal_queue_lifetime').value);\n\t\t\tXHR.appendData('maximal_backoff_time',document.getElementById('maximal_backoff_time').value);\n\t\t\tXHR.appendData('minimal_backoff_time',document.getElementById('minimal_backoff_time').value);\n\t\t\tXHR.appendData('queue_run_delay',document.getElementById('queue_run_delay').value);\n\t\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\t\tAnimateDiv('postfix-tuning-form');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SavePerfTuning);\t\t\t\n\t\t}\n\n</script>\n";
    $tpl = new Templates();
    echo $tpl->_ENGINE_parse_body($html);
}