Пример #1
0
    exit;
}
if (isset($_GET["smtp-notifs-tab"])) {
    SMTP_NOTIFICATIONS_SWITCH();
    exit;
}
if (isset($_GET["SMTP_NOTIFICATIONS_ADD_CC"])) {
    SMTP_NOTIFICATIONS_ADD_CC();
    exit;
}
if (isset($_GET["SMTP_NOTIFICATIONS_DEL_CC"])) {
    SMTP_NOTIFICATIONS_DEL_CC();
    exit;
}
if (isset($_GET["SMTP_NOTIFICATIONS_LIST_CC"])) {
    echo SMTP_NOTIFICATIONS_CCLIST();
    exit;
}
if (isset($_GET["ldapindex-js"])) {
    ldapindex_js();
    exit;
}
if (isset($_GET["ldapindex-popup"])) {
    ldapindex_popup();
    exit;
}
if (isset($_GET["ldapindex-start"])) {
    ldapindex_save();
    exit;
}
if (isset($_GET["ajax-notif"])) {
Пример #2
0
function SMTP_NOTIFICATIONS()
{
    $users = new usersMenus();
    $ini = new Bs_IniHandler();
    $page = CurrentPageName();
    $sock = new sockets();
    $ini->loadString($sock->getFrameWork("cmd.php?SmtpNotificationConfigRead=yes"));
    $EnableMONITSmtpNotif = $sock->GET_INFO("EnableMONITSmtpNotif");
    $jGrowlNotifsDisabled = $sock->GET_INFO("jGrowlNotifsDisabled");
    if (!is_numeric($jGrowlNotifsDisabled)) {
        $jGrowlNotifsDisabled = 1;
    }
    if ($EnableMONITSmtpNotif == null) {
        $EnableMONITSmtpNotif = 1;
    }
    if ($ini->_params["SMTP"]["smtp_server_port"] == null) {
        $ini->_params["SMTP"]["smtp_server_port"] = 25;
    }
    if ($ini->_params["SMTP"]["smtp_sender"] == null) {
        $users = new usersMenus();
        $ini->_params["SMTP"]["smtp_sender"] = "artica@{$users->fqdn}";
    }
    if ($ini->_params["SMTP"]["PostfixQueueEnabled"] == null) {
        $ini->_params["SMTP"]["PostfixQueueEnabled"] = 1;
    }
    if ($ini->_params["SMTP"]["PostfixQueueMaxMails"] == null) {
        $ini->_params["SMTP"]["PostfixQueueMaxMails"] = 20;
    }
    if ($ini->_params["SMTP"]["SystemCPUAlarm"] == null) {
        $ini->_params["SMTP"]["SystemCPUAlarm"] = 1;
    }
    if ($ini->_params["SMTP"]["SystemCPUAlarmPourc"] == null) {
        $ini->_params["SMTP"]["SystemCPUAlarmPourc"] = 95;
    }
    if ($ini->_params["SMTP"]["SystemCPUAlarmMin"] == null) {
        $ini->_params["SMTP"]["SystemCPUAlarmMin"] = 5;
    }
    if ($ini->_params["SMTP"]["monit"] == null) {
        $ini->_params["SMTP"]["monit"] = 1;
    }
    if (!$users->msmtp_installed) {
        $warn = Paragraphe("64-infos.png", "{APP_MSMTP}", "{APP_MSMTP_NOT_INSTALLED}", "javascript:Loadjs('setup.index.progress.php?product=APP_MSMTP&start-install=yes');");
    }
    $SystemCPUAlarmMin_arr = array(5 => 5, 10 => 10, 15 => 15, 30 => 30, 60 => 60, 120 => 120, 180 => 180, 240 => 240);
    $SystemCPUAlarmMin = Field_array_Hash($SystemCPUAlarmMin_arr, 'SystemCPUAlarmMin', $ini->_params["SMTP"]["SystemCPUAlarmMin"]);
    $member_add = Paragraphe("member-add-64.png", "{add_recipient}", "{add_recipient_text}", "javascript:SMTP_NOTIFICATIONS_ADD_CC();");
    $notifcclist = SMTP_NOTIFICATIONS_CCLIST();
    //Switchdiv
    $notif1 = "\n\t<div class=explain>{smtp_notifications_text}</div>\n\t<div id='notif1'>\n\t<table style='width:99%'>\n\t<tr>\n\t<td valign='top'>{$warn}{$member_add}<hr><div id='notifcclist' style='width:100%;height:110px;overflow:auto'>{$notifcclist}</div></td>\n\t<td valign='top'>\n\t\n\t<table style='width:99%'>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{jGrowlNotifsDisabled}:</strong></td>\n\t\t<td>" . Field_checkbox("jGrowlNotifsDisabled", 1, $jGrowlNotifsDisabled, "") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtp_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox("enabled", 1, $ini->_params["SMTP"]["enabled"], "SMTPNotifArticaEnableSwitch()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{EnableMONITSmtpNotif}:</strong></td>\n\t\t<td>" . Field_checkbox("EnableMONITSmtpNotif", 1, $EnableMONITSmtpNotif, "") . "</td>\n\t</tr>\n\n\t\n\t\n\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text('smtp_server_name', trim($ini->_params["SMTP"]["smtp_server_name"]), 'font-size:13px;padding:3px;width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text('smtp_server_port', trim($ini->_params["SMTP"]["smtp_server_port"]), 'font-size:13px;padding:3px;width:30px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text('smtp_sender', trim($ini->_params["SMTP"]["smtp_sender"]), 'font-size:13px;padding:3px;width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtp_dest}:</strong></td>\n\t\t<td>" . Field_text('smtp_dest', trim($ini->_params["SMTP"]["smtp_dest"]), 'font-size:13px;padding:3px;width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text('smtp_auth_user', trim($ini->_params["SMTP"]["smtp_auth_user"]), 'font-size:13px;padding:3px;width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password('smtp_auth_passwd', trim($ini->_params["SMTP"]["smtp_auth_passwd"]), 'font-size:13px;padding:3px;width:100px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox("tls_enabled", 1, $ini->_params["SMTP"]["tls_enabled"]) . "</td>\n\t</tr>\t\n\n\t\n\t\n\t<tr>\n\t\t<td align='left'>\n\t\t\t" . button("{test}", "testnotifs()") . "\n\t\t\t\n\t\t</td>\n\t\t<td align='right'>" . button('{edit}', "javascript:SaveArticaSMTPNotifValues();") . "</td>\n\n\t</tr>\n</table>\n\n\n\n</td>\n\n\n</tr>\n</table>\n</div>\n<script>\nvar x_SaveArticaSMTPNotifValues= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\tRefreshTab('main_config_notifs');\n\t\n\t}\n\n\tfunction SaveArticaSMTPNotifValues(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('enabled').checked){XHR.appendData('enabled',1);}else {XHR.appendData('enabled',0);}\n\t\tif(document.getElementById('jGrowlNotifsDisabled').checked){XHR.appendData('jGrowlNotifsDisabled',1);}else {XHR.appendData('jGrowlNotifsDisabled',0);}\n\t\t\n\t\t\n\t\t\n\t\tif(document.getElementById('tls_enabled').checked){XHR.appendData('tls_enabled',1);}else {XHR.appendData('tls_enabled',0);}\n\t\tif(document.getElementById('EnableMONITSmtpNotif').checked){XHR.appendData('EnableMONITSmtpNotif',1);}else {XHR.appendData('EnableMONITSmtpNotif',0);}\n\t\tXHR.appendData('smtp_server_name',document.getElementById('smtp_server_name').value);\n\t\tXHR.appendData('smtp_server_port',document.getElementById('smtp_server_port').value);\n\t\tXHR.appendData('smtp_sender',document.getElementById('smtp_sender').value);\n\t\tXHR.appendData('smtp_dest',document.getElementById('smtp_dest').value);\n\t\tXHR.appendData('smtp_auth_user',document.getElementById('smtp_auth_user').value);\n\t\tXHR.appendData('smtp_auth_passwd',document.getElementById('smtp_auth_passwd').value);\n\t\tXHR.appendData('smtp_notifications','yes');\n\t\tdocument.getElementById('notif1').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveArticaSMTPNotifValues);\n\t}\n\t\n\tfunction SMTPNotifArticaEnableSwitch(){\n\t\tdocument.getElementById('smtp_auth_passwd').disabled=true;\n\t\tdocument.getElementById('EnableMONITSmtpNotif').disabled=true;\n\t\tdocument.getElementById('smtp_auth_user').disabled=true;\n\t\tdocument.getElementById('smtp_dest').disabled=true;\n\t\tdocument.getElementById('smtp_sender').disabled=true;\n\t\tdocument.getElementById('smtp_server_port').disabled=true;\n\t\tdocument.getElementById('smtp_server_name').disabled=true;\n\t\tdocument.getElementById('tls_enabled').disabled=true;\n\t\tif(document.getElementById('enabled').checked){\n\t\t\tdocument.getElementById('EnableMONITSmtpNotif').disabled=false;\n\t\t\tdocument.getElementById('smtp_auth_passwd').disabled=false;\n\t\t\tdocument.getElementById('smtp_auth_user').disabled=false;\n\t\t\tdocument.getElementById('smtp_dest').disabled=false;\n\t\t\tdocument.getElementById('smtp_sender').disabled=false;\n\t\t\tdocument.getElementById('smtp_server_port').disabled=false;\n\t\t\tdocument.getElementById('smtp_server_name').disabled=false;\n\t\t\tdocument.getElementById('tls_enabled').disabled=false;\t\t\n\t\t}\n\t}\n\tSMTPNotifArticaEnableSwitch();\n</script>\n";
    $notif2 = "\n<div id='notif2'>\n<br>\n<div class=explain>{notification_context}</div>\n<table style='width:100%'>\n<tr>\n\t<td valign='top' class=legend>{system}:</td>\n\t<td valign='top'>" . Field_checkbox('system', 1, $ini->_params["SMTP"]["system"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{security}:</td>\n\t<td valign='top'>" . Field_checkbox('security', 1, $ini->_params["SMTP"]["security"]) . "</td>\n</tr>\n\n<tr>\n\t<td valign='top' class=legend>{sa-learn}:</td>\n\t<td valign='top'>" . Field_checkbox('sa-learn', 1, $ini->_params["SMTP"]["sa-learn"]) . "</td>\n</tr>\n\n<tr>\n\t<td valign='top' class=legend>{logs_cleaning}:</td>\n\t<td valign='top'>" . Field_checkbox('logs_cleaning', 1, $ini->_params["SMTP"]["logs_cleaning"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{update}:</td>\n\t<td valign='top'>" . Field_checkbox('update', 1, $ini->_params["SMTP"]["update"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{KASPERSKY_UPDATES}:</td>\n\t<td valign='top'>" . Field_checkbox('KASPERSKY_UPDATES', 1, $ini->_params["SMTP"]["KASPERSKY_UPDATES"]) . "</td>\n</tr>\n\n<tr>\n\t<td valign='top' class=legend>{backup}:</td>\n\t<td valign='top'>" . Field_checkbox('backup', 1, $ini->_params["SMTP"]["backup"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{mailbox}:</td>\n\t<td valign='top'>" . Field_checkbox('mailbox', 1, $ini->_params["SMTP"]["mailbox"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>postfix:</td>\n\t<td valign='top'>" . Field_checkbox('postfix', 1, $ini->_params["SMTP"]["postfix"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>VIPTrack:</td>\n\t<td valign='top'>" . Field_checkbox('VIPTrack', 1, $ini->_params["SMTP"]["VIPTrack"]) . "</td>\n</tr>\n\n<tr>\n\t\t<td nowrap class=legend>{APP_MONIT}:</strong></td>\n\t\t<td>" . Field_checkbox('monit', 1, $ini->_params["SMTP"]["monit"]) . "</td>\n\t</tr>\n<tr>\n\t<td valign='top' colspan=2 align='right'><hr>" . button('{edit}', "SaveNotificationsContext()") . "</td>\n</tr>\n</table>\n<br><div style='font-size:14px;font-weight:bold;border-bottom:1px solid #005447'>{CPU_ALARM}</div>\n<table style='width:100%'>\n<tr>\n\t<td valign='top' class=legend>{enable}:</td>\n\t<td valign='top'>" . Field_checkbox('SystemCPUAlarm', 1, $ini->_params["SMTP"]["SystemCPUAlarm"], "NotifSwitch()") . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{SystemCPUAlarmPourc}:</td>\n\t<td valign='top'>" . Field_text('SystemCPUAlarmPourc', $ini->_params["SMTP"]["SystemCPUAlarmPourc"], 'width:40px') . "&nbsp;%</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{during}:</td>\n\t<td valign='top'>{$SystemCPUAlarmMin}&nbsp;mn</td>\n</tr>\n<tr>\n\t<td valign='top' colspan=2 align='right'><hr>" . button('{edit}', "SaveNotificationsContext();") . "</td>\n</tr>\n</table>\n</div>\n<script>\n      \n\tfunction NotifSwitch(){\n\t\tvar enabled='{$ini->_params["SMTP"]["enabled"]}';\n\t\tDisableFieldsFromId('notif2');\t\t\t\t\t\t\n\t\tif(enabled!=='1'){return;}\n\t\tEnableFieldsFromId('notif2');\n\t\t\n\t\t\n\t\tdocument.getElementById('SystemCPUAlarmPourc').disabled=true;\n\t\tdocument.getElementById('SystemCPUAlarmMin').disabled=true;\n\t\tif(document.getElementById('SystemCPUAlarm').checked){\n\t\t\tdocument.getElementById('SystemCPUAlarmPourc').disabled=false;\n\t\t\tdocument.getElementById('SystemCPUAlarmMin').disabled=false;\n\t\t}\t\n\t\n\t}\n\t\n\tvar x_SaveNotificationsContext= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tRefreshTab('main_config_notifs');\n\t\n\t}\t\n\t\n\tfunction SaveNotificationsContext(){\n\t\tvar XHR=XHRParseElements('notif2');\n\t\tXHR.appendData('smtp_notifications','yes');\n\t\tdocument.getElementById('notif2').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveNotificationsContext);\n\t}\n\t\n\tNotifSwitch();\n</script>\n\n\n";
    $notif3 = "\n<div id='notif3'>\n<br>\n<div class=explain>{APP_POSTFIX} {notifications}</div>\n<table style='width:100%'>\n<tr>\n\t<td valign='top' class=legend>{PostfixQueueEnabled}:</td>\n\t<td valign='top'>" . Field_checkbox('PostfixQueueEnabled', 1, $ini->_params["SMTP"]["PostfixQueueEnabled"], 'NotifSwitch()') . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{PostfixQueueMaxMails}:</td>\n\t<td valign='top'>" . Field_text('PostfixQueueMaxMails', $ini->_params["SMTP"]["PostfixQueueMaxMails"], 'width:60px') . "</td>\n</tr>\n<tr>\n\t<td valign='top' colspan=2 align='right'>" . button('{edit}', "javascript:SavePostFixNotifications()") . "</td>\n</tr>\n</table>\n</div>\n<script>\n\tvar x_SavePostFixNotifications= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tRefreshTab('main_config_notifs');\n\t\n\t}\n\n\tfunction SavePostFixNotifications(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('PostfixQueueEnabled').checked){XHR.appendData('PostfixQueueEnabled',1);}else {XHR.appendData('PostfixQueueEnabled',0);}\n\t\tXHR.appendData('PostfixQueueMaxMails',document.getElementById('PostfixQueueMaxMails').value);\n\t\tXHR.appendData('smtp_notifications','yes');\n\t\tdocument.getElementById('notif3').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SavePostFixNotifications);\n\t}\n\t\n\tfunction NotifSwitch(){\n\t\tvar enabled='{$ini->_params["SMTP"]["enabled"]}';\n\t\tdocument.getElementById('PostfixQueueEnabled').disabled=true;\n\t\tdocument.getElementById('PostfixQueueMaxMails').disabled=true;\n\t\tif(enabled!=='1'){return;}\n\t\tdocument.getElementById('PostfixQueueEnabled').disabled=false;\n\t\tif(document.getElementById('PostfixQueueEnabled').checked){\n\t\t\tdocument.getElementById('PostfixQueueMaxMails').disabled=false;\n\t\t}\n\t\t\n\t\n\t}\n\t\n\tNotifSwitch();\n</script>\n\n";
    switch ($_GET["smtp-notifs-tab"]) {
        case "notif1":
            $HTML = $notif1;
            break;
        case "notif2":
            $HTML = $notif2;
            break;
        case "notif3":
            $HTML = $notif3;
            break;
        default:
            $HTML = $notif1;
            break;
    }
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($HTML);
}
Пример #3
0
function SMTP_NOTIFICATIONS()
{
    $users = new usersMenus();
    $ini = new Bs_IniHandler();
    $page = CurrentPageName();
    $sock = new sockets();
    $ini->loadString($sock->getFrameWork("cmd.php?SmtpNotificationConfigRead=yes"));
    if ($ini->_params["SMTP"]["smtp_server_port"] == null) {
        $ini->_params["SMTP"]["smtp_server_port"] = 25;
    }
    if ($ini->_params["SMTP"]["smtp_sender"] == null) {
        $users = new usersMenus();
        $ini->_params["SMTP"]["smtp_sender"] = "artica@{$users->fqdn}";
    }
    if ($ini->_params["SMTP"]["PostfixQueueEnabled"] == null) {
        $ini->_params["SMTP"]["PostfixQueueEnabled"] = 1;
    }
    if ($ini->_params["SMTP"]["PostfixQueueMaxMails"] == null) {
        $ini->_params["SMTP"]["PostfixQueueMaxMails"] = 20;
    }
    if ($ini->_params["SMTP"]["SystemCPUAlarm"] == null) {
        $ini->_params["SMTP"]["SystemCPUAlarm"] = 1;
    }
    if ($ini->_params["SMTP"]["SystemCPUAlarmPourc"] == null) {
        $ini->_params["SMTP"]["SystemCPUAlarmPourc"] = 95;
    }
    if ($ini->_params["SMTP"]["SystemCPUAlarmMin"] == null) {
        $ini->_params["SMTP"]["SystemCPUAlarmMin"] = 5;
    }
    if ($ini->_params["SMTP"]["monit"] == null) {
        $ini->_params["SMTP"]["monit"] = 1;
    }
    if (!$users->msmtp_installed) {
        $warn = Paragraphe("64-infos.png", "{APP_MSMTP}", "{APP_MSMTP_NOT_INSTALLED}", "javascript:Loadjs('setup.index.progress.php?product=APP_MSMTP&start-install=yes');");
    }
    $SystemCPUAlarmMin_arr = array(5 => 5, 10 => 10, 15 => 15, 30 => 30, 60 => 60, 120 => 120, 180 => 180, 240 => 240);
    $SystemCPUAlarmMin = Field_array_Hash($SystemCPUAlarmMin_arr, '$SystemCPUAlarmMin', $ini->_params["SMTP"]["SystemCPUAlarmMin"]);
    $member_add = Paragraphe("member-add-64.png", "{add_recipient}", "{add_recipient_text}", "javascript:SMTP_NOTIFICATIONS_ADD_CC();");
    $notifcclist = SMTP_NOTIFICATIONS_CCLIST();
    //Switchdiv
    $notif1 = "\n\t<p class=caption>{smtp_notifications_text}</p>\n\t<div id='notif1'>\n\t<table style='width:99%'>\n\t<tr>\n\t<td valign='top'>{$warn}{$member_add}<hr>" . RoundedLightWhite("<div id='notifcclist' style='width:100%;height:110px;overflow:auto'>{$notifcclist}</div>") . "</td>\n\t<td valign='top'>\n\t\n\t<table style='width:99%' class=table_form>\n\t<tr>\n\t\t<td nowrap class=legend>{smtp_enabled}:</strong></td>\n\t\t<td>" . Field_numeric_checkbox_img("enabled", $ini->_params["SMTP"]["enabled"], '{enable_disable}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text('smtp_server_name', trim($ini->_params["SMTP"]["smtp_server_name"]), 'width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text('smtp_server_port', trim($ini->_params["SMTP"]["smtp_server_port"]), 'width:30px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text('smtp_sender', trim($ini->_params["SMTP"]["smtp_sender"]), 'width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend>{smtp_dest}:</strong></td>\n\t\t<td>" . Field_text('smtp_dest', trim($ini->_params["SMTP"]["smtp_dest"]), 'width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text('smtp_auth_user', trim($ini->_params["SMTP"]["smtp_auth_user"]), 'width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password('smtp_auth_passwd', trim($ini->_params["SMTP"]["smtp_auth_passwd"]), 'width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_numeric_checkbox_img("tls_enabled", $ini->_params["SMTP"]["tls_enabled"], '{enable_disable}') . "</td>\n\t</tr>\t\n\n\t\n\t\n\t<tr>\n\t\t<td align='left'>\n\t\t\t" . button("{test}", "testnotifs()") . "\n\t\t\t\n\t\t</td>\n\t\t<td align='right'>" . button('{edit}', "javascript:ParseForm('FFM120','{$page}',true);") . "</td>\n\n\t</tr>\n</table>\n</td>\n\n</tr>\n</table>\n</div>\n";
    $notif2 = "\n<div id='notif2'>\n<br>\n<p class=caption style='font-size:14px'>{notification_context}</p>\n<table style='width:100%'class=table_form>\n<tr>\n\t<td valign='top' class=legend>{sa-learn}:</td>\n\t<td valign='top'>" . Field_checkbox('sa-learn', 1, $ini->_params["SMTP"]["sa-learn"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{system}:</td>\n\t<td valign='top'>" . Field_checkbox('system', 1, $ini->_params["SMTP"]["system"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{logs_cleaning}:</td>\n\t<td valign='top'>" . Field_checkbox('logs_cleaning', 1, $ini->_params["SMTP"]["logs_cleaning"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{update}:</td>\n\t<td valign='top'>" . Field_checkbox('update', 1, $ini->_params["SMTP"]["update"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{KASPERSKY_UPDATES}:</td>\n\t<td valign='top'>" . Field_checkbox('update', 1, $ini->_params["SMTP"]["KASPERSKY_UPDATES"]) . "</td>\n</tr>\n\n<tr>\n\t<td valign='top' class=legend>{backup}:</td>\n\t<td valign='top'>" . Field_checkbox('backup', 1, $ini->_params["SMTP"]["backup"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{mailbox}:</td>\n\t<td valign='top'>" . Field_checkbox('mailbox', 1, $ini->_params["SMTP"]["mailbox"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>postfix:</td>\n\t<td valign='top'>" . Field_checkbox('postfix', 1, $ini->_params["SMTP"]["postfix"]) . "</td>\n</tr>\n\n<tr>\n\t\t<td nowrap class=legend>{APP_MONIT}:</strong></td>\n\t\t<td>" . Field_checkbox('monit', 1, $ini->_params["SMTP"]["monit"]) . "</td>\n\t</tr>\n<tr>\n\t<td valign='top' colspan=2 align='right'><hr>" . button('{edit}', "javascript:ParseForm('FFM120','{$page}',true);") . "</td>\n</tr>\n</table>\n\n<hr>\n<h3>{CPU_ALARM}</h3>\n<table style='width:100%'class=table_form>\n<tr>\n\t<td valign='top' class=legend>{enable}:</td>\n\t<td valign='top'>" . Field_checkbox('SystemCPUAlarm', 1, $ini->_params["SMTP"]["SystemCPUAlarm"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{SystemCPUAlarmPourc}:</td>\n\t<td valign='top'>" . Field_text('SystemCPUAlarmPourc', $ini->_params["SMTP"]["SystemCPUAlarmPourc"], 'width:20px') . "&nbsp;%</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{during}:</td>\n\t<td valign='top'>{$SystemCPUAlarmMin}&nbsp;mn</td>\n</tr>\n<tr>\n\t<td valign='top' colspan=2 align='right'><hr>" . button('{edit}', "javascript:ParseForm('FFM120','{$page}',true);") . "</td>\n</tr>\n</table>\n\n</div>";
    $notif3 = "\n<div id='notif3'>\n<br>\n<p class=caption style='font-size:14px'>{APP_POSTFIX} {notifications}</p>\n<table style='width:100%' class=table_form>\n<tr>\n\t<td valign='top' class=legend>{PostfixQueueEnabled}:</td>\n\t<td valign='top'>" . Field_checkbox('PostfixQueueEnabled', 1, $ini->_params["SMTP"]["PostfixQueueEnabled"]) . "</td>\n</tr>\n<tr>\n\t<td valign='top' class=legend>{PostfixQueueMaxMails}:</td>\n\t<td valign='top'>" . Field_text('PostfixQueueMaxMails', $ini->_params["SMTP"]["PostfixQueueMaxMails"], 'width:60px') . "</td>\n</tr>\n<tr>\n\t<td valign='top' colspan=2 align='right'>" . button('{edit}', "javascript:ParseForm('FFM120','{$page}',true);") . "</td>\n</tr>\n</table>\n</div>";
    switch ($_GET["smtp-notifs-tab"]) {
        case "notif1":
            $HTML = $notif1;
            break;
        case "notif2":
            $HTML = $notif2;
            break;
        case "notif3":
            $HTML = $notif3;
            break;
        default:
            $HTML = $notif1;
            break;
    }
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($HTML);
}