aa811d391f5bf692ebc4a538870a2d261bb1edb6
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/save.php   1) <?php
modules/vmail/save.php   2) 
modules/vmail/save.php   3) require_once('session/start.php');
modules/vmail/save.php   4) 
modules/vmail/save.php   5) require_once('vmail.php');
modules/vmail/save.php   6) 
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/save.php   7) require_role(array(ROLE_SYSTEMUSER, ROLE_VMAIL_ACCOUNT));
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/save.php   8) 
modules/vmail/save.php   9) require_once("inc/debug.php");
modules/vmail/save.php  10) global $debugmode;
modules/vmail/save.php  11) 
modules/vmail/save.php  12) 
modules/vmail/save.php  13) if ($_GET['action'] == 'edit')
modules/vmail/save.php  14) {
modules/vmail/save.php  15)   check_form_token('vmail_edit_mailbox');
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/save.php  16)   $accountlogin = ($_SESSION['role'] == ROLE_VMAIL_ACCOUNT);
modules/email/save.php  17) 
modules/email/save.php  18)   if ($accountlogin) {
modules/email/save.php  19)     $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
modules/email/save.php  20)     $account = get_account_details($id, false);
modules/email/save.php  21)     // Leere das, sonst werden die vervielfacht
modules/email/save.php  22)     $account['forwards'] = array();
modules/email/save.php  23)   } else {
modules/email/save.php  24)     $id = (int) $_GET['id'];
modules/email/save.php  25)   
modules/email/save.php  26)     $account = empty_account();
modules/email/save.php  27)     $account['id'] = NULL;
modules/email/save.php  28)     if ($id)
modules/email/save.php  29)       $account['id'] = $id;
modules/email/save.php  30)     $account['local'] = $_POST['local'];
modules/email/save.php  31)     $account['domain'] = (int) $_POST['domain'];
modules/email/save.php  32)     $account['password'] = $_POST['password'];
modules/email/save.php  33)     if (($account['password'] == '') && ($_POST['mailbox'] == 'yes'))
modules/email/save.php  34)       system_failure("Sie haben ein leeres Passwort eingegeben!");
modules/email/save.php  35)     if ($_POST['password'] == '**********')
modules/email/save.php  36)       $account['password'] = '';
modules/email/save.php  37)     if ($_POST['mailbox'] != 'yes')
modules/email/save.php  38)     {
modules/email/save.php  39)       $account['password'] = NULL;
modules/email/save.php  40)       $account['spamfilter'] = 'none';
modules/email/save.php  41)     }
modules/email/save.php  42)     if (isset($_POST['quota'])) {
modules/email/save.php  43)       $account['quota'] = $_POST['quota'];
modules/email/save.php  44)     }
modules/email/save.php  45)   
modules/email/save.php  46)     $account['quota_threshold'] = -1;
modules/email/save.php  47)     if (isset($_POST['quota_notify']) && isset($_POST['quota_threshold']) && $_POST['quota_notify'] == 1) {
modules/email/save.php  48)       $account['quota_threshold'] = $_POST['quota_threshold'];
modules/email/save.php  49)     }
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php  50) 
bernd Quota-Threshold für Notific...

bernd authored 13 years ago

