Beispiel #1
0
         $smarty->assign('if_illegal_sa_subjecttag', 'y');
     } else {
         if ($_POST['rewrite_subject'] == 0) {
             $rewrite_subject = '';
         } elseif ($_POST['rewrite_subject'] == 1) {
             $rewrite_subject = clean_input(trim($_POST['rewrite_subject_header']));
         }
         update_spamassassin_value($_SESSION['email'], "rewrite_header subject", $rewrite_subject, $_SESSION['uid']);
     }
 }
 if (isset($_POST['threshold']) && !empty($_POST['threshold'])) {
     if (ereg("^[0-9]{1,2}\\.[0-9]\$", $_POST['threshold']) == 0) {
         $smarty->assign('error_msg', 'y');
         $smarty->assign('if_wrong_sa_threshold', 'y');
     } else {
         update_spamassassin_value($_SESSION['email'], "required_score", $_POST['threshold'], $_SESSION['uid']);
     }
 }
 //save move_spam
 if (isset($_POST['spam_fwd_active']) && $_POST['spam_fwd_active'] == 1 && $_POST['move_spam'] == 1) {
     $smarty->assign('error_msg', 'y');
     $smarty->assign('move_spam_active_and_spam_fwd', 1);
 } elseif ($_POST['move_spam'] == 0) {
     $sql = sprintf("UPDATE users SET move_spam=NULL WHERE id='%d'", $db->escapeSimple($_SESSION['uid']));
     $result =& $db->query($sql);
     //reset filter
     $sql = sprintf("UPDATE mailfilter SET active='0' WHERE email='%d' AND type='move_spam'", $db->escapeSimple($_SESSION['uid']));
     $result =& $db->query($sql);
 } elseif ($_POST['move_spam'] == 1) {
     //reset filter
     $sql = sprintf("UPDATE mailfilter SET active='0' WHERE email='%d' AND type='move_spam'", $db->escapeSimple($_SESSION['uid']));
Beispiel #2
0
         $smarty->assign('if_illegal_sa_subjecttag', 'y');
     } else {
         if ($_POST['rewrite_subject'] == 0) {
             $rewrite_subject = '';
         } elseif ($_POST['rewrite_subject'] == 1) {
             $rewrite_subject = clean_input(trim($_POST['rewrite_subject_header']));
         }
         update_spamassassin_value($edata['email'], "rewrite_header subject", $rewrite_subject, $_GET['id']);
     }
 }
 if (isset($_POST['threshold']) && !empty($_POST['threshold'])) {
     if (ereg("^[0-9]{1,2}\\.[0-9]\$", $_POST['threshold']) == 0) {
         $smarty->assign('error_msg', 'y');
         $smarty->assign('if_wrong_sa_threshold', 'y');
     } else {
         update_spamassassin_value($edata['email'], "required_score", $_POST['threshold'], $_GET['id']);
     }
 }
 //save the del_known_spam option
 if (is_numeric($_POST['del_known_spam']) && $_POST['del_known_spam'] == 1) {
     if (ereg("^[0-9]{1,2}\\.[0-9]\$", $_POST['del_known_spam_value']) == 0) {
         $smarty->assign('error_msg', 'y');
         $smarty->assign('if_wrong_del_known_spam_value', 'y');
     } elseif (get_spamassassin_value($edata['email'], "required_score", "5.0") >= $_POST['del_known_spam_value']) {
         $smarty->assign('error_msg', 'y');
         $smarty->assign('if_wrong_del_known_spam_value_lower', 'y');
     } else {
         update_email_options($_GET['id'], 'del_known_spam_value', $_POST['del_known_spam_value'], 0);
         update_email_options($_GET['id'], 'del_known_spam', '1', 0);
     }
 } else {