function popup_index() { $page = CurrentPageName(); $tpl = new Templates(); $time = time(); $add_server = $tpl->_ENGINE_parse_body("{add_server}"); $html = "\n<div class=explain>{smtp_fallback_relay_tiny}<br>{smtp_fallback_relay_text}</div>\n<br>\n<div id='table_list_{$time}'></div>\n<script>\nfunction PostfixAddFallBackServer(Routingdomain){\n\tif(!Routingdomain){Routingdomain='';}\n\tYahooWin6(430,'{$page}?PostfixAddFallBackServer=yes&hostname={$_GET["hostname"]}&domainName='+Routingdomain,'{$add_server}')\n\t}\n\t\n\tfunction RefreshFailBackServers(){\n\t\tLoadAjax('table_list_{$time}','{$page}?PostfixAddFallBackerserverLoad=yes&hostname={$_GET["hostname"]}&time={$time}');\n\t}\n\t\n\tvar x_PostfixAddFallBackerserverDelete=function(obj){\n \tvar tempvalue=trim(obj.responseText);\n\t \tif(tempvalue.length>3){alert(tempvalue);}\n\t\tRefreshFailBackServers();\n\t\t}\t\t\n\t\n\tfunction PostfixAddFallBackerserverDelete(index){\n\t\tvar XHR = new XHRConnection();\t\n\t\tXHR.appendData('PostfixAddFallBackerserverDelete',index);\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tAnimateDiv('table_list_{$time}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_PostfixAddFallBackerserverDelete);\n\t\t\t\n\t\t}\t\n\t\n\tRefreshFailBackServers();\n</script>\n\n"; echo $tpl->_ENGINE_parse_body($html); }
function popup_index() { $html = "\n<table style='width:600px' align=center>\n<td valign='top' style='text-align:justify'>" . RoundedLightWhite("<p class=caption>{smtp_fallback_relay_tiny}<br>{smtp_fallback_relay_text}</p>") . "</td>\n</tr>\n</table>\n<table style='width:600px' align=center>\n<tr>\n<td align='center'><input type='button' value='{add_server} »' OnClick=\"javascript:PostfixAddFallBackServer();\"></td></tr>\n<tr>\n<td>" . RoundedLightWhite("<div id='table_list'>" . PostfixAddFallBackerserverList() . "</div>") . "</td></tr>\n</table>\n"; $js["JS"][] = 'js/postfix-fallback.js'; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_index() { $main = new main_cf(); $html = "<H1>{address_verify_map_minitext}</H1>" . RoundedLightWhite("<p class=caption>{address_verify_map_text}</p>") . "<br>\n\n\n<form name='FFMDBCache'>\n\n<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n\t\t" . RoundedLightWhite("\n\t\t<table style='width:100%;margin:10px'>\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', str_replace('btree:', '', $main->main_array["address_verify_map"])) . "</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_yesno_checkbox_img('address_verify_negative_cache', $main->main_array["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', $main->main_array["address_verify_poll_count"], 'width:30%', 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', $main->main_array["address_verify_poll_delay"], 'width:30%', 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\n\t\t\t\n\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', $main->main_array["address_verify_sender"], 'width:30%', 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', $main->main_array["address_verify_negative_expire_time"], 'width:30%', 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', $main->main_array["address_verify_negative_refresh_time"], 'width:30%', 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', $main->main_array["address_verify_positive_expire_time"], 'width:30%', 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', $main->main_array["address_verify_positive_refresh_time"], 'width:30%', 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\n\t\t\t\n\t\t\t\t\t\n\n\t\t\t\n\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right' colspan=2><input type='button' value='{delete} »' OnClick=\"PostFixVerifyDatabaseDeleteSave();\"> <input type='button' value='{edit} »' OnClick=\"PostFixVerifyDatabaseSave();\"></td>\n\t\t\t</tr>\t\t\t\t\n\t\t</table>") . "\n</td>\n</tr>\n</table></form>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_index() { $main = new main_cf(); $html = "\n<H1>{smtp_connection_cache_destinations}</H1>\n<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n" . RoundedLightWhite("<div style='text-align:justify;font-size:12px;height:200px;overflow:auto;width:99%'>{smtp_connection_cache_destinations_text}</div>") . "\n<br>\n" . RoundedLightWhite("\n<form name='FFMA'>\n<table style='width:500px'>\n\t<tr>\n\t\t<td class=legend nowrap><strong>{smtp_connection_cache_on_demand} :</strong></td>\n\t\t<td align='left'>" . Field_yesno_checkbox_img('smtp_connection_cache_on_demand', $main->main_array["smtp_connection_cache_on_demand"], '{enable_disable}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{smtp_connection_cache_time_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connection_cache_time_limit', $main->main_array["smtp_connection_cache_time_limit"], 'width:20%', null, null, '{smtp_connection_cache_time_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{smtp_connection_reuse_time_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connection_reuse_time_limit', $main->main_array["smtp_connection_reuse_time_limit"], 'width:20%', null, null, '{smtp_connection_reuse_time_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{connection_cache_ttl_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('connection_cache_ttl_limit', $main->main_array["connection_cache_ttl_limit"], 'width:20%', null, null, '{connection_cache_ttl_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{connection_cache_status_update_time} :</strong></td>\n\t\t<td align='left'>" . Field_text('connection_cache_status_update_time', $main->main_array["connection_cache_status_update_time"], 'width:20%', null, null, '{connection_cache_status_update_time_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:PostFixSaveServerCacheSettings();\"></td>\n\t\t\n\t</tr>\t\t\t\n\t\t\t\t\t\n\t\t\n</form>\t") . "\n\t\n\t<tr>\n\t\n\t\n\t\t<td class=legend nowrap><strong>{smtp_connection_cache_destinations_field} :</strong></td>\n\t\t<td align='left'><input type='button' value='{add_server_domain} »' OnClick=\"javascript:PostFixAddServerCache();\">\n\t</tr>\n</table>\t\n\n\n</td>\n</tr>\n</table><div id='ServerCacheList'>" . PostFixServerCacheList() . "</div>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_index() { $main = new main_cf(); $page = CurrentPageName(); $html = "<table style='width:600px' align=center>\n<tr>\n<td valign='top'><div style='width:100%;height:400px;overflow:auto'>\n<form name='FFMAP'>\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_1}</H5></td></tr>\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_1_text}') . "</td></tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_error_sleep_time} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_error_sleep_time', $main->main_array["smtpd_error_sleep_time"], 'width:20%', null, null, '{smtpd_error_sleep_time_text}') . "\n\t</tr>\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\n</table>") . "<br>\n\n\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_2}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_2_text}') . "</td></tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_soft_error_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_soft_error_limit', $main->main_array["smtpd_soft_error_limit"], 'width:20%', null, null, '{smtpd_soft_error_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_hard_error_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_hard_error_limit', $main->main_array["smtpd_hard_error_limit"], 'width:20%', null, null, '{smtpd_hard_error_limit_text}') . "\n\t</tr>\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_3}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_3_text}') . "</td></tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_connection_count_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_connection_count_limit', $main->main_array["smtpd_client_connection_count_limit"], 'width:20%', null, null, '{smtpd_client_connection_count_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_connection_rate_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_connection_rate_limit', $main->main_array["smtpd_client_connection_rate_limit"], 'width:20%', null, null, '{smtpd_client_connection_rate_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_message_rate_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_message_rate_limit', $main->main_array["smtpd_client_message_rate_limit"], 'width:20%', null, null, '{smtpd_client_message_rate_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_recipient_rate_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_recipient_rate_limit', $main->main_array["smtpd_client_recipient_rate_limit"], 'width:20%', null, null, '{smtpd_client_recipient_rate_limit_text}') . "\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} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_new_tls_session_rate_limit', $main->main_array["smtpd_client_new_tls_session_rate_limit"], 'width:20%', null, null, '{smtpd_client_new_tls_session_rate_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_event_limit_exceptions} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_event_limit_exceptions', $main->main_array["smtpd_client_event_limit_exceptions"], 'width:70%', null, null, '{smtpd_client_event_limit_exceptions_text}') . "\n\t</tr>\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\t\t\t\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_4}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_4_text}') . "</td></tr>\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{in_flow_delay} :</strong></td>\n\t\t<td align='left'>" . Field_text('in_flow_delay', $main->main_array["in_flow_delay"], 'width:10%', null, null, '{in_flow_delay_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_connect_timeout} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connect_timeout', $main->main_array["smtp_connect_timeout"], 'width:50%', null, null, '{smtp_connect_timeout_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_helo_timeout} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_helo_timeout', $main->main_array["smtp_helo_timeout"], 'width:50%', null, null, '{smtp_helo_timeout_text}') . "\n\t</tr>\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\t\n\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_8}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_8_text}') . "</td></tr>\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{initial_destination_concurrency} :</strong></td>\n\t\t<td align='left'>" . Field_text('initial_destination_concurrency', $main->main_array["initial_destination_concurrency"], 'width:50%', null, null, '{initial_destination_concurrency_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_destination_concurrency_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('default_destination_concurrency_limit', $main->main_array["default_destination_concurrency_limit"], 'width:50%', null, null, '{default_destination_concurrency_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{local_destination_concurrency_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('local_destination_concurrency_limit', $main->main_array["local_destination_concurrency_limit"], 'width:50%', null, null, '{local_destination_concurrency_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_destination_concurrency_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_destination_concurrency_limit', $main->main_array["smtp_destination_concurrency_limit"], 'width:80%', null, null, '{smtp_destination_concurrency_limit_text}') . "\n\t</tr\t\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\t\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_5}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_5_text}') . "</td></tr>\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_destination_recipient_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('default_destination_recipient_limit', $main->main_array["default_destination_recipient_limit"], 'width:50%', null, null, '{default_destination_recipient_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_recipient_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_recipient_limit', $main->main_array["smtpd_recipient_limit"], 'width:50%', null, null, '{smtpd_recipient_limit_text}') . "\n\t</tr>\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_6}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_6_text}') . "</td></tr>\t\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{queue_run_delay} :</strong></td>\n\t\t<td align='left'>" . Field_text('queue_run_delay', $main->main_array["queue_run_delay"], 'width:50%', null, null, '{queue_run_delay_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{minimal_backoff_time} :</strong></td>\n\t\t<td align='left'>" . Field_text('minimal_backoff_time', $main->main_array["minimal_backoff_time"], 'width:50%', null, null, '{minimal_backoff_time_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{queue_run_delay} :</strong></td>\n\t\t<td align='left'>" . Field_text('maximal_backoff_time', $main->main_array["maximal_backoff_time"], 'width:50%', null, null, '{maximal_backoff_time_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{maximal_queue_lifetime} :</strong></td>\n\t\t<td align='left'>" . Field_text('maximal_queue_lifetime', $main->main_array["maximal_queue_lifetime"], 'width:50%', null, null, '{maximal_queue_lifetime_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{bounce_queue_lifetime} :</strong></td>\n\t\t<td align='left'>" . Field_text('bounce_queue_lifetime', $main->main_array["bounce_queue_lifetime"], 'width:50%', null, null, '{bounce_queue_lifetime_text}') . "\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('qmgr_message_recipient_limit', $main->main_array["qmgr_message_recipient_limit"], 'width:50%', null, null, '{qmgr_message_recipient_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_minimum} :</strong></td>\n\t\t<td align='left'>" . Field_text('qmgr_message_recipient_minimum', $main->main_array["qmgr_message_recipient_minimum"], 'width:50%', null, null, '{qmgr_message_recipient_minimum_text}') . "\n\t</tr>\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\t\t\t\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_7}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_7_text}') . "</td></tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_process_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('default_process_limit', $main->main_array["default_process_limit"], 'width:50%', null, null, '{default_process_limit_text}') . "\n\t</tr>\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\n</form>\t\n</table>") . "\t\n\n</div>\n</td>\n</tr>\n</table>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function about() { $page = CurrentPageName(); $tpl = new Templates(); $time = time(); $html = "\n<div class=text-info style='font-size:14px'>{smtp_fallback_relay_tiny}<br>{smtp_fallback_relay_text}</div>\n\n"; echo $tpl->_ENGINE_parse_body($html); }
function GeneralSettings() { $ave = new kav4mailservers(1, null, 1); $page = CurrentPageName(); $tpl = new Templates(null, null, null, 1); $html = Tabs() . "\n\t<fieldset>\n\t\t<legend>{general_settings}</legend>\n\t<form name='ffm1'>\t\t\n\t<table style='width:100%'>\n\t<input type='hidden' name='KEY' value='smtpscan.general'>\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{NotifyFromAddress}:</strong></td>\n\t\t\t<td>" . Field_text('NotifyFromAddress', $ave->array_conf["smtpscan.general"]["NotifyFromAddress"]) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<tr><td colspan=2> </td></tr>\n\t\t<tr>\n\t\t\t<td align='right' valign='top'>" . Field_yesno_checkbox_img('EHLOsupport8BITMIME', $ave->array_conf["smtpscan.general"]["EHLOsupport8BITMIME"], '{enable_disable}') . "</td>\n\t\t\t<td align='left' class='caption'><strong>:{EHLOsupport8BITMIME}</strong>{EHLOsupport8BITMIME_text}</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<tr><td colspan=2> </td></tr>\n\t\t\n\t\t<tr>\n\t\t\t<td align='right' valign='top'>" . Field_yesno_checkbox_img('EHLOsupportDSN', $ave->array_conf["smtpscan.general"]["EHLOsupportDSN"], '{enable_disable}') . "</td>\n\t\t\t<td align='left' class=caption><strong>:{EHLOsupportDSN}</strong>{EHLOsupportDSN_text}</td>\n\t\t</tr>\n\t\t\n\t\t<tr><td colspan=2> </td></tr>\n\t\t<tr>\n\t\t\t<td align='right' valign='top'>" . Field_yesno_checkbox_img('EHLOsupportXFORWARD', $ave->array_conf["smtpscan.general"]["EHLOsupportXFORWARD"], '{enable_disable}') . "</td>\n\t\t\t<td align='left'><strong>:{EHLOsupportXFORWARD}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right'><strong>{EHLOattrsXFORWARD}:</strong></td>\n\t\t\t<td align='right' valign='top'>" . Field_text('EHLOattrsXFORWARD', $ave->array_conf["smtpscan.general"]["EHLOattrsXFORWARD"]) . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td> </td>\n\t\t<td class='caption'>{EHLOsupportXFORWARD_text}<br><b>protocol:</b>{$ave->array_conf["smtpscan.general"]["Protocol"]} « {$ave->array_conf["smtpscan.general"]["ForwardMailer"]} »</td>\n\t\t</tr>\n\t\t<tr><td colspan=2 style='text-align:right;padding-right:10px'><input type='button' value='{submit} »' OnClick=\"javascript:ParseForm('ffm1','{$page}',true);\"></td></tr>\n\t</table>\n\t</form>\n\t</fieldset>"; return $tpl->_ENGINE_parse_body($html); }
function otherpage() { $page = CurrentPageName(); $main = new main_cf(); $html = "\n<H1>Postfix:{other_settings}</H1>\n<div id='otherpagedvi'>\n<table style='width:100%' class=table_form>\n<tr>\n\t<td class=legend nowrap>{undisclosed_recipients_header}:</td>\n\t<td>" . Field_text('undisclosed_recipients_header', $main->main_array["undisclosed_recipients_header"], 'width:100%') . "</td>\n\t<td>" . help_icon("{undisclosed_recipients_header_text}") . "</td>\n</tr>\n<tr>\n\t<td class=legend nowrap>{enable_original_recipient}:</td>\n\t<td>" . Field_yesno_checkbox('enable_original_recipient', $main->main_array["enable_original_recipient"]) . "</td>\n\t<td>" . help_icon("{enable_original_recipient_text}") . "</td>\n</tr>\n\n\n<tr><td colspan=2><hr></td></tr>\n<tr><td colspan=2 align='right'><input type='button' OnClick=\"javascript:SavePostfixOtherSection();\" value=' {edit} »»'></td></tr>\n</table>\n</div>\n\n"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_old() { $page = CurrentPageName(); $tpl = new templates(); if (strpos($_GET["uid"], '$') > 0) { $add = "\n\t\t<div style='text-align:right;margin:8px'>" . imgtootltip("32-group-icon-add.png", "{add_group}", "AddNewGroupComp()") . "</div>\n\t\t\n\t\t"; } $html = "{$add}\n\t<div style='width:100%;height:300px;overflow:auto' id='AddGroupAffectDiv'></div>\n\t\n\t\n\t<script>\n\t\t\n\t\t\n\n\n\tfunction RefreshGroup(){\n\t\tLoadAjax('AddGroupAffectDiv','{$page}?popup-list=yes&ou={$_GET["ou"]}&uid={$_GET["uid"]}');\n\t}\n\tRefreshGroup();\t\n\t</script>\n\t\n\t"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function SystemStatistics($nopage = 0) { $users = new usersMenus(); $graph1 = InsertChart('js/charts.swf', "js/charts_library", "listener.graphs.php?MonthsBlocketType=yes", 600, 180, "", true, $users->ChartLicence); $js = "<script>\t\n\t\t\n\tfunction wait(){\n\t\tdocument.getElementById('blank').src='img/blank.gif';\n\t\tsetTimeout(\"Refreshit()\",10000)\n\t\t\n\t}\n\t\n\tfunction Refreshit(){\n\t\tdocument.getElementById('blank').src='img/wait.gif';\n\t\tsetTimeout(\"Send()\",2000);\n\t}\n\t\n\tfunction Send(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('SystemStatistics','yes');\n\t\tXHR.setRefreshArea('rrd');\t\t\t\t\t\t\t\t\t\n\t\tXHR.sendAndLoad(CurrentPageName(), 'GET');\n\t\twait();\n\t}\n\n</script>"; $time = serialize(date('Y-m-d H:I:s')); $html = "\n\t\n\t\n\t\n\t<div id='rrd'>\n\t<center style='border:1px dotted #CCCCCC;margin:4px;padding:4px'>\n\t\t<H3>{detected_this_month}</H3>\n\t\t{$graph1}\n\t\t</center>\n\t\t<div id='graph2'></div>\n\t\t<div id='graph3'></div>\n\t</div>\n"; // <script>wait()</script> if ($nopage == 0) { $tpl = new template_users("{more_stats}", $js . $html); echo $tpl->web_page; } else { $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); } }
function popup_list() { $group = new groups(); $ou_con = base64_decode($_GET["ou"]); if ($ou_con != null) { $_GET["ou"] = $ou_con; } $hash_group = $group->list_of_groups($_GET["ou"], 1); $hash_group[null] = "{no_group}"; $uid = $_GET["uid"]; $html = "<table style='width:80%'>"; while (list($num, $ligne) = each($hash_group)) { $html = $html . "<tr " . CellRollOver("AddAjaxPopUpGroupV2('{$ou}','{$uid}',{$num},'{$ligne}');", "{add_group} {$ligne}") . ">\n\t\t\t<td width=1%><img src='img/32-group-icon.png'></td>\n\t\t\t<td valign='middle' style='font-size:14px;font-weight:bold'>{$ligne} ({$num})</a></td>\n\t\t\t</tr>"; } $html = $html . "</table>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
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); }
function maillog() { include_once dirname(__FILE__) . "/ressources/class.status.logs.inc"; $user = new usersMenus(); $tpl = new Templates(); if ($user->AsPostfixAdministrator == false) { echo DIV_SHADOW($tpl->_ENGINE_parse_body('{no privileges}')); exit; } $sock = new sockets(); if ($_GET["maillog_filter"] != null) { switch ($_GET["maillog_filter"]) { case 'articaweb': $datas = file_get_contents(dirname(__FILE__) . '/ressources/logs/artica-web.log'); break; case 'procmail': $datas = $sock->getfile('procmail_logs'); break; default: $datas = $sock->getfile('maillog:' . $_GET["maillog_filter"]); break; } } else { $tbl = unserialize(base64_decode($sock->getFrameWork('cmd.php?postfix-tail=yes'))); } $datas = htmlentities($datas); $tbl = explode("\n", $datas); $tbl = array_reverse($tbl, TRUE); $html = "<table style='width:100%'>"; while (list($num, $val) = each($tbl)) { if (trim($val) != null) { if ($class == "rowA") { $class = "rowB"; } else { $class = "rowA"; } $html = $html . "<tr>\n\t\t<td width=1% style='border-bottom:1px dotted #CCCCCC' align='center'><img src='" . statusLogs($val) . "'></td>\n\t\t<td width=99%' style='border-bottom:1px dotted #CCCCCC;font-size:10px;'>{$val}</td>\n\t\t</tr>\n\t\t"; } } $html = $html . "</table>"; return $html; }
function USER_GROUP_CONTENT($userid) { if (substr($userid, strlen($userid) - 1, 1) == '$') { $users = new computers($userid); } else { $users = new user($userid); } $ou = $users->ou; $sambagroups = array("515" => true, "548" => true, "544" => true, "551" => true, "512" => true, "514" => true, "513" => true, 550 => true, 552 => true); $priv = new usersMenus(); $button = "<input type='button' value='{add} »' OnClick=\"javascript:AddMemberGroup();\" style='margin-bottom:0px'>"; if ($priv->AllowAddUsers == false) { $button = null; } $gp = "<h3>{member_of_group}:</H3>\n\t\t<center>\n\t\t\t<div id='USER_GROUP' style='margin:3px;padding:5px;height:200px;overflow:auto'>" . USER_GROUP_LIST($userid) . "</div>\n\t\t</center>"; $ou_encoded = base64_encode($ou); $groupjs = "Loadjs('domains.group.user.affect.php?ou={$ou_encoded}&uid={$userid}')"; $addgroup = Paragraphe("64-folder-group-add.png", "{add_group}", "{ADD_USER_GROUP_TEXT}", "javascript:{$groupjs}"); if ($priv->EnableManageUsersTroughActiveDirectory) { $addgroup = Paragraphe("64-folder-group-add-grey.png", "{add_group}", "{ADD_USER_GROUP_TEXT}"); } $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>{$addgroup}</td>\n\t<td valign='top'>\n\t\n\t<h5>{$users->DisplayName}:{move_member}</h5>\n\t<form name='ffm1'>\n\t<input type='hidden' name='userid' id='userid' value='{$userid}'>\n\t{$gp}\n\t</td>\n\t</tr>\n\t</table>"; $tpl = new Templates(); return $tpl->_ENGINE_parse_body($html); }
function TreeProcMailApplyConfig() { $usr = new usersMenus(); $tpl = new Templates(); if ($usr->AsMailBoxAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); exit; } $proc = new procmail(); $proc->SaveItToDisk(); echo $tpl->_ENGINE_parse_body('{success}'); exit; }
function popup_index() { $html = "\n\n<table style='width:99%' align=center class=form>\n<tr>\n<td valign='top'><img src='img/bg_perf.jpg'></td>\n<td valign='top'>\n" . ParagrapheTEXT('cache-refresh-48.png', '{smtp_connection_cache_destinations}', '{smtp_connection_cache_destinations_minitext}', "javascript:Loadjs('postfix.performances.cache.php?hostname={$_GET["hostname"]}')") . ParagrapheTEXT('cache-refresh-48.png', '{address_verify_map}', '{address_verify_map_minitext}', "javascript:Loadjs('postfix.performances.verify.map.php?hostname={$_GET["hostname"]}')") . "\n" . ParagrapheTEXT('folder-equerre-48.png', '{title_postfix_tuning}', '{title_postfix_tuning_text}', "javascript:Loadjs('postfix.performances.tuning.php?hostname={$_GET["hostname"]}')") . "\n" . ParagrapheTEXT('folder-fallback-48.png', '{smtp_fallback_relay}', '{smtp_fallback_relay_tiny}', "javascript:Loadjs('postfix.fallback.relay.php?hostname={$_GET["hostname"]}')") . "\n</td>\n</tr>\n</table>\n<div class=text-info style='font-size:14px'>{performances_settings_text}</div>\n"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
<?php header("Pragma: no-cache"); header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); session_start(); include_once "ressources/class.templates.inc"; include_once "ressources/class.ldap.inc"; include_once "ressources/class.sockets.inc"; $user = new usersMenus(); $tpl = new Templates(); if ($user->AsPostfixAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no privileges}'); exit; } $sock = new sockets(); $datas = $sock->getfile('procmail_logs'); if ($sock->error == true) { echo $tpl->_ENGINE_parse_body('{socket_error}'); exit; } $datas = htmlentities($datas); $tbl = explode("\n", $datas); $tbl = array_reverse($tbl, TRUE); $html = "<table style='width:100%'>"; while (list($num, $val) = each($tbl)) { if (trim($val) != null) { if ($class == "rowA") { $class = "rowB"; } else {
function Cyrus_mailbox_apply_settings() { $usr = new usersMenus(); $tpl = new Templates(); $show = array(); $uid = $_GET["Cyrus_mailbox_apply_settings"]; if ($usr->AsMailBoxAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); exit; } $cyrus = new cyrus(); $ldap = new clladp(); $show[] = "{mailbox_creation_results}: {$uid}"; $hash = $ldap->UserDatas($uid); if ($hash["MailboxActive"] == "TRUE") { $show[] = "{mailbox_enabled}"; $createMailbox = true; if ($cyrus->CreateMailbox($uid) == false) { $createMailbox = false; $error = "{failed}:{creating_mailbox}:{$uid}\n{$cyrus->cyrus_last_error}\n"; } else { $error = "{success}:{creating_mailbox}:{$uid}\n"; } $show[] = $cyrus->cyrus_infos; } else { $show[] = "{mailbox_not_enabled}"; } while (list($num, $ligne) = each($show)) { $html = $html . "<div style='font-size:12px;font-weight:bold;'>{$ligne}</div>\n"; } echo "<div style='width:100%;height:250px;overflow:auto'>" . $tpl->_ENGINE_parse_body($html) . "</div>"; }
function popup_index() { $html = "\n<h1>{performances_settings_text}</H1>\n<table style='width:600px' align=center>\n<tr>\n<td valign='top'>" . RoundedLightWhite("<img src='img/bg_perf.jpg'>") . "</td>\n<td valign='top'>\n\t" . Paragraphe('folder-cache-64.png', '{smtp_connection_cache_destinations}', '{smtp_connection_cache_destinations_minitext}', "javascript:Loadjs('postfix.performances.cache.php')") . Paragraphe('folder-cache-64.png', '{address_verify_map}', '{address_verify_map_minitext}', "javascript:Loadjs('postfix.performances.verify.map.php')") . "</td>\n\n</td>\n</tr>\n</table>\n<table>\n\t<tr>\n\t<td valign='top' >" . Paragraphe('folder-equerre-64.png', '{title_postfix_tuning}', '{title_postfix_tuning_text}', "javascript:Loadjs('postfix.performances.tuning.php')") . "</td>\n\t<td valign='top' >" . Paragraphe('folder-fallback-64.png', '{smtp_fallback_relay}', '{smtp_fallback_relay_tiny}', "javascript:Loadjs('postfix.fallback.relay.php')") . "</td>\n\t</tr>\t\n</table>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function USER_GROUP_POPUP_ADD() { $group = new groups(); $ou_con = base64_decode($_GET["ou"]); if ($ou_con != null) { $_GET["ou"] = $ou_con; } $hash_group = $group->list_of_groups($_GET["ou"], 1); $hash_group[null] = "{no_group}"; $uid = $_GET["uid"]; $html = "\n\t<h1>{add_group}</H1>\n\t<div style='width:100%;height:300px;overflow:auto'>\n\t<input type='hidden' id='ADD_USER_GROUP_ASK' value='{ADD_USER_GROUP_ASK}'>\n\t<table style='width:80%' class=table_form>\n\t\t\n\t\t\t\n\t"; while (list($num, $ligne) = each($hash_group)) { $html = $html . "<tr " . CellRollOver("AddAjaxPopUpGroupV2('{$ou}','{$uid}',{$num},'{$ligne}');", "{add_group} {$ligne}") . ">\n\t\t\t<td width=1%><img src='img/32-group-icon.png'></td>\n\t\t\t<td valign='middle' style='font-size:15px;font-weight:bold'>{$ligne} ({$num})</a></td>\n\t\t\t</tr>"; } $html = $html . "</table></div>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function ListDirectory() { $uid = $_GET["uid"]; $taskid = $_GET["taskid"]; $sock = new sockets(); $tpl = new Templates(); $uid = str_replace(".", "^", $uid); $firstletter = substr($uid, 0, 1); $target_dir = $_GET["path"]; $target_dir = base64_encode($target_dir); writelogs("Send receive", __FUNCTION__, __FILE__); $data = $sock->getFrameWork("cmd.php?cyr-restore-container={$taskid}&dir={$target_dir}"); writelogs(strlen($data) . " bytes receive", __FUNCTION__, __FILE__); $array = unserialize(base64_decode($data)); if (!is_array($array)) { return; } while (list($path, $dir) = each($array)) { if ($dir == null) { continue; } $array1[$dir] = $dir; } ksort($array1); while (list($path, $path_1) = each($array1)) { $divid = md5("INBOX/{$path_1}"); //ListDirectory(taskid,path,divid) $path_1_text = texttooltip($path_1, "{browse}", "ListDirectory('{$taskid}','{$target_dir_src}/{$path_1}','{$divid}')"); $html = $html . "\n\t\t<table style='width:100%;padding:3px;'>\n \t\t<tr >\n \t\t\t<td> </td>\n \t\t\t<td width=1%><img src='img/mailbox.gif'></td>\n \t\t\t<td " . CellRollOver() . " width=99% valign='top' style='font-size:11px'><strong>{$path_1_text}</strong></td>\n \t\t\t<td>" . imgtootltip("22-backup.png", "{restore} {$path_1}", "RestoreMailbox({$taskid},'{$target_dir}','INBOX/{$path_1}')") . "</td>\n \t\t</tr>\n \t\t</table>\n\t\t<div id='{$divid}' style='padding-left:15px'></div>"; } echo $tpl->_ENGINE_parse_body("{$html}"); }
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} :</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} :</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} :</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} :</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} :</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} :</strong></td>\n\t\t<td align='left'><input type='button' value='{add_server_domain} »' 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); }
function pie_single_mailbox_user() { $tpl = new Templates(); $USER_STORAGE_USAGE = $_GET["USER_STORAGE_USAGE"]; $USER_STORAGE_LIMIT = $_GET["STORAGE_LIMIT"]; $FREE = $_GET["FREE"]; writelogs("USER_STORAGE_USAGE={$USER_STORAGE_USAGE}", __FUNCTION__, __FILE__); writelogs("STORAGE_LIMIT={$USER_STORAGE_LIMIT}", __FUNCTION__, __FILE__); if ($USER_STORAGE_LIMIT == null) { $USER_STORAGE_LIMIT = 1000000; $USER_STORAGE_USAGE = 0; $FREE = $USER_STORAGE_LIMIT; } $USER_STORAGE_RESTANT = $USER_STORAGE_LIMIT - $USER_STORAGE_USAGE; if ($USER_STORAGE_RESTANT > 1) { $reste = round($USER_STORAGE_RESTANT / 1024); $data = array($USER_STORAGE_USAGE, $USER_STORAGE_RESTANT); } else { $data = array($USER_STORAGE_USAGE); } $title = $tpl->_ENGINE_parse_body("{your mailbox usage}\n ({$reste} mb free)"); writelogs("USER_STORAGE_USAGE={$USER_STORAGE_USAGE} - USER_STORAGE_LIMIT={$USER_STORAGE_LIMIT} FREE={$FREE}", __FUNCTION__, __FILE__); $date = date('Y-m-d'); $textes = array(); $donnees = array(); $zlabel = array(); $date = date('Y-m-d'); $textes[] = 'title'; $donnees[] = ''; $donnees[] = $FREE; $textes[] = "Free"; $donnees[] = $USER_STORAGE_USAGE; $textes[] = "used"; BuildPieChart(array($textes, $donnees)); }
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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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} :</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); }
function Cyrus_mailbox_apply_settings() { $usr = new usersMenus(); $tpl = new Templates(); $uid = $_GET["Cyrus_mailbox_apply_settings"]; if ($usr->AsMailBoxAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); exit; } $cyrus = new cyrus(); $ldap = new clladp(); $hash = $ldap->UserDatas($uid); if ($hash["MailboxActive"] == "TRUE") { $createMailbox = true; if ($cyrus->CreateMailbox($uid) == false) { $createMailbox = false; $error = "{failed}:{creating_mailbox}:{$uid}\n{$cyrus->cyrus_last_error}\n"; } else { $error = "{success}:{creating_mailbox}:{$uid}\n"; } } echo html_entity_decode($tpl->_ENGINE_parse_body($error)); }
<?php header("Pragma: no-cache"); header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); session_start(); include_once "ressources/class.templates.inc"; include_once "ressources/class.ldap.inc"; include_once "ressources/class.sockets.inc"; include_once dirname(__FILE__) . '/ressources/kav4mailservers.inc'; $user = new usersMenus(); $tpl = new Templates(); if ($user->AsPostfixAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no privileges}'); exit; } $kav = new kav4mailservers(1); $datas = htmlentities($datas); $tbl = explode("\n", $datas); $tbl = $kav->DaemonLastLogs(); $html = DaemonErrors() . DaemonLastLogs(); $tplusr = new template_users('{events}', $html, 0, 0, 0, 10); echo $tplusr->web_page; function DaemonLastLogs() { $kav = new kav4mailservers(1); $daemon_errors = $kav->DaemonLastLogs(); if (is_array($daemon_errors)) { $html = $html . "<H4>{events}</H4>\n\t\t\t<center>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr style='background-color:#005447;'>\n\t\t\t<td> </td>\n\t\t\t<td style='color:white;font-weight:bold' width=5%>{date}</td>\n\t\t\t<td style='color:white;font-weight:bold'>{details}</td>\n\t\t\t</tr>"; while (list($key, $val) = each($daemon_errors)) {
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); }
function pie_single_mailbox_user() { $tpl = new Templates(); $users = new usersMenus(); $uid = $_SESSION["uid"]; if ($users->cyrus_imapd_installed == 0) { return null; } $ldap = new clladp(); $hash = $ldap->UserDatas($_SESSION["uid"]); if ($hash["MailboxActive"] != 'TRUE') { return null; } $cyrus = new cyrus(); $res = $cyrus->get_quota_array($uid); $size = $cyrus->MailboxInfosSize($uid); $free = $cyrus->USER_STORAGE_LIMIT - $cyrus->USER_STORAGE_USAGE; if (!$cyrus->MailBoxExists($uid)) { return null; } $USER_STORAGE_USAGE = $cyrus->USER_STORAGE_USAGE; $USER_STORAGE_LIMIT = $cyrus->USER_STORAGE_LIMIT; $FREE = $free; writelogs("USER_STORAGE_USAGE={$USER_STORAGE_USAGE}", __FUNCTION__, __FILE__); writelogs("STORAGE_LIMIT={$USER_STORAGE_LIMIT}", __FUNCTION__, __FILE__); if ($USER_STORAGE_LIMIT == null) { $USER_STORAGE_LIMIT = 1000000; $USER_STORAGE_USAGE = 0; $FREE = $USER_STORAGE_LIMIT; } $USER_STORAGE_RESTANT = $USER_STORAGE_LIMIT - $USER_STORAGE_USAGE; if ($USER_STORAGE_RESTANT > 1) { $reste = round($USER_STORAGE_RESTANT / 1024); $data = array($USER_STORAGE_USAGE, $USER_STORAGE_RESTANT); } else { $data = array($USER_STORAGE_USAGE); } $title = $tpl->_ENGINE_parse_body("{your mailbox usage} ({$reste} mb free)"); writelogs("USER_STORAGE_USAGE={$USER_STORAGE_USAGE} - USER_STORAGE_LIMIT={$USER_STORAGE_LIMIT} FREE={$FREE}", __FUNCTION__, __FILE__); $date = date('Y-m-d'); $textes = array(); $donnees = array(); $zlabel = array(); $date = date('Y-m-d'); $donnees[] = $FREE; $textes[] = "{$FREE} Free"; $donnees[] = $USER_STORAGE_USAGE; $textes[] = "{$USER_STORAGE_USAGE} used"; $data = $donnees; $graph = new PieGraph(370, 350, 'auto'); //$graph->SetShadow(); $graph->title->Set($title); $graph->title->SetFont(FF_FONT1, FS_BOLD); $p1 = new PiePlot3D($data); $p1->SetLabels($textes, 1); $p1->SetEdge('black', 0); $p1->SetAngle(55); $p1->SetLabelMargin(2); $p1->SetCenter(0.4, 0.5); $p1->ExplodeAll(10); $graph->Add($p1); $graph->SetFrame(false); $graph->StrokeCSIM(); }