本文整理汇总了PHP中Paragraphe_switch_disable函数的典型用法代码示例。如果您正苦于以下问题:PHP Paragraphe_switch_disable函数的具体用法?PHP Paragraphe_switch_disable怎么用?PHP Paragraphe_switch_disable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Paragraphe_switch_disable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: popup
function popup()
{
$sock = new sockets();
$PostfixMultiCreateBubble = $sock->GET_INFO("PostfixMultiCreateBubble");
if (!is_numeric($PostfixMultiCreateBubble)) {
$PostfixMultiCreateBubble = 0;
}
$main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
$EnableSubmission = $main->GET("EnableSubmission");
$TrustMyNetwork = $main->GET("TrustMyNetwork");
if (!is_numeric($TrustMyNetwork)) {
$TrustMyNetwork = 1;
}
$EnableSasl = $main->GET("EnableSasl");
$sasl = Paragraphe_switch_img('{sasl_title}', '{sasl_intro}', 'EnableSasl', $EnableSasl, '{enable_disable}', 300);
if ($PostfixMultiCreateBubble == 1) {
$TrustMyNetwork = "<input type=hidden id='TrustMyNetwork' name=\"TrustMyNetwork\" value='{$TrustMyNetwork}'>" . Paragraphe_switch_disable('{TrustMyNetwork}', '{TrustMyNetwork_text}<hr><i style=color:#9E0000>{PostfixMultiCreateBubbleIsEnabled}</i>', '{TrustMyNetwork_text}', 300);
} else {
$TrustMyNetwork = Paragraphe_switch_img('{TrustMyNetwork}', '{TrustMyNetwork_text}', 'TrustMyNetwork', $TrustMyNetwork, '{enable_disable}', 300);
}
$PostfixEnableSubmission_field = Paragraphe_switch_img('{PostfixEnableSubmission}', '{PostfixEnableSubmission_text}', 'EnableSubmission', $EnableSubmission, '{enable_disable}', 300);
$old = "" . Paragraphe("64-settings-black.png", "{SASL_STATUS}", "{SASL_STATUS_TEXT}", "javascript:SaslStatus();") . "\n\t\t\t{$settings}\n\t\t\t{$smtpd_sasl_exceptions_networks}";
$html = "\n\t<div id='sasl-id'>\n\t<table style='width:99%' class=form>\n\t<tbody>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t{$sasl}\n\t\t\t<div style='text-align:right'><hr>" . button("{apply}", "postfix_multi_enable_auth()", 16) . "</div>\n\t\t</td>\n\t<td valign='top'>\n\t\t{$TrustMyNetwork}\n\t\t<div style='text-align:right'><hr>" . button("{apply}", "postfix_multi_enable_auth()", 16) . "</div>\n\t</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2>\n\t\t{$PostfixEnableSubmission_field}\n\t\t<div style='text-align:right'><hr>" . button("{apply}", "postfix_multi_enable_auth()", 16) . "</div>\n\t</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, 'postfix.sasl.php');
}
示例2: MAIN_STATUS_MIDDLE
function MAIN_STATUS_MIDDLE()
{
$tpl = new templates();
$page = CurrentPageName();
$sock = new sockets();
$t = time();
$EnableNginx = intval($sock->GET_INFO("EnableNginx"));
$EnableFreeWeb = intval($sock->GET_INFO("EnableFreeWeb"));
$EnableNginxMail = intval($sock->GET_INFO("EnableNginxMail"));
$SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
$users = new usersMenus();
if (!is_numeric($SQUIDEnable)) {
$SQUIDEnable = 1;
}
$p1 = Paragraphe_switch_img("{enable_reverse_proxy_service}", "{enable_reverse_proxy_service_explain}", "EnableNginx-{$t}", $EnableNginx, null, 1072);
$p2 = Paragraphe_switch_disable("{enable_reverse_imap_proxy_service}", "{enable_reverse_imap_proxy_service_explain}", "EnableNginxMail-{$t}", $EnableNginxMail, null, 1072);
$p3 = Paragraphe_switch_img("{enable_freeweb}", "{enable_freeweb_text}", "EnableFreeWeb-{$t}", $EnableFreeWeb, null, 1072);
if ($users->SQUID_INSTALLED) {
$p4 = Paragraphe_switch_img("{enable_squid_service}", "{enable_squid_service_explain}<br>{enable_squid_service_text}", "SQUIDEnable-{$t}", $SQUIDEnable, null, 1072);
}
$p2 = "<br>{$p2}";
$p2 = null;
$html = "{$p1}<br>{$p3}<br>{$p4}{$p2}<hr>\n\t<div style='text-align:right;width:98%'>" . button("{apply}", "Save{$t}()", 40) . "</div>\n\t<script>\n\t\t\t\n\tvar xSave{$t}=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tLoadjs('nginx.verif.progress.php');\n\t\t}\t\n\t\t\n\t\tfunction Save{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n \t\tXHR.appendData('EnableFreeWeb',document.getElementById('EnableFreeWeb-{$t}').value);\n \t\tXHR.appendData('EnableNginx',document.getElementById('EnableNginx-{$t}').value);\n \t\tif(document.getElementById('EnableNginxMail-{$t}')){\n \t\t\tXHR.appendData('EnableNginxMail',document.getElementById('EnableNginxMail-{$t}').value);\n \t\t}\n \t\tif(document.getElementById('SQUIDEnable-{$t}')){\n \t\t\tXHR.appendData('SQUIDEnable',document.getElementById('SQUIDEnable-{$t}').value);\n \t\t}\n \t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\t\n\t\t}\n\t</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例3: popup
function popup()
{
$sock = new sockets();
$EnableKav4Samba = $sock->GET_INFO('EnableKav4Samba');
$EnableScannedOnly = $sock->GET_INFO('EnableScannedOnly');
$EnableSambaXapian = $sock->GET_INFO('EnableSambaXapian');
if ($EnableKav4Samba == null) {
$EnableKav4Samba = 1;
}
if ($EnableScannedOnly == null) {
$EnableScannedOnly = 1;
}
if ($EnableSambaXapian == null) {
$EnableSambaXapian = 1;
}
$users = new usersMenus();
if ($users->KAV4SAMBA_INSTALLED) {
$kav = Paragraphe_switch_img('{enable_kaspersky_samba}', '{enable_kaspersky_samba_text}', 'EnableKav4Samba', $EnableKav4Samba, '{enable_disable}', 290);
} else {
$kav = Paragraphe_switch_disable('{enable_kaspersky_samba}', '{feature_not_installed}', '{feature_not_installed}', 290);
}
if ($users->SCANNED_ONLY_INSTALLED) {
$SCANNED_ONLY_INSTALLED = Paragraphe_switch_img('{enable_scanned_only}', '{enable_scanned_only_text}', 'EnableScannedOnly', $EnableScannedOnly, '{enable_disable}', 290);
} else {
$SCANNED_ONLY_INSTALLED = Paragraphe_switch_disable('{enable_scanned_only}', '{feature_not_installed}', '{feature_not_installed}', 290);
}
if ($users->XAPIAN_PHP_INSTALLED) {
$XAPIAN_INSTALLED = Paragraphe_switch_img('{enable_xapian_indexing}', '{enable_xapian_indexing_text}', 'EnableSambaXapian', $EnableSambaXapian, '{enable_disable}', 290);
}
$html = "<H1>{APP_SAMBA} {plugins}</H1>\n\t<p class=caption style='font-size:13px'>{vfs_modules_disabled_text}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$kav}</TD>\n\t\t<td valign='top'>{$SCANNED_ONLY_INSTALLED}</TD>\n\t</TR>\n\t<tr>\n\t\t<td valign='top'>{$XAPIAN_INSTALLED}</TD>\n\t\t<td valign='top'> </TD>\n\t</TR>\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t" . button("{edit}", "SaveSambaPlugins()") . "\n\t\t\n\t</tr>\n\t</TABLE>\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例4: popup
function popup()
{
$sock = new sockets();
$EnableKav4Samba = $sock->GET_INFO('EnableKav4Samba');
$EnableScannedOnly = $sock->GET_INFO('EnableScannedOnly');
$EnableSambaXapian = $sock->GET_INFO('EnableSambaXapian');
if ($EnableKav4Samba == null) {
$EnableKav4Samba = 1;
}
if ($EnableScannedOnly == null) {
$EnableScannedOnly = 1;
}
if ($EnableSambaXapian == null) {
$EnableSambaXapian = 1;
}
$EnableGreyhole = $sock->GET_INFO('EnableGreyhole');
if (!is_numeric($EnableGreyhole)) {
$EnableGreyhole = 1;
}
$users = new usersMenus();
if ($users->KAV4SAMBA_INSTALLED) {
$kav = Paragraphe_switch_img('{enable_kaspersky_samba}', '{enable_kaspersky_samba_text}', 'EnableKav4Samba', $EnableKav4Samba, '{enable_disable}', 290);
} else {
$kav = Paragraphe_switch_disable('{enable_kaspersky_samba}', '{feature_not_installed}', '{feature_not_installed}', 290);
}
if ($users->SCANNED_ONLY_INSTALLED) {
$SCANNED_ONLY_INSTALLED = Paragraphe_switch_img('{enable_scanned_only}', '{enable_scanned_only_text}', 'EnableScannedOnly', $EnableScannedOnly, '{enable_disable}', 290);
} else {
$SCANNED_ONLY_INSTALLED = Paragraphe_switch_disable('{enable_scanned_only}', '{feature_not_installed}', '{feature_not_installed}', 290);
}
if ($users->GREYHOLE_INSTALLED) {
$GREYHOLE = Paragraphe_switch_img('{enable_grehole}', '{enable_grehole_text}', 'EnableGreyhole', $EnableGreyhole, '{enable_disable}', 290);
} else {
$GREYHOLE = Paragraphe_switch_disable('{enable_grehole}', '{feature_not_installed}', '{feature_not_installed}', 290);
}
$html = "\n\t<div class=explain>{vfs_modules_disabled_text}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$kav}</TD>\n\t\t<td valign='top'>{$SCANNED_ONLY_INSTALLED}</TD>\n\t</TR>\n\t<tr>\n\t\t<td valign='top'>{$GREYHOLE}</TD>\n\t\t<td valign='top'>{$XAPIAN_INSTALLED}</TD>\n\t\t\n\t</TR>\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t" . button("{apply}", "SaveSambaPlugins()", 16) . "\n\t\t\n\t</tr>\n\t</TABLE>\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例5: popup
function popup()
{
$infos = infos();
$sock = new sockets();
$page = CurrentPageName();
$alx = $sock->getFrameWork("system.php?modinfo=alx");
$ModeProbeAlx = intval($sock->GET_INFO("ModeProbeAlx"));
$q = new mysql();
$DIVS = array();
$js = array();
if ($q->TABLE_EXISTS("RXTX_HOUR", "artica_events")) {
$results = $q->QUERY_SQL("SELECT ETH FROM RXTX_HOUR GROUP BY ETH", "artica_events");
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$ETH = $ligne["ETH"];
$nic = new system_nic($ETH);
$DIVS[] = "<hr><div style='font-size:30px;margin-top:20px'>{$ETH} [{$nic->IPADDR}] - {$nic->NICNAME} - {$nic->netzone}</div>";
$DIVS[] = "<div style='width:1460px;height:350px' id='{$ETH}-RX-hour' class=form></div>";
$DIVS[] = "<div style='width:1460px;height:350px' id='{$ETH}-TX-hour' class=form></div>";
$DIVS[] = "<div style='width:1460px;height:350px' id='{$ETH}-RX-week' class=form></div>";
$DIVS[] = "<div style='width:1460px;height:350px' id='{$ETH}-TX-week' class=form></div>";
$js[] = "Loadjs('{$page}?eth-hour=yes&type=RXÐ={$ETH}')";
$js[] = "Loadjs('{$page}?eth-hour=yes&type=TXÐ={$ETH}')";
$js[] = "Loadjs('{$page}?eth-week=yes&type=RXÐ={$ETH}')";
$js[] = "Loadjs('{$page}?eth-week=yes&type=TXÐ={$ETH}')";
}
}
$t = time();
if ($alx == "TRUE") {
$alxform = Paragraphe_switch_img("{qualcomm_atheros}", "{qualcomm_atheros_explain}", "ModeProbeAlx", $ModeProbeAlx, null, 1450);
} else {
$alxform = Paragraphe_switch_disable("{qualcomm_atheros}", "{qualcomm_atheros_explain}", "ModeProbeAlx", 0, null, 1450);
}
//$gateway=Paragraphe('relayhost.png','{APP_ARTICA_GAYTEWAY}','{APP_ARTICA_GAYTEWAY_TEXT}',"javascript:Loadjs('index.gateway.php?script=yes')");
$html = "\n\t<div style='width:98%' class=form>\n\t{$alxform}\t\t\n\t{$gateway}\n\t<div style='margin-top:20px;text-align:right'><hr>" . button("{apply}", "Save{$t}()", 32) . "</div>\n\t</div>\n\t\n\t<div style='width:98%' class=form>\n\t<div style='font-size:26px;font-weight:bold'>{network_hardware_infos_text}</div>\n\t<br>\n\t<div style='width:98%;height:300px;overflow:auto;'>{$infos}</div>\n\t</div>\n\t" . @implode("\n", $DIVS) . "\n<script>\nvar xSave{$t}=function (obj) {\n\tLoadjs('network.restart.php');\n}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ModeProbeAlx',document.getElementById('ModeProbeAlx').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n" . @implode("\n", $js) . "\n</script>\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例6: popup
function popup()
{
$tpl = new templates();
$t = time();
$page = CurrentPageName();
$sock = new sockets();
$AsSquidLoadBalancer = $sock->GET_INFO("AsSquidLoadBalancer");
if (!is_numeric($AsSquidLoadBalancer)) {
$AsSquidLoadBalancer = 0;
}
$EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance");
if (!is_numeric($EnableWebProxyStatsAppliance)) {
$EnableWebProxyStatsAppliance = 0;
}
if ($users->WEBSTATS_APPLIANCE) {
$EnableWebProxyStatsAppliance = 1;
}
$switch = Paragraphe_switch_img("{activate_loadbalancing}", "{activate_loadbalancing_text}", "AsSquidLoadBalancer", $AsSquidLoadBalancer, null, 400);
if ($EnableWebProxyStatsAppliance == 1) {
$switch = Paragraphe_switch_disable("{activate_loadbalancing}", "{activate_loadbalancing_text}", "", 400);
}
$html = "\n\t<div id='{$t}-div'></div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td>{$switch}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right'><hr>" . button("{apply}", "SaveLoadBalance{$t}()", 18) . "</td>\n\t</tr>\n\t</table>\n\t\n\t\n\t\n\t\n\t<script>\n\tvar x_SaveLoadBalance{$t}=function(obj){\n \tvar tempvalue=obj.responseText;\n \tif(tempvalue.length>5){alert(tempvalue);}\n \tCacheOff();\n \tQuickLinkSystems('section_architecture');\n \tYahooWin3Hide();\n \t}\t\n\n\tfunction SaveLoadBalance{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AsSquidLoadBalancer',document.getElementById('AsSquidLoadBalancer').value);\n\t\t\tAnimateDiv('{$t}-div');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveLoadBalance{$t});\t\t\n\t}\t\t\n\t\t\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例7: altermime_articafilter_failed
function altermime_articafilter_failed()
{
$level = Paragraphe_switch_disable('{APP_ALTERMIME}', "{APP_ARTICA_FILTER_NOT_ENABLED}", "{APP_ARTICA_FILTER_NOT_ENABLED}");
$activate = Paragraphe('64-folder-install.png', '{AS_ACTIVATE}', '{AS_ACTIVATE_TEXT}', "javascript:Loadjs('postfix.index.php?script=antispam')", null, 210, null, 0, true);
$tpl = new templates();
$html = "<H1>{disclaimer}</H1>\n\t<p class=caption>{disclaimer_text}</p>\n\t<table style='widht:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<div id='sanesecuid'>\n\t\t\t{$level}\n\t\t\t</div>\n\t\t</td>\n\t\t<td valign='top'>{$activate}</td>\n\t</tr>";
echo $tpl->_ENGINE_parse_body($html);
}
示例8: antispam_popup
function antispam_popup()
{
$users = new usersMenus();
$users->LoadModulesEnabled();
$sock = new sockets();
$EnableArticaSMTPFilter = $sock->GET_INFO("EnableArticaSMTPFilter");
$EnableArticaSMTPFilter = 0;
$EnableArticaPolicyFilter = $sock->GET_INFO("EnableArticaPolicyFilter");
$EnableArticaPolicyFilter = 0;
$EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
$amavis = Paragraphe_switch_disable('{enable_amavis}', '{feature_not_installed}', '{feature_not_installed}');
$amavis_disabled = Paragraphe_switch_disable('{enable_amavis}', '{feature_not_installed}', '{feature_not_installed}');
$assp = Paragraphe_switch_disable('{enable_assp}', '{feature_not_installed}', '{feature_not_installed}');
if ($users->SPAMASS_MILTER_INSTALLED) {
$spamassin = Paragraphe_switch_img('{enable_spamasssin}', '{enable_spamasssin_text}', 'enable_spamassassin', $users->SpamAssMilterEnabled, '{enable_disable}', 290);
} else {
$spamassin = Paragraphe_switch_disable('{enable_spamasssin}', '{feature_not_installed}', '{feature_not_installed}');
}
if ($users->AMAVIS_INSTALLED) {
$amavis = Paragraphe_switch_img('{enable_amavis}', '{enable_amavis_text}', 'enable_amavis', $users->EnableAmavisDaemon, '{enable_disable}', 290);
if ($users->EnableAmavisDaemon == 1) {
$spamassin = Paragraphe_switch_disable('{spamassassin_in_amavis}', '{spamassassin_in_amavis_text}', '{spamassassin_in_amavis_text}');
}
}
//$artica=Paragraphe_switch_img('{enable_artica_filter}','{enable_artica_filter_text}','EnableArticaSMTPFilter',$EnableArticaSMTPFilter,'{enable_disable}',290);
//$artica_policy=Paragraphe_switch_img('{enable_artica_policy}','{enable_artica_policy_text}','EnableArticaPolicyFilter',$EnableArticaPolicyFilter,'{enable_disable}',290);
if ($users->ASSP_INSTALLED) {
$sock = new sockets();
$EnableASSP = $sock->GET_INFO('EnableASSP');
$assp = Paragraphe_switch_img('{enable_assp}', '{enable_assp_text}', 'EnableASSP', $EnableASSP, '{enable_disable}', 290);
}
if ($users->MILTERGREYLIST_INSTALLED) {
$miltergreylist = Paragraphe_switch_img('{APP_MILTERGREYLIST}', '{enable_miltergreylist_text}', 'MilterGreyListEnabled', $users->MilterGreyListEnabled, '{enable_disable}', 290);
} else {
$miltergreylist = Paragraphe_switch_disable('{APP_MILTERGREYLIST}', '{feature_not_installed}', '{feature_not_installed}');
}
if ($users->KAV_MILTER_INSTALLED) {
$kavmilter = Paragraphe_switch_img('{APP_KAVMILTER}', '{enable_kavmilter_text}', 'kavmilterEnable', $users->KAVMILTER_ENABLED, '{enable_disable}', 290);
} else {
$kavmilter = Paragraphe_switch_disable('{APP_KAVMILTER}', '{feature_not_installed}', '{feature_not_installed}');
}
if ($users->kas_installed) {
$kaspersky = Paragraphe_switch_img('{enable_kaspersky_as}', '{enable_kaspersky_as_text}', 'enable_kaspersky_as', $users->KasxFilterEnabled, '{enable_disable}', 290);
} else {
$kaspersky = Paragraphe_switch_disable('{enable_kaspersky_as}', '{feature_not_installed}', '{feature_not_installed}');
}
if (!$users->MEM_HIGER_1G) {
$amavis = Paragraphe_switch_disable('{enable_amavis}', '{ressources_insuffisantes}', '{ressources_insuffisantes}');
$spamassin = Paragraphe_switch_disable('{enable_spamasssin}', '{ressources_insuffisantes}', '{ressources_insuffisantes}');
}
if ($EnablePostfixMultiInstance == 1) {
$spamassin = Paragraphe_switch_disable('{enable_spamasssin}', '{feature_disabled_multiple_postfix_instances_enabled}', '{feature_disabled_multiple_postfix_instances_enabled}');
$miltergreylist = Paragraphe_switch_disable('{APP_MILTERGREYLIST}', '{feature_disabled_multiple_postfix_instances_enabled}', '{feature_disabled_multiple_postfix_instances_enabled}');
$assp = Paragraphe_switch_disable('{enable_assp}', '{feature_disabled_multiple_postfix_instances_enabled}', '{feature_disabled_multiple_postfix_instances_enabled}');
$spamassin = null;
$miltergreylist = null;
$assp = null;
}
if ($users->KASPERSKY_SMTP_APPLIANCE) {
$amavis = $amavis_disabled;
$spamassin = null;
$assp = null;
}
if ($users->CLUEBRINGER_INSTALLED) {
$EnableCluebringer = $sock->GET_INFO("EnableCluebringer");
$Cluebringer = Paragraphe_switch_img('{APP_CLUEBRINGER}', '{enable_cluebringer_text}', 'EnableCluebringer', $EnableCluebringer, '{enable_disable}', 290);
}
$html = "\n\t\n\t<div style='width:100%;height:400px;overflow:auto'>\n\t<table style='width:99%' class=form>\n\t<td valign='top' width=50%>\n\t\t{$kaspersky}<br>{$kavmilter}<br>{$amavis}<br>{$spamassin}\n\t</td>\n\t<td valign='top' width=50%>\n \t\t{$miltergreylist}<br>{$assp}<br>{$Cluebringer}<br>{$artica}<br>{$artica_policy}\n\t</td>\n\t</tr>\n\t<tr>\n\t</table>\n\t</div>\n\t<div style='width:100%;text-align:right'><hr>" . button("{apply}", "ApplyKasSpamas()", 18) . "</div>\n\t";
$tpl = new templates();
$html = $tpl->_ENGINE_parse_body($html, 'postfix.plugins.php');
echo $html;
}
示例9: logfile_daemon_popup
function logfile_daemon_popup(){
$page=CurrentPageName();
$tpl=new templates();
$sock=new sockets();
$SquidPerformance=intval($sock->GET_INFO("SquidPerformance"));
if($SquidPerformance>1){
echo $tpl->_ENGINE_parse_body(FATAL_WARNING_SHOW_128("{artica_statistics_disabled_see_performance}"));
return;
}
$RemoteUfdbCat=intval($sock->GET_INFO("RemoteUfdbCat"));
$t=time();
$DisableLogFileDaemonMySQL=intval($sock->GET_INFO("DisableLogFileDaemonMySQL"));
$DisableLogFileDaemonCategories=intval($sock->GET_INFO("DisableLogFileDaemonCategories"));
$DisableLogFileDaemonCategories_INV=1;
$DisableLogFileDaemonMySQL_INV=1;
if($DisableLogFileDaemonCategories==1){
$DisableLogFileDaemonCategories_INV=0;
}
if($DisableLogFileDaemonMySQL==1){
$DisableLogFileDaemonMySQL_INV=0;
}
$detect_categories=Paragraphe_switch_img("{detect_categories}", "{logfile_detect_categories}","DisableLogFileDaemonCategories",$DisableLogFileDaemonCategories_INV,null,750);
if($SquidPerformance>0){
$detect_categories=Paragraphe_switch_disable("{detect_categories}", "{logfile_detect_categories}","DisableLogFileDaemonCategories",$DisableLogFileDaemonCategories_INV,null,750);
$explain_RemoteUfdbCat="<div style='font-size:18px' class=text-info>{explain_SquidPerformance_nocat}</div>";
}
if($RemoteUfdbCat==1){
$detect_categories=Paragraphe_switch_disable("{detect_categories}", "{logfile_detect_categories}","DisableLogFileDaemonCategories",$DisableLogFileDaemonCategories_INV,null,750);
$explain_RemoteUfdbCat="<div style='font-size:18px' class=text-info>{explain_RemoteUfdbCat}</div>";
}
$html="<div style='width:98%' class=form>$explain_RemoteUfdbCat
".Paragraphe_switch_img("{direct_to_mysql}", "{logfile_direct_to_mysql_explain}","DisableLogFileDaemonMySQL",$DisableLogFileDaemonMySQL_INV,null,750)
."$detect_categories
<div style='width:100%;text-align:right;margin-top:20px'><hr>".button("{apply}","Save$t()",26)."</div>
<script>
var xSave$t= function (obj) {
var res=obj.responseText;
if (res.length>3){alert(res);return;}
YahooWin2Hide();
Loadjs('squid.reconfigure.simple.php');
}
function SaveCK$t(e){
if(!checkEnter(e)){return;}
Save$t();
}
function Save$t(){
var XHR = new XHRConnection();
XHR.appendData('DisableLogFileDaemonMySQL',document.getElementById('DisableLogFileDaemonMySQL').value);
XHR.appendData('DisableLogFileDaemonCategories',document.getElementById('DisableLogFileDaemonCategories').value);
XHR.sendAndLoad('$page', 'POST',xSave$t);
}
</script>
";
echo $tpl->_ENGINE_parse_body($html);
}
示例10: global_parameters
function global_parameters()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$users = new usersMenus();
$DisableAnyCache = $sock->GET_INFO("DisableAnyCache");
if (!is_numeric($DisableAnyCache)) {
$DisableAnyCache = 0;
}
$CacheReplacementPolicy = $sock->GET_INFO("CacheReplacementPolicy");
$DisableAnyCache = $sock->GET_INFO("DisableAnyCache");
if ($CacheReplacementPolicy == null) {
$CacheReplacementPolicy = "heap_LFUDA";
}
$SquidDebugCacheProc = $sock->GET_INFO("SquidDebugCacheProc");
$ForceWindowsUpdateCaching = $sock->GET_INFO("ForceWindowsUpdateCaching");
$ProxyDedicateMicrosoftRules = $sock->GET_INFO("ProxyDedicateMicrosoftRules");
$DisableSquidSMP = intval($sock->GET_INFO("DisableSquidSMP"));
if ($DisableSquidSMP == 0) {
$EnableSQUIDSMP = 1;
} else {
$EnableSQUIDSMP = 0;
}
$SquidSimpleConfig = $sock->GET_INFO("SquidSimpleConfig");
if (!is_numeric($SquidSimpleConfig)) {
$SquidSimpleConfig = 1;
}
$SquidCacheLevel = $sock->GET_INFO("SquidCacheLevel");
if (!is_numeric($SquidCacheLevel)) {
$SquidCacheLevel = 4;
}
$compilefile = "ressources/logs/squid.compilation.params";
if (!is_file($compilefile)) {
$sock->getFrameWork("squid.php?compil-params=yes");
}
$COMPILATION_PARAMS = unserialize(base64_decode(@file_get_contents($compilefile)));
$SquidReloadIntoIMS = $sock->GET_INFO("SquidReloadIntoIMS");
$license_error = null;
$refresh_pattern_def_min = $sock->GET_INFO("refresh_pattern_def_min");
$refresh_pattern_def_max = $sock->GET_INFO("refresh_pattern_def_max");
$refresh_pattern_def_perc = $sock->GET_INFO("refresh_pattern_def_perc");
if (!is_numeric($refresh_pattern_def_min)) {
$refresh_pattern_def_min = 4320;
}
if (!is_numeric($refresh_pattern_def_max)) {
$refresh_pattern_def_min = 43200;
}
if (!is_numeric($refresh_pattern_def_perc)) {
$refresh_pattern_def_perc = 40;
}
if (!is_numeric($SquidDebugCacheProc)) {
$SquidDebugCacheProc = 0;
}
if (!is_numeric($DisableAnyCache)) {
$DisableAnyCache = 0;
}
if (!is_numeric($ForceWindowsUpdateCaching)) {
$ForceWindowsUpdateCaching = 0;
}
if (!is_numeric($ProxyDedicateMicrosoftRules)) {
$ProxyDedicateMicrosoftRules = 0;
}
if (!is_numeric($SquidReloadIntoIMS)) {
$SquidReloadIntoIMS = 1;
}
$squid = new squidbee();
$t = time();
$array["lru"] = "{cache_lru}";
$array["heap_GDSF"] = "{heap_GDSF}";
$array["heap_LFUDA"] = "{heap_LFUDA}";
$array["heap_LRU"] = "{heap_LRU}";
$read_ahead_gap = $squid->global_conf_array["read_ahead_gap"];
$cache_mem = $squid->global_conf_array["cache_mem"];
if (preg_match("#([0-9]+)\\s+#", $cache_mem, $re)) {
$cache_mem = $re[1];
}
$minimum_object_size = $squid->global_conf_array["minimum_object_size"];
if (preg_match("#([0-9]+)\\s+#", $read_ahead_gap, $re)) {
$read_ahead_gap = $re[1];
}
if (preg_match("#([0-9]+)\\s+#", $minimum_object_size, $re)) {
$minimum_object_size = $re[1];
}
if (preg_match("#([0-9]+)#", $squid->global_conf_array["maximum_object_size"], $re)) {
$maximum_object_size = $re[1];
if (preg_match("#([A-Z]+)#", $squid->global_conf_array["maximum_object_size"], $re)) {
$unit = $re[1];
}
if ($unit == "KB") {
$maximum_object_size_in_memory = round($maximum_object_size_in_memory / 1024);
}
}
$level = Paragraphe_switch_img('{DisableAnyCache} ({hard_drive})', "{DisableAnyCache_explain2}", "DisableAnyCache-{$t}", $DisableAnyCache, null, 850);
if ($SquidCacheLevel == 0) {
$level = Paragraphe_switch_disable('{DisableAnyCache}', "{DisableAnyCache_explain2}", "DisableAnyCache-{$t}", $DisableAnyCache, null, 850);
}
$DisableSquidSMPF = Paragraphe_switch_img("{EnableSQUIDSMP}", "{EnableSQUIDSMP_explain}", "EnableSQUIDSMP-{$t}", $EnableSQUIDSMP, null, 850);
$CORP_LICENSE = 1;
//.........这里部分代码省略.........
示例11: plugins_popup
function plugins_popup()
{
$squid = new squidbee();
$users = new usersMenus();
if ($users->KAV4PROXY_INSTALLED) {
if ($squid->isicap()) {
$kav = Paragraphe_switch_img("{enable_kavproxy}", "{enable_kavproxy_text}", 'enable_kavproxy', $squid->enable_kavproxy, '{enable_disable}', 250);
} else {
$kav = Paragraphe_switch_disable('{enable_kavproxy}', "{feature_not_installed}<br><strong style='color:#d32d2d'>{$squid->kav_accept_why}</strong>", '{feature_not_installed}');
}
}
if ($users->C_ICAP_INSTALLED) {
if ($users->SQUID_ICAP_ENABLED) {
$cicap = Paragraphe_switch_img("{enable_c_icap}", "{enable_c_icap_text}", 'enable_c_icap', $squid->enable_cicap, '{enable_disable}', 250);
}
}
if ($users->DANSGUARDIAN_INSTALLED) {
$dans = Paragraphe_switch_img("{enable_dansguardian}", "{enable_dansguardian_text}", 'enable_dansguardian', $squid->enable_dansguardian, '{enable_disable}', 250);
}
if ($users->SQUIDGUARD_INSTALLED) {
$squidguard = Paragraphe_switch_img("{enable_squidguard}", "{enable_squidguard_text}", 'enable_squidguard', $squid->enable_squidguard, '{enable_disable}', 250);
}
if ($users->APP_UFDBGUARD_INSTALLED) {
$ufdbguardd = Paragraphe_switch_img("{enable_ufdbguardd}", "{enable_ufdbguardd_text}", 'enable_ufdbguardd', $squid->enable_UfdbGuard, '{enable_disable}', 250);
}
if ($users->ADZAPPER_INSTALLED) {
//$adzapper=Paragraphe_switch_img('{enable_adzapper}','{enable_adzapper_text}','enable_adzapper',$squid->enable_adzapper,'{enable_disable}',250);
}
if ($users->APP_SQUIDCLAMAV_INSTALLED) {
$squidclamav = Paragraphe_switch_img('{enable_squidclamav}', '{enable_squidclamav_text}', 'enable_squidclamav', $squid->enable_squidclamav, '{enable_disable}', 250);
}
if ($users->C_ICAP_INSTALLED) {
if ($users->SQUID_ICAP_ENABLED) {
if ($users->APP_KHSE_INSTALLED) {
$metascanner = Paragraphe_switch_img('{enable_metascanner}', '{enable_metascanner_text}', 'enable_metascanner', $squid->enable_metascanner, '{enable_disable}', 250);
}
}
}
if ($users->KASPERSKY_WEB_APPLIANCE) {
$cicap = null;
$squidclamav = null;
$squidguard = null;
$adzapper = null;
}
$tr[] = $squidclamav;
$tr[] = $metascanner;
$tr[] = $cicap;
$tr[] = $kav;
$tr[] = $adzapper;
$tr[] = $squidguard;
$tr[] = $ufdbguardd;
$tr[] = $dans;
$tables[] = "<table style='width:100%'><tr>";
$t = 0;
while (list($key, $line) = each($tr)) {
$line = trim($line);
if ($line == null) {
continue;
}
$t = $t + 1;
$tables[] = "<td >{$line}</td>";
if ($t == 2) {
$t = 0;
$tables[] = "</tr><tr>";
}
}
if ($t < 2) {
for ($i = 0; $i <= $t; $i++) {
$tables[] = "<td > </td>";
}
}
$form = "<div id='div-poubelle'></div>\n\t\t " . implode("\n", $tables) . "\n\t\t</table> \t\n\t\t\t<div style='text-align:right'><hr>" . button("{apply}", "save_plugins()") . "</div>\n\t\t\t\t\t\n\t\t";
$html = "{$form}";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, 'squid.index.php');
}
示例12: status_list
function status_list()
{
$users = new usersMenus();
$users->LoadModulesEnabled();
$sock = new sockets();
$tpl = new templates();
$users = new usersMenus();
$users->LoadModulesEnabled();
$sock = new sockets();
$EnableArticaSMTPFilter = $sock->GET_INFO("EnableArticaSMTPFilter");
$EnableArticaSMTPFilter = 0;
$EnableArticaPolicyFilter = $sock->GET_INFO("EnableArticaPolicyFilter");
$EnableArticaPolicyFilter = 0;
$EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
$amavis = Paragraphe_switch_disable('{enable_amavis}', '{feature_not_installed}', '{feature_not_installed}');
$assp = Paragraphe_switch_disable('{enable_assp}', '{feature_not_installed}', '{feature_not_installed}');
$main = new maincf_multi("master");
$array_filters = unserialize(base64_decode($main->GET_BIGDATA("PluginsEnabled")));
$array["APP_POSTFWD2"]["INSTALLED"] = True;
$array["APP_POSTFWD2"]["NAME"] = "APP_POSTFWD2";
$array["APP_POSTFWD2"]["ENABLED"] = $array_filters["APP_POSTFWD2"];
$array["APP_POSTFWD2"]["TEXT"] = "POSTFWD2_ABOUT";
$array["APP_POSTFWD2"]["JS"] = "Loadjs('postfwd2.php?instance=master&with-popup=yes')";
$array["MILTER_GREYLIST"]["INSTALLED"] = False;
$array["MILTER_GREYLIST"]["NAME"] = "APP_MILTERGREYLIST";
$array["AMAVISD"]["INSTALLED"] = False;
$array["AMAVISD_MILTER"]["INSTALLED"] = False;
$array["AMAVISD"]["NAME"] = "APP_AMAVISD_NEW";
$array["SPAMASSASSIN"]["INSTALLED"] = False;
$array["SPAMASS_MILTER"]["INSTALLED"] = False;
$array["CLAMAV"]["INSTALLED"] = False;
$array["APP_MILTER_DKIM"]["INSTALLED"] = False;
$array["APP_MILTER_DKIM"]["NAME"] = "APP_MILTER_DKIM";
$array["APP_MILTER_DKIM"]["TEXT"] = "dkim_about";
$array["FRESHCLAM"]["INSTALLED"] = False;
$array["FRESHCLAM"]["NAME"] = "APP_FRESHCLAM";
$array["APP_CLUEBRINGER"]["INSTALLED"] = False;
$array["DKIM_FILTER"]["INSTALLED"] = False;
$array["DKIM_FILTER"]["NAME"] = "APP_DKIM_FILTER";
$array["SPFMILTER"]["INSTALLED"] = False;
$array["SPFMILTER"]["NAME"] = "APP_SPFMILTER";
$array["APP_CLUEBRINGER"]["NAME"] = "APP_CLUEBRINGER";
$array["MAILSPY"]["INSTALLED"] = False;
$array["MAILSPY"]["NAME"] = "APP_MAILSPY";
$array["KAVMILTER"]["INSTALLED"] = False;
$array["KAS_MILTER"]["INSTALLED"] = False;
$array["KAS3"]["INSTALLED"] = False;
$array["BOGOM"]["INSTALLED"] = False;
$array["BOGOM"]["NAME"] = "APP_BOGOM";
$array["POLICYD_WEIGHT"]["INSTALLED"] = False;
//$array["APP_ARTICA_POLICY"]["INSTALLED"]=False;
$array["AMAVISD_MILTER"]["NAME"] = "APP_AMAVISD_MILTER";
$array["KAS3"]["NAME"] = "APP_KAS3_MILTER";
$array["SPAMASS_MILTER"]["NAME"] = "APP_SPAMASS_MILTER";
$array["SPAMASSASSIN"]["NAME"] = "APP_SPAMASSASSIN";
$array["KAVMILTER"]["NAME"] = "APP_KAVMILTER";
$array["KAS_MILTER"]["NAME"] = "APP_KAS3_MILTER";
$array["ASSP"]["INSTALLED"] = False;
$array["ASSP"]["NAME"] = "APP_ASSP";
if ($users->SPAMASS_MILTER_INSTALLED) {
$array["SPAMASS_MILTER"]["INSTALLED"] = true;
$array["SPAMASS_MILTER"]["TEXT"] = "feature_not_installed";
$array["SPAMASS_MILTER"]["ENABLED"] = $users->SpamAssMilterEnabled;
$array["SPAMASS_MILTER"]["TOKEN"] = "enable_spamassassin";
$array["SPAMASS_MILTER"]["JS"] = "Loadjs('postfix.index.php?script=antispam')";
}
if ($users->DKIMFILTER_INSTALLED) {
$array["DKIM_FILTER"]["INSTALLED"] = true;
}
if ($users->spamassassin_installed) {
$APP_SPAMASSASSIN_TEXT = $tpl->_ENGINE_parse_body("{APP_SPAMASSASSIN_TEXT}");
$spamassassin_in_amavis_text = $tpl->_ENGINE_parse_body("{spamassassin_in_amavis_text}");
$array["SPAMASSASSIN"]["INSTALLED"] = True;
$array["SPAMASSASSIN"]["TEXT"] = "{$APP_SPAMASSASSIN_TEXT}<br>{$spamassassin_in_amavis_text}";
$array["SPAMASSASSIN"]["ENABLED"] = $users->EnableAmavisDaemon;
$array["SPAMASSASSIN"]["LOCK"] = true;
$array["SPAMASSASSIN"]["JS"] = "Loadjs('postfix.index.php?script=antispam')";
} else {
$array["SPAMASSASSIN"]["JS-INSTALL"] = "Loadjs('spamassassin.install.php');";
//APP_SPAMASSASSIN
}
if ($users->AMAVIS_INSTALLED) {
$array["AMAVISD"]["INSTALLED"] = true;
$array["AMAVISD"]["TEXT"] = "enable_amavis_text";
$array["AMAVISD"]["ENABLED"] = $users->EnableAmavisDaemon;
$array["AMAVISD"]["TOKEN"] = "enable_amavis";
$array["AMAVISD"]["JS"] = "Loadjs('amavis.index.php?ajax=yes')";
//
if ($users->EnableAmavisDaemon == 1) {
$array["SPAMASS_MILTER"]["INSTALLED"] = true;
$array["SPAMASS_MILTER"]["TEXT"] = "spamassassin_in_amavis_text";
$array["SPAMASS_MILTER"]["ENABLED"] = 0;
$array["SPAMASS_MILTER"]["LOCK"] = true;
}
} else {
$array["AMAVISD"]["JS-INSTALL"] = "Loadjs('amavisd.install.php');";
}
if ($users->CLAMD_INSTALLED) {
$EnableClamavDaemon = $sock->GET_INFO("EnableClamavDaemon");
if (!is_numeric($EnableClamavDaemon)) {
//.........这里部分代码省略.........
示例13: logfile_daemon_popup
function logfile_daemon_popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$SquidPerformance = intval($sock->GET_INFO("SquidPerformance"));
if ($SquidPerformance > 1) {
echo $tpl->_ENGINE_parse_body(FATAL_ERROR_SHOW_128("{artica_statistics_disabled_see_performance}"));
return;
}
$RemoteUfdbCat = intval($sock->GET_INFO("RemoteUfdbCat"));
$t = time();
$LogFileDaemonMaxEvents = intval($sock->GET_INFO("LogFileDaemonMaxEvents"));
if ($LogFileDaemonMaxEvents == 0) {
$LogFileDaemonMaxEvents = 500;
}
if ($RemoteUfdbCat == 1) {
$detect_categories = Paragraphe_switch_disable("{detect_categories}", "{logfile_detect_categories}", "DisableLogFileDaemonCategories", $DisableLogFileDaemonCategories_INV, null, 750);
$explain_RemoteUfdbCat = "<div style='font-size:18px' class=explain>{explain_RemoteUfdbCat}</div>";
}
$html = "<div style='width:98%' class=form>{$explain_RemoteUfdbCat}\r\n\t<div style='font-size:18px' class=explain>{LogFileDaemonMaxEvents_explain}</div>\r\n\t<table style='width:100%'>\r\n\t<tr>\r\n\t\t<td class=legend style='font-size:22px'>{max_events_in_memory}:</td>\r\n\t\t<td>" . Field_text("LogFileDaemonMaxEvents", $LogFileDaemonMaxEvents, "font-size:22px;width:110px") . "</td>\r\n\t</tr>\r\n\t</table>\r\n\t <div style='width:100%;text-align:right;margin-top:20px'><hr>" . button("{apply}", "Save{$t}()", 26) . "</div>\r\n<script>\r\nvar xSave{$t}= function (obj) {\r\n\tvar res=obj.responseText;\r\n\tif (res.length>3){alert(res);return;}\r\n\tYahooWin2Hide();\r\n\tLoadjs('squid.reload.php');\r\n}\r\nfunction SaveCK{$t}(e){\r\n\tif(!checkEnter(e)){return;}\r\n\tSave{$t}();\r\n}\r\n\r\nfunction Save{$t}(){\r\n\tvar XHR = new XHRConnection();\r\n\tXHR.appendData('LogFileDaemonMaxEvents',document.getElementById('LogFileDaemonMaxEvents').value);\r\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\r\n}\t\t\t\t\r\n</script>\r\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例14: popup
function popup(){
$page=CurrentPageName();
$sock=new sockets();
$users=new usersMenus();
$t=time();
$LICENSE=0;
if($users->CORP_LICENSE){$LICENSE=1;}
$EnableSquidGuardHTTPService=$sock->GET_INFO("EnableSquidGuardHTTPService");
if(strlen(trim($EnableSquidGuardHTTPService))==0){$EnableSquidGuardHTTPService=1;}
$SquidGuardApacheSSLPort=$sock->GET_INFO("SquidGuardApacheSSLPort");
$SquidGuardApachePort=intval($sock->GET_INFO("SquidGuardApachePort"));
$SquidGuardWebBlankReferer=intval($sock->GET_INFO("SquidGuardWebBlankReferer"));
$SquidGuardWebSSLCertificate=$sock->GET_INFO("SquidGuardWebSSLCertificate");
if(!is_numeric($SquidGuardApacheSSLPort)){$SquidGuardApacheSSLPort=9025;}
if($SquidGuardApachePort==0){$SquidGuardApachePort=9020;}
$SquidGuardIPWeb=$sock->GET_INFO("SquidGuardIPWeb");
$fulluri=$sock->GET_INFO("SquidGuardIPWeb");
$SquidGuardWebFollowExtensions=$sock->GET_INFO("SquidGuardWebFollowExtensions");
$SquidGuardWebUseExternalUri=intval($sock->GET_INFO("SquidGuardWebUseExternalUri"));
$SquidGuardServerName=$sock->GET_INFO("SquidGuardServerName");
if($SquidGuardIPWeb==null){
$SquidGuardIPWeb="http://".$_SERVER['SERVER_ADDR'].':'.$SquidGuardApachePort."/exec.squidguard.php";
$SquidGuardIPWebSSL="https://".$_SERVER['SERVER_ADDR'].':'.$SquidGuardApacheSSLPort."/exec.squidguard.php";
$fulluri="http://".$_SERVER['SERVER_ADDR'].':'.$SquidGuardApachePort."/exec.squidguard.php";
$fulluriSSL="https://".$_SERVER['SERVER_ADDR'].':'.$SquidGuardApacheSSLPort."/exec.squidguard.php";
}
$SquidGuardIPWeb=str_replace("http://",null,$SquidGuardIPWeb);
$SquidGuardIPWeb=str_replace("https://",null,$SquidGuardIPWeb);
$fulluriSSL=$SquidGuardIPWeb;
if(preg_match("#\/(.+?):([0-9]+)\/#",$SquidGuardIPWeb,$re)){$SquidGuardIPWeb="{$re[1]}:{$re[2]}";}
if(preg_match("#(.+?):([0-9]+)#",$SquidGuardIPWeb,$re)){
$SquidGuardServerName=$re[1];
$SquidGuardApachePort=$re[2];
}
if(!is_numeric($SquidGuardWebFollowExtensions)){$SquidGuardWebFollowExtensions=1;}
$fulluriSSL=str_replace($SquidGuardApachePort, $SquidGuardApacheSSLPort, $fulluriSSL);
$squid_reverse=new squid_reverse();
$sslcertificates=$squid_reverse->ssl_certificates_list();
$button= button("{apply}","SaveSquidGuardHTTPService$t()",32);
$p1=Paragraphe_switch_img("{enable_http_service}",
"{enable_http_service_squidguard}","EnableSquidGuardHTTPService",$EnableSquidGuardHTTPService,null,626,"EnableSquidGuardHTTPService()");
if($SquidGuardWebUseExternalUri==1){
$p1=Paragraphe_switch_disable("{enable_http_service}",
"{enable_http_service_squidguard}","EnableSquidGuardHTTPService",$EnableSquidGuardHTTPService,null,626,"EnableSquidGuardHTTPService()");
$button=null;
}
$html="
<div id='EnableSquidGuardHTTPServiceDiv'>
<div style='width:98%' class=form>
<table style='width:100%'>
<tr>
<td style='vertical-align:top'><div id='squid-guard-http-status' style='margin-right:10px'></div></td>
<td colspan=2>$p1".
Paragraphe_switch_img("{FollowExtensions}",
"{SquidGuardWebFollowExtensions_explain}","SquidGuardWebFollowExtensions",$SquidGuardWebFollowExtensions,null,626,"EnableSquidGuardHTTPService()").
Paragraphe_switch_img("{SquidGuardWebBlankReferer}",
"{SquidGuardWebBlankReferer_explain}","SquidGuardWebBlankReferer",$SquidGuardWebBlankReferer,null,626,"EnableSquidGuardHTTPService()").
"</td>
<tr>
<td class=legend style='font-size:22px'>{listen_port}:</td>
<td>". Field_text("listen_port_squidguard",$SquidGuardApachePort,"font-size:22px;padding:3px;width:110px",null,null,null,false,"")."</td>
<td> </td>
</tr>
<tr>
<td class=legend style='font-size:22px'>{listen_port} (SSL):</td>
<td>". Field_text("listen_port_squidguard_ssl",$SquidGuardApacheSSLPort,"font-size:22px;padding:3px;width:110px",null,null,null,false,"")."</td>
<td> </td>
</tr>
<tr>
<td class=legend style='font-size:22px'>{certificate}:</td>
<td>". Field_array_Hash($sslcertificates,"SquidGuardWebSSLCertificate",$SquidGuardWebSSLCertificate,
"style:font-size:22px;padding:3px;width:75%",null,null,null,false,"")."</td>
<td> </td>
</tr>
//.........这里部分代码省略.........
示例15: popup
function popup()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$MimeDefangVersion = $sock->GET_INFO("MimeDefangVersion");
$enable_amavisdeamon_ask = $tpl->javascript_parse_text("{enable_mimedefang_ask}");
$disable_amavisdeamon_ask = $tpl->javascript_parse_text("{disable_mimedefang_ask}");
$MimeDefangEnabled = trim($sock->GET_INFO("MimeDefangEnabled", true));
$MimeDefangArchiver = intval($sock->GET_INFO("MimeDefangArchiver", true));
$MimeDefangClamav = intval($sock->GET_INFO("MimeDefangClamav"));
$MimeDefangDisclaimer = intval($sock->GET_INFO("MimeDefangDisclaimer"));
$MimeDefangSpamAssassin = intval($sock->GET_INFO("MimeDefangSpamAssassin"));
$MimeDefangAutoWhiteList = intval($sock->GET_INFO("MimeDefangAutoWhiteList"));
$MimeDefangFilterExtensions = intval($sock->GET_INFO("MimeDefangFilterExtensions"));
$MimeDefangAutoCompress = intval($sock->GET_INFO("MimeDefangAutoCompress"));
if (!is_numeric($MimeDefangEnabled)) {
$MimeDefangEnabled = 0;
}
$EnableMimeDefang = Paragraphe_switch_img("{enable_disable_this_service}", "{MIMEDEFANG_DEF}<br>{APP_VALVUAD_TEXT}", "MimeDefangEnabled", $MimeDefangEnabled, null, 990);
$TOTAL_MEMORY_MB = $sock->getFrameWork("system.php?TOTAL_MEMORY_MB=yes");
if ($TOTAL_MEMORY_MB < 1500) {
$p = FATAL_ERROR_SHOW_128("{NO_ENOUGH_MEMORY_FOR_THIS_SECTION}<br><strong style='font-size:18px'>{require}:1500MB</strong>", false, true);
$MimeDefangEnabled = 0;
$EnableDaemonP = null;
$EnableMimeDefang = Paragraphe_switch_disable("{enable_disable_this_service}", "{MIMEDEFANG_DEF}", "MimeDefangEnabled", $MimeDefangEnabled, null, 990);
}
if ($MimeDefangEnabled == 0) {
$backupemail_behavior = Paragraphe_switch_disable("{backupemail_behavior}", "{enable_APP_MAILARCHIVER_text}<br>{mimedefang_is_currently_disabled_text}", "MimeDefangArchiver", $MimeDefangArchiver, null, 990);
$clamav_behavior = Paragraphe_switch_disable("{enable_antivirus}", "{ACTIVATE_ANTIVIRUS_SERVICE_TEXT}", "MimeDefangClamav", $MimeDefangClamav, null, 990);
$disclaimer = Paragraphe_switch_disable("{enable_disclaimer}", "{disclaimer_text}", "MimeDefangDisclaimer", $MimeDefangDisclaimer, null, 990);
$enableSpamassassin = Paragraphe_switch_disable("{enable_spamasssin}", "{enable_spamasssin_text}", "MimeDefangSpamAssassin", $MimeDefangSpamAssassin, null, 990);
$AutoWhiteList = Paragraphe_switch_disable("{smtp_AutoWhiteList}", "{smtp_AutoWhiteList_text}", "MimeDefangAutoWhiteList", $MimeDefangAutoWhiteList, null, 990);
$extensions = Paragraphe_switch_disable("{title_mime}", "{mimedefang_attachments_text}", "MimeDefangFilterExtensions", $MimeDefangFilterExtensions, null, 990);
$autcompress = Paragraphe_switch_disable("{automated_compression}", "{auto-compress_text}", "MimeDefangAutoCompress", $MimeDefangAutoCompress, null, 990);
} else {
$clamav_behavior = Paragraphe_switch_img("{enable_antivirus}", "{ACTIVATE_ANTIVIRUS_SERVICE_TEXT}", "MimeDefangClamav", $MimeDefangClamav, null, 990);
$enableSpamassassin = Paragraphe_switch_img("{enable_spamasssin}", "{enable_spamasssin_text}", "MimeDefangSpamAssassin", $MimeDefangSpamAssassin, null, 990);
$backupemail_behavior = Paragraphe_switch_img("{backupemail_behavior}", "{enable_APP_MAILARCHIVER_text}", "MimeDefangArchiver", $MimeDefangArchiver, null, 990);
$disclaimer = Paragraphe_switch_img("{enable_disclaimer}", "{disclaimer_text}<br>{disclaimer_explain}", "MimeDefangDisclaimer", $MimeDefangDisclaimer, null, 990);
$AutoWhiteList = Paragraphe_switch_img("{smtp_AutoWhiteList}", "{smtp_AutoWhiteList_text}", "MimeDefangAutoWhiteList", $MimeDefangAutoWhiteList, null, 990);
$extensions = Paragraphe_switch_img("{title_mime}", "{mimedefang_attachments_text}", "MimeDefangFilterExtensions", $MimeDefangFilterExtensions, null, 990);
$autcompress = Paragraphe_switch_img("{automated_compression}", "{auto-compress_text}", "MimeDefangAutoCompress", $MimeDefangAutoCompress, null, 990);
}
$tr[] = $EnableDaemonP;
//$tr[]=Paragraphe32("service_options", "service_options_text", "Loadjs('mimedefang.service.php')", "32-parameters.png",500);
//$tr[]=Paragraphe32("online_help", "online_help", "s_PopUpFull('http://www.mail-appliance.org/index.php?cID=305','1024','900');", "help_bg32.png",500);
$table = CompileTr2($tr);
$html = "<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'>\n\t\t\t<div id='status-{$t}'></div>\n\t\t</td>\n\t\t<td valign='top' style='padding-left:15px'>\n\t\t\t<div style='font-size:40px;margin:bottom:40px;text-align:right'>{APP_MIMEDEFANG} v{$MimeDefangVersion} <span style='font-size:18px'>(" . texttooltip("{reload_service}", "{reload_service_text}", "MimeDefangCompileRules()") . ")</span></div>\n\t\t\t{$p}\n\t\t\t<div style='width:98%' class=form>\n\t\t\t{$EnableMimeDefang}\n\t\t\t</div>\n\t\t\t<div style='width:98%' class=form>\n\t\t\t{$enableSpamassassin}\n\t\t\t{$AutoWhiteList}\n\t\t\t{$clamav_behavior}\n\t\t\t{$extensions}\n\t\t\t{$backupemail_behavior}\n\t\t\t{$disclaimer}\n\t\t\t{$autcompress}\n\t\t\t\n\t\t\t<div style='margin:20px;text-align:right'>" . button("{apply}", "Save{$t}()", 40) . "</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div id='explain-{$t}'>{$table}</div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\tfunction MimeDefangCompileRules(){\n\t\tLoadjs('mimedefang.compile.php');\n\t}\n\t\n\tvar x_Enablemimedefang= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tMimeDefangCompileRules();\n\t}\t\t\n\tfunction Save{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('MimeDefangEnabled',document.getElementById('MimeDefangEnabled').value);\n\t\tXHR.appendData('MimeDefangClamav',document.getElementById('MimeDefangClamav').value);\n\t\tXHR.appendData('MimeDefangArchiver',document.getElementById('MimeDefangArchiver').value);\n\t\tXHR.appendData('MimeDefangDisclaimer',document.getElementById('MimeDefangDisclaimer').value);\n\t\tXHR.appendData('MimeDefangSpamAssassin',document.getElementById('MimeDefangSpamAssassin').value);\n\t\tXHR.appendData('MimeDefangAutoWhiteList',document.getElementById('MimeDefangAutoWhiteList').value);\n\t\tXHR.appendData('MimeDefangFilterExtensions',document.getElementById('MimeDefangFilterExtensions').value);\n\t\tXHR.appendData('MimeDefangAutoCompress',document.getElementById('MimeDefangAutoCompress').value);\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_Enablemimedefang);\n\t}\n\t\n\n\t\tLoadAjax('status-{$t}','{$page}?status=yes&t={$t}');\n\t\t\n\t\t\n\t</script>\n\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}