8561dcc482e93e1f6870885841541bb315368864
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php   1) <?php
modules/imap/accounts.php   2) 
modules/imap/accounts.php   3) require_once('session/start.php');
modules/imap/accounts.php   4) 
bernd Domain-Klasse benutzen

bernd authored 16 years ago

modules/imap/accounts.php   5) require_once('class/domain.php');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php   6) require_once('mailaccounts.php');
modules/imap/accounts.php   7) 
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

modules/email/imap.php      8) require_once('inc/icons.php');
modules/email/imap.php      9) 
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  10) require_role(ROLE_SYSTEMUSER);
modules/imap/accounts.php  11) 
bernd Benutzer config-Variablen f...

bernd authored 15 years ago

modules/email/imap.php     12) 
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  13) $user = $_SESSION['userinfo'];
modules/imap/accounts.php  14) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

modules/email/imap.php     15) title("E-Mail-Accounts");
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  16) 
modules/imap/accounts.php  17) 
modules/imap/accounts.php  18) if (isset($_GET['action']) && $_GET['action'] == 'save')
modules/imap/accounts.php  19) {
modules/imap/accounts.php  20)   if (isset($_GET['id']))
modules/imap/accounts.php  21)   {
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/imap.php     22)     check_form_token('email_imap_edit');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  23)     $account = $_POST['user'].'@'.$_POST['domain'];
modules/imap/accounts.php  24)     if (isset($_POST['enabled']) && $_POST['enabled'] == 'true')
modules/imap/accounts.php  25)       $enabled = 'Y';
modules/imap/accounts.php  26)     else
modules/imap/accounts.php  27)       $enabled = 'N';
modules/imap/accounts.php  28)     $acc = array('id' => $_GET['id'], 'account' => $account, 'mailbox' => $_POST['mailbox'], 'enabled' => $enabled);
modules/imap/accounts.php  29)     if ($_POST['password'] != '')
modules/imap/accounts.php  30)       $acc['password'] = $_POST['password'];
modules/imap/accounts.php  31)     $error = check_valid($acc);
modules/imap/accounts.php  32)     if ($error != "")
modules/imap/accounts.php  33)     {
modules/imap/accounts.php  34)       input_error($error);
modules/imap/accounts.php  35)       $title = "E-Mail-Accounts";
modules/imap/accounts.php  36)       output("");
modules/imap/accounts.php  37)     }
modules/imap/accounts.php  38)     else
modules/imap/accounts.php  39)     {
modules/imap/accounts.php  40)       change_mailaccount($_GET['id'], $acc);
modules/imap/accounts.php  41)       if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/imap.php     42)         header('Location: imap');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  43)       die();
modules/imap/accounts.php  44)     }
modules/imap/accounts.php  45)   }
modules/imap/accounts.php  46)   elseif (isset($_POST['create']))
modules/imap/accounts.php  47)   {
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/imap.php     48)     check_form_token('email_imap_create');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  49)     $account = $_POST['user'].'@'.$_POST['domain'];
modules/imap/accounts.php  50)     if (isset($_POST['enabled']) && $_POST['enabled'] == 'true')
modules/imap/accounts.php  51)       $enabled = 'Y';
modules/imap/accounts.php  52)     else
modules/imap/accounts.php  53)       $enabled = 'N';
modules/imap/accounts.php  54)     $acc = array('account' => $account, 'mailbox' => $_POST['mailbox'], 'enabled' => $enabled);
modules/imap/accounts.php  55)     if ($_POST['password'] != '')
modules/imap/accounts.php  56)       $acc['password'] = $_POST['password'];
modules/imap/accounts.php  57)     $error = check_valid($acc);
modules/imap/accounts.php  58)     if ($error != "")
modules/imap/accounts.php  59)     {
modules/imap/accounts.php  60)       input_error($error);
modules/imap/accounts.php  61)       output("");
modules/imap/accounts.php  62)     }
modules/imap/accounts.php  63)     else
modules/imap/accounts.php  64)     {
modules/imap/accounts.php  65)       create_mailaccount($acc);
modules/imap/accounts.php  66)       if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/imap.php     67)         header('Location: imap');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  68)       die(); 
modules/imap/accounts.php  69)     }
modules/imap/accounts.php  70)   }
modules/imap/accounts.php  71) }
modules/imap/accounts.php  72) elseif (isset($_GET['action']) && $_GET['action'] == 'create')
modules/imap/accounts.php  73) {
bernd XSS/CSRF-Bugs behoben

bernd authored 16 years ago

modules/imap/accounts.php  74)   $options = '';
modules/imap/accounts.php  75)   $domains = get_domain_list($user['customerno'], $user['uid']);
modules/imap/accounts.php  76)   if (count($domains) > 0)
modules/imap/accounts.php  77)     $options .= '<option>----------------------------</option>';
modules/imap/accounts.php  78)   foreach ($domains as $dom)
modules/imap/accounts.php  79)     $options .= '<option value="'.$dom->fqdn.'">'.$dom->fqdn.'</option>';
modules/imap/accounts.php  80) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

