Пример #1
0
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
******************************************************************************/
if (isset($_POST['save_option'])) {
    update_email_options($_SESSION['uid'], "del_virus_notifi", $_POST['del_virus_notifi'], 0);
    update_email_options($_SESSION['uid'], "del_dups_mails", $_POST['del_dups_mails'], 0);
    update_mailfilter('del_virus_notifi', $_SESSION['uid'], $_POST['del_virus_notifi'], 0, 0);
    update_mailfilter('del_dups_mails', $_SESSION['uid'], $_POST['del_dups_mails'], 0, 0);
    // activate System-Script
    run_systemscripts();
    if (is_dir(ROOT . "/includes/localization/" . $_POST['web_lang']) || ($_POST['web_lang'] = "en_US")) {
        update_email_options($_SESSION['uid'], 'web_lang', $_POST['web_lang'], 0);
        $_SESSION['lang'] = $_POST['web_lang'];
    }
}
$del_virus_notifi = get_email_options($_SESSION['uid'], "del_virus_notifi", 0);
$smarty->assign('del_virus_notifi', $del_virus_notifi);
$del_dups_mails = get_email_options($_SESSION['uid'], "del_dups_mails", 0);
$smarty->assign('del_dups_mails', $del_dups_mails);
$smarty->assign('table_lang', get_all_langs());
$smarty->assign('web_lang', $_SESSION['lang']);
$smarty->assign('email', $_SESSION['email']);
Пример #2
0
                 $sql = sprintf("SELECT p_spamassassin,p_mailarchive,p_bogofilter,p_mailfilter,p_fetchmail FROM domains where id=%s", $db->escapeSimple($daten['domainid']));
                 $res_domain =& $db->query($sql);
                 $data_domain = $res_domain->fetchrow(DB_FETCHMODE_ASSOC);
                 $smarty->assign('if_login_ok', 'yes');
                 logging($_SESSION['email']);
                 $_SESSION['spamassassin'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_spamassassin');
                 $_SESSION['p_mailarchive'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_mailarchive');
                 $_SESSION['p_bogofilter'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_bogofilter');
                 $_SESSION['p_spam_del'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_spam_del');
                 $_SESSION['p_sa_learn'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_sa_learn');
                 $_SESSION['p_fetchmail'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_fetchmail');
                 $_SESSION['p_autores_xheader'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_autores_xheader');
                 $_SESSION['p_spam_fwd'] = check_du_fetaure($_SESSION['uid'], $daten['domainid'], 'p_spam_fwd');
                 $_SESSION['forwarding'] = $daten['p_forwarding'];
                 $_SESSION['p_mailfilter'] = $data_domain['p_mailfilter'];
                 $_SESSION['lang'] = get_email_options($_SESSION['uid'], 'web_lang', 'en_US');
             }
         }
     }
 } else {
     $sql = sprintf("SELECT * FROM adm_users WHERE username='******' AND access='1'", $db->escapeSimple($_POST['email']));
     $result =& $db->query($sql);
     if ($result->numRows() == 1) {
         $daten = $result->fetchrow(DB_FETCHMODE_ASSOC);
         if (check_password($daten['cpasswd'], $_POST['password']) == 1) {
             $login = 1;
             $_SESSION['lang'] = $daten['web_lang'];
             $_SESSION['s_uid'] = $daten['id'];
             $_SESSION['email'] = $daten['username'];
             $_SESSION['cpasswd'] = encrypt_passwd($_POST['password']);
             $_SESSION['superadmin'] = '1';
Пример #3
0
            } else {
                $data['value'] .= " " . $_POST['white_add_email'];
            }
            $sql = sprintf("UPDATE spamassassin SET value='%s' WHERE username='******' AND preference='whitelist_from'", $db->escapeSimple($data['value']), $db->escapeSimple($_SESSION['email']));
        }
        if (!empty($sql)) {
            $result =& $db->query($sql);
        }
    }
}
$spamassassin = get_email_options($_SESSION['uid'], "spamassassin", 0);
$bogofilter = get_email_options($_SESSION['uid'], "bogofilter", 0);
$del_known_spam = get_email_options($_SESSION['uid'], "del_known_spam", 0);
$del_known_spam_value = get_email_options($_SESSION['uid'], "del_known_spam_value", '10.0');
$spam_fwd_active = get_email_options($_SESSION['uid'], "spam_fwd_active", 0);
$spam_fwd_mail = get_email_options($_SESSION['uid'], 'spam_fwd_mail', '');
$smarty->assign('spam_fwd_mail', $spam_fwd_mail);
$smarty->assign('spam_fwd_active', $spam_fwd_active);
$smarty->assign('bogofilter_active', $bogofilter);
$smarty->assign('spamassassin_active', $spamassassin);
$smarty->assign('email', $_SESSION['email']);
$smarty->assign('del_known_spam', $del_known_spam);
$smarty->assign('del_known_spam_value', $del_known_spam_value);
// Database output rewrite_header subject
$sa_header = get_spamassassin_value($_SESSION['email'], "rewrite_header subject", false);
if ($sa_header == false) {
    $smarty->assign('rewrite_subject', '0');
    $smarty->assign('rewrite_subject_header', "*** SPAM ***");
} else {
    $smarty->assign('rewrite_subject', '1');
    $smarty->assign('rewrite_subject_header', $sa_header);
Пример #4
0
    $active = $_POST['autores_active'];
    $msg = $_POST['autores_msg'];
    $esubject = $_POST['autores_subject'];
    $times = $_POST['autores_sendback_times'];
} else {
    $active = 'n';
}
// outout val_tos
$sql = sprintf("SELECT recip,id FROM autoresponder_recipient WHERE email='%d'", $db->escapeSimple($_SESSION['uid']));
$result =& $db->query($sql);
$table_val_tos = array();
while ($data = $result->fetchrow(DB_FETCHMODE_ASSOC)) {
    array_push($table_val_tos, array('recip' => $data['recip'], 'id' => $data['id']));
}
//output val_tos_active
$val_tos_active = get_email_options($_SESSION['uid'], "auto_val_tos_active", 0);
$smarty->assign('val_tos_active', $val_tos_active);
//output autoresponder disabled feature
$autores_disable = get_autores_disable($_SESSION['uid']);
//output xheader feature
if ($_SESSION['p_autores_xheader'] == 1) {
    $sql = sprintf("SELECT * FROM autoresponder_xheader WHERE email='%d' ORDER BY xheader", $db->escapeSimple($_SESSION['uid']));
    $result =& $db->query($sql);
    $table_xheader = array();
    while ($data = $result->fetchrow(DB_FETCHMODE_ASSOC)) {
        array_push($table_xheader, array('id' => $data['id'], 'xheader' => $data['xheader'], 'value' => $data['value']));
    }
    $smarty->assign('table_xheader', $table_xheader);
}
if (isset($autores_disable)) {
    $smarty->assign('autores_disable', $autores_disable);
Пример #5
0
 $result =& $db->query($sql);
 $table_val_tos = array();
 while ($data = $result->fetchrow(DB_FETCHMODE_ASSOC)) {
     array_push($table_val_tos, array('recip' => $data['recip'], 'id' => $data['id']));
 }
 $smarty->assign('table_val_tos', $table_val_tos);
 //output val_tos_active
 $val_tos_active = get_email_options($_GET['id'], "auto_val_tos_active", 0);
 $smarty->assign('val_tos_active', $val_tos_active);
 // output spamassassin
 $spamassassin = get_email_options($_GET['id'], "spamassassin", 0);
 $bogofilter = get_email_options($_GET['id'], "bogofilter", 0);
 $del_known_spam = get_email_options($_GET['id'], "del_known_spam", 0);
 $del_known_spam_value = get_email_options($_GET['id'], "del_known_spam_value", '10.0');
 $spam_fwd_active = get_email_options($_GET['id'], "spam_fwd_active", 0);
 $spam_fwd_mail = get_email_options($_GET['id'], 'spam_fwd_mail', '');
 $smarty->assign('spam_fwd_mail', $spam_fwd_mail);
 $smarty->assign('spam_fwd_active', $spam_fwd_active);
 $smarty->assign('spamassassin_active', $spamassassin);
 $smarty->assign('bogofilter_active', $bogofilter);
 $smarty->assign('del_known_spam', $del_known_spam);
 $smarty->assign('del_known_spam_value', $del_known_spam_value);
 // Database output rewrite_header subject
 $sa_header = get_spamassassin_value($full_email, "rewrite_header subject", false);
 if ($sa_header == false) {
     $smarty->assign('rewrite_subject', '0');
     $smarty->assign('rewrite_subject_header', "*** SPAM ***");
 } else {
     $smarty->assign('rewrite_subject', '1');
     $smarty->assign('rewrite_subject_header', $sa_header);
 }