$_GET['id'], 'account' => $account, 'mailbox' => $_POST['mailbox'], 'enabled' => $enabled); if ($_POST['password'] != '') $acc['password'] = $_POST['password']; $error = check_valid($acc); if ($error != "") { input_error($error); $section = "mail"; $title = "E-Mail-Accounts"; output(""); } else { change_mailaccount($_GET['id'], $acc); if (! $debugmode) header('Location: accounts.php'); die(); } } elseif (isset($_POST['create'])) { check_form_token('imap_accounts_create'); $account = $_POST['user'].'@'.$_POST['domain']; if (isset($_POST['enabled']) && $_POST['enabled'] == 'true') $enabled = 'Y'; else $enabled = 'N'; $acc = array('account' => $account, 'mailbox' => $_POST['mailbox'], 'enabled' => $enabled); if ($_POST['password'] != '') $acc['password'] = $_POST['password']; $error = check_valid($acc); if ($error != "") { input_error($error); output(""); } else { create_mailaccount($acc); if (! $debugmode) header('Location: accounts.php'); die(); } } } elseif (isset($_GET['action']) && $_GET['action'] == 'create') { output('
Hier können Sie ein neues POP3/IMAP-Konto anlegen.
'); } elseif (isset($_GET['action']) && $_GET['action'] == 'delete' && $_GET['account'] != '') { if ($_POST['confirm'] == 'yes') { check_form_token('imap_accounts_delete'); delete_mailaccount($_GET['account']); if (! $debugmode) header('Location: accounts.php'); die(); } else { output('Soll der folgende Account wirklich gelöscht werden?
'); $_GET['account'] = (int) $_GET['account']; $account = get_mailaccount($_GET['account']); $enabled = ($account['enabled'] ? 'Ja' : 'Nein'); output(' '); } } elseif (isset($_GET['edit'])) { output('Hier können Sie die Einstellungen des IMAP-Kontos bearbeiten.
'); $_GET['edit'] = (int) $_GET['edit']; $account = get_mailaccount($_GET['edit']); list($username, $domain) = explode('@', $account['account'], 2); $enabled = ($account['enabled'] ? ' checked="checked"' : ''); output(' '); } else { output('Folgende POP3/IMAP-Konten sind eingerichtet:
Benutzername: | Mailbox-Pfad: | aktiv | ||
---|---|---|---|---|
'.$account['account'].' | '.$mailbox.' | '.($account['enabled'] ? 'Ja' : 'Nein').' | bearbeiten | löschen |