modules/email/imap.php     81)   title("IMAP-Account anlegen");
modules/email/imap.php     82)   output('<p>Hier können Sie ein neues POP3/IMAP-Konto anlegen.</p>
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/imap.php     83) <p style="border: 2px solid red; background-color: white; padding:1em;"><strong>ACHTUNG:</strong> ein POP3-/IMAP-Account ist <strong>keine E-Mail-Adresse</strong>. Wenn Sie sich nicht sicher sind, lesen Sie bitte die Anleitung <a href="https://wiki.schokokeks.org/E-Mail/Konfiguration">in unserem Wiki</a>. Sie können Ihre E-Mail-Konten auch über eine einfachere Möglichkeit verwalten, dann ist eine Einrichtung über diese Weboberfläche möglich. Die Umstellung erfolgt '.internal_link("../email/domains", "unter Domains").'.</p>
modules/email/imap.php     84)   '.html_form('email_imap_create', 'imap', 'action=save', '
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  85)   <table style="margin-bottom: 1em;">
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php  86)   <tr><th>Einstellung:</th><th>Wert:</th><th>&#160;</th></tr>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  87)   <tr>
modules/imap/accounts.php  88)     <td>Benutzername:</td>
modules/imap/accounts.php  89)     <td><input type="text" id="user" name="user" />@<select name="domain" size="1">
bernd Mehr config-optionen und co...

bernd authored 14 years ago

modules/email/imap.php     90)     <option value="'.config('masterdomain').'">'.config('masterdomain').'</option>
bernd XSS/CSRF-Bugs behoben

bernd authored 16 years ago

modules/imap/accounts.php  91)   '.$options.'
modules/imap/accounts.php  92)     </select></td>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php  93)   </tr>
modules/imap/accounts.php  94)   <tr>
modules/imap/accounts.php  95)     <td>Mailbox:</td>
modules/imap/accounts.php  96)     <td><input type="text" id="mailbox" name="mailbox" value="'.$user['homedir'].'/" /></td>
modules/imap/accounts.php  97)   </tr>
modules/imap/accounts.php  98)   <tr>
modules/imap/accounts.php  99)     <td>Passwort:</td>
modules/imap/accounts.php 100)     <td><input type="password" id="password" name="password" value="" /></td>
modules/imap/accounts.php 101)   </tr>
modules/imap/accounts.php 102)   <tr>
modules/imap/accounts.php 103)     <td>Account sofort aktivieren:</td>
modules/imap/accounts.php 104)     <td><input type="checkbox" id="enabled" name="enabled" value="true" /></td>
modules/imap/accounts.php 105)   </tr>
modules/imap/accounts.php 106)   </table>
bernd XML-Fehler

bernd authored 16 years ago

modules/imap/accounts.php 107)   <p><input type="submit" name="create" value="Anlegen" /></p>
bernd XSS/CSRF-Bugs behoben

bernd authored 16 years ago

modules/imap/accounts.php 108)   '));
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 109) }
modules/imap/accounts.php 110) elseif (isset($_GET['action']) && $_GET['action'] == 'delete' && $_GET['account'] != '')
modules/imap/accounts.php 111) {
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 112)   $sure = user_is_sure();
modules/imap/accounts.php 113)   if ($sure === NULL)
modules/imap/accounts.php 114)   {
modules/imap/accounts.php 115)     $_GET['account'] = (int) $_GET['account'];
modules/imap/accounts.php 116)     $account = get_mailaccount($_GET['account']);
modules/imap/accounts.php 117)     $enabled = ($account['enabled'] ? 'Ja' : 'Nein');
bernd * alle internen Links sinnv...

bernd authored 15 years ago

