function postfix_status() { $user = new usersMenus(); if (!$user->POSTFIX_INSTALLED) { return null; } $user->LoadModulesEnabled(); $q = new mysql(); $fetchmail_count = 0; if ($user->fetchmail_installed) { BuildingExecRightStatus("Building fetchmail statistics...", 25); $sql = "SELECT COUNT(ID) as tcount FROM `fetchmail_events` WHERE DATE_FORMAT(zDate,'%Y-%m-%d')=DATE_FORMAT( NOW( ) ,'%Y-%m-%d' )"; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events')); $fetchmail_count = $ligne["tcount"]; $sql = "SELECT SUM(size) as tcount FROM `fetchmail_events` WHERE DATE_FORMAT(zDate,'%Y-%m-%d')=DATE_FORMAT( NOW( ) ,'%Y-%m-%d' )"; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events')); $fetchmail_size = FormatBytes($ligne["tcount"] / 1024); events("fetchmail_count={$fetchmail_count}, fetchmail_size={$fetchmail_size}"); } else { events('Fetchmail is not installed'); } BuildingExecRightStatus("Building storage statistics...", 30); $sql = "SELECT COUNT( MessageID ) as tcount FROM storage WHERE DATE_FORMAT( zDate, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) "; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup')); $backuped_mails = $ligne["tcount"]; BuildingExecRightStatus("Building quarantine statistics...", 35); $sql = "SELECT COUNT( MessageID ) as tcount FROM quarantine WHERE DATE_FORMAT( zDate, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) "; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup')); $quarantine_mails = $ligne["tcount"]; BuildingExecRightStatus("Building messages number statistics...", 40); $sql = "SELECT COUNT(ID) as tcount FROM `smtp_logs` WHERE DATE_FORMAT( time_sended, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' )"; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events')); $flow_mails = $ligne["tcount"]; if ($user->cyrus_imapd_installed) { BuildingExecRightStatus("Building imap/pop3 number statistics...", 45); $sql = "SELECT COUNT(ID) as tcount FROM `mbx_con` WHERE DATE_FORMAT( zDate, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' )"; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events')); $mbx_con = $ligne["tcount"]; $mbx_con = "<tr>\n\t\t\t<td class=legend nowrap>{mbx_con}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$mbx_con} {connections}</td>\n\t\t</tr>"; } if ($fetchmail_count > 0) { $fetchmail = "<tr>\n\t\t\t<td class=legend nowrap>{fetchmail_recup}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$fetchmail_count} {emails} ({$fetchmail_size})</td>\n\t\t</tr>"; } $html = "\n\t<H5>Postfix: {today}</h5>\n\t<table class=table_form>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{received_mails}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$flow_mails}</td>\n\t\t</tr>\n\t\t{$mbx_con}\t\n\t\t{$fetchmail}\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{backuped_mails}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$backuped_mails}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{quarantine_mails}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$quarantine_mails}</td>\n\t\t</tr>\n\t</table>\n\t\t\t\t\t\t\n\t\n\t"; if ($user->AMAVIS_INSTALLED) { if ($user->EnableAmavisDaemon) { BuildingExecRightStatus("Building Amavis statistics...", 50); $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString($sock->getfile('amavisstatus')); $status_amavis = DAEMON_STATUS_ROUND("AMAVISD", $ini, null); $status_amavismilter = DAEMON_STATUS_ROUND("AMAVISD_MILTER", $ini, null); $status = "<br>{$status_amavis}<br>{$status_amavismilter}"; } } $html = RoundedLightGrey($html) . $status . "<br>"; file_put_contents('/usr/share/artica-postfix/ressources/logs/status.postfix.flow.html', $html); system('/bin/chmod 755 /usr/share/artica-postfix/ressources/logs/status.postfix.flow.html'); BuildingExecRightStatus("Building done...", 100); }
function popup() { $users = new usersMenus(); $users->LoadModulesEnabled(); $page = CurrentPageName(); $tpl = new templates(); $kas_enabled = 0; $amavis_enabled = 0; $kas = new kas_mysql("default"); if ($kas->GET_KEY("ACTION_SPAM_MODE") == 2) { $ACTION_SPAM_MODE = 1; } if ($kas->GET_KEY("ACTION_PROBABLE_MODE") == 2) { $ACTION_PROBABLE_MODE = 1; } if ($kas->GET_KEY("ACTION_FORMAL_MODE") == 2) { $ACTION_FORMAL_MODE = 1; } $amavis = new amavis(); $sa_tag3_level_defltl = $tpl->_ENGINE_parse_body('{sa_tag3_level_deflt}'); if ($users->kas_installed) { if ($users->KasxFilterEnabled == 1) { $kas_enabled = 1; } } if ($users->AMAVIS_INSTALLED) { if ($users->EnableAmavisDaemon == 1) { $amavis_enabled = 1; } } $html = "\n\t<div id='kas3feature'>\n\t\t<table style='width:100%' class=form>\n\t\t<tr>\n\t\t\t<td colspan=2><strong style='font-size:16px'>{APP_KAS3}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{spam option 1}</td>\n\t\t\t<td>" . Field_checkbox("ACTION_SPAM_MODE", 1, $ACTION_SPAM_MODE) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{spam option 2}</td>\n\t\t\t<td>" . Field_checkbox("ACTION_PROBABLE_MODE", 1, $ACTION_PROBABLE_MODE) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend>{spam option 4}</td>\n\t\t\t<td>" . Field_checkbox("ACTION_FORMAL_MODE", 1, $ACTION_FORMAL_MODE) . "</td>\n\t\t</tr>\t\n\t\t</table>\n\t</div>\n\t\n\t<div id='amavisfeature'>\n\t\t<table style='width:100%' class=form>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2><strong style='font-size:16px'>{APP_AMAVIS}/{APP_SPAMASSASSIN}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{spam option 1} <b>({score} {$amavis->main_array["BEHAVIORS"]["sa_tag3_level_deflt"]})</b></td>\n\t\t\t\t<td>" . Field_checkbox("EnableQuarantineSpammy2", 1, $amavis->EnableQuarantineSpammy2) . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{spam option 2} <b>({score} {$amavis->main_array["BEHAVIORS"]["sa_tag2_level_deflt"]})</b></td>\n\t\t\t\t<td>" . Field_checkbox("EnableQuarantineSpammy", 1, $amavis->EnableQuarantineSpammy) . "</td>\n\t\t\t</tr>\n\t\n\t\t\t</table>\n\t</div>\n\t\n\t\n\t<div style='text-align:right;width:100%'><hr>" . button("{apply}", "SaveQuarPolicies()") . "</div>\n\t\n\t<script>\n\t\tfunction DisableQuarPolicies(){\n\t\t\tvar kas_enabled={$kas_enabled};\n\t\t\tvar amavis_enabled={$amavis_enabled};\n\t\t\tif(kas_enabled!==1){\n\t\t\t\tdocument.getElementById('ACTION_SPAM_MODE').disabled=true;\n\t\t\t\tdocument.getElementById('ACTION_PROBABLE_MODE').disabled=true;\n\t\t\t\tdocument.getElementById('ACTION_FORMAL_MODE').disabled=true;\n\t\t\t}\n\t\t\t\n\t\t\tif(amavis_enabled!==1){\n\t\t\t\tdocument.getElementById('EnableQuarantineSpammy2').disabled=true;\n\t\t\t\tdocument.getElementById('EnableQuarantineSpammy').disabled=true;\n\t\t\t}\t\t\t\n\t\t\n\t\t}\n\t\t\nvar x_SaveQuarPolicies= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue);}\n\tYahooWin3Hide();\n}\t\t\n\t\n\t\n\t\tfunction SaveQuarPolicies(){\n\t\t\tvar kas_enabled={$kas_enabled};\n\t\t\tvar amavis_enabled={$amavis_enabled};\t\t\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('SAVE_QUAR',1);\n\t\t\tif(kas_enabled==1){\n\t\t\t\tXHR.appendData('SAVE_KAS',1);\n\t\t\t\tif(document.getElementById('ACTION_SPAM_MODE').checked){XHR.appendData('ACTION_SPAM_MODE',1);}else{XHR.appendData('ACTION_SPAM_MODE',0);}\n\t\t\t\tif(document.getElementById('ACTION_PROBABLE_MODE').checked){XHR.appendData('ACTION_PROBABLE_MODE',1);}else{XHR.appendData('ACTION_PROBABLE_MODE',0);}\n\t\t\t\tif(document.getElementById('ACTION_FORMAL_MODE').checked){XHR.appendData('ACTION_FORMAL_MODE',1);}else{XHR.appendData('ACTION_FORMAL_MODE',0);}\n\t\t\t}\n\t\t\t\n\t\t\tif(amavis_enabled==1){\n\t\t\t\tXHR.appendData('SAVE_AMAVIS',1);\n\t\t\t\tif(document.getElementById('EnableQuarantineSpammy2').checked){XHR.appendData('EnableQuarantineSpammy2',1);}else{XHR.appendData('EnableQuarantineSpammy2',0);}\n\t\t\t\tif(document.getElementById('EnableQuarantineSpammy').checked){XHR.appendData('EnableQuarantineSpammy',1);}else{XHR.appendData('EnableQuarantineSpammy',0);}\n\t\t\t}\n\t\t\t\n\t\t\tdocument.getElementById('kas3feature').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\t\tdocument.getElementById('amavisfeature').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveQuarPolicies);\t\t\t\n\t\t\n\t\t}\n\t\n\t\n\tDisableQuarPolicies();\n\t</script>\n\t\n\t\n\n\n"; echo $tpl->_ENGINE_parse_body($html); }
function addressbook_front() { $server = $_SERVER['SERVER_NAME']; $ldap = new clladp(); if (preg_match('#^(.+?):#', $server, $re)) { $server = $re[1]; } $usr = new usersMenus(); $usr->LoadModulesEnabled(); if ($usr->EnableNonEncryptedLdapSession == 1) { $portadd = ",389"; } $users = new user($_SESSION["uid"]); $settings = "\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td colspan=2><H3>{your_parameters}</h3><p class=caption>{your_parameters_text}</p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{hostname}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>{$server}</code></strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{listen_port}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>636{$portadd}</code></strong></td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend valign='top'>{base_dn}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>ou={$users->cn},ou=People,dc={$users->ou},dc=NAB,{$ldap->suffix}</code></strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap valign='top'>{bind_dn}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>{$users->dn}</code></strong></td>\n\t\t</tr>\t\t\t\t\t\t\n\t\t</table>\n\t\n\t\n\t\n\t"; $settings = RoundedLightWhite($settings); $html = "<H1>{your_address_book}</H1>\n\t<p class=caption>{your_address_book_text}</p>\n\t{$settings}\n\t\n\t\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function tabs(){ if(!isset($_GET["main"])){$_GET["main"]="network";}; $hostname=$_GET["hostname"]; $ou=$_GET["ou"]; $users=new usersMenus(); $users->LoadModulesEnabled(); $tpl=new templates(); $filters_settings=$tpl->_ENGINE_parse_body('{filters_settings}'); if(strlen($filters_settings)>25){$filters_settings=texttooltip(substr($filters_settings,0,22).'...',$filters_settings,null,null,1);} $page=CurrentPageName(); $array["status"]='{status}'; $array["transport"]='{transport_settings}'; $array["security"]='{security_settings}'; $array["filters"]=$filters_settings; while (list ($num, $ligne) = each ($array) ){ $html[]=$tpl->_ENGINE_parse_body("<li><a href=\"$page?$num=yes&hostname=$hostname&ou=$ou\"><span>$ligne</span></a></li>\n"); } echo " <div id=main_multi_config_postfix style='width:100%;height:550px;overflow:auto'> <ul>". implode("\n",$html)."</ul> </div> <script> $(document).ready(function(){ $('#main_multi_config_postfix').tabs(); }); </script>"; }
function USER_FETCHMAIL($uid) { include_once dirname(__FILE__) . '/ressources/class.fdm.inc'; $fdm = new fdm($uid); $users = new usersMenus(); if (!$users->fdm_installed) { $warning = "<strong>{fdm_not_installed}</strong>"; } $users->LoadModulesEnabled(); if ($users->EnableFDMFetch != 1) { $warning = $warning . "<br><strong>{fdm_not_enabled}</strong>"; } if (!$users->fdm_cache) { $warning = $warning . "<br><strong>{fdm_cache_not_exists}</strong>"; } if (strlen($warning) > 0) { $warning = RoundedLightYellow($warning); } $html = "\n\t<hr>\n\t<H3>{$uid}::{fetch_mails}</H3>{$warning}\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' style='vertical-align:top' style='vertical-align:top'><br><div id='fdm_list' style='width:450px'>" . USER_FETCHMAIL_LIST($uid) . "</div></td>\n\t<td valign='top' style='vertical-align:top' style='vertical-align:top' width=1%>\n\t\n\t<table style='width:100%'><tr>\n\t<td>" . imgtootltip('add-fetchmail-48.png', '{add_rule}', "fdm_addrule('{$uid}')") . "</td>\n\t<td>" . imgtootltip('48-logs.png', '{all_events}', "fdm_events('{$uid}')") . "</td>\n\t\n\t</tr>\n\t</table>\n\t\n\t"; $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }
function main_status_milter() { if ($_GET["hostname"] == null) { $hostname = $users->hostname; $_GET["hostname"] = $hostname; } else { $hostname = $_GET["hostname"]; } $ini = new Bs_IniHandler(); $users = new usersMenus(); $users->LoadModulesEnabled(); $sock = new sockets(); if ($users->MimeDefangEnabled == 1) { include_once 'ressources/class.mimedefang.inc'; $ini->loadString($sock->getfile('mimedefangstatus', $_GET["hostname"])); $mime = new mimedefang(); if ($mime->ScriptConf_array["BUILD"]["ENABLE_SA"] == 1) { $title = "{managed_by_mimedefang}"; $milter_status = DAEMON_STATUS_ROUND('MIMEDEFANG', $ini, $title); } else { $title = "{managed_by_mimedefang_not_enabled}"; $milter_status = DAEMON_STATUS_ROUND('MIMEDEFANG', $ini, $title); } } else { $ini->loadString($sock->getfile('MILTER_SPAMASS_STATUS', $_GET["hostname"])); $milter_status = DAEMON_STATUS_ROUND('SPAMASS_MILTER', $ini); } $tpl = new templates(); return $tpl->_ENGINE_parse_body($milter_status); }
function compile_miltergreylist() { $users = new usersMenus(); $tpl = new templates(); $users->LoadModulesEnabled(); $page = CurrentPageName(); $policy = new policydweight(); $policy->SaveConf(); $script = "\n\t<div id='compile_miltergreylist'></div>\n\t<script>\n\t\tChangeStatus(45);\n\t\tLoadAjaxSilent('compile_miltergreylist','{$page}?compile_postfix_save=yes');\n\t</script>\n\t"; if ($users->MILTERGREYLIST_INSTALLED != 1) { echo $tpl->_ENGINE_parse_body("<strong>{APP_MILTERGREYLIST}:</strong> {error_module_not_installed})") . $script; die; } if ($users->MilterGreyListEnabled != 1) { echo $tpl->_ENGINE_parse_body("<strong>{APP_MILTERGREYLIST}:</strong> {error_module_not_enabled})") . $script; die; } $milter = new milter_greylist(); $milter->SaveToLdap(); echo $tpl->_ENGINE_parse_body("<br><strong>{APP_MILTERGREYLIST}:</strong>{apply config} {success}") . $script; }
function GROUP_SETTINGS_PAGE_CONTENT() { $ldap = new clladp(); $page = CurrentPageName(); $num = $_GET["LoadGroupSettings"]; $groupID = $num; writelogs("Loading group {$num}", __FUNCTION__, __FILE__, __LINE__); if (is_base64_encoded($_GET["ou"])) { $_GET["ou"] = base64_decode($_GET["ou"]); } $ou_conn = $_GET["ou"]; if (!$ldap->EnableManageUsersTroughActiveDirectory) { if (!is_numeric($num)) { return null; } } if (trim($num) == null) { $num = 0; } if ($num == 0) { if (isset($_GET["byGroupName"])) { $num = $ldap->GroupIDFromName($_GET["ou"], $_GET["byGroupName"]); writelogs("Numeric identifier=0, try to get numeric identifier by {$_GET["ou"]}/{$_GET["byGroupName"]}={$num}", __FUNCTION__, __FILE__, __LINE__); if ($num == 0) { return; } } } $group = new groups($num); if (trim($_GET["ou"]) != null) { if ($group->ou != $_GET["ou"]) { $tpl = new templates(); $error = "<center style='border:2px solid red;padding:10px;margin:10px'><span style='font-size:13px;font-weight:bold;color:red'>Group: {$num}/{$_GET["ou"]}<br> {error_group_not_in_your_organization}</span></center>"; //echo $tpl->_ENGINE_parse_body($error); writelogs("ERROR: group {$num} from organization \"{$group->ou}\" is different from requested organization \"{$_GET["ou"]}\"", __FUNCTION__, __FILE__); return null; } } $text_disbaled = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}"; $user = new usersMenus(); $user->LoadModulesEnabled(); $sock = new sockets(); $SambaEnabled = $sock->GET_INFO("SambaEnabled"); if (!is_numeric($SambaEnabled)) { $SambaEnabled = 1; } if ($SambaEnabled == 0) { $user->SAMBA_INSTALLED = false; } $SAMBA_GROUP = Paragraphe('64-group-samba-grey.png', '{MK_SAMBA_GROUP}', $text_disbaled, ''); $mailing_list = Paragraphe('64-mailinglist-grey.png', "{mailing_list}", "{$text_disbaled}"); //$hash=$ldap->GroupDatas($num); $members = count($group->members); if ($user->POSTFIX_INSTALLED == true) { $mailing_list_count = $group->CountMailingListes(); $js = "javascript:Loadjs('domains.edit.group.php?LoadMailingList-js={$_GET['ou']}')"; $mailing_list = Paragraphe('64-mailinglist.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}", "{$js}"); } if ($user->DANSGUARDIAN_INSTALLED == true) { $DANSGUARDIAN = Paragraphe('icon-chevallier-564.png', '{dansguardian_rules}', '{dansguardian_rules_text}', "javascript:DansGuardianRules({$num})"); // } $automount = Paragraphe('folder-64-automount.png', '{shared_folders}', '{shared_folders_text}', "javascript:Loadjs('SharedFolders.groups.php?gpid={$num}')"); if ($user->cyrus_imapd_installed) { $sieve_auto = Paragraphe('64-learning.png', '{sieve_auto_script}', '{sieve_auto_script_text}', "javascript:Loadjs('{$page}?sieve-js={$num}')"); } if ($user->SAMBA_INSTALLED) { $COMPUTERS = Paragraphe('computers-64.png', '{computers}', '{computers_text}', "javascript:LoadComputerGroup({$num})"); $SAMBA_GROUP = Paragraphe('64-group-samba.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}', "javascript:Change_group_settings({$num})"); $LOGON_SCRIPT = Paragraphe('script-64.png', '{LOGON_SCRIPT}', '{LOGON_SCRIPT_TEXT}', "javascript:Loadjs('domains.edit.group.login.script.php?gpid={$num}')"); } if ($DANSGUARDIAN == null) { $DANSGUARDIAN = Paragraphe('icon-chevallier-564-grey.png', '{dansguardian_rules}', $text_disbaled, ''); } if ($automount == null) { $automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', $text_disbaled, ''); } if ($COMPUTERS == null) { $COMPUTERS = Paragraphe('computers-64-grey.png', '{computers}', $text_disbaled, ''); } if (!$user->cyrus_imapd_installed) { if ($user->SAMBA_INSTALLED) { $sieve_auto = $LOGON_SCRIPT; $LOGON_SCRIPT = null; } } $RENAME_GROUP = Paragraphe('group_rename-64.png', '{GROUP_RENAME}', '{GROUP_RENAME_TEXT}', "javascript:Loadjs('domains.edit.group.rename.php?group-id={$num}&ou={$_GET["ou"]}')"); $OPTIONS_DEFAULT_PASSWORD = Paragraphe('64-key.png', '{group_default_password}', '{group_default_password_text}', "javascript:YahooWin('400','{$page}?default_password=yes&gpid={$num}')"); $PRIVILEGES = Paragraphe('members-priv-64.png', '{privileges}', '{privileges_text}', "javascript:GroupPrivileges({$num})"); $ou_encoded = base64_encode($_GET["ou"]); $delete_group = imgtootltip("32-cancel.png", "{delete}::{$group->groupName}", "Loadjs('domains.delete.group.php?gpid={$num}')"); $quotaDisk = Paragraphe("rename-disk-64.png", '{disk_user_quota}', '{disk_group_quota_text}', "javascript:Loadjs('domains.edit.user.quota.php?uid=@{$group->group_id}&ou={$group->ou}&userid=@{$group->group_id}')", null, 210, 'font-size:12px;font-weight:bold'); $quotaDisk_disabled = Paragraphe("rename-disk-64-grey.png", '{disk_user_quota}', '{disk_group_quota_text}'); if (!$user->QUOTA_INSTALLED) { $quotaDisk = $quotaDisk_disabled; } if ($user->EnableManageUsersTroughActiveDirectory) { $SAMBA_GROUP = Paragraphe('64-group-samba-64.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}'); $mailing_list = Paragraphe('64-mailinglist-grey.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}"); $automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', '{shared_folders_text}'); $DANSGUARDIAN = null; $PRIVILEGES = Paragraphe('members-priv-64-grey.png', '{privileges}', '{privileges_text}'); $delete_group = null; } $GroupSettingsID = null; if (isset($_GET["GroupSettingsID"])) { $GroupSettingsID = $_GET["GroupSettingsID"]; } $html_tab1 = "\n\t\n\t<div style='width:98%' class=form>\n\t<table>\n\t<tr>\n\t<td valign='top'>{$PRIVILEGES}</td>\n\t<td valign='top'>{$COMPUTERS}</td>\n\t<td valign='top'>{$SAMBA_GROUP}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'>{$mailing_list}</td>\n\t<td valign='top'>{$automount}</td>\n\t<td valign='top'></td>\n\t</tr>\n\t</table></div>"; $html_tab2 = "<div style='width:98%' class=form>\t<table>\n\t<tr>\n\t<td valign='top'> </td>\n\t<td valign='top'> </td>\n\t<td valign='top'> </td>\n\t</tr>\n\t<tr>\n\t<td valign='top'> </td>\n\t<td valign='top'> </td>\n\t<td valign='top'> </td>\n\t</tr>\n\t</table></div>"; $html_tab3 = "<div style='width:98%' class=form>\t\n\t<table>\n\t\t<tr>\n\t\t\t<td valign='top'>{$DANSGUARDIAN}</td>\n\t\t\t<td valign='top'> </td>\n\t\t\t<td valign='top'> </td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'> </td>\n\t\t\t<td valign='top'> </td>\n\t\t\t<td valign='top'> </td>\n\t\t</tr>\n\t</table></div>"; $t[] = $RENAME_GROUP; $t[] = $OPTIONS_DEFAULT_PASSWORD; $t[] = $sieve_auto; $t[] = $LOGON_SCRIPT; $t[] = $quotaDisk; $html_tab4 = "<div style='width:98%' class=form><table>" . CompileTr3($t) . "</table></div>"; if ($_GET["tab"] == 'asav') { $html_tab1 = $html_tab2; } if ($_GET["tab"] == 'proxy') { $html_tab1 = $html_tab3; } if ($_GET["tab"] == 'options') { $html_tab1 = $html_tab4; } $html = $html_tab1; $tpl = new templates(); $group_description = $tpl->_ENGINE_parse_body("{group_description}"); $barre_principale = "\n\t<input type='hidden' id='group_delete_text' value='{group_delete_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=3%><div style='height:1px;border-bottom:1px solid #CCCCCC;width:100%;float:right'> </div></td>\n\t\t<td width=1% nowrap><H5 style='border-bottom:0px'>{group} « {$group->groupName} »</h5></td>\n\t\t<td><div style='height:1px;border-bottom:1px solid #CCCCCC;width:100%;float:right'> </div></td>\n\t\t<td width=1%>{$delete_group}</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'><div style='margin-top:-5px;padding-right:50px'>\n\t\t\t<a href=\"javascript:blur();\" OnClick=\"ChangeGroupDescription()\" \n\t\t\tstyle='font-size:11px;text-decoration:underline;font-style:italic'>{$group->description}</a></div></td>\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tfunction ChangeGroupDescription(){\n\t\t\tYahooWin5('360','{$page}?ChangeGroupDescription=yes&gpid={$groupID}&ou={$ou_conn}','{$group->groupName}::{$group_description}');\n\t\t\n\t\t}\n\t\t\n\t</script>\n\t"; echo $tpl->_ENGINE_parse_body("{$barre_principale}{$tab}{$html}"); }
function main_config_backup() { $spamass = true; $clamav = true; $mime = new mimedefang(); $users = new usersMenus(); $users->LoadModulesEnabled(); $tab = main_config_tabs(); $backup_enabled = true; $bightml = "<tr>\n\t\t<td align='right' with=1% nowrap class=legend>{BIGHTML_ENABLED}:</td>\n\t\t<td align='left'>" . Field_numeric_checkbox_img('BIGHTML_ENABLED', $mime->ScriptConf_array["BUILD"]["BIGHTML_ENABLED"], '{enable_disable}') . "</td>\n\t\t<td> </td>\n\t\t</tr>\n\t\t"; $filtersenderto = "<tr>\n\t\t<td align='right' with=1% nowrap class=legend>{FILTER_LOCAL_SENDER_ENABLED}:</td>\n\t\t<td align='left'>" . Field_numeric_checkbox_img('FILTER_LOCAL_SENDER_ENABLED', $mime->ScriptConf_array["BUILD"]["FILTER_LOCAL_SENDER_ENABLED"], '{FILTER_LOCAL_SENDER_ENABLED_TEXT}') . "\n\t\t</td>\n\t\t<td> </td>\n\t\t</tr>\n\t\t"; if (!$users->MHONARC_INSTALLED) { $backup_enabled = false; } if ($users->MailArchiverEnabled == 1) { $backup_enabled = false; } if ($backup_enabled) { $backup = "<tr>\n\t\t<td align='right' with=1% nowrap class=legend>{BACKUP_ENABLED}:</td>\n\t\t<td align='left'>" . Field_numeric_checkbox_img('BACKUP_ENABLED', $mime->ScriptConf_array["BUILD"]["BACKUP_ENABLED"], '{enable_disable}') . "</td>\n\t\t<td> </td>\n\t\t</tr>"; } else { $backup = "<tr>\n\t\t<td align='right' with=1% nowrap class=legend>{BACKUP_ENABLED}:</td>\n\t\t<td align='left'><img src='img/status_ok-grey.gif'><input type='hidden' name='BACKUP_ENABLED' value='0' id='BACKUP_ENABLED'></td>\n\t\t<td> </td>\n\t\t</tr>"; } $other = "\n\t<form name='FFM_DANS2'>\n\t<input type='hidden' name='SaveGeneralSettings' value='yes'>\n\t<H5>{backup_filters}</H5>\n\t<table style='width:100%'>\n\t\t{$filtersenderto}\n\t\t{$bightml}\n\t\t{$backup}\n\t\t<tr>\n\t\t\t<td {$style} colspan=3 align='right' valign='top'>\n\t\t\t\t<input type='button' value='{save} »' \n\t\t\t\tOnClick=\"javascript:ParseForm('FFM_DANS2','{$page}',true);LoadAjax('main_config','{$page}?main=yes');\">\n\t\t\t</td>\n\t\t</tr>\t\n\t</table>\n\t</FORM>"; $other = $tab . "<br>" . RoundedLightGrey($other); $tpl = new templates(); return $tpl->_ENGINE_parse_body($other); }
function security2() { $failedtext = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}"; $page = CurrentPageName(); $users = new usersMenus(); $users->LoadModulesEnabled(); $tls = Buildicon64("DEF_ICO_POSTFIX_TLS"); //$security_rules=Paragraphe('folder-rules-64.png','{security_rules}','{security_rules_text}',"javascript:Loadjs('postfix.security.rules.php?js=yes')",null,210,null,0,true); $messages_restriction = Paragraphe('folder-message-restriction.png', '{messages_restriction}', '{messages_restriction_text}', "javascript:Loadjs('postfix.messages.restriction.php?script=yes')", null, 210, null, 0, true); $internet_deny = Paragraphe('64-internet-deny.png', '{INTERNET_DENY}', '{INTERNET_DENY_TEXT}', "javascript:Loadjs('postfix.internet.deny.php')", null, 210, 100, 0, true); $ssl = Paragraphe('folder-64-routing-secure.png', '{SSL_ENABLE}', '{SSL_ENABLE_TEXT}', "javascript:Loadjs('postfix.master.cf.php?script=ssl');", null, 210, null, 0, true); $ou_encoded = base64_encode("_Global"); //$extensions_block=Paragraphe("bg_forbiden-attachmt-64.png","{attachment_blocking}","{attachment_blocking_text}","javascript:Loadjs('domains.edit.attachblocking.ou.php?ou=$ou_encoded')",null,210,null,0,true); $plugins_activate = Paragraphe('folder-lego.png', '{POSTFIX_BUNDLE}', '{POSTFIX_BUNDLE_TEXT}', "javascript:Loadjs('postfix.plugins.php?script=yes')", null, 210, 100, 0, true); $postfixInstantIptables = Buildicon64("DEF_ICO_MAIL_IPABLES"); $backup = icon_backup(); $header_clean = Paragraphe("gomme-64.png", "{HIDE_CLIENT_MUA}", '{HIDE_CLIENT_MUA_TEXT}', "javascript:Loadjs('postfix.hide.headers.php')", null, 210, 100, 0, true); $vipwatch = Paragraphe("vipwatch-64.png", "VIPTrack", '{VIPTrack_text}', "javascript:Loadjs('postfix.viptrack.php')", null, 210, 100, 0, true); $tr[] = $backup; $tr[] = $vipwatch; $tr[] = $tls; $tr[] = $messages_restriction; $tr[] = $sasl; $tr[] = $ssl; $tr[] = $internet_deny; $tr[] = $header_clean; $table = CompileTr3($tr); $html = "\n<center>\n<div style='width:700px'>{$table}</div></center>"; $tpl = new templates(); $datas = $tpl->_ENGINE_parse_body($html); return $datas; }
function page() { $usersmenus = new usersMenus(); $usersmenus->LoadModulesEnabled(); $html = $html . "\n<table style='margin:0px;padding:0px;'>\n<tr>\n<td valign='top' style='margin:0px;padding:0px;'>{$awstats_mail}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$graph_defang}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$collectd}</td>\n<tr>\n<td valign='top' style='margin:0px;padding:0px;'>{$kas}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$mailspy}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$awstats_squid}</td>\n</tr>\n<tr>\n<td valign='top' style='margin:0px;padding:0px;'>{$bind}<td>\n<td valign='top' style='margin:0px;padding:0px;'></td>\n<td valign='top' style='margin:0px;padding:0px;'> </td>\n</tr>\n</table>\n"; $tpl = new template_users('{statistics}', $html); echo $tpl->web_page; }
function organization_management() { $ou = $_GET["ou"]; $ou_encoded = base64_encode($ou); $ldap = new clladp(); $sock = new sockets(); if (trim($ou == null)) { if (isset($_COOKIE["SwitchOrgTabsOu"])) { $_GET["ou"] = $_COOKIE["SwitchOrgTabsOu"]; } } $usersmenus = new usersMenus(); $usersmenus->LoadModulesEnabled(); if ($usersmenus->AllowAddUsers or $usersmenus->AsOrgAdmin or $usersmenus->AsMessagingOrg) { $add_user = Paragraphe('folder-useradd-64.png', '{create_user}', '{create_user_text}', "javascript:Loadjs('domains.add.user.php?ou={$ou}')", null, 210, null, 0, true); $groups = Paragraphe('folder-group-64.png', "{manage_groups} ({$ou})", '{manage_groups_text}', "javascript:Loadjs('domains.edit.group.php?ou={$ou_encoded}&js=yes&popup=yes')", null, 210, 100, 0, true); } $find_members = Paragraphe('find-members-64.png', '{find_members}', '{find_members_text}', "javascript:Loadjs('domains.find.user.php?ou={$ou}')", null, 210, null, 0, true); if ($usersmenus->AsArticaAdministrator) { $delete = Paragraphe('64-cancel.png', "{delete_ou} {$ou}", '{delete_ou_text}', "javascript:Loadjs('domains.delete.org.php?ou={$ou}');", null, 210, 100, 0, true); } if ($usersmenus->AsOrgAdmin) { $img = $ldap->get_organization_picture($ou, 64); $ad_import = Paragraphe('folder-import-ad-64.png', '{ad_import}', '{ad_import_text}', "javascript:Loadjs('domains.ad.import.php?ou={$ou}')", null, 210, 0, 0, true); $ldap_import = Paragraphe('database-restore-64.png', '{ldap_importation}', '{ldap_importation_text}', "javascript:Loadjs('domains.ldap.import.php?ou={$ou}')", null, 210, 0, 0, true); $orgsettings = Paragraphe($img, '{ORG_SETTINGS}', '{ORG_SETTINGS_TEXT}', "javascript:Loadjs('domains.organization-settings.php?ou={$ou}')", null, 210, 0, 0, true); $orgsduplicate = Paragraphe('org-duplicate-64.png', '{EXPORT_ORG}', '{duplicate_to_remote_server}', "javascript:Loadjs('domains.organization-settings.php?ou={$ou}&js-export=yes')", null, 210, 0, 0, true); } if (!isset($_GET["miniadm"])) { if ($usersmenus->AsOrgAdmin or $usersmenus->AsMessagingOrg) { $transport = Paragraphe('folder-transport-64.png', '{localdomains}', '{localdomains_text}', "javascript:Loadjs('domains.edit.domains.php?js=yes&ou={$ou}')", null, 210, null, 0, true); if ($usersmenus->POSTFIX_INSTALLED) { $sendmail = "<div style='float:left'>" . Buildicon64('DEF_ICO_SENDTOALL', 210, 100, "?ou={$ou}") . "</div>"; } } } if ($usersmenus->ARTICA_META_ENABLED) { if ($sock->GET_INFO("AllowArticaMetaAddUsers") != 1) { $add_user = null; } } if ($usersmenus->POSTFIX_INSTALLED) { $transport = null; } if ($usersmenus->EnableManageUsersTroughActiveDirectory or $ldap->IsOUUnderActiveDirectory($ou)) { $ad_import = Paragraphe('folder-import-ad-64-grey.png', '{ad_import}', '{ad_import_text}'); $orgsduplicate = Paragraphe('org-duplicate-64-grey.png', '{EXPORT_ORG}', '{duplicate_to_remote_server}'); $delete = Paragraphe('64-cancel-grey.png', '{delete_ou}', '{delete_ou_text}'); $add_user = Paragraphe('folder-useradd-64-grey.png', '{create_user}', '{create_user_text}'); $orgsettings = Paragraphe('64-org-settings-grey.png', '{ORG_SETTINGS}', '{ORG_SETTINGS_TEXT}'); $ldap_import = Paragraphe('database-restore-64-grey.png', '{ldap_importation}', '{ldap_importation_text}'); } $tr[] = $add_user; $tr[] = $groups; $tr[] = $find_members; $tr[] = $transport; $tr[] = $ad_import; $tr[] = $ldap_import; $tr[] = $orgsettings; $tr[] = $orgsduplicate; $tr[] = $sendmail; $tr[] = $delete; $tables[] = "<table style='width:99%' class=form><tr>"; $t = 0; while (list($key, $line) = each($tr)) { $line = trim($line); if ($line == null) { continue; } $t = $t + 1; $tables[] = "<td valign='top'>{$line}</td>"; if ($t == 3) { $t = 0; $tables[] = "</tr><tr>"; } } if ($t < 3) { for ($i = 0; $i <= $t; $i++) { $tables[] = "<td valign='top'> </td>"; } } $html = "<center><div style='width:700px'>" . implode("\n", $tables) . "</div></center>"; return $html; }
function main_pureftpd() { //$status=pureftpd_status(); cookies_main(); $users = new usersMenus(); $tpl = new templates(); $users->LoadModulesEnabled(); $pure = Paragraphe('64-pureftpd-grey.png', '{APP_PUREFTPD}', '{feature_not_installed}', ''); $events = Paragraphe('64-spam-grey.png', '{events}', '{feature_not_installed}', ''); $apply = Paragraphe('system-64-grey.png', '{apply}', '{feature_not_installed}', ''); $purewho = Paragraphe('folder-rules2-64-info-grey.png', '{current_connections}', '{feature_not_installed}', ''); if ($users->PUREFTP_INSTALLED) { $pure = Paragraphe('64-pureftpd.png', '{APP_PUREFTPD}', '{APP_PUREFTPD_TEXT}', "javascript:Loadjs('pureftp.index.php?js=yes')"); $events = Paragraphe('64-spam.png', '{events}', '{events_text}', "javascript:Loadjs('pureftp.events.php')"); $apply = Paragraphe('system-64.png', '{apply}', '{apply_config_pureftpd}', "javascript:ApplyConfig('pure-ftpd');"); $purewho = Paragraphe('folder-rules2-64-info.png', '{current_connections}', '{current_connections_text}', "javascript:Loadjs('pureftp.events.php?who=yes')"); } $html = "{$tab}\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n\n\t\t<table>\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$pure}</td>\n\t\t\t<td valign='top' >{$events}</td>\n\t\t\t<td valign='top'>{$purewho}</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$apply}</td>\n\t\t\t<td valign='top' >{$status}</td>\n\t\t\t<td valign='top' > </td>\n\t\t\t</tr>\t\t\t\t\t\n\t\t</table>\n</td>\n<td valign='top' style='width:1%'>{$pureftp_error}\n</td>\n</tr>\n</table>"; return $tpl->_ENGINE_parse_body($html); }
function DOMAINSLIST_SEARCH() { $ldap = new clladp(); $page = CurrentPageName(); $tpl = new templates(); $ou = $_GET["ou"]; include_once "ressources/class.amavis.inc"; $amavis = new amavis(); $amavis_oui = false; $disclaimer = true; $users = new usersMenus(); $users->LoadModulesEnabled(); if ($users->AMAVIS_INSTALLED) { if ($users->EnableAmavisDaemon == 1) { $amavis_oui = true; } } $POSTFIX_INSTALLED = $users->POSTFIX_INSTALLED; $sock = new sockets(); $disclaimer = IS_DISCLAIMER(); $HashDomains = $ldap->Hash_associated_domains($ou); if ($GLOBALS["VERBOSE"]) { echo count($HashDomains) . " domains for this ou = {$ou}\n"; } $aliases = new AutoAliases($ou); $search = string_to_regex($_POST["query"]); $domainstyle = "font-size:16px"; if (isset($_GET["expand"])) { $domainstyle = "font-size:18px"; } $data = array(); $c = 0; while (list($num, $ligne) = each($HashDomains)) { if ($search != null) { if (!preg_match("#{$search}#", $num)) { continue; } } $c++; $autoalias = " "; $disclaimer_domain = " "; $amavis_infos = " "; $amavis_duplicate = " "; $js = "Loadjs('domains.relay.domains.php?domain={$num}&ou={$ou}&local=yes')"; $delete = imgtootltip("delete-24.png", '{label_delete_transport}', "DeleteInternetDomainInside('{$num}')"); if (strlen($aliases->DomainsArray[$num]) > 0) { $autoalias = "<img src='img/20-check.png'>"; } if ($amavis_oui) { $amavis_infos = imgtootltip("24-parameters.png", "AS -> {$num}", "Loadjs('domains.amavis.php?domain={$num}')"); } if ($amavis->copy_to_domain_array[strtolower($num)]["enable"] == 1) { $amavis_duplicate = "<strong style='font-size:12px'>{$amavis->copy_to_domain_array[strtolower($num)]["duplicate_host"]}:{$amavis->copy_to_domain_array[strtolower($num)]["duplicate_port"]}"; } if ($disclaimer) { $disclaimer_domain = imgtootltip("24-parameters.png", "disclaimer -> {$num}", "Loadjs('domains.disclaimer.php?domain={$num}&ou={$ou}')"); } $autoalias = $tpl->_ENGINE_parse_body($autoalias); $data['rows'][] = array('id' => "dom-{$num}", 'cell' => array("\n\t\t<a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\" style='{$domainstyle};font-weight:bold;text-decoration:underline'>{$num}</span>", "<span style='font-size:14px'>{$autoalias}</span>", "<span style='font-size:14px'>{$amavis_infos}</span>", "<span style='font-size:14px'>{$disclaimer_domain}</span>", "<span style='font-size:14px'>{$amavis_duplicate}</span>", $delete)); } if ($c == 0) { json_error_show("No Internet domain..."); } $data['page'] = 1; $data['total'] = $c; echo json_encode($data); }
function filters_section_kaspersky() { if (posix_getuid() == 0) { return null; } $page = CurrentPageName(); $sock = new sockets(); $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance"); $users = new usersMenus(); $users->LoadModulesEnabled(); $kas3 = Paragraphe('folder-caterpillar.png', '{APP_KAS3}', '{KAS3_TEXT}', 'javascript:Loadjs("kas.group.rules.php?ajax=yes")', null, 210, null, 0, true); $kasper = Paragraphe('icon-antivirus-64.png', '{APP_KAVMILTER}', '{APP_KAVMILTER_TEXT}', "javascript:Loadjs('milter.index.php?ajax=yes')", null, 210, null, 0, true); $activate = Paragraphe('64-folder-install.png', '{AS_ACTIVATE}', '{AS_ACTIVATE_TEXT}', "javascript:Loadjs('{$page}?script=antispam')", null, 210, null, 0, true); $mailspy = Paragraphe('64-milterspy.png', '{APP_MAILSPY}', '{APP_MAILSPY_TEXT}', 'mailspy.index.php', null, 210, 100, 0, true); $install = Buildicon64("DEF_ICO_CONTROLCENTER"); $milter_script = Paragraphe('64-milter-behavior.png', '{plugins_behavior}', '{plugins_behavior_text}', "javascript:Loadjs('{$page}?script=milterbehavior')", null, 210, 100, 0, true); $wbl = Buildicon64('DEF_ICO_MAIL_WBL'); $quarantine = Paragraphe('folder-quarantine-0-64.png', '{quarantine_and_backup_storage}', '{quarantine_and_backup_storage_text}', "javascript:Loadjs('quarantine.php?script=quarantine')", null, 210, 100, 0, true); $apply = applysettings_postfix(true); $assp = Buildicon64("DEF_ICO_ASSP"); $quarantine_admin = Paragraphe("biohazard-64.png", "{all_quarantines}", "{all_quarantines_text}", "javascript:Loadjs('domains.quarantine.php?js=yes&Master=yes')", null, 210, 100, 0, true); $quarantine_report = Paragraphe("64-administrative-tools.png", "{quarantine_reports}", "{quarantine_reports_text}", "javascript:Loadjs('domains.quarantine.php?js=yes&MailSettings=yes')", null, 210, 100, 0, true); $quarantine_policies = Paragraphe("script-64.png", "{quanrantine_policies}", "{quanrantine_policies_text}", "javascript:Loadjs('quarantine.policies.php')", null, 210, null, 0, true); if ($users->KasxFilterEnabled != 1) { $kas3 = null; } if ($users->kas_installed != 1) { $kas3 = null; } if (!$users->KAV_MILTER_INSTALLED) { $kasper = null; } if ($users->KAVMILTER_ENABLED != 1) { $kasper = null; } if ($users->KasxFilterEnabled != 1) { $kas3 = null; } if ($users->kas_installed != 1) { $kas3 = null; } if ($users->KAVMILTER_ENABLED != 1) { $kav = null; } if (!$users->KAV_MILTER_INSTALLED) { $kav = null; } if ($users->MilterGreyListEnabled != 1) { $mg = nul; } if (!$users->MILTERGREYLIST_INSTALLED) { $mg = null; } if ($EnablePostfixMultiInstance == 1) { $mg = null; } if ($users->EnableMilterSpyDaemon != 1) { $mailspy = null; } if (!$users->MILTER_SPY_INSTALLED) { $mailspy = null; } $tr[] = $apply; $tr[] = $activate; $tr[] = $milter_script; $tr[] = $kas3; $tr[] = $assp; $tr[] = $kasper; $tr[] = $quarantine_policies; $tr[] = $quarantine; $tr[] = $quarantine_admin; $tr[] = $quarantine_report; $tr[] = $wbl; $tr[] = $mailspy; $tables[] = "<table style='width:70%' class=form><tr>"; $t = 0; while (list($key, $line) = each($tr)) { $line = trim($line); if ($line == null) { continue; } $t = $t + 1; $tables[] = "<td valign='top'>{$line}</td>"; if ($t == 3) { $t = 0; $tables[] = "</tr><tr>"; } } if ($t < 3) { for ($i = 0; $i <= $t; $i++) { $tables[] = "<td valign='top'> </td>"; } } $tables[] = "</table>"; $html = implode("\n", $tables); $tpl = new templates(); $datas = $tpl->_ENGINE_parse_body($html, "postfix.plugins.php,domain.manage.org.index.php,domains.quarantine.php"); return $datas; }
function security() { $datas = GET_CACHED(__FILE__, __FUNCTION__, null, TRUE); if ($datas != null) { return $datas; } $failedtext = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}"; $page = CurrentPageName(); $users = new usersMenus(); $users->LoadModulesEnabled(); $tls = Buildicon64("DEF_ICO_POSTFIX_TLS"); $security_rules = Paragraphe('folder-rules-64.png', '{security_rules}', '{security_rules_text}', "javascript:Loadjs('postfix.security.rules.php?js=yes')", null, 210, null, 0, true); $apply = applysettings_postfix(true); $messages_restriction = Paragraphe('folder-message-restriction.png', '{messages_restriction}', '{messages_restriction_text}', "javascript:Loadjs('postfix.messages.restriction.php?script=yes')", null, 210, null, 0, true); $sasl = Paragraphe('64-smtp-auth.png', '{SASL_TITLE}', '{SASL_TEXT}', "javascript:Loadjs('postfix.index.php?script=auth');", null, 210, null, 0, true); $internet_deny = Paragraphe('64-internet-deny.png', '{INTERNET_DENY}', '{INTERNET_DENY_TEXT}', "javascript:Loadjs('postfix.internet.deny.php')", null, 210, 100, 0, true); $ssl = Paragraphe('folder-64-routing-secure.png', '{SSL_ENABLE}', '{SSL_ENABLE_TEXT}', "javascript:Loadjs('postfix.master.cf.php?script=ssl');", null, 210, null, 0, true); $global_smtp_rules = Buildicon64('DEF_ICO_POSTFIX_REGEX'); $smtpd_client_restrictions = Paragraphe('64-sender-check.png', '{smtpd_client_restrictions_icon}', '{smtpd_client_restrictions_icon_text}', "javascript:Loadjs('postfix.smtpd_client_restrictions.php')", null, 210, null, 0, true); $ou_encoded = base64_encode("_Global"); $extensions_block = Paragraphe("bg_forbiden-attachmt-64.png", "{attachment_blocking}", "{attachment_blocking_text}", "javascript:Loadjs('domains.edit.attachblocking.ou.php?ou={$ou_encoded}')", null, 210, null, 0, true); $plugins_activate = Paragraphe('folder-lego.png', '{POSTFIX_BUNDLE}', '{POSTFIX_BUNDLE_TEXT}', "javascript:Loadjs('postfix.plugins.php?script=yes')", null, 210, 100, 0, true); $postfixInstantIptables = Buildicon64("DEF_ICO_MAIL_IPABLES"); $backup = icon_backup(); $html = "\n<div style='width:700px'>\n<table style='width:100%'>\n<tr>\n<td valign='top'>{$backup}</td>\n<td valign='top'>{$tls}</td>\n<td valign='top'>{$security_rules}</td>\n</tr>\n<tr>\n<td valign='top'>{$apply}</td>\n<td valign='top'>{$messages_restriction}</td>\n<td valign='top'>{$smtpd_client_restrictions}</td>\n</tr>\n<tr>\n<td valign='top'>{$sasl}</td>\n<td valign='top'>{$ssl}</td>\n<td valign='top'>{$internet_deny}</td>\n</tr>\n<tr>\n<td valign='top'>{$global_smtp_rules}</td>\n<td valign='top'>{$postfixInstantIptables}</td>\n<td valign='top'>{$extensions_block}</td>\n</td>\n</table>\n</div>\n"; $tpl = new templates(); $datas = $tpl->_ENGINE_parse_body($html); SET_CACHED(__FILE__, __FUNCTION__, null, $datas); return $datas; }
function ApplyConfigKavMail() { $users = new usersMenus(); $users->LoadModulesEnabled(); if ($users->KAV_MILTER_INSTALLED) { if ($users->KAVMILTER_ENABLED == 1) { include_once "ressources/class.kavmilterd.inc"; $kavmilterd = new kavmilterd(); $kavmilterd->ReBuildAllRules(); $kavmilterd->SaveToLdap(); $result = Success("aveserver_main_settings"); $tpl = new templates(); echo $tpl->_ENGINE_parse_body($result); } } }
function fetch_index() { $users = new usersMenus(); $tpl = new templates(); $page = CurrentPageName(); $fetchmail_rules_text = $tpl->_ENGINE_parse_body("{fetchmail_rules}"); $users->LoadModulesEnabled(); if ($users->EnableFetchmail == 0) { echo fetch_popup_enable(); exit; } if ($_GET["md"] == null) { $_GET["md"] = time(); } $add_fetchmail = Paragraphe('add-fetchmail-64.png', '{add_new_fetchmail_rule}', '{fetchmail_explain}', "javascript:add_fetchmail_rules()", null); $daemon_settings = Paragraphe('folder-tools2-64.png', '{daemon_settings}', '{daemon_settings_text}', "javascript:YahooWin('550','fetchmail.daemon.settings.php?ajax=yes','{fetchmail_daemon_settings}')"); //$rules=Paragraphe('fetchmail-rule-64.png','{fetchmail_rules}','{fetchmail_rules_text}',"javascript:YahooWin('600','fetchmail.daemon.rules.php?ajax=yes','$fetchmail_rules_text')"); //$logs=Paragraphe('64-logs.png','{events}','{events_text}',"javascript:s_PopUpScroll('fetchmail.index.php?events=true',800,600);"); $update = Paragraphe('64-recycle.png', '{update_now}', '{update_fetchmail_now}', "javascript:ReloadFetchMail();"); $apply = Paragraphe('user-config-download-64.png', '{apply_parameters}', '{compile_rules}', "javascript:Loadjs('fetchmail.compile.progress.php');"); $help = Paragraphe("help-64.png", "{help}", "{online_help}", "javascript:s_PopUpFull('http://www.mail-appliance.org/index.php?cID=126','1024','900');"); $fetchmailrc = Paragraphe('script-view-64.png', '{configuration_file}', '{display_generated_configuration_file}', "javascript:Loadjs('fetchmailrc.php')"); $html = "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'>\n\t\t<div id='{$_GET["md"]}'></div>\n\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "LoadAjax('{$_GET["md"]}','{$page}?fetch_status=yes');") . "</div>\t\n\t</td>\n\t<td valign='top'>\n\n\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$update}</td>\n\t\t<td valign='top'>{$add_fetchmail}</td>\t\n\t\t\n\t</tr>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$apply}</td>\n\t\t<td valign='top'>{$fetchmailrc}</td>\t\n\t\t\n\t</tr>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$help}</td>\n\t\t<td valign='top'> </td>\t\n\t\t\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td colspan=2><div class=text-info style='text-align:left;font-size:16px'>{fetchmail_about}</div></td>\n\t</tr>\n\t</table>\n\t\n\t</td>\n</tr>\n</table>\n\n<script>\n\t LoadAjax('{$_GET["md"]}','{$page}?fetch_status=yes');\n\t \nvar x_ReloadFetchMail= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)}\n\t}\n\nfunction ReloadFetchMail(){\n \t\tvar XHR = new XHRConnection();\n XHR.appendData('reload-fetchmail',1);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ReloadFetchMail);\n}\t \n\t \n</script>\n\t"; echo $tpl->_ENGINE_parse_body($html); }
function main_config_mimedefang() { $users = new usersMenus(); if (!$users->MIMEDEFANG_INSTALLED) { return null; } $users->LoadModulesEnabled(); if ($users->MimeDefangEnabled != 1) { return null; } $sock = new sockets(); $ini = new Bs_IniHandler(); $ini->loadString($sock->GET_INFO("ArticaPerformancesSettings")); $MX_REQUESTS = $ini->_params["MIMEDEFANG"]["MX_REQUESTS"]; if ($MX_REQUESTS == null) { $MX_REQUESTS = 200; } $MX_MINIMUM = $ini->_params["MIMEDEFANG"]["MX_MINIMUM"]; if ($MX_MINIMUM == null) { $MX_MINIMUM = 2; } $MX_MAXIMUM = $ini->_params["MIMEDEFANG"]["MX_MAXIMUM"]; if ($MX_MAXIMUM == null) { $MX_MAXIMUM = 10; } $MX_MAX_RSS = $ini->_params["MIMEDEFANG"]["MX_MAX_RSS"]; if ($MX_MAX_RSS == null) { $MX_MAX_RSS = 30000; } $MX_MAX_AS = $ini->_params["MIMEDEFANG"]["MX_MAX_AS"]; if ($MX_MAX_AS == null) { $MX_MAX_AS = 90000; } if ($MX_REQUESTS > 900) { $mimedefang_macro = 1; } if ($MX_REQUESTS < 300) { $mimedefang_macro = 2; } if ($MX_REQUESTS < 101) { $mimedefang_macro = 3; } if ($MX_REQUESTS < 60) { $mimedefang_macro = 4; } $arrp = array(0 => '{select}', 1 => "{high}", 2 => "{medium}", 3 => "{low}", 4 => '{very_low}'); $arrp = Field_array_Hash($arrp, 'mimedefang_macro', $mimedefang_macro, "mimedefang_macro()"); $html = "<H5>{mimedefang_consumption}</h5>\n\t<p class=caption>{mimedefang_consumption_text}</p>\n\t\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td nowrap width=1% align='right'><strong>{mimedefang_macro}:</strong></td>\n\t\t<td>{$arrp}</td>\t\n\t\t</tr>\n\t</table>\n\t\n<form name=ffmmimedefang>\n<table style='width:100%'>\n<tr>\n\t<td nowrap width=1% align='right'><strong>{MX_REQUESTS}:</strong></td>\n\t<td>" . Field_text('MX_REQUESTS', $MX_REQUESTS, 'width:90px') . "</td>\n\t<td nowrap width=1% align='left'>" . help_icon('{MX_REQUESTS_TEXT}') . "</td>\n</tr>\n<tr>\n\t<td nowrap width=1% align='right'><strong>{MX_MINIMUM}:</strong></td>\n\t<td>" . Field_text('MX_MINIMUM', $MX_MINIMUM, 'width:90px') . "</td>\n\t<td nowrap width=1% align='left'>" . help_icon('{MX_MINIMUM_TEXT}') . "</td>\n</tr>\n<tr>\n\t<td nowrap width=1% align='right'><strong>{MX_MAXIMUM}:</strong></td>\n\t<td>" . Field_text('MX_MAXIMUM', $MX_MAXIMUM, 'width:90px') . "</td>\n\t<td nowrap width=1% align='left'>" . help_icon('{MX_MAXIMUM_TEXT}') . "</td>\n</tr>\n<tr>\n\t<td nowrap width=1% align='right'><strong>{MX_MAX_RSS}:</strong></td>\n\t<td>" . Field_text('MX_MAX_RSS', $MX_MAX_RSS, 'width:90px') . "</td>\n\t<td nowrap width=1% align='left'>" . help_icon('{MX_MAX_RSS_TEXT}') . "</td>\n</tr>\n<tr>\n\t<td nowrap width=1% align='right'><strong>{MX_MAX_AS}:</strong></td>\n\t<td>" . Field_text('MX_MAX_AS', $MX_MAX_AS, 'width:90px') . "</td>\n\t<td nowrap width=1% align='left'>" . help_icon('{MX_MAX_AS_TEXT}') . "</td>\n</tr>\n<tr>\n\t<td colspan=2 align='right'><input type=button OnClick=\"javascript:ParseForm('ffmmimedefang','{$page}',true);\" value='{apply} »'>\n</tr>\n</table>\n</form>\t"; $tpl = new templates(); return "<div style='float:left;margin:4px;width:300px'>" . RoundedLightGrey($tpl->_ENGINE_parse_body($html)) . "</div>"; }
function whitelist_global_list() { $tpl = new templates(); $users = new usersMenus(); $users->LoadModulesEnabled(); $q = new mysql(); $EnableAmavisDaemon = $users->EnableAmavisDaemon; if (!$users->AMAVIS_INSTALLED) { $EnableAmavisDaemon = 0; } if (!is_numeric($EnableAmavisDaemon)) { $EnableAmavisDaemon = 0; } if ($EnableAmavisDaemon == 1) { $amavis = new amavis(); $max_score = $amavis->main_array["BEHAVIORS"]["sa_tag2_level_deflt"]; } $max_score_white_text = $tpl->javascript_parse_text("{max_score_white_text}\\n{score}:{$max_score}"); $search = '%'; $table = "postfix_global_whitelist"; $page = 1; $FORCE_FILTER = "AND `hostname`='{$_GET["hostname"]}' "; $total = 0; $MyPage = CurrentPageName(); if (!$q->TestingConnection()) { json_error_show("Connection to MySQL server failed"); } if ($q->COUNT_ROWS($table, "artica_backup") == 0) { json_error_show("{$table} empty"); } if (isset($_POST["sortname"])) { if ($_POST["sortname"] != null) { $ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}"; } } if (isset($_POST['page'])) { $page = $_POST['page']; } $searchstring = string_to_flexquery(); if ($searchstring != null) { $sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE 1 {$FORCE_FILTER} {$searchstring}"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); if (!$q->ok) { json_error_show($q->mysql_error . " LINE:" . __LINE__); } $total = $ligne["TCOUNT"]; } else { $sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE 1 {$FORCE_FILTER}"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); if (!$q->ok) { json_error_show($q->mysql_error . " LINE:" . __LINE__); } $total = $ligne["TCOUNT"]; } if (isset($_POST['rp'])) { $rp = $_POST['rp']; } $pageStart = ($page - 1) * $rp; $limitSql = "LIMIT {$pageStart}, {$rp}"; $data = array(); $data['page'] = $page; $data['total'] = $total; $data['rows'] = array(); $sql = "SELECT * FROM `{$table}` WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}"; $results = $q->QUERY_SQL($sql, "artica_backup"); if (!$q->ok) { json_error_show($q->mysql_error . " LINE:" . __LINE__); } if (mysql_num_rows($results) == 0) { json_error_show("no row"); } $score = 0; while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) { $allmxText = null; $disable = Field_checkbox("enabled_{$ligne["ID"]}", 1, $ligne["enabled"], "GlobalWhiteDisable('{$ligne["ID"]}')"); $delete = imgsimple("delete-32.png", "{delete}", "GlobalWhiteDelete('{$ligne["ID"]}')"); $modifyScore = "<a href=\"javascript:blur();\" OnClick=\"javascript:GlobalScoreModify('{$ligne["ID"]}','{$score}');\" style='text-decoration:underline;font-weight:bold'>"; $allmx = unserialize($ligne["allmx"]); if ($score == 0) { $score = "{no}"; } else { $score = "-{$ligne["score"]}"; } $icon = "datasource-32.png"; if ($EnableAmavisDaemon == 0) { $score = "{disabled}"; } if (count($allmx) > 0) { $allmxText = "<div style='font-size:11px'><i>" . @implode(", ", $allmx) . "</i></div>"; } $data['rows'][] = array('id' => $ligne['ID'], 'cell' => array("<img src='img/{$icon}'>", "<span style='font-size:16px'><code>{$ligne["sender"]}</code></span>{$allmxText}", $tpl->_ENGINE_parse_body("<span style='font-size:14px'><strong style='font-size:14px' id='score_{$ligne["ID"]}'>{$modifyScore}{$score}</a></strong></span>"), "{$disable}", $delete)); } echo json_encode($data); }
function main_services(){ $sock=new sockets(); $users=new usersMenus(); $users->LoadModulesEnabled(); if($users->DOTCLEAR_INSTALLED){ $dotclear=Paragraphe('64-dotclear.png','{APP_DOTCLEAR}','{APP_DOTCLEAR_TEXT}','dotclear.index.php','APP_DOTCLEAR_TEXT'); } if($users->OBM2_INSTALLED){ $obm2=Paragraphe('64-obm2.png','{APP_OBM2}','{APP_OBM2_TEXT}',"javascript:Loadjs('obm2.index.php')",'APP_OBM2_TEXT'); } if($users->openldap_installed){ $addressbook=Paragraphe("64-addressbook.png","{remote_addressbook}","{remote_addressbook_text}","javascript:AdressBookPopup();"); } if($users->XAPIAN_PHP_INSTALLED){ $instantsearch=Paragraphe("64-xapian.png","{InstantSearch}","{InstantSearch_text}","javascript:Loadjs('instantsearch.php');"); } if($users->OPENGOO_INSTALLED){ $opengoo=Paragraphe("64-opengoo.png","{APP_OPENGOO}","{APP_OPENGOO_TEXT}","javascript:Loadjs('opengoo.php');"); } if($users->phpldapadmin_installed){ $phpldapadmin=Paragraphe('phpldap-admin-64.png','{APP_PHPLDAPADMIN}','{APP_PHPLDAPADMIN_TEXT}',"javascript:s_PopUpFull('ldap/index.php',1024,800);","{artica_events_text}"); } if($users->MLDONKEY_INSTALLED){ $mldonkey=Paragraphe('64-emule.png','{APP_MLDONKEY}','{APP_MLDONKEY_TEXT}',"javascript:Loadjs('mldonkey.php')",""); } if($users->KAV4FS_INSTALLED){ $kav4fs=Paragraphe('bigkav-64.png','{APP_KAV4FS}','{APP_KAV4FS_TEXT}',"javascript:Loadjs('kav4fs.php')",""); } $massmailing=Paragraphe('mass-mailing-64.png','{email_campaigns}','{APP_MASSMAILING_ENABLE_TEXT}',"javascript:Loadjs('system.enable.massmailing.php');","{APP_MASSMAILING_ENABLE_TEXT}"); $userautofill=Paragraphe('member-add-64.png','{auto_account}','{auto_account_text}',"javascript:Loadjs('auto-account.php?script=yes')",'auto_account_text'); $installed_applis=Paragraphe('folder-applications-64.jpg','{installed_applications}','{installed_applications_text}','system.applications.php','installed_applications_text'); $add_remove=Paragraphe('add-remove-64.png','{application_setup}','{application_setup_txt}',"javascript:Loadjs('setup.index.php?js=yes')"); $services=Paragraphe('folder-servicesm-64.jpg','{manage_services}','{manage_services_text}','javascript:Loadjs("admin.index.services.status.php?js=yes");','manage_services_text'); if($users->BACKUPPC_INSTALLED){ $backuppc=Paragraphe('backuppc-64.png','{APP_BACKUPPC}','{APP_BACKUPPC_TEXT}',"javascript:Loadjs('backup-pc.index.php');",'APP_BACKUPPC_TEXT'); } if($users->OCSI_INSTALLED){ $ocs=Paragraphe('64-ocs.png','{APP_OCSI}','{APP_OCSI_TEXT}',"javascript:Loadjs('ocs.ng.php');",'APP_OCSI_TEXT'); } if($users->OCS_LNX_AGENT_INSTALLED){ $ocsAgent=Paragraphe('64-ocs.png','{APP_OCSI_LINUX_CLIENT}','{APP_OCSI_LINUX_CLIENT_TEXT}',"javascript:Loadjs('ocs.agent.php');",'APP_OCSI_LINUX_CLIENT_TEXT'); } if($users->APP_AUDITD_INSTALLED){ $auditd=Paragraphe('folder-watch-64.png','{APP_AUDITD}','{APP_AUDITD_TEXT}',"javascript:Loadjs('auditd.php');",'APP_AUDITD_TEXT'); } if($users->DROPBOX_INSTALLED){ $dropbox=Paragraphe('dropbox-64.png','{APP_DROPBOX}','{APP_DROPBOX_TEXT}',"javascript:Loadjs('samba.dropbox.php')",null,210,null,0,false); } if($users->APACHE_INSTALLED){ $apache=Paragraphe('apache-groupeware-64.png','{APP_GROUPWARE_APACHE}','{APP_GROUPWARE_APACHE_TEXT}',"javascript:Loadjs('apache-groupware.php')",null,210,null,0,false); } if($users->CLAMD_INSTALLED){ $clamav=Paragraphe('clamav-64.png','{clamav_protect}','{clamav_protect_disable_text}',"javascript:Loadjs('clamav.enable.php')",null,210,null,0,false); } if($users->APACHE_INSTALLED){ if($users->PUREFTP_INSTALLED){ $free_web=Paragraphe('free-web-64.png','{free_web_servers}','{free_web_servers_text}',"javascript:Loadjs('freeweb.php')",null,210,null,0,false); } } $APP_SABNZBDPLUS=Paragraphe('sab2_64-grey.png','{APP_SABNZBDPLUS}','{APP_SABNZBDPLUS_TEXT}',"",null,210,null,0,false); if($users->APP_SABNZBDPLUS_INSTALLED){ $APP_SABNZBDPLUS=Paragraphe('sab2_64.png','{APP_SABNZBDPLUS}','{APP_SABNZBDPLUS_TEXT}',"javascript:Loadjs('sabnzbdplus.php')",null,210,null,0,false); } $metaconsole=Paragraphe("artica-meta-64.png","{meta-console}","{meta-console-text}","javascript:Loadjs('artica.meta.php')",null,210,null,0,false); if($users->LXC_INSTALLED){ $LXC=Paragraphe('64-computer-alias.png','{APP_LXC}','{APP_LXC_TEXT}',"javascript:Loadjs('lxc.index.php')",null,210,null,0,false); } if($users->KASPERSKY_WEB_APPLIANCE){ $addressbook=null; $userautofill=null; $massmailing=null; $APP_SABNZBDPLUS=null; } //ApacheGroupware $tr[]=$add_remove; $tr[]=$services; $tr[]=$metaconsole; $tr[]=$backuppc; $tr[]=$auditd; $tr[]=$phpldapadmin; $tr[]=$apache; $tr[]=$free_web; $tr[]=$clamav; $tr[]=$mldonkey; $tr[]=$massmailing; $tr[]=$addressbook; $tr[]=$userautofill; $tr[]=$obm2; $tr[]=$dotclear; $tr[]=$kav4fs; $tr[]=$ocs; $tr[]=$ocsAgent; $tr[]=$dropbox; $tr[]=$LXC; $tr[]=$APP_SABNZBDPLUS; $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 valign='top'>$line</td>"; if($t==3){$t=0;$tables[]="</tr><tr>";} } if($t<3){ for($i=0;$i<=$t;$i++){ $tables[]="<td valign='top'> </td>"; } } $tables[]="</table>"; $html=implode("\n",$tables); $tpl=new templates(); $html=$tpl->_ENGINE_parse_body($html); SET_CACHED(__FILE__,__FUNCTION__,null,$html); echo $html; }
function kaspersky(){ $users=new usersMenus(); if(!$users->POSTFIX_INSTALLED){return false;} $users->LoadModulesEnabled(); $page=CurrentPageName(); if($users->kas_installed OR $users->KAV_MILTER_INSTALLED){ return LocalParagraphe("enable_kaspersky","enable_kaspersky_text","Loadjs('configure.server.php?script=enable_kasper')","bigkav24.png"); } }
function ajax_pop() { $sock = new sockets(); $users = new usersMenus(); $users->LoadModulesEnabled(); $EnableAmavisDaemon = $users->EnableAmavisDaemon; if (!$users->AMAVIS_INSTALLED) { $EnableAmavisDaemon = 0; } if (!is_numeric($EnableAmavisDaemon)) { $EnableAmavisDaemon = 0; } $EnableArticaPolicyFilter = $sock->GET_INFO("EnableArticaPolicyFilter"); $EnableArticaPolicyFilter = 0; if (!is_numeric($EnableArticaPolicyFilter)) { $EnableArticaPolicyFilter = 0; } $ArticaPolicyFilterMaxRCPTInternalDomainsOnly = $sock->GET_INFO("ArticaPolicyFilterMaxRCPTInternalDomainsOnly"); $SpamassassinMaxRCPTScore = $sock->GET_INFO("SpamassassinMaxRCPTScore"); $page = CurrentPageName(); $main = new main_cf(); $main->FillDefaults(); $message_size_limit = $sock->GET_INFO("message_size_limit"); $main->main_array["default_destination_recipient_limit"] = $sock->GET_INFO("default_destination_recipient_limit"); $main->main_array["smtpd_recipient_limit"] = $sock->GET_INFO("smtpd_recipient_limit"); $main->main_array["mime_nesting_limit"] = $sock->GET_INFO("mime_nesting_limit"); $PostfixNotifyMessagesRestrictions = $sock->GET_INFO("PostfixNotifyMessagesRestrictions"); $main = new maincf_multi("master", "master"); $header_address_token_limit = $sock->GET_INFO("header_address_token_limit"); $header_size_limit = $sock->GET_INFO("header_size_limit"); $max_rcpt_to = $main->GET("max_rcpt_to"); if (!is_numeric($message_size_limit)) { $message_size_limit = 10240000; } $main->main_array["virtual_mailbox_limit"] = $sock->GET_INFO("virtual_mailbox_limit"); $message_size_limit = $message_size_limit / 1024 / 1000; $main->main_array["virtual_mailbox_limit"] = $main->main_array["virtual_mailbox_limit"] / 1024 / 1000; if (!is_numeric($header_address_token_limit)) { $header_address_token_limit = 10240; } if (!is_numeric($header_size_limit)) { $header_size_limit = 102400; } if (!is_numeric($max_rcpt_to)) { $max_rcpt_to = 0; } if (!is_numeric($PostfixNotifyMessagesRestrictions)) { $PostfixNotifyMessagesRestrictions = 0; } $header_size_limit = $header_size_limit / 1024; if (!is_numeric($SpamassassinMaxRCPTScore)) { $SpamassassinMaxRCPTScore = 10; } $html = "\n\t\t\n\t\t<div id='messages_restriction_id'>\n\t\t\n\t\t\n\n\t\n\n\n\t\t<div style='font-size:16px'><strong>{max_rcpt_to}</strong></div>\n\t\t<table class=form style='width:99%'>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{max_rcpt_to}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('max_rcpt_to', $max_rcpt_to, 'width:60px;font-size:13px;padding:3px;text-align:right') . " {recipients} </td>\n\t\t\t<td>" . help_icon('{max_rcpt_to_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{max_rcpt_to_onlyForLocalDomains}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_checkbox("ArticaPolicyFilterMaxRCPTInternalDomainsOnly", 1, $ArticaPolicyFilterMaxRCPTInternalDomainsOnly, "ArticaPolicyFilterMaxRCPTInternalDomainsOnlySave()") . "</td>\n\t\t\t<td>" . help_icon('{max_rcpt_to_onlyForLocalDomains_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{score}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('SpamassassinMaxRCPTScore', $SpamassassinMaxRCPTScore, 'width:40px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t<td>" . help_icon('{SpamassassinMaxRCPTScore_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t\t</tr>\n\t\t</table>\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t<div style='font-size:16px'><strong>{restrictions}</strong></div>\n\t\t<table class=form style='width:99%'>\n\n\t\t\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{message_size_limit}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('message_size_limit', $message_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB</td>\n\t\t\t<td>" . help_icon('{message_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{virtual_mailbox_limit}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('virtual_mailbox_limit', $main->main_array["virtual_mailbox_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB </td>\n\t\t\t<td>" . help_icon('{virtual_mailbox_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{mime_nesting_limit}</strong>:</td>\n\t\t\t<td>" . Field_text('mime_nesting_limit', $main->main_array["mime_nesting_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t<td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{header_address_token_limit_field}</strong>:</td>\n\t\t\t<td>" . Field_text('header_address_token_limit', $header_address_token_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t<td>" . help_icon('{header_address_token_limit_explain}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{header_size_limit}:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('header_size_limit', $header_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " KB </td>\n\t\t\t<td>" . help_icon('{header_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{notify}:</td>\n\t\t\t<td style='font-size:13px'>" . Field_checkbox("PostfixNotifyMessagesRestrictions", 1, $PostfixNotifyMessagesRestrictions, "PostfixNotifyMessagesRestrictionsSave()") . "</td>\n\t\t\t<td>" . help_icon('{PostfixNotifyMessagesRestrictions_text}') . "</td>\n\t\t</tr>\n\t<tr>\n\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t</tr>\t\t\n\t\t</table>\n\t\t\n\t\t\n\t<div style='font-size:16px'><strong>{performances}</strong></div>\n\t<table class=form style='width:99%'>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{default_destination_recipient_limit}</strong>:</td>\n\t\t<td>" . Field_text('default_destination_recipient_limit', $main->main_array["default_destination_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t<td>" . help_icon('{default_destination_recipient_limit_text}') . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtpd_recipient_limit}</strong>:</td>\n\t\t<td>" . Field_text('smtpd_recipient_limit', $main->main_array["smtpd_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t<td>" . help_icon('{smtpd_recipient_limit_text}') . "</td>\n\t</tr>\n\n\n\n\t<tr>\n\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\nvar x_SaveMessagesRestrictions=function (obj) {\n\ttempvalue=obj.responseText;\n\tYahooWinSHide();\n }\t\n\t\nfunction SaveMessagesRestrictions(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('header_size_limit',document.getElementById('header_size_limit').value);\n\tXHR.appendData('message_size_limit',document.getElementById('message_size_limit').value);\n\tXHR.appendData('default_destination_recipient_limit',document.getElementById('default_destination_recipient_limit').value);\n\tXHR.appendData('smtpd_recipient_limit',document.getElementById('smtpd_recipient_limit').value);\n\tXHR.appendData('mime_nesting_limit',document.getElementById('mime_nesting_limit').value);\n\tXHR.appendData('header_address_token_limit',document.getElementById('header_address_token_limit').value);\n\tXHR.appendData('virtual_mailbox_limit',document.getElementById('virtual_mailbox_limit').value);\n\tXHR.appendData('max_rcpt_to',document.getElementById('max_rcpt_to').value);\n\tXHR.appendData('SpamassassinMaxRCPTScore',document.getElementById('SpamassassinMaxRCPTScore').value);\n\t\n\t\n\t\n\tdocument.getElementById('messages_restriction_id').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\tXHR.sendAndLoad('{$page}', 'GET',x_SaveMessagesRestrictions);\n}\t\n\nfunction PostfixNotifyMessagesRestrictionsSave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('PostfixNotifyMessagesRestrictions').checked){\n\t\tXHR.appendData('PostfixNotifyMessagesRestrictions',1);\n\t}else{\n\t\tXHR.appendData('PostfixNotifyMessagesRestrictions',0);\n\t}\n\tXHR.sendAndLoad('{$page}', 'GET');\n}\n\nfunction ArticaPolicyFilterMaxRCPTInternalDomainsOnlySave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('ArticaPolicyFilterMaxRCPTInternalDomainsOnly').checked){\n\t\tXHR.appendData('ArticaPolicyFilterMaxRCPTInternalDomainsOnly',1);\n\t}else{\n\t\tXHR.appendData('ArticaPolicyFilterMaxRCPTInternalDomainsOnly',0);\n\t}\n\tXHR.sendAndLoad('{$page}', 'GET');\n}\n\n\nfunction CheckRequiredRestrictionsFields(){\n\tvar EnableArticaPolicyFilter={$EnableAmavisDaemon};\n\tif(EnableArticaPolicyFilter==0){\n\t\tdocument.getElementById('ArticaPolicyFilterMaxRCPTInternalDomainsOnly').disabled=true;\n\t\tdocument.getElementById('SpamassassinMaxRCPTScore').disabled=true;\n\t}\n}\n\n\nCheckRequiredRestrictionsFields();\n</script>\n\t\n\t\n\t"; $tpl = new templates(); echo $tpl->_parse_body($html); }
function SERVICES_STATUS() { if ($_GET["section"] == "index") { INDEX(); exit; } $ini = new Bs_IniHandler(); $sock = new sockets(); $GLOBALS["ArticaWatchDogList"] = unserialize(base64_decode($sock->GET_INFO("ArticaWatchDogList"))); $users = new usersMenus(); $users->LoadModulesEnabled(); if ($_GET["section"] == null) { $_GET["section"] = "artica_services"; } //echo($sock->getfile('daemons_status')); $table_header = "<tr>\n\t\t<th width=1% style='{$style1}{$style2}'> </td>\n\t\t<th nowrap>{daemon}</td>\n\t\t<th nowrap> </td>\n\t\t<th width=1% nowrap>{memory}</td>\n\t\t<th width=1% nowrap>{virtual_memory}</td>\n\t\t<th width=1%>{version}</td>\n\t\t<th nowrap >{uptime}</td>\n\t\t</tr>"; $inifile = dirname(__FILE__) . "/ressources/logs/global.status.ini"; $ini->loadFile($inifile); if ($_GET["section"] == "artica_services") { $html = "\n\t\t\t<div style='heigth:550px;overflow:auto'>\n\t\t\t<table style='width:98%;margin:0px;padding:5px;'>{$table_header}"; if ($users->VMWARE_HOST) { if ($users->VMWARE_TOOLS_INSTALLED) { $html = $html . BuildRow($users, $ini->_params["APP_VMTOOLS"], "{APP_VMTOOLS}"); } } if ($users->VIRTUALBOX_HOST) { if ($users->APP_VBOXADDINTION_INSTALLED) { $html = $html . BuildRow($users, $ini->_params["APP_VBOXADDITIONS"], "{APP_VBOXADDITIONS}"); } } $html = $html . BuildRow($users, $ini->_params["ARTICA"], "{APP_ARTICA}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_NOTIFIER"], "{APP_ARTICA_NOTIFIER}"); $html = $html . BuildRow($users, $ini->_params["LIGHTTPD"], "{APP_LIGHTTPD}"); $html = $html . BuildRow($users, $ini->_params["ARTICA_WATCHDOG"], "{APP_ARTICA_WATCHDOG}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_STATUS"], "{APP_ARTICA_STATUS}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_EXECUTOR"], "{APP_ARTICA_EXECUTOR}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_BACKGROUND"], "{APP_ARTICA_BACKGROUND}"); $html = $html . BuildRow($users, $ini->_params["APP_SYSLOGER"], "{APP_SYSLOGER}"); $html = $html . BuildRow($users, $ini->_params["SASLAUTHD"], "{APP_SASLAUTHD}"); $html = $html . BuildRow($users, $ini->_params["BOA"], "{APP_BOA}"); $html = $html . BuildRow($users, $ini->_params["FRAMEWORK"], "{APP_FRAMEWORK}"); $html = $html . BuildRow($users, $ini->_params["APP_APACHE_SRC"], "{APP_APACHE_SRC}"); $html = $html . BuildRow($users, $ini->_params["APP_TOMCAT"], "{APP_TOMCAT}"); $html = $html . BuildRow($users, $ini->_params["APP_GROUPWARE_APACHE"], "{APP_GROUPWARE_APACHE}"); $html = $html . BuildRow($users, $ini->_params["LDAP"], "{APP_LDAP}"); $html = $html . BuildRow($users, $ini->_params["ARTICA_MYSQL"], "{APP_MYSQL_ARTICA}"); $html = $html . BuildRow($users, $ini->_params["APP_GREENSQL"], "{APP_GREENSQL}"); $html = $html . BuildRow($users, $ini->_params["APP_PDNS"], "{APP_PDNS}"); $html = $html . BuildRow($users, $ini->_params["APP_PDNS_INSTANCE"], "{APP_PDNS_INSTANCE}"); $html = $html . BuildRow($users, $ini->_params["PDNS_RECURSOR"], "{APP_PDNS_RECURSOR}"); $html = $html . BuildRow($users, $ini->_params["DNSMASQ"], "{APP_DNSMASQ}"); $html = $html . BuildRow($users, $ini->_params["APP_DDCLIENT"], "{APP_DDCLIENT}"); $html = $html . BuildRow($users, $ini->_params["BIND9"], "{APP_BIND9}"); $html = $html . BuildRow($users, $ini->_params["DHCPD"], "{APP_DHCP}"); $html = $html . BuildRow($users, $ini->_params["APP_NSCD"], "{APP_NSCD}"); $html = $html . BuildRow($users, $ini->_params["APP_ARPD"], "{APP_ARPD}"); if (!$users->KASPERSKY_WEB_APPLIANCE) { $html = $html . BuildRow($users, $ini->_params["CLAMAV"], "{APP_CLAMAV}"); $html = $html . BuildRow($users, $ini->_params["FRESHCLAM"], "{APP_FRESHCLAM}"); } $html = $html . BuildRow($users, $ini->_params["APP_SNORT"], "{APP_SNORT}"); while (list($key, $array) = each($ini->_params)) { if (preg_match("#APP_SNORT:(.+)#", $key, $re)) { $html = $html . BuildRow($users, $ini->_params[$key], "{APP_SNORT}", $re[1]); } } reset($ini->_params); $html = $html . BuildRow($users, $ini->_params["APP_KAV4FS"], "{APP_KAV4FS}"); $html = $html . BuildRow($users, $ini->_params["APP_KAV4FS_AVS"], "{APP_KAV4FS_AVS}"); $html = $html . BuildRow($users, $ini->_params["APP_OCSI"], "{APP_OCSI}"); $html = $html . BuildRow($users, $ini->_params["APP_OCSI_DOWNLOAD"], "{APP_OCSI_DOWNLOAD}"); $html = $html . BuildRow($users, $ini->_params["APP_OCSI_LINUX_CLIENT"], "{APP_OCSI_LINUX_CLIENT}"); $html = $html . BuildRow($users, $ini->_params["KRETRANSLATOR_HTTPD"], "{APP_KRETRANSLATOR_HTTPD}"); $html = $html . BuildRow($users, $ini->_params["SYSLOGNG"], "{APP_SYSLOGNG}"); $html = $html . BuildRow($users, $ini->_params["APP_OPENSSH"], "{APP_OPENSSH}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_AUTH_TAIL"], "{APP_ARTICA_AUTH_TAIL}"); $html = $html . BuildRow($users, $ini->_params["COLLECTD"], "{APP_COLLECTD}"); $html = $html . BuildRow($users, $ini->_params["SMARTD"], "{APP_SMARTMONTOOLS}"); $html = $html . BuildRow($users, $ini->_params["APP_AUDITD"], "{APP_AUDITD}"); $html = $html . BuildRow($users, $ini->_params["APP_VNSTAT"], "{APP_VNSTAT}"); $html = $html . BuildRow($users, $ini->_params["APP_ZABBIX_SERVER"], "{APP_ZABBIX_SERVER}"); $html = $html . BuildRow($users, $ini->_params["APP_ZABBIX_AGENT"], "{APP_ZABBIX_AGENT}"); $html = $html . BuildRow($users, $ini->_params["IPTABLES"], "{APP_IPTABLES}"); $html = $html . BuildRow($users, $ini->_params["APP_AMACHI"], "{APP_AMACHI}"); $html = $html . BuildRow($users, $ini->_params["NTPD"], "{APP_NTPD}"); $html = $html . BuildRow($users, $ini->_params["APP_AUTOFS"], "{APP_AUTOFS}"); $html = $html . BuildRow($users, $ini->_params["APP_NFS"], "{APP_NFS}"); $html = $html . BuildRow($users, $ini->_params["PRELOAD"], "{APP_PRELOAD}"); $html = $html . BuildRow($users, $ini->_params["CONSOLEKIT"], "{APP_CONSOLEKIT}"); $html = $html . BuildRow($users, $ini->_params["GDM"], "{APP_GDM}"); $html = $html . BuildRow($users, $ini->_params["XFCE"], "{APP_XFCE}"); $html = $html . BuildRow($users, $ini->_params["INETD"], "{APP_INETD}"); $html = $html . BuildRow($users, $ini->_params["APP_RSYNC"], "{APP_RSYNC}"); $html = $html . BuildRow($users, $ini->_params["OBM2"], "{APP_OBM2}"); $html = $html . BuildRow($users, $ini->_params["DOTCLEAR"], "{APP_DOTCLEAR}"); $html = $html . BuildRow($users, $ini->_params["PUREFTPD"], "{APP_PUREFTPD}"); $html = $html . BuildRow($users, $ini->_params["APP_MLDONKEY"], "{APP_MLDONKEY}"); $html = $html . BuildRow($users, $ini->_params["APP_DROPBOX"], "{APP_DROPBOX}"); $html = $html . BuildRow($users, $ini->_params["APP_SABNZBDPLUS"], "{APP_SABNZBDPLUS}"); $html = $html . "</table></div>"; $html_A = $html; } if ($_GET["section"] == "postfix_services") { if ($users->POSTFIX_INSTALLED) { $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance"); $html = "\n\t\t\t\t<div style='heigth:550px;overflow:auto'>\n\t\t\t\t<table style='width:98%;margin:0px;padding:5px;'>{$table_header}"; $html = $html . BuildRow($users, $ini->_params["POSTFIX"], "{APP_POSTFIX}"); if ($EnablePostfixMultiInstance == 1) { reset($ini->_params); while (list($key, $array) = each($ini->_params)) { if (preg_match("#POSTFIX-MULTI-(.+)#", $key, $re)) { $html = $html . BuildRow($users, $ini->_params["{$key}"], "{APP_POSTFIX}", $re[1]); } if (preg_match("#APP_CROSSROADS:(.+)#", $key, $re)) { $html = $html . BuildRow($users, $ini->_params["{$key}"], "{APP_CROSSROADS}", $re[1]); } } } reset($ini->_params); while (list($key, $array) = each($ini->_params)) { if (preg_match("#APP_POSTFWD2:(.+)#", $key, $re)) { $html = $html . BuildRow($users, $ini->_params[$key], "{APP_POSTFWD2}", $re[1]); } } reset($ini->_params); $html = $html . BuildRow($users, $ini->_params["APP_CROSSROADS"], "{APP_CROSSROADS}"); $html = $html . BuildRow($users, $ini->_params["ARTICA_MYSQMAIL"], "{APP_ARTICA_MYSQMAIL}"); $html = $html . BuildRow($users, $ini->_params["APP_POSTFILTER"], "{APP_POSTFILTER}"); $html = $html . BuildRow($users, $ini->_params["JCHECKMAIL"], "{APP_JCHECKMAIL}"); $html = $html . BuildRow($users, $ini->_params["MILTER_GREYLIST"], "{APP_MILTERGREYLIST}"); $html = $html . BuildRow($users, $ini->_params["ASSP"], "{APP_ASSP}"); $html = $html . BuildRow($users, $ini->_params["AMAVISD"], "{APP_AMAVISD_NEW}"); $html = $html . BuildRow($users, $ini->_params["AMAVISD_MILTER"], "{APP_AMAVISD_MILTER}"); $html = $html . BuildRow($users, $ini->_params["APP_CLUEBRINGER"], "{APP_CLUEBRINGER}"); $html = $html . BuildRow($users, $ini->_params["APP_OPENDKIM"], "{APP_OPENDKIM}"); $html = $html . BuildRow($users, $ini->_params["APP_MILTER_DKIM"], "{APP_MILTER_DKIM}"); $html = $html . BuildRow($users, $ini->_params["MAILARCHIVER"], "{APP_MAILARCHIVER}"); $html = $html . BuildRow($users, $ini->_params["DKIM_FILTER"], "{APP_DKIM_FILTER}"); $html = $html . BuildRow($users, $ini->_params["MIMEDEFANG"], "{APP_MIMEDEFANG}"); $html = $html . BuildRow($users, $ini->_params["MIMEDEFANGX"], "{APP_MIMEDEFANGX}"); $html = $html . BuildRow($users, $ini->_params["CLAMAV_MILTER"], "{APP_CLAMAV_MILTER}"); $html = $html . BuildRow($users, $ini->_params["MAILFROMD"], "{APP_MAILFROMD}"); $html = $html . BuildRow($users, $ini->_params["SQLGREY"], "{APP_SQLGREY}"); $html = $html . BuildRow($users, $ini->_params["SPAMASS_MILTER"], "{APP_SPAMASS_MILTER}"); $html = $html . BuildRow($users, $ini->_params["SPAMASSASSIN"], "{APP_SPAMASSASSIN}"); $html = $html . BuildRow($users, $ini->_params["KAVMILTER"], "{APP_KAVMILTER}"); $html = $html . BuildRow($users, $ini->_params["KAS3"], "{APP_KAS3}"); $html = $html . BuildRow($users, $ini->_params["KAS_MILTER"], "{APP_KAS3_MILTER}"); $html = $html . BuildRow($users, $ini->_params["MAILMAN"], "{APP_MAILMAN}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_POLICY"], "{APP_ARTICA_POLICY}"); $html = $html . BuildRow($users, $ini->_params["STUNNEL"], "{APP_STUNNEL}"); $html = $html . "</table></div>"; $html_B = $html; } } if ($_GET["section"] == "squid_services") { if ($users->SQUID_INSTALLED) { $html = "<table style='width:98%;margin:0px;padding:5px;'>{$table_header}"; $html = $html . BuildRow($users, $ini->_params["SQUID"], "{APP_SQUID}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_SQUID_TAIL"], "{APP_ARTICA_SQUID_TAIL}"); $html = $html . BuildRow($users, $ini->_params["APP_SQUID_CLAMAV_TAIL"], "{APP_SQUID_CLAMAV_TAIL}"); $html = $html . BuildRow($users, $ini->_params["KAV4PROXY"], "{APP_KAV4PROXY}"); $html = $html . BuildRow($users, $ini->_params["DANSGUARDIAN"], "{APP_DANSGUARDIAN}"); $html = $html . BuildRow($users, $ini->_params["ARTICA_DANS_TAIL"], "{APP_ARTICA_DANSGUARDIAN_TAIL}"); $html = $html . BuildRow($users, $ini->_params["APP_PROXY_PAC"], "{APP_PROXY_PAC}"); $html = $html . BuildRow($users, $ini->_params["APP_SQUIDGUARD_HTTP"], "{APP_SQUIDGUARD_HTTP}"); $html = $html . BuildRow($users, $ini->_params["APP_ARTICA_SQUIDGUARDTAIL"], "{APP_ARTICA_SQUIDGUARDTAIL}"); $html = $html . BuildRow($users, $ini->_params["APP_UFDBGUARD"], "{APP_UFDBGUARD}"); $html = $html . BuildRow($users, $ini->_params["APP_UFDBGUARD_TAIL"], "{APP_UFDBGUARD_TAIL}"); $html = $html . "</table></div>"; $html_C = $html; } } if ($_GET["section"] == "mail_services") { $html = "\n\t\t<div style='heigth:550px;overflow:auto'>\n\t\t<table style='width:98%;margin:0px;padding:5px;'>{$table_header}"; $html = $html . BuildRow($users, $ini->_params["CYRUSIMAP"], "{APP_CYRUS}"); $html = $html . BuildRow($users, $ini->_params["ROUNDCUBE"], "{APP_ROUNDCUBE}"); $arrayZarafa[] = "APP_ZARAFA"; $arrayZarafa[] = "APP_ZARAFA_GATEWAY"; $arrayZarafa[] = "APP_ZARAFA_SPOOLER"; $arrayZarafa[] = "APP_ZARAFA_WEB"; $arrayZarafa[] = "APP_ZARAFA_MONITOR"; $arrayZarafa[] = "APP_ZARAFA_DAGENT"; $arrayZarafa[] = "APP_ZARAFA_ICAL"; $arrayZarafa[] = "APP_ZARAFA_INDEXER"; $arrayZarafa[] = "APP_ZARAFA_LICENSED"; while (list($num, $ligne) = each($arrayZarafa)) { $html = $html . BuildRow($users, $ini->_params[$ligne], "{{$ligne}}"); } $html = $html . BuildRow($users, $ini->_params["FETCHMAIL"], "{APP_FETCHMAIL}"); $html = $html . BuildRow($users, $ini->_params["FETCHMAIL_LOGGER"], "{APP_FETCHMAIL_LOGGER}"); $html = $html . BuildRow($users, $ini->_params["P3SCAN"], "{APP_P3SCAN}"); $html = $html . BuildRow($users, $ini->_params["OBM_APACHE"], "{APP_OBM_APACHE}"); $html = $html . "</table></div>"; $html_D = $html; } if ($_GET["section"] == "samba_services") { if ($users->SAMBA_INSTALLED) { $html = "\n\t\t\t<div style='heigth:550px;overflow:auto'>\n\t\t\t<table style='width:98%;margin:0px;padding:5px;'>{$table_header}"; $html = $html . BuildRow($users, $ini->_params["SAMBA_SMBD"], "{APP_SAMBA_SMBD}"); $html = $html . BuildRow($users, $ini->_params["SAMBA_NMBD"], "{APP_SAMBA_NMBD}"); $html = $html . BuildRow($users, $ini->_params["SAMBA_WINBIND"], "{APP_SAMBA_WINBIND}"); $html = $html . BuildRow($users, $ini->_params["APP_GREYHOLE"], "{APP_GREYHOLE}"); $html = $html . BuildRow($users, $ini->_params["APP_AUDITD"], "{APP_AUDITD}"); $html = $html . BuildRow($users, $ini->_params["SAMBA_SCANNEDONLY"], "{APP_SCANNED_ONLY}"); $html = $html . BuildRow($users, $ini->_params["KAV4SAMBA"], "{APP_KAV4SAMBA}"); $html = $html . BuildRow($users, $ini->_params["APP_KAV4FS"], "{APP_KAV4FS}"); $html = $html . BuildRow($users, $ini->_params["APP_KAV4FS_AVS"], "{APP_KAV4FS_AVS}"); $html = $html . BuildRow($users, $ini->_params["CUPS"], "{APP_CUPS}"); $html = $html . BuildRow($users, $ini->_params["APP_MLDONKEY"], "{APP_MLDONKEY}"); $html = $html . BuildRow($users, $ini->_params["APP_BACKUPPC"], "{APP_BACKUPPC}"); $html = $html . BuildRow($users, $ini->_params["APP_OCSI"], "{APP_OCSI}"); $html = $html . BuildRow($users, $ini->_params["APP_OCSI_DOWNLOAD"], "{APP_OCSI_DOWNLOAD}"); $html = $html . BuildRow($users, $ini->_params["APP_DROPBOX"], "{APP_DROPBOX}"); $html = $html . BuildRow($users, $ini->_params["APP_OPENSSH"], "{APP_OPENSSH}"); $html = $html . BuildRow($users, $ini->_params["APP_SABNZBDPLUS"], "{APP_SABNZBDPLUS}"); $html = $html . "</table></div>"; $html_F = $html; } } $artica_services = "{$html_A}<br>"; $postfix_services = "{$html_B}<br>"; $mail_services = "{$html_D}<br>"; $samba_services = "{$html_F}<br>"; $squid_services = "{$html_C}<br>"; switch ($_GET["section"]) { case "artica_services": $services = $artica_services; break; case "postfix_services": $services = $postfix_services; break; case "mail_services": $services = $mail_services; break; case "samba_services": $services = $samba_services; break; case "squid_services": $services = $squid_services; break; default: $services = $artica_services; break; } $html_E = "\n\t<input type='hidden' name='service_switch' id='service_switch' value='{$_GET["section"]}'>\n\t</center>\n\t\t{$services}\n\t</center>"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html_E); }
function main_settings($noecho = 0) { $amavis = new amavis(); $page = CurrentPageName(); $users = new usersMenus(); $users->LoadModulesEnabled(); $array = array("D_PASS" => "{D_PASS}", "D_DISCARD" => "{D_DISCARD}", "D_BOUNCE" => "{D_BOUNCE}"); $kas3 = Paragraphe('folder-caterpillar.png', '{APP_KAS3}', '{KAS3_TEXT}', 'javascript:Loadjs("kas.group.rules.php?ajax=yes")', null, 210, null, 0, true); $kas3_bad = Paragraphe('folder-caterpillar-grey.png', '{APP_KAS3}', '{feature_disabled}', null, null, 210, null, 0, true); if ($users->kas_installed) { if ($users->KasxFilterEnabled) { $kas = $kas3; } else { $kas = $kas3_bad; } } $trustlocal = Paragraphe("network-connection2.png", '{trust_local}', '{trust_local_text}', "javascript:Loadjs('{$page}?script=trustlocal')", null, 210, 100); $localNetwork = Paragraphe("64-ip-settings.png", '{local_network}', '{local_network_text}', "javascript:Loadjs('{$page}?script=localnetwork')", null, 210, 100); $filterbhavior = Paragraphe("64-milter-behavior.png", '{filter_behavior}', '{filter_behavior_text}', "javascript:Loadjs('{$page}?script=filterbehavior')", null, 210, 100); $notification = Paragraphe("mail4-64.png", '{smtp_notification}', '{notification_text}', "javascript:Loadjs('{$page}?script=notification')", null, 210, 100); $spamassassin = Paragraphe("folder-64-spamassassin-grey.png", '{spamassassin}', '{feature_not_installed}', null, null, 210, 100); $whitelist = Paragraphe("folder-64-spamassassin-grey.png", '{spamassassin}', '{feature_not_installed}', null, null, 210, 100); $pieces_jointes = Paragraphe("pieces-jointes.png", '{filter_extension}', '{filter_extension_text}', "javascript:Loadjs('{$page}?script=filterextension')", null, 210, 100); if ($users->spamassassin_installed) { $spamassassin = Paragraphe("folder-64-spamassassin.png", '{spamassassin}', '{spamassassin_text}', "javascript:Loadjs('{$page}?script=spamassassin')", null, 210, 100); } //$apply=Paragraphe('system-64.png','{apply config}','{APPLY_SETTINGS_AMAVIS}',"javascript:Loadjs('$page?script=apply')",'APPLY_SETTINGS_AMAVIS',210,100); $apply = Buildicon64("DEF_ICO_AMAVIS_RESTART", 210, 100); $prepost = Paragraphe("folder-equerre-64.png", '{postfix_hooking}', '{postfix_hooking_text}', "javascript:Loadjs('{$page}?hooking-js=yes')", 'postfix_hooking_text', 210, 100); $spf = Paragraphe("spf-logo-64.png", '{APP_SPF}', '{APP_SPF_TINY_TEXT}', "javascript:Loadjs('spamassassin.spf.php')", 'APP_SPF_TINY_TEXT', 210, 100); $users = new usersMenus(); if ($users->CLAMD_INSTALLED) { $sanesecurity = Paragraphe('folder-64-denywebistes.png', 'SaneSecurity signatures', '{sanesecurity_text}', "javascript:Loadjs('{$page}?sanesecurity-js=yes')", 'sanesecurity_text', 210, 100); } $html = "\n\t<H5>{global_settings}</H5>\n\t<table>\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$trustlocal}</td>\n\t\t\t<td valign='top' >{$filterbhavior}</td>\n\t\t\t<td valign='top' >{$apply}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$pieces_jointes}</td>\n\t\t\t<td valign='top'>{$spf}</td>\n\t\t\t<td valign='top' >{$spamassassin}</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<td valign='top'>{$prepost}</td>\n\t\t\t<td valign='top' >{$notification}</td>\n\t\t\t<td valign='top'>{$sanesecurity}</td>\t\t\t\n\t\t\t</tr>\n\t\t\t\n\t</table>\n\t\n\t\n\t"; $tpl = new templates(); if ($noecho == 0) { echo $tpl->_ENGINE_parse_body($html); } else { return $tpl->_ENGINE_parse_body($html, 'postfix.index.php'); } }
function IS_DISCLAIMER() { $disclaimer = true; $users = new usersMenus(); $sock = new sockets(); $users->LoadModulesEnabled(); $POSTFIX_INSTALLED = $users->POSTFIX_INSTALLED; $ALTERMIME_INSTALLED = $users->ALTERMIME_INSTALLED; $EnableAlterMime = $sock->GET_INFO('EnableAlterMime'); $EnableArticaSMTPFilter = $sock->GET_INFO("EnableArticaSMTPFilter"); $EnableArticaSMTPFilter = 0; $DisclaimerOrgOverwrite = $sock->GET_INFO("DisclaimerOrgOverwrite"); if (!$POSTFIX_INSTALLED) { $disclaimer = false; } if (!$ALTERMIME_INSTALLED) { $disclaimer = false; } if ($EnableAlterMime == 1) { if ($EnableArticaSMTPFilter == 0) { $disclaimer = false; } } if ($DisclaimerOrgOverwrite == 0) { $disclaimer = false; } if ($disclaimer == false) { return false; } $user = new user($_SESSION["uid"]); if (!preg_match("#(.+?)@(.+)#", $user->mail, $re)) { return false; } $dd = new domains_disclaimer($user->ou, trim(strtolower($re[2]))); if ($dd->DisclaimerActivate == "FALSE") { return false; } if ($dd->DisclaimerUserOverwrite == "FALSE") { return false; } return $disclaimer; }
function security_postfix(){ $hostname=$_GET["hostname"]; $user=new usersMenus(); $user->LoadModulesEnabled(); $md=md5($hostname); $tpl=new templates(); $sock=new sockets(); $page=CurrentPageName(); $q=new mysql(); $main=new maincf_multi($hostname); $ou=$main->ou; $ou_encoded=base64_encode($ou); $spamass=new spamassassin(); $EnablePostfixMultiInstance=$sock->GET_INFO("EnablePostfixMultiInstance"); $SpamassassinMaxRCPTScore=$sock->GET_INFO("SpamassassinMaxRCPTScore"); if($hostname=="master"){ $message_size_limit=$sock->GET_INFO("message_size_limit"); $max_rcpt_to=$main->GET("max_rcpt_to"); } $stylea="style='font-size:13px;text-decoration:underline;font-weight:bold'"; $GLOBALS["STYLEA"]=$stylea; if(!is_numeric($SpamassassinMaxRCPTScore)){$SpamassassinMaxRCPTScore=10;} if(!is_numeric($message_size_limit)){$message_size_limit=10240000;} if($message_size_limit==0){$message_size_limit="{unlimited}";}else{ $message_size_limit=FormatBytes($message_size_limit/1024); } $js_messagelimit="Loadjs('postfix.messages.restriction.php?script=yes');"; if(!is_numeric($max_rcpt_to)){$max_rcpt_to=0;} if($max_rcpt_to==0){$max_rcpt_to="{unlimited}";} //regex $data=unserialize(base64_decode($main->GET_BIGDATA("header_check"))); $header_content_filters_rules=0; if(is_array($data)){while (list ($num, $ligne) = each ($data)){if($ligne==null){continue;}$header_content_filters_rules++;}} if($header_content_filters_rules==0){$header_content_filters_rules="{no_rules}";}else{$header_content_filters_rules="$header_content_filters_rules {rules}";} $check_client_access=0; $data=unserialize(base64_decode($main->GET_BIGDATA("check_client_access"))); if(is_array($data)){while (list ($num, $ligne) = each ($data)){if($ligne==null){continue;}$check_client_access++;}} if($check_client_access==0){$check_client_access="{no_rules}";}else{$check_client_access="$check_client_access {rules}";} $EnableBodyChecks=$main->GET("EnableBodyChecks"); if(!is_numeric($EnableBodyChecks)){$EnableBodyChecks=0;} $EnableBodyChecks_text="{disabled}"; if($EnableBodyChecks==1){$EnableBodyChecks_text="{enabled}";} $sql="SELECT COUNT(*) as tcount FROM postfix_regex_words WHERE `hostname`='{$_GET["hostname"]}' AND enabled=1"; $ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup")); if($ligne["tcount"]==0){$EnableBodyChecks_rules="{no_rules}";}else{$EnableBodyChecks_rules="{$ligne["tcount"]} {rules}";} $js_iptables="Loadjs('postfix.iptables.php');"; $js_regex="Loadjs('domains.postfix.multi.regex.php?ou=$ou&hostname=$hostname');"; $EnablePostfixAutoBlock=$sock->GET_INFO("EnablePostfixAutoBlock"); if(!is_numeric($EnablePostfixAutoBlock)){$EnablePostfixAutoBlock=0;} $EnablePostfixAutoBlock_text="{disabled}"; if($EnablePostfixAutoBlock==1){$EnablePostfixAutoBlock_text="{enabled}";} $sql="SELECT COUNT(*) AS tcount FROM iptables WHERE local_port=25 AND flux='INPUT' AND disable=0"; $ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup")); if($ligne["tcount"]==0){$PostfixAutoBlock_rules="{no_rules}";}else{$PostfixAutoBlock_rules="{$ligne["tcount"]} {rules}";} $smtpd_client_restrictions_js="Loadjs('postfix.smtpd_client_restrictions.php');"; $EnablePostfixAntispamPack_value=$sock->GET_INFO('EnablePostfixAntispamPack'); $EnableGenericrDNSClients=$sock->GET_INFO("EnableGenericrDNSClients"); $reject_forged_mails=$sock->GET_INFO('reject_forged_mails'); $PostfixHideClientMua=$sock->GET_INFO("PostfixHideClientMua"); $PostfixHideClientMua_js="Loadjs('postfix.hide.headers.php')"; $EnablePostfixInternalDomainsCheck=$sock->GET_INFO('EnablePostfixInternalDomainsCheck'); $RestrictToInternalDomains=$sock->GET_INFO('RestrictToInternalDomains'); $reject_unknown_client_hostname=$sock->GET_INFO('reject_unknown_client_hostname'); $reject_unknown_reverse_client_hostname=$sock->GET_INFO('reject_unknown_reverse_client_hostname'); $reject_unknown_sender_domain=$sock->GET_INFO('reject_unknown_sender_domain'); $reject_invalid_hostname=$sock->GET_INFO('reject_invalid_hostname'); $reject_non_fqdn_sender=$sock->GET_INFO('reject_non_fqdn_sender'); if($reject_unknown_client_hostname==1){$reject_unknown_client_hostname="{enabled}";}else{$reject_unknown_client_hostname="{disabled}";} if($reject_unknown_reverse_client_hostname==1){$reject_unknown_reverse_client_hostname="{enabled}";}else{$reject_unknown_reverse_client_hostname="{disabled}";} if($reject_unknown_sender_domain==1){$reject_unknown_sender_domain="{enabled}";}else{$reject_unknown_sender_domain="{disabled}";} if($reject_invalid_hostname==1){$reject_invalid_hostname="{enabled}";}else{$reject_invalid_hostname="{disabled}";} if($reject_non_fqdn_sender==1){$reject_non_fqdn_sender="{enabled}";}else{$reject_non_fqdn_sender="{disabled}";} if($RestrictToInternalDomains==1){$RestrictToInternalDomains="{enabled}";}else{$RestrictToInternalDomains="{disabled}";} if($PostfixHideClientMua==1){$PostfixHideClientMua="{enabled}";}else{$PostfixHideClientMua="{disabled}";} //Postscreen ------------------------------------------------------------------------------------ $postscreen_js="Loadjs('postscreen.php?hostname=$hostname&ou=$ou');"; $EnablePostScreen=$main->GET("EnablePostScreen"); if(!$user->POSTSCREEN_INSTALLED){$EnablePostScreen=0;} $postscreen_dnsbl_action=$main->GET("postscreen_dnsbl_action"); if($EnablePostScreen==1){$EnablePostScreen="{enabled}";$postscreen_dnsbl_action="$postscreen_dnsbl_action";}else{$EnablePostScreen="{disabled}";$postscreen_dnsbl_action="{disabled}";} $data=unserialize(base64_decode($main->GET_BIGDATA("postscreen_dnsbl_sites"))); $postscreen_dnsbl_count=0; while (list ($num, $ligne) = each ($data)){if($ligne==null){continue;}$postscreen_dnsbl_count++;} if($postscreen_dnsbl_count==0){$postscreen_dnsbl_count="{no_rules}";}else{$postscreen_dnsbl_count="$postscreen_dnsbl_count {rules}";} //milter-greylist {gl_YES-QUICK} ------------------------------------------------------------------------------------ $mgreylist_js="Loadjs('milter.greylist.index.php?js=yes');"; $mgreylist=new milter_greylist(true,$hostname,$ou); $MilterGreyListEnabled=$mgreylist->MilterGreyListEnabled; if(!$user->MILTERGREYLIST_INSTALLED){$MilterGreyListEnabled=0;} $mgreylist_delay="{$mgreylist->main_array["greylist"]} {$mgreylist->main_array["greylist_TIME"]}"; if($MilterGreyListEnabled==1){$MilterGreyListEnabled="{enabled} $mgreylist_delay";}else{$MilterGreyListEnabled="{disabled}";} //Blacklist: ------------------------------------------------------------------------------------ $Blacklist_js="Loadjs('whitelists.admin.php?js=yes')"; $sql="SELECT COUNT(*) as tcount FROM postfix_global_blacklist WHERE enabled=1"; $ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup")); if($ligne["tcount"]==0){$Blacklist_rules="{no_rules}";}else{$Blacklist_rules="{$ligne["tcount"]} {rules}";} //Attachments ------------------------------------------------------------------------------------ $enable_attachment_blocking_postfix=$main->GET("enable_attachment_blocking_postfix"); $attachs_js="Loadjs('domains.edit.attachblocking.ou.php?ou=$ou_encoded&hostname=$hostname');"; if($EnablePostfixMultiInstance){$hostnameq=" AND hostname='$hostname'";} $ou_q=$ou; if($hostname=="master"){$ou_q="_Global";} $sql="SELECT count(*) as tcount FROM smtp_attachments_blocking WHERE ou='$ou_q'$hostnameq"; $ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup")); if($ligne["tcount"]==0){$attachs_rules="{no_rules}";}else{$attachs_rules="{$ligne["tcount"]} {rules}";} if($enable_attachment_blocking_postfix==1){$enable_attachment_blocking_postfix="{enabled}";}else{$enable_attachment_blocking_postfix="{disabled}";} //Kas3 ------------------------------------------------------------------------------------ $ou_kas=$ou; if($hostname=="master"){$ou_q=base64_encode("default");$ou_kas="default";} $kas_js="Loadjs('domains.edit.kas.php?ou=$ou_q');"; $kas=new kas_mysql($ou_kas); $KasxFilterEnabled=$sock->GET_INFO("KasxFilterEnabled"); $OPT_FILTRATION_ON=$kas->GET_KEY("OPT_FILTRATION_ON"); $OPT_PROBABLE_SPAM_ON=$kas->GET_KEY("OPT_PROBABLE_SPAM_ON"); $ACTION_SPAM_MODE=$kas->GET_KEY("ACTION_SPAM_MODE"); $ACTION_PROBABLE_MODE=$kas->GET_KEY("ACTION_PROBABLE_MODE"); if(!$user->kas_installed){$KasxFilterEnabled=0;} if($KasxFilterEnabled==0){$OPT_FILTRATION_ON=0;$OPT_PROBABLE_SPAM_ON=0;} $OPT_SPAM_RATE_LIMIT=$kas->GET_KEY("OPT_SPAM_RATE_LIMIT"); $OPT_SPAM_RATE_LIMIT_TABLE=array(4=>"{maximum}",3=>"{high}",2=>"{normal}",1=>"{minimum}"); if(!is_numeric($OPT_SPAM_RATE_LIMIT)){$OPT_SPAM_RATE_LIMIT=3;} if($OPT_FILTRATION_ON==1){$kas_text="{level}:{$OPT_SPAM_RATE_LIMIT_TABLE[$OPT_SPAM_RATE_LIMIT]}";}else{$kas_text="{disabled}";$ACTION_SPAM_MODE=-4;$ACTION_PROBABLE_MODE=-4;} if($OPT_PROBABLE_SPAM_ON==1){$kas_probable="{enabled}";}else{$kas_probable="{disabled}";} $kas_action_message=array(0=>"{acceptmessage}",1=>"{kassendcopy}",2=>"{quarantine}",-1=>"{kasreject}",-3=>"{kasdelete}",-4=>"{disabled}"); $ACTION_SPAM_MODE=$kas_action_message[$ACTION_SPAM_MODE]; $ACTION_PROBABLE_MODE=$kas_action_message[$ACTION_PROBABLE_MODE]; //Amavis - spamassassin $EnableAmavisDaemon=$user->EnableAmavisDaemon; if(!$user->AMAVIS_INSTALLED){$EnableAmavisDaemon=0;} $amavis_js="Loadjs('amavis.index.php?ajax=yes');"; if($EnablePostfixMultiInstance){$hostnameq=" AND hostname='$hostname'";} $ou_q=$ou; if($hostname=="master"){$ou_q="_Global";} $sql="SELECT count(*) as tcount FROM smtp_attachments_blocking WHERE ou='$ou_q'$hostnameq"; $ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup")); if($ligne["tcount"]==0){$amavis_attachs_rules="{no_rules}";}else{$amavis_attachs_rules="{$ligne["tcount"]} {rules}";} if($EnableAmavisDaemon==0){$EnableAmavisDaemon_text="{disabled}";}else{$EnableAmavisDaemon_text="{enabled}";} //Spamassassin - keywords $sql="SELECT count(*) as tcount FROM spamassassin_keywords WHERE enabled=1 and score>0"; $ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup")); if($ligne["tcount"]==0){$spamassassin_keywords="$EnableAmavisDaemon_text {no_rules}";}else{$spamassassin_keywords="$EnableAmavisDaemon_text {$ligne["tcount"]} {rules}";} $spamassassin_keywords_js="Loadjs('spamassassin.keywords.php');"; //spamassassin_backscatter $spamassassin_backscatter_js="Loadjs('spamassassin.backscatter.php');"; $spamassassin_backscatter=$sock->GET_INFO("SpamAssassinVirusBounceEnabled"); if($EnableAmavisDaemon==0){$spamassassin_backscatter=0;} if($spamassassin_backscatter==0){$spamassassin_backscatter="{disabled}";}else{$spamassassin_backscatter="{enabled}";} $DecodeShortURLs_js="Loadjs('spamassassin.DecodeShortURLs.php');"; $sql="SELECT COUNT(*) as tcount FROM spamassassin_table WHERE spam_type='DecodeShortURLs' AND enabled=1"; $ligne=mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup")); if($ligne["tcount"]==0){$DecodeShortURLs="$EnableAmavisDaemon_text {no_rules}";}else{$DecodeShortURLs="$EnableAmavisDaemon_text {$ligne["tcount"]} {rules}";} //plugins, wrongx, pyzor,razor... $spamassassin_js="Loadjs('spamassassin.index.php')"; $EnableSpamassassinWrongMX=$sock->GET_INFO("EnableSpamassassinWrongMX"); if(!is_numeric($EnableSpamassassinWrongMX)){$EnableSpamassassinWrongMX=1;} if($EnableAmavisDaemon==0){$EnableSpamassassinWrongMX=0;} if($EnableSpamassassinWrongMX==0){$EnableSpamassassinWrongMX="{disabled}";}else{$EnableSpamassassinWrongMX="{enabled}";} $use_razor2=$spamass->main_array["use_razor2"]; if($EnableAmavisDaemon==0){$use_razor2=0;} if($use_razor2==0){$use_razor2="{disabled}";}else{$use_razor2="{enabled}";} $use_pyzor=$spamass->main_array["use_pyzor"]; if($EnableAmavisDaemon==0){$use_pyzor=0;} if($use_pyzor==0){$use_pyzor="{disabled}";}else{$use_pyzor="{enabled}";} $amavis=new amavis(); $amavis_action1="{pass}"; $amavis_action2="{pass}"; $amavis_spam="$EnableAmavisDaemon_text {score} >={$amavis->main_array["BEHAVIORS"]["sa_tag3_level_deflt"]}"; if($amavis->EnableQuarantineSpammy2==1){$amavis_action1="{quarantine}";} $amavis_probable="$EnableAmavisDaemon_text {score} >={$amavis->main_array["BEHAVIORS"]["sa_tag2_level_deflt"]}"; if($amavis->EnableQuarantineSpammy==1){$amavis_action2="{quarantine}";} $clamav_unofficial_js="Loadjs('clamav.unofficial.php')"; $html=" <div style='text-align:right'>". imgtootltip("refresh-24.png","{refresh}","RefreshTab('main_config_postfix_synthesis_$md')")."</div> <H3 style='font-size:16px'>{APP_POSTFIX} » {filters_connect}</h3> <table style='width:665px' class=form> <tr> <td class=legend width='350px'>{postfix_autoblock}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_iptables\" $stylea>$EnablePostfixAutoBlock_text $PostfixAutoBlock_rules</a></td> <td width=1% nowrap><strong style='font-size:13px'>{firewall}</td> </tr> <tr> <td class=legend width='350px'>{black list}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$Blacklist_js\" $stylea>$Blacklist_rules</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>PostScreen:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$postscreen_js\" $stylea>$EnablePostScreen</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>PostScreen RBL:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$postscreen_js\" $stylea>$postscreen_dnsbl_action $postscreen_dnsbl_count</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{blockips}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_regex\" $stylea>$check_client_access</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{reject_unknown_client_hostname}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_unknown_client_hostname</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{reject_unknown_reverse_client_hostname}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_unknown_reverse_client_hostname</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{reject_unknown_sender_domain}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_unknown_sender_domain</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{reject_invalid_hostname}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_invalid_hostname</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{reject_non_fqdn_sender}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$reject_non_fqdn_sender</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{RestrictToInternalDomains}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$smtpd_client_restrictions_js\" $stylea>$RestrictToInternalDomains</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> </table> <H3 style='font-size:16px'>{filters_connect}</h3> <table style='width:665px' class=form> <tr> <td class=legend width='350px'>{gl_YES-QUICK}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$mgreylist_js\" $stylea>$MilterGreyListEnabled</a></td> <td width=1% nowrap><strong style='font-size:13px'>{delayed}</td> </tr> </table> <H3 style='font-size:16px'>{APP_POSTFIX} » {messages_restriction}</h3> <table style='width:665px' class=form> ". _MaxRcptTO($hostname)." <tr> <td class=legend width='350px'>{message_size_limit}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_messagelimit\" $stylea>$message_size_limit</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{HIDE_CLIENT_MUA}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$PostfixHideClientMua_js\" $stylea>$PostfixHideClientMua</a></td> <td width=1% nowrap><strong style='font-size:13px'>{pass}</td> </tr> </table> <H3 style='font-size:16px'>{APP_POSTFIX} » {content_filters}</h3> <table style='width:665px' class=form> <tr> <td class=legend width='350px'>{header_content_filters_rules}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_regex\" $stylea>$header_content_filters_rules</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{RegexSimpleWords}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$js_regex\" $stylea>$EnableBodyChecks_text $EnableBodyChecks_rules</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> <tr> <td class=legend width='350px'>{attachment_blocking}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$attachs_js\" $stylea>$enable_attachment_blocking_postfix $attachs_rules</a></td> <td width=1% nowrap><strong style='font-size:13px'>{reject}</td> </tr> </table> <H3 style='font-size:16px'>{content_filters} » {APP_KAS3}</h3> <table style='width:665px' class=form> <tr> <td class=legend width='350px'>{APP_KAS3}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$kas_text</a></td> <td width=1% nowrap><strong style='font-size:13px'> </td> </tr> <tr> <td class=legend width='350px'>{OPT_PROBABLE_SPAM_ON}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$kas_probable</a></td> <td width=1% nowrap><strong style='font-size:13px'> </td> </tr> <tr> <td class=legend width='350px'>{spam option 2}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$ACTION_PROBABLE_MODE</a></td> <td width=1% nowrap><strong style='font-size:13px'> </td> </tr> <tr> <td class=legend width='350px'>{spam option 1}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$ACTION_SPAM_MODE</a></td> <td width=1% nowrap><strong style='font-size:13px'> </td> </tr> </table> <H3 style='font-size:16px'>{content_filters} » {addons_bundle}</h3> <table style='width:665px' class=form> <tr> <td class=legend width='350px'>{attachment_blocking}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$kas_js\" $stylea>$EnableAmavisDaemon_text $amavis_attachs_rules</a></td> <td width=1% nowrap><strong style='font-size:13px'>{quarantine}</td> </tr> <tr> <td class=legend width='350px'>{block_keywords}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_keywords_js\" $stylea>$spamassassin_keywords</a></td> <td width=1% nowrap><strong style='font-size:13px'>{score}+</td> </tr> <tr> <td class=legend width='350px'>{Virus_Bounce_Ruleset}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_backscatter_js\" $stylea>$spamassassin_backscatter</a></td> <td width=1% nowrap><strong style='font-size:13px'>{score}+</td> </tr> <tr> <td class=legend width='350px'>{DecodeShortURLs}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$DecodeShortURLs_js\" $stylea>$DecodeShortURLs</a></td> <td width=1% nowrap><strong style='font-size:13px'>{score}+</td> </tr> <tr> <td class=legend width='350px'>WrongMX:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_js\" $stylea>$EnableSpamassassinWrongMX</a></td> <td width=1% nowrap><strong style='font-size:13px'>{score}+</td> </tr> <tr> <td class=legend width='350px'>Razor:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_js\" $stylea>$use_razor2</a></td> <td width=1% nowrap><strong style='font-size:13px'>{score}+</td> </tr> <tr> <td class=legend width='350px'>Pyzor:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$spamassassin_js\" $stylea>$use_pyzor</a></td> <td width=1% nowrap><strong style='font-size:13px'>{score}+</td> </tr> <tr> <td class=legend width='350px'>{spam option 2}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$amavis_js\" $stylea>$amavis_probable</a></td> <td width=1% nowrap><strong style='font-size:13px'>$amavis_action2</td> </tr> <tr> <td class=legend width='350px'>{spam option 1}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$amavis_js\" $stylea>$amavis_spam</a></td> <td width=1% nowrap><strong style='font-size:13px'>$amavis_action1</td> </tr> <tr> <td class=legend width='350px'>{APP_CLAMAV}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$amavis_js\" $stylea>$EnableAmavisDaemon_text</a></td> <td width=1% nowrap><strong style='font-size:13px'>{quarantine}</td> </tr> <tr> <td class=legend width='350px'>{clamav_unofficial}:</td> <td width='230px'><a href=\"javascript:blur()\" OnClick=\"javascript:$clamav_unofficial_js\" $stylea>$EnableAmavisDaemon_text</a></td> <td width=1% nowrap><strong style='font-size:13px'>{quarantine}</td> </tr> </table> "; echo $tpl->_ENGINE_parse_body($html); }
function admin_graph_start() { /*header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("content-type:text/html"); */ $users = new usersMenus(); $users->LoadModulesEnabled(); $sock = new sockets(); if ($users->kas_installed) { if ($users->KasxFilterEnabled) { kas_stats(); exit; } } if ($users->GRAPHDEFANG_INSTALLED) { if ($users->MimeDefangEnabled == 1) { graph_defang(); exit; } } $style = "style='border:1px dotted #CCCCCC;padding:3px;margin:3px;text-align:center'"; $md = md5(date('Ymdhis')); $users = new usersMenus(nul, 0, $_GET["hostname"]); if ($users->POSTFIX_INSTALLED == true) { if ($sock->GET_INFO("MailGraphEnabled") == 1) { $g_postfix = "<div id='g_postfix' {$style}>\n\t\t\t<H3>Postfix</H3>\n\t\t\t<img src='images.listener.php?uri=mailgraph/mailgraph_0.png&md={$md}'>\n\t\t\t</div>"; } } if ($users->SQUID_INSTALLED == true) { $SQUIDEnable = $sock->GET_INFO("SQUIDEnable"); if (!is_numeric($SQUIDEnable)) { $SQUIDEnable = 1; } if ($SQUIDEnable == 1) { $g_squid = "\n\t\t\t<div id='g_squid' {$style}>\n\t\t\t\t<H3>Squid</H3>\n\t\t\t\t\t<img src='images.listener.php?uri=squid/rrd/connections.day.1.png&md={$md}'>\n\t\t\t\t\n\t\t\t\t\t<img src='ressources/logs/hours-squid-hits.png' style='margin-top:5px'>\n\t\t\t\t\t<br>\n\t\t\t\t\t<img src='ressources/logs/hours-squid-size.png' style='margin-top:5px'>\n\t\t\t</div>"; } } $g_system = "<div id='g_sys' {$style}>\n\t\t<H3>system</H3>\n\t\t\t<img src='images.listener.php?uri=system/rrd/01cpu-1day.png&md={$md}'>\n\t</div>"; $p = "<input type='hidden' id='switch' value='{$_GET["main"]}'>\n\t{$g_squid}.{$g_system}.{$g_postfix}."; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($p); }
function main_tabs() { if (!isset($_GET["main"])) { $_GET["main"] = "network"; } $users = new usersMenus(); $users->LoadModulesEnabled(); $tpl = new templates(); $sock = new sockets(); $page = CurrentPageName(); $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance"); $ou = $_SESSION["ou"]; if ($users->AsMessagingOrg) { $array["messaging"] = '{emails_received}'; } $array["org"] = $ou; while (list($num, $ligne) = each($array)) { $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes\"><span>{$ligne}</span></li>\n"); } echo "\n\t<div id=main_config_user_panel style='width:100%;height:750px;overflow:auto'>\n\t\t<ul>" . implode("\n", $html) . "</ul>\n\t</div>\n\t\t<script>\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\$('#main_config_user_panel').tabs({\n\t\t\t\t load: function(event, ui) {\n\t\t\t\t \$('a', ui.panel).click(function() {\n\t\t\t\t \$(ui.panel).load(this.href);\n\t\t\t\t return false;\n\t\t\t\t });\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t});\n\t\t</script>"; }
function bundle_opensource() { $bundle = true; $firstbg = "bg-coinds-gris-300.png"; $users = new usersMenus(); $users->LoadModulesEnabled(); if (!$users->SPAMASS_MILTER_INSTALLED) { $bundle = false; } if (!$users->CLAMAV_MILTER_INSTALLED) { $bundle = false; } if ($bundle == false) { $firstbg = "bg-coinds-red-300.png"; } else { if ($users->SpamAssMilterEnabled == 1 && $users->ClamavMilterEnabled == 1) { $firstbg = "bg-coinds-green-300.png"; $button = "<input type='button' OnClick=\"javascript:Disable('opensource');\" value='{disable} »'>"; } else { $button = "<input type='button' OnClick=\"javascript:Enable('opensource');\" value='{enable} »'>"; } } $clamav_img = "okdanger32.png"; $text_clamav = "{not_installed}"; $spamass_img = "okdanger32.png"; $spamass_text = "{not_installed}"; if ($users->CLAMAV_MILTER_INSTALLED) { if ($users->ClamavMilterEnabled == 1) { $clamav_img = "ok32.png"; $text_clamav = "{activated}"; } else { $clamav_img = "warning32.png"; $text_clamav = "{disabled}"; } } if ($users->SPAMASS_MILTER_INSTALLED) { if ($users->SpamAssMilterEnabled == 1) { $spamass_img = "ok32.png"; $spamass_text = "{activated}"; } else { $spamass_img = "warning32.png"; $spamass_text = "{disabled}"; } } $text = "\n\t<table style='width:100%;background-color:transparent;background-image:none'>\n\t<tr>\n\t\t<td colspan=2><H3 style='font-size:15px'>{clamspam_bundle}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{performances}:</td>\n\t\t<td>" . bundle_barre(60) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{functionnalities}:</td>\n\t\t<td>" . bundle_barre(30) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{security}:</td>\n\t\t<td>" . bundle_barre(70) . "</td>\n\t</tr>\t\t\n\t</table>\n\t<br>\n\t<table style='width:100%;background-color:transparent;background-image:none'>\n\t<tr>\n\t\t<td valign='top' width=1%><img src='img/{$clamav_img}'></td>\n\t\t<td valign='middle'><span style='font-size:13px;font-weight:bold'>{APP_CLAMAV_MILTER}</span></td>\n\t\t<td valign='middle'><span style='font-size:13px;font-weight:bold'>{$text_clamav}</span></td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' width=1%><img src='img/{$spamass_img}'></td>\n\t\t<td valign='middle'><span style='font-size:13px;font-weight:bold'>{APP_SPAMASS_MILTER}</span></td>\n\t\t<td valign='middle'><span style='font-size:13px;font-weight:bold'>{$spamass_text}</span></td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td colspan=3 align='right'>{$button}</td>\n\t</table>\n\t\n\t\n\t<br>\n\t\n\t"; $html = "<div style='width:283px;height:230px;background-repeat:no-repeat;background-image:url(img/{$firstbg});padding:10px;' \n\t\tonmouseover='javascript:this.style.backgroundImage=\"url(img/bg-coinds-blanc-300.png)\"'\n\t\tonmouseout='javascript:this.style.backgroundImage=\"url(img/{$firstbg})\"'\n\t\t>{$text}\n\t\t\n\t\t \n\t\t</div>\n\t\n\t\n\t"; return $html; }