67d3ffab626b1f3cd94864ec65b8e26b41567d94
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) 
modules/vmail/save.php   7) require_role(ROLE_SYSTEMUSER);
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');
modules/vmail/save.php  16)   $id = (int) $_GET['id'];
modules/vmail/save.php  17) 
modules/vmail/save.php  18)   $account = empty_account();
modules/vmail/save.php  19)   $account['id'] = NULL;
modules/vmail/save.php  20)   if ($id)
modules/vmail/save.php  21)     $account['id'] = $id;
modules/vmail/save.php  22)   $account['local'] = $_POST['local'];
modules/vmail/save.php  23)   $account['domain'] = (int) $_POST['domain'];
modules/vmail/save.php  24)   $account['spamfilter'] = $_POST['spamfilter_action'];
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php  25)   $account['password'] = $_POST['password'];
bernd diverse spezial/fehlerfälle...

bernd authored 16 years ago

modules/vmail/save.php  26)   if (($account['password'] == '') && ($_POST['mailbox'] == 'yes'))
modules/vmail/save.php  27)     system_failure("Sie haben ein leeres Passwort eingegeben!");
bernd Sterne in das Passwort-Feld...

bernd authored 16 years ago

modules/vmail/save.php  28)   if ($_POST['password'] == '**********')
modules/vmail/save.php  29)     $account['password'] = '';
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php  30)   if ($_POST['mailbox'] != 'yes')
bernd Setze Spamfilter=none wenn...

bernd authored 16 years ago

modules/vmail/save.php  31)   {
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php  32)     $account['password'] = NULL;
bernd Setze Spamfilter=none wenn...

bernd authored 16 years ago

modules/vmail/save.php  33)     $account['spamfilter'] = 'none';
modules/vmail/save.php  34)   }
bernd Mailaccount-Quota auch bei...

bernd authored 13 years ago

modules/email/save.php  35)   if (isset($_POST['quota'])) {
modules/email/save.php  36)     $account['quota'] = $_POST['quota'];
modules/email/save.php  37)   }
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/save.php  38) 
modules/vmail/save.php  39)   if ($_POST['forward'] == 'yes')
modules/vmail/save.php  40)   {
modules/vmail/save.php  41)     $num = 1;
modules/vmail/save.php  42)     while (true)
modules/vmail/save.php  43)     {
modules/vmail/save.php  44)       if (! isset($_POST['forward_to_'.$num]))
modules/vmail/save.php  45)         break;
bernd Bugfixes

bernd authored 16 years ago

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

bernd authored 14 years ago

modules/email/save.php  48)       $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  49)       array_push($account['forwards'], $fwd);
modules/vmail/save.php  50)       $num++;
modules/vmail/save.php  51)     }
bernd diverse spezial/fehlerfälle...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

modules/vmail/save.php  54) 
modules/vmail/save.php  55)   if (($_POST['forward']!='yes') && ($_POST['mailbox']!='yes'))
modules/vmail/save.php  56)     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  57) 
modules/vmail/save.php  58)   DEBUG($account);
modules/vmail/save.php  59) 
modules/vmail/save.php  60)   save_vmail_account($account);
modules/vmail/save.php  61) 
modules/vmail/save.php  62)   if (! ($debugmode || we_have_an_error()))
bernd eliminate .php extensions f...

bernd authored 16 years ago

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

bernd authored 17 years ago

modules/vmail/save.php  64) }
modules/vmail/save.php  65) elseif ($_GET['action'] == 'delete')
modules/vmail/save.php  66) {
modules/vmail/save.php  67)   $title = "E-mail-Adresse löschen";
modules/vmail/save.php  68)   $section = 'vmail_vmail';
modules/vmail/save.php  69) 
modules/vmail/save.php  70)   $account = get_account_details( (int) $_GET['id'] );
modules/vmail/save.php  71) 
modules/vmail/save.php  72)   $domain = NULL;
modules/vmail/save.php  73)   $domains = get_vmail_domains();
modules/vmail/save.php  74)   foreach ($domains as $dom)
modules/vmail/save.php  75)     if ($dom->id == $account['domain'])
modules/vmail/save.php  76)     {
modules/vmail/save.php  77)       $domain = $dom->domainname;
modules/vmail/save.php  78)       break;
modules/vmail/save.php  79)     }
modules/vmail/save.php  80)   $account_string = $account['local'] . "@" . $domain;
modules/vmail/save.php  81)   $sure = user_is_sure();
modules/vmail/save.php  82)   if ($sure === NULL)
modules/vmail/save.php  83)   {
bernd * alle internen Links sinnv...

bernd authored 15 years ago

modules/email/save.php  84)     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  85)   }
modules/vmail/save.php  86)   elseif ($sure === true)
modules/vmail/save.php  87)   {
modules/vmail/save.php  88)     delete_account($account['id']);
modules/vmail/save.php  89)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 16 years ago

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

bernd authored 17 years ago

modules/vmail/save.php  91)   }
modules/vmail/save.php  92)   elseif ($sure === false)
modules/vmail/save.php  93)   {
modules/vmail/save.php  94)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 16 years ago

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

bernd authored 17 years ago

modules/vmail/save.php  96)   }