modules/email/imap.php    118)     are_you_sure("action=delete&account={$_GET['account']}", '
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 119)     <p>Soll der folgende Account wirklich gelöscht werden?</p>
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 120)     <table style="margin-bottom: 1em;">
modules/imap/accounts.php 121)       <tr><td>Benutzername:</td>
modules/imap/accounts.php 122)         <td>'.filter_input_general($account['account']).'</td>
modules/imap/accounts.php 123)       </tr>
modules/imap/accounts.php 124)       <tr><td>Mailbox:</td>
modules/imap/accounts.php 125)         <td>'.filter_input_general($account['mailbox']).'</td>
modules/imap/accounts.php 126)       </tr>
modules/imap/accounts.php 127)       <tr><td>Konto aktiv:</td>
modules/imap/accounts.php 128)         <td>'.$enabled.'</td>
modules/imap/accounts.php 129)       </tr>
modules/imap/accounts.php 130)     </table>
modules/imap/accounts.php 131) ');
modules/imap/accounts.php 132)   }
modules/imap/accounts.php 133)   elseif ($sure === true)
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 134)   {
modules/imap/accounts.php 135)     delete_mailaccount($_GET['account']);
modules/imap/accounts.php 136)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/imap.php    137)       header('Location: imap');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 138)     die();
modules/imap/accounts.php 139)   }
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 140)   elseif ($sure === false)
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 141)   {
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 142)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/imap.php    143)       header("Location: imap");
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 144)     die();
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 145)   }
modules/imap/accounts.php 146) }
modules/imap/accounts.php 147) elseif (isset($_GET['edit']))
modules/imap/accounts.php 148) {
bernd Benutze überall title() sta...

bernd authored 13 years ago

modules/email/imap.php    149)   title("IMAP-Account bearbeiten");
modules/email/imap.php    150)   output('<p>Hier können Sie die Einstellungen des IMAP-Kontos bearbeiten.</p>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 151) ');
modules/imap/accounts.php 152)   $_GET['edit'] = (int) $_GET['edit'];
modules/imap/accounts.php 153)   $account = get_mailaccount($_GET['edit']);
modules/imap/accounts.php 154)   list($username, $domain) = explode('@', $account['account'], 2);
modules/imap/accounts.php 155)   $enabled = ($account['enabled'] ? ' checked="checked"' : '');
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 156)   $form = '
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 157)   <table style="margin-bottom: 1em;">
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 158)   <tr><th>Einstellung:</th><th>alter Wert:</th><th>neuer Wert:</th><th>&#160;</th></tr>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 159)   <tr><td>Benutzername:</td><td><input type="text" id="old_account" name="old_account" value="'.$account['account'].'" readonly="readonly" style="background-color: #C0C0C0;" /></td>
modules/imap/accounts.php 160)           <td><input type="text" id="user" name="user" value="'.$username.'" />@<select name="domain" id="domain" size="1">
bernd Mehr config-optionen und co...

bernd authored 14 years ago

modules/email/imap.php    161)     <option value="'.config('masterdomain').'">'.config('masterdomain').'</option>
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 162)     ';
bernd Domain-Klasse benutzen

bernd authored 16 years ago

modules/imap/accounts.php 163)     $domains = get_domain_list($user['customerno'], $user['uid']);
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 164)     if (count($domains) > 0)
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 165)       $form .= '<option>----------------------------</option>';
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 166)     foreach ($domains as $dom)
bernd Domain-Klasse benutzen

bernd authored 16 years ago

modules/imap/accounts.php 167)       if ($domain == $dom->fqdn)
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 168)         $form .= '<option value="'.$dom->fqdn.'" selected="selected">'.$dom->fqdn.'</option>';
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 169)       else
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 170)         $form .= '<option value="'.$dom->fqdn.'">'.$dom->fqdn.'</option>';
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 171) 
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 172)     $form .= '</select></td>
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 173)           <td><input type="button" onclick="document.getElementById(\'user\').value = \''.$username.'\' ; document.getElementById(\'domain\').value = \''.$domain.'\'" value="Zeile zurücksetzen" /></td></tr>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 174)   <tr><td>Mailbox:</td><td><input type="text" id="old_mailbox" name="old_mailbox" value="'.$account['mailbox'].'" readonly="readonly" style="background-color: #C0C0C0;" /></td>
modules/imap/accounts.php 175)           <td><input type="text" id="mailbox" name="mailbox" value="'.$account['mailbox'].'" /></td>
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 176)           <td><input type="button" onclick="document.getElementById(\'mailbox\').value = document.getElementById(\'old_mailbox\').value" value="Zeile zurücksetzen" /></td></tr>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 177)   <tr><td>Passwort:</td><td><i>nicht angezeigt</i></td>
modules/imap/accounts.php 178)           <td><input type="password" id="password" name="password" value="" /></td>
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 179)           <td><input type="button" onclick="document.getElementById(\'password\').value = \'\'" value="Zeile zurücksetzen" /></td></tr>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 180)   <tr><td>Konto aktiv:</td>
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 181)     <td>&#160;</td>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 182)     <td><input type="checkbox" id="enabled" name="enabled" value="true"'.$enabled.' /></td>
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 183)     <td>&#160;</td></tr>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 184)   </table>
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 185)   <p><input type="submit" value="Änderungen speichern" /><br />
modules/imap/accounts.php 186)   Hinweis: Das Passwort wird nur geändert, wenn Sie auf dieser Seite eines eingeben. Geben Sie keines an, wird das bisherige beibehalten!</p>
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

