예제 #1
0
파일: user_options.php 프로젝트: hggh/cpves
* 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
파일: user_spam.php 프로젝트: hggh/cpves
        update_email_options($_SESSION['uid'], 'del_known_spam', '0', 0);
    }
    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 (isset($_POST['spam_fwd_active']) && $_POST['spam_fwd_active'] == 1) {
        if (Validate::email($_POST['spam_fwd_mail'])) {
            update_email_options($_SESSION['uid'], 'spam_fwd_active', '1', 0);
            update_email_options($_SESSION['uid'], 'spam_fwd_mail', $_POST['spam_fwd_mail'], 0);
        } else {
            $smarty->assign('error_msg', 'y');
            $smarty->assign('if_error_forwardaddr_valid', 'y');
            update_email_options($_SESSION['uid'], 'spam_fwd_active', '0', 0);
        }
    } else {
        update_email_options($_SESSION['uid'], 'spam_fwd_active', '0', 0);
    }
    // activate System-Script
    run_systemscripts();
}
// SAVE new whitelist
if (isset($_POST['white_add']) && isset($_POST['white_add_email']) && !empty($_POST['white_add_email'])) {
    if (ereg("^(.*)@(.*)\$", $_POST['white_add_email']) == 1) {
        $sql = sprintf("SELECT value FROM spamassassin WHERE username='******' AND preference='whitelist_from'", $db->escapeSimple($_SESSION['email']));
        $result =& $db->query($sql);
        unset($sql);
        if ($result->numRows() == 0) {
            $sql = sprintf("INSERT INTO spamassassin SET username='******', preference='whitelist_from', value='%s'", $db->escapeSimple($_SESSION['email']), $db->escapeSimple($_POST['white_add_email']));
        } else {
            $data = $result->fetchrow(DB_FETCHMODE_ASSOC);
            if (empty($data['value'])) {
예제 #3
0
파일: user_autores.php 프로젝트: hggh/cpves
            } else {
                if ($_POST['autores_sendback_times'] != "n" && ($_POST['autores_sendback_times'] < 1 && $_POST['autores_sendback_times'] > 5)) {
                    $smarty->assign('error_msg', 'y');
                    $smarty->assign('if_error_autores_send_times', 'y');
                    $error = true;
                } else {
                    save_autoresponder($_SESSION['uid'], $_POST['autores_active'], $_POST['autores_subject'], $_POST['autores_msg'], $_POST['autores_sendback_times']);
                    // activate System-Script
                    run_systemscripts();
                }
            }
        }
    }
}
if (isset($_POST['val_tos_active']) && is_numeric($_POST['val_tos_active'])) {
    update_email_options($_SESSION['uid'], "auto_val_tos_active", $_POST['val_tos_active'], 0);
}
if (isset($_POST['val_tos_del'])) {
    val_tos_del($_SESSION['uid'], $_POST['val_tos']);
}
if (isset($_POST['val_tos_add'])) {
    if (val_tos_add($_SESSION['uid'], $_POST['val_tos_da']) == 1) {
        $smarty->assign('error_msg', 'y');
        $smarty->assign('if_submit_email_wrong', 'y');
    }
}
//xheader disable feature
if ($_SESSION['p_autores_xheader'] == 1) {
    if (isset($_GET['xheader']) && is_numeric($_GET['xheader']) && isset($_GET['do']) && $_GET['do'] == 'del') {
        $sql = sprintf("DELETE FROM autoresponder_xheader WHERE email='%d' AND id='%d'", $db->escapeSimple($_SESSION['uid']), $db->escapeSimple($_GET['xheader']));
        $db->query($sql);
예제 #4
0
파일: email_view.php 프로젝트: hggh/cpves
 /*  Autoresponder end */
 /* foward option save begin */
 if (isset($_POST['fwdmail_submit'])) {
     if (!empty($_POST['forwardaddress']) && Validate::email($_POST['forwardaddress']) != 1) {
         $smarty->assign('error_msg', 'y');
         $smarty->assign('if_error_forwardaddr_valid', 'y');
     } else {
         update_mailfilter('mail_forward', $_GET['id'], $_POST['forwardaddress'], $_POST['delete_forward'], $_POST['save_local']);
         run_systemscripts();
     }
 }
 /* foward option save begin */
 /* options save begin */
 if (isset($_POST['submit_mailoptions'])) {
     update_email_options($_GET['id'], "del_dups_mails", $_POST['del_dups_mails'], 0);
     update_email_options($_GET['id'], "del_virus_notifi", $_POST['del_virus_notifi'], 0);
     update_mailfilter('del_virus_notifi', $_GET['id'], $_POST['del_virus_notifi'], 0, 0);
     update_mailfilter('del_dups_mails', $_GET['id'], $_POST['del_dups_mails'], 0, 0);
     // activate System-Script
     run_systemscripts();
 }
 $del_virus_notifi = get_email_options($_GET['id'], "del_virus_notifi", 0);
 $smarty->assign('del_virus_notifi', $del_virus_notifi);
 $del_dups_mails = get_email_options($_GET['id'], "del_dups_mails", 0);
 $smarty->assign('del_dups_mails', $del_dups_mails);
 /* option save ENDE */
 /* forward option begin */
 $sql = sprintf("SELECT type,filter FROM mailfilter WHERE email='%d' AND active!=0 AND type LIKE 'forward%%'", $db->escapeSimple($_GET['id']));
 $result =& $db->query($sql);
 if ($result->numRows() == 1) {
     $data = $result->fetchrow(DB_FETCHMODE_ASSOC);