modules/email/save.php  51)   }
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/save.php  52)   $account['spamfilter'] = $_POST['spamfilter_action'];
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/save.php  53) 
modules/email/save.php  54) 
modules/email/save.php  55)   $ar = empty_autoresponder_config();
modules/email/save.php  56)   $valid_from_date = time();
modules/email/save.php  57)   $valid_until_date = NULL;
modules/email/save.php  58)   if (isset($_POST['ar_valid_from_day']) && isset($_POST['ar_valid_from_month']) && isset($_POST['ar_valid_from_year'])) {
modules/email/save.php  59)     $valid_from_date = strtotime($_POST['ar_valid_from_year'].'-'.$_POST['ar_valid_from_month'].'-'.$_POST['ar_valid_from_day']);
modules/email/save.php  60)   }
modules/email/save.php  61)   if (isset($_POST['ar_valid_until_day']) && isset($_POST['ar_valid_until_month']) && isset($_POST['ar_valid_until_year'])) {
modules/email/save.php  62)     $valid_until_date = strtotime($_POST['ar_valid_until_year'].'-'.$_POST['ar_valid_until_month'].'-'.$_POST['ar_valid_until_day']);
modules/email/save.php  63)   }
modules/email/save.php  64)   if (isset($_POST['ar_valid_from']) && ($_POST['ar_valid_from'] == 'now' || $valid_from_date < time())) {
modules/email/save.php  65)     $valid_from_date = time();
modules/email/save.php  66)   }
modules/email/save.php  67)   $ar['valid_from'] = date('Y-m-d', $valid_from_date);
modules/email/save.php  68)   $ar['valid_until'] = date('Y-m-d', $valid_until_date);
modules/email/save.php  69)   if (!isset($_POST['autoresponder']) || $_POST['autoresponder'] != 'yes') {
modules/email/save.php  70)     $ar['valid_from'] = NULL;
modules/email/save.php  71)   }
modules/email/save.php  72)   if (isset($_POST['ar_valid_until']) && ($_POST['ar_valid_until'] == 'infinity' || $valid_until_date < time())) {
modules/email/save.php  73)     $ar['valid_until'] = NULL;
modules/email/save.php  74)   }
modules/email/save.php  75) 
modules/email/save.php  76)   if (isset($_POST['ar_subject']) && $_POST['ar_subject'] == 'custom' && isset($_POST['ar_subject_value']) && chop($_POST['ar_subject_value']) != '') {
modules/email/save.php  77)     $ar['subject'] = filter_input_general( chop($_POST['ar_subject_value']) );
modules/email/save.php  78)   }
modules/email/save.php  79) 
modules/email/save.php  80)   if (isset($_POST['ar_message'])) {
modules/email/save.php  81)     $ar['message'] = filter_input_general( $_POST['ar_message'] );
modules/email/save.php  82)   }
modules/email/save.php  83) 
modules/email/save.php  84)   if (isset($_POST['ar_quote'])) {
modules/email/save.php  85)     if ($_POST['ar_quote'] == 'inline') {
modules/email/save.php  86)       $ar['quote'] = 'inline';
modules/email/save.php  87)     }
modules/email/save.php  88)     if ($_POST['ar_quote'] == 'attach') {
modules/email/save.php  89)       $ar['quote'] = 'attach';
modules/email/save.php  90)     }
modules/email/save.php  91)   }
modules/email/save.php  92) 
modules/email/save.php  93)   if (isset($_POST['ar_from']) && $_POST['ar_from'] == 'custom' && isset($_POST['ar_fromname'])) {
modules/email/save.php  94)     $ar['fromname'] = filter_input_general( $_POST['ar_fromname']);
modules/email/save.php  95)   }
modules/email/save.php  96)     
modules/email/save.php  97)   $account['autoresponder'] = $ar;
modules/email/save.php  98) 
modules/email/save.php  99) 
modules/email/save.php 100) 
bernd VMail-Quota-Zeug

bernd authored 13 years ago

modules/email/save.php 101)   if (isset($_POST['forward']) && $_POST['forward'] == 'yes')
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php 102)   {
modules/vmail/save.php 103)     $num = 1;
modules/vmail/save.php 104)     while (true)
modules/vmail/save.php 105)     {
modules/vmail/save.php 106)       if (! isset($_POST['forward_to_'.$num]))
modules/vmail/save.php 107)         break;
bernd Bugfixes

bernd authored 16 years ago

modules/vmail/save.php 108)       if ($_POST['forward_to_'.$num] == '')
modules/vmail/save.php 109)         break;
bernd Filtere Leerzeichen am Anfa...

bernd authored 14 years ago