modules/imap/accounts.php 187)   ';
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/imap.php    188)   output(html_form('email_imap_edit', 'imap', 'action=save&id='.$_GET['edit'], $form));
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 189) }
modules/imap/accounts.php 190) else
modules/imap/accounts.php 191) {
bernd Benutze überall title() sta...

bernd authored 13 years ago

modules/email/imap.php    192)   title("IMAP-Accounts");
bernd IMAP-Accounts deutlicher de...

bernd authored 14 years ago

modules/email/imap.php    193)   if (user_has_only_vmail_domains())
modules/email/imap.php    194)   {
modules/email/imap.php    195)     output('<div class="error"><strong>Achtung:</strong> Alle Ihre Domains sind auf Webinterface-Verwaltung konfiguriert. Sie können dennoch manuelle IMAP-Konten für Ihre speziellen Konfigurationen anlegen, in der Regel sollten Sie aber hier keine IMAP-Acccounts anlegen. Dies kann zu Fehlfunktionen führen.</div>');
modules/email/imap.php    196)   }
modules/email/imap.php    197)   output('<p>Folgende POP3/IMAP-Konten sind eingerichtet:</p>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 198) <table style="margin-bottom: 1em;">
bernd Entities repariert

bernd authored 16 years ago

modules/imap/accounts.php 199) <tr><th>Kontoname:</th><th>Mailbox-Pfad:</th><th>aktiv</th><th>&#160;</th></tr>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 200) ');
modules/imap/accounts.php 201) 
modules/imap/accounts.php 202)         foreach (mailaccounts($user['uid']) as $account)
modules/imap/accounts.php 203)         {
modules/imap/accounts.php 204)                 $mailbox = $account['mailbox'];
modules/imap/accounts.php 205)                 if (empty($mailbox))
modules/imap/accounts.php 206)                         $mailbox = '<i>nicht festgelegt</i>';
modules/imap/accounts.php 207)                 output('<tr>
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/imap.php    208)             <td>'.internal_link('imap', $account['account'], 'edit='.$account['id']).'</td>
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 209)             <td>'.$mailbox.'</td>
modules/imap/accounts.php 210)             <td><b>'.($account['enabled'] ? 'Ja' : 'Nein').'</b></td>
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

modules/email/imap.php    211)             <td>'.internal_link("imap", icon_delete("»{$account['account']}« löschen"), "action=delete&account=".$account['id']).'</td></tr>');
bernd webinterface => /webinterface

bernd authored 17 years ago

modules/imap/accounts.php 212)         }
bernd IMAP-Accounts deutlicher de...

bernd authored 14 years ago

modules/email/imap.php    213)   output('</table>');
modules/email/imap.php    214)   if (imap_on_vmail_domain())
modules/email/imap.php    215)   {
bernd typo

bernd authored 14 years ago

modules/email/imap.php    216)     output('<div class="error"><strong>Achtung:</strong> Es scheint als hätten Sie einen (manuellen) IMAP-Account mittels einer Domain angelegt, die für Webinterface-Verwaltung konfiguriert ist. Sollten Sie nicht genau wissen was Sie tun, ist das vermutlich falsch und wird zu Fehlfunktionen führen.</div>');
bernd IMAP-Accounts deutlicher de...

bernd authored 14 years ago

modules/email/imap.php    217)   }
bernd addnew() eingeführt

bernd authored 14 years ago

modules/email/imap.php    218)   addnew("imap", "Neuen Account anlegen", "action=create");
bernd Info-Seite über Mail-Login-...

bernd authored 13 years ago

modules/email/imap.php    219) 
modules/email/imap.php    220)   output('<p>'.other_icon('information.png', 'Zugangsdaten anzeigen').' <strong>'.internal_link('logindata', 'Zugangsdaten für E-Mail-Abruf anzeigen', 'server='.get_server_by_id($_SESSION['userinfo']['server']).'&type=manual').'</strong></p>');