Example #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']);
Example #2
0
 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);
     if ($data['type'] == "forward_cc") {
         // mit kopie ans lokale postfach