modules/email/save.php 110)       $fwd = array("spamfilter" => $_POST['spamfilter_action_'.$num], "destination" => chop($_POST['forward_to_'.$num]));
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php 111)       array_push($account['forwards'], $fwd);
modules/vmail/save.php 112)       $num++;
modules/vmail/save.php 113)     }
bernd diverse spezial/fehlerfälle...

bernd authored 16 years ago

modules/vmail/save.php 114)     if ($num == 1) system_failure("Bitte mindestens eine Weiterleitungsadresse angeben.");
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php 115)   }
bernd diverse spezial/fehlerfälle...

bernd authored 16 years ago

modules/vmail/save.php 116) 
bernd VMail-Quota-Zeug

bernd authored 13 years ago

modules/email/save.php 117)   if ((isset($_POST['forward']) && $_POST['forward']!='yes') && ($_POST['mailbox']!='yes'))
bernd diverse spezial/fehlerfälle...

bernd authored 16 years ago

modules/vmail/save.php 118)     system_failure("Entweder eine Mailbox oder eine Weiterleitung muss angegeben werden!");
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/save.php 119) 
modules/vmail/save.php 120)   DEBUG($account);
modules/vmail/save.php 121) 
modules/vmail/save.php 122)   save_vmail_account($account);
modules/vmail/save.php 123) 
modules/vmail/save.php 124)   if (! ($debugmode || we_have_an_error()))
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/save.php 125)     if ($accountlogin) {
modules/email/save.php 126)       header('Location: ../index/index');
modules/email/save.php 127)     } else {
modules/email/save.php 128)       header('Location: vmail');
modules/email/save.php 129)     }
bernd Löschen geht jetzt auch

bernd authored 17 years ago

modules/vmail/save.php 130) }
modules/vmail/save.php 131) elseif ($_GET['action'] == 'delete')
modules/vmail/save.php 132) {
modules/vmail/save.php 133)   $title = "E-mail-Adresse löschen";
modules/vmail/save.php 134)   $section = 'vmail_vmail';
modules/vmail/save.php 135) 
modules/vmail/save.php 136)   $account = get_account_details( (int) $_GET['id'] );
modules/vmail/save.php 137) 
modules/vmail/save.php 138)   $domain = NULL;
modules/vmail/save.php 139)   $domains = get_vmail_domains();
modules/vmail/save.php 140)   foreach ($domains as $dom)
modules/vmail/save.php 141)     if ($dom->id == $account['domain'])
modules/vmail/save.php 142)     {
modules/vmail/save.php 143)       $domain = $dom->domainname;
modules/vmail/save.php 144)       break;
modules/vmail/save.php 145)     }
modules/vmail/save.php 146)   $account_string = $account['local'] . "@" . $domain;
modules/vmail/save.php 147)   $sure = user_is_sure();
modules/vmail/save.php 148)   if ($sure === NULL)
modules/vmail/save.php 149)   {
bernd * alle internen Links sinnv...

bernd authored 15 years ago

modules/email/save.php 150)     are_you_sure("action=delete&id={$account['id']}", "Möchten Sie die E-Mail-Adresse »{$account_string}« wirklich löschen?");
bernd Löschen geht jetzt auch

bernd authored 17 years ago

modules/vmail/save.php 151)   }
modules/vmail/save.php 152)   elseif ($sure === true)
modules/vmail/save.php 153)   {
modules/vmail/save.php 154)     delete_account($account['id']);
modules/vmail/save.php 155)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 16 years ago

modules/email/save.php 156)       header("Location: vmail");
bernd Löschen geht jetzt auch

bernd authored 17 years ago

modules/vmail/save.php 157)   }
modules/vmail/save.php 158)   elseif ($sure === false)
modules/vmail/save.php 159)   {
modules/vmail/save.php 160)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 16 years ago

modules/email/save.php 161)       header("Location: vmail");
bernd Löschen geht jetzt auch

bernd authored 17 years ago

modules/vmail/save.php 162)   }