commit e0b946dd8b114ac17fb1ceb84acc1dd8236cadf7 from: mischa date: Sun Sep 04 11:10:23 2022 UTC create -> add commit - 299eeaee3ffbac49b88577bef60c6267da27c4a9 commit + e0b946dd8b114ac17fb1ceb84acc1dd8236cadf7 blob - 8d1c032bca3178cc8dd458ee69671254e4caceac blob + ac2bcfffbb87b0fb863a84f7c4c6cbb4ccda9d09 --- admin/add-alias.php +++ admin/add-alias.php @@ -27,12 +27,18 @@ include '../languages/' . check_language() . '.lang'; $list_domains = list_domains(); +if ($_SERVER['REQUEST_METHOD'] == "GET") { + $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN); + $domain_key = array_search($domain, array_column($list_domains, 'domain')); +} + if ($_SERVER['REQUEST_METHOD'] == "POST") { $address = strtolower(filter_input(INPUT_POST, 'address', FILTER_DEFAULT)); $domain = filter_input(INPUT_POST, 'domain', FILTER_VALIDATE_DOMAIN); $goto = strtolower(filter_input(INPUT_POST, 'goto', FILTER_DEFAULT)); $domain_key = array_search($domain, array_column($list_domains, 'domain')); + print "$domain_key"; $from = filter_var($address . '@' . $domain, FILTER_VALIDATE_EMAIL); if (!str_contains($goto, '@')) { blob - 76e84c072cbd0f992e7e8077d5750c402b44912b blob + d6f2fe79c4154dc312e8d23ede8a84d6292f3838 --- admin/add-mailbox.php +++ admin/add-mailbox.php @@ -29,8 +29,12 @@ include '../languages/' . check_language() . '.lang'; $list_domains = list_domains(); -if ($_SERVER['REQUEST_METHOD'] == "POST") { +if ($_SERVER['REQUEST_METHOD'] == "GET") { + $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN); + $domain_key = array_search($domain, array_column($list_domains, 'domain')); +} +if ($_SERVER['REQUEST_METHOD'] == "POST") { $username = strtolower(filter_input(INPUT_POST, 'username', FILTER_DEFAULT)); $domain = filter_input(INPUT_POST, 'domain', FILTER_VALIDATE_DOMAIN); $password1 = filter_input(INPUT_POST, 'password1', FILTER_DEFAULT); blob - c9e46062bd0305b15094b7503456b6f111e71934 blob + 76e1928704369e4c51739f3df2fef920432f5a61 --- admin/list-virtual.php +++ admin/list-virtual.php @@ -29,7 +29,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") { $limit = PAGE_SIZE; if (count($list_domains) > 0) { $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN) ?? $list_domains[0]['domain']; - $selected_domain = array_search($domain, array_column($list_domains, 'domain')); + $domain_key = array_search($domain, array_column($list_domains, 'domain')); $list_alias = list_aliases($domain, $offset, $limit); $list_mailbox = list_mailboxes($domain, $offset, $limit); } blob - 43fdcadb3f53805bd0dcf8aa5d43b4d400f2a5e3 blob + 40d9de400f98399bacb2cc84258ca448571766a1 --- admin/viewlog.php +++ admin/viewlog.php @@ -24,6 +24,7 @@ $list_domains = list_domains(); if ($_SERVER['REQUEST_METHOD'] == "GET") { $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN) ?? $list_domains[0]['domain']; + $domain_key = array_search($domain, array_column($list_domains, 'domain')); $dbh = connect_db(); $sth = $dbh->prepare("SELECT * FROM log WHERE domain=? ORDER BY timestamp DESC LIMIT 10"); $sth->bindParam(1, $domain, PDO::PARAM_STR); blob - /dev/null blob + d3f7356c5473993e6c2ee78eb59056b5ee3b4263 (mode 644) --- /dev/null +++ add-alias.php @@ -0,0 +1,112 @@ + +// Copyright (c) 2022 High5! +// License Info: LICENSE.TXT +// +// File: create-alias.php +// +// Template File: create-alias.tpl +// +// Template Variables: +// +// tMessage +// tAddress +// tGoto +// tDomain +// +// Form POST \ GET Variables: +// +// fAddress +// fGoto +// fDomain +// +require("./functions.inc.php"); +include("./languages/" . check_language() . ".lang"); + +$SESSID_USERNAME = check_session(); +$list_domains = list_domains($SESSID_USERNAME); + +if ($_SERVER['REQUEST_METHOD'] == "GET") { + $pCreate_alias_goto_text = $LANG['Create_alias_goto_text']; + + if (isset($_GET['domain'])) $tDomain = escape_string($_GET['domain']); +} + +if ($_SERVER['REQUEST_METHOD'] == "POST") { + $pCreate_alias_goto_text = $LANG['Create_alias_goto_text']; + + $fAddress = escape_string($_POST['fAddress']) . "@" . escape_string($_POST['fDomain']); + $fAddress = strtolower($fAddress); + $fGoto = escape_string($_POST['fGoto']); + $fGoto = strtolower($fGoto); + $fDomain = escape_string($_POST['fDomain']); + + if (!preg_match('/@/',$fGoto)) { + $fGoto = $fGoto . "@" . escape_string($_POST['fDomain']); + } + + if (!check_owner($SESSID_USERNAME, $fDomain)) { + $error = 1; + $tAddress = escape_string($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $LANG['Create_alias_address_text_error1']; + } + + if (!check_alias($fDomain)) { + $error = 1; + $tAddress = escape_string($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $LANG['Create_alias_address_text_error3']; + } + + if (empty($fAddress) or !check_email($fAddress)) { + $error = 1; + $tAddress = escape_string($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $LANG['Create_alias_address_text_error1']; + } + + if (empty($fGoto) or !check_email($fGoto)) { + $error = 1; + $tAddress = escape_string($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_goto_text = $LANG['Create_alias_goto_text_error']; + } + + if (escape_string($_POST['fAddress']) == "*") $fAddress = "@" . escape_string($_POST['fDomain']); + + $result = db_query("SELECT * FROM alias WHERE address='$fAddress'"); + if ($result['rows'] == 1) { + $error = 1; + $tAddress = escape_string($_POST['fAddress']); + $tGoto = $fGoto; + $tDomain = $fDomain; + $pCreate_alias_address_text = $LANG['Create_alias_address_text_error2']; + } + + if ($error != 1) { + if (preg_match('/^\*@(.*)$/', $fGoto, $match)) $fGoto = "@" . $match[1]; + + $result = db_query("INSERT INTO alias (address,goto,domain,created,modified) VALUES ('$fAddress','$fGoto','$fDomain',NOW(),NOW())"); + if ($result['rows'] != 1) { + $tDomain = $fDomain; + $tMessage = $LANG['Create_alias_result_error'] . "
($fAddress -> $fGoto)
\n"; + } else { + db_log($SESSID_USERNAME, $fDomain, "create alias", "$fAddress -> $fGoto"); + + $tDomain = $fDomain; + $tMessage = $LANG['Create_alias_result_succes'] . "
($fAddress -> $fGoto)
\n"; + } + } +} +include("./templates/header.tpl"); +include("./templates/menu.tpl"); +include("./templates/add-alias.tpl"); +include("./templates/footer.tpl"); +?> blob - /dev/null blob + 23698790470ccda7a42802a038efdb6a87b52708 (mode 644) --- /dev/null +++ add-mailbox.php @@ -0,0 +1,191 @@ + +// Copyright (c) 2022 High5! +// License Info: LICENSE.TXT +// +// File: create-mailbox.php +// +// Template File: create-mailbox.tpl +// +// Template Variables: +// +// tMessage +// tUsername +// tName +// tQuota +// tDomain +// +// Form POST \ GET Variables: +// +// fUsername +// fPassword +// fPassword2 +// fName +// fQuota +// fDomain +// fActive +// fMail +// +require("./functions.inc.php"); +include("./languages/" . check_language() . ".lang"); + +$SESSID_USERNAME = check_session(); +$list_domains = list_domains($SESSID_USERNAME); + +if ($_SERVER['REQUEST_METHOD'] == "GET") { + $tQuota = $CONF['maxquota']; + + $pCreate_mailbox_password_text = $LANG['Create_mailbox_password_text']; + $pCreate_mailbox_name_text = $LANG['Create_mailbox_name_text']; + $pCreate_mailbox_quota_text = $LANG['Create_mailbox_quota_text']; + + if (isset($_GET['domain'])) $tDomain = escape_string($_GET['domain']); +} + +if ($_SERVER['REQUEST_METHOD'] == "POST") { + $pCreate_mailbox_password_text = $LANG['Create_mailbox_password_text']; + $pCreate_mailbox_name_text = $LANG['Create_mailbox_name_text']; + $pCreate_mailbox_quota_text = $LANG['Create_mailbox_quota_text']; + + $fUsername = escape_string($_POST['fUsername']) . "@" . escape_string($_POST['fDomain']); + $fUsername = strtolower($fUsername); + $fPassword = escape_string($_POST['fPassword']); + $fPassword2 = escape_string($_POST['fPassword2']); + $fName = escape_string($_POST['fName']); + $fDomain = escape_string($_POST['fDomain']); + if (isset($_POST['fQuota'])) $fQuota = escape_string($_POST['fQuota']); + if (isset($_POST['fActive'])) $fActive = escape_string($_POST['fActive']); + if (isset($_POST['fMail'])) $fMail = escape_string($_POST['fMail']); + + if (!check_owner($SESSID_USERNAME, $fDomain)) { + $error = 1; + $tUsername = escape_string($_POST['fUsername']); + $tName = $fName; + $tQuota = $fQuota; + $tDomain = $fDomain; + $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error1']; + } + + if (!check_mailbox($fDomain)) { + $error = 1; + $tUsername = escape_string($_POST['fUsername']); + $tName = $fName; + $tQuota = $fQuota; + $tDomain = $fDomain; + $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error3']; + } + + if (empty($fUsername) or !check_email($fUsername)) { + $error = 1; + $tUsername = escape_string($_POST['fUsername']); + $tName = $fName; + $tQuota = $fQuota; + $tDomain = $fDomain; + $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error1']; + } + + if (empty($fPassword) or ($fPassword != $fPassword2)) { + if ($CONF['generate_password'] == "YES") { + $fPassword = generate_password(); + } else { + $error = 1; + $tUsername = escape_string($_POST['fUsername']); + $tName = $fName; + $tQuota = $fQuota; + $tDomain = $fDomain; + $pCreate_mailbox_password_text = $LANG['Create_mailbox_password_text_error']; + } + } + + if ($CONF['quota'] == "YES") { + if (!check_quota($fQuota, $fDomain)) { + $error = 1; + $tUsername = escape_string($_POST['fUsername']); + $tName = $fName; + $tQuota = $fQuota; + $tDomain = $fDomain; + $pCreate_mailbox_quota_text = $LANG['Create_mailbox_quota_text_error']; + } + } + + $result = db_query("SELECT * FROM alias WHERE address='$fUsername'"); + if ($result['rows'] == 1) { + $error = 1; + $tUsername = escape_string($_POST['fUsername']); + $tName = $fName; + $tQuota = $fQuota; + $tDomain = $fDomain; + $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error2']; + } + + if ($error != 1) { + $password = pacrypt($fPassword); + + if ($CONF['domain_path'] == "YES") { + if ($CONF['domain_in_mailbox'] == "YES") { + $maildir = $fDomain . "/" . $fUsername . "/"; + } else { + $maildir = $fDomain . "/" . escape_string($_POST['fUsername']) . "/"; + } + } else { + $maildir = $fUsername . "/"; + } + + if (!empty($fQuota)) { + $quota = $fQuota * $CONF['quota_multiplier']; + } else { + $quota = 0; + } + + if ($fActive == "on") { + $fActive = 1; + } else { + $fActive = 0; + } + + $result = db_query("INSERT INTO alias (address,goto,domain,created,modified,active) VALUES ('$fUsername','vmail','$fDomain',NOW(),NOW(),'$fActive')"); + if ($result['rows'] != 1) { + $tDomain = $fDomain; + $tMessage = $LANG['Alias_result_error'] . "
($fUsername -> $fUsername)
"; + } + + $result = db_query("INSERT INTO mailbox (username,password,name,maildir,quota,domain,created,modified,active) VALUES ('$fUsername','$password','$fName','$maildir','$quota','$fDomain',NOW(),NOW(),'$fActive')"); + if ($result['rows'] != 1) { + $tDomain = $fDomain; + $tMessage .= $LANG['Create_mailbox_result_error'] . "
($fUsername)
"; + } else { + db_log($SESSID_USERNAME, $fDomain, "create mailbox", "$fUsername"); + + $tDomain = $fDomain; + $tMessage = $LANG['Create_mailbox_result_succes'] . "
($fUsername"; + if ($CONF['generate_password'] == "YES") { + $tMessage .= " / $fPassword)
"; + } else { + $tMessage .= ")
"; + } + + $tQuota = $CONF['maxquota']; + + if ($fMail == "on") { + $fTo = $fUsername; + $fSubject = $LANG['Sendmail_subject_text']; + $fHeaders = "From: " . $SESSID_USERNAME . "\r\n"; + $fHeaders .= "Content-Type: text/plain; charset=utf-8\r\n"; + $fBody = $CONF['welcome_text']; + + if (!mail($fTo, $fSubject, $fBody, $fHeaders)) { + $tMessage .= "
" . $LANG['Sendmail_result_error'] . "
"; + } else { + $tMessage .= "
" . $LANG['Sendmail_result_succes'] . "
"; + } + } + } + } +} +include("./templates/header.tpl"); +include("./templates/menu.tpl"); +include("./templates/add-mailbox.tpl"); +include("./templates/footer.tpl"); +?> blob - 7a1895d5dcbd6ecde053d5aa0320bd810a00211b (mode 644) blob + /dev/null --- create-alias.php +++ /dev/null @@ -1,114 +0,0 @@ - -// Copyright (c) 2022 High5! -// License Info: LICENSE.TXT -// -// File: create-alias.php -// -// Template File: create-alias.tpl -// -// Template Variables: -// -// tMessage -// tAddress -// tGoto -// tDomain -// -// Form POST \ GET Variables: -// -// fAddress -// fGoto -// fDomain -// -require("./variables.inc.php"); -require("./config.inc.php"); -require("./functions.inc.php"); -include("./languages/" . check_language() . ".lang"); - -$SESSID_USERNAME = check_session(); -$list_domains = list_domains_for_admin($SESSID_USERNAME); - -if ($_SERVER['REQUEST_METHOD'] == "GET") { - $pCreate_alias_goto_text = $LANG['Create_alias_goto_text']; - - if (isset($_GET['domain'])) $tDomain = escape_string($_GET['domain']); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") { - $pCreate_alias_goto_text = $LANG['Create_alias_goto_text']; - - $fAddress = escape_string($_POST['fAddress']) . "@" . escape_string($_POST['fDomain']); - $fAddress = strtolower($fAddress); - $fGoto = escape_string($_POST['fGoto']); - $fGoto = strtolower($fGoto); - $fDomain = escape_string($_POST['fDomain']); - - if (!preg_match('/@/',$fGoto)) { - $fGoto = $fGoto . "@" . escape_string($_POST['fDomain']); - } - - if (!check_owner($SESSID_USERNAME, $fDomain)) { - $error = 1; - $tAddress = escape_string($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $LANG['Create_alias_address_text_error1']; - } - - if (!check_alias($fDomain)) { - $error = 1; - $tAddress = escape_string($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $LANG['Create_alias_address_text_error3']; - } - - if (empty($fAddress) or !check_email($fAddress)) { - $error = 1; - $tAddress = escape_string($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $LANG['Create_alias_address_text_error1']; - } - - if (empty($fGoto) or !check_email($fGoto)) { - $error = 1; - $tAddress = escape_string($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_goto_text = $LANG['Create_alias_goto_text_error']; - } - - if (escape_string($_POST['fAddress']) == "*") $fAddress = "@" . escape_string($_POST['fDomain']); - - $result = db_query("SELECT * FROM alias WHERE address='$fAddress'"); - if ($result['rows'] == 1) { - $error = 1; - $tAddress = escape_string($_POST['fAddress']); - $tGoto = $fGoto; - $tDomain = $fDomain; - $pCreate_alias_address_text = $LANG['Create_alias_address_text_error2']; - } - - if ($error != 1) { - if (preg_match('/^\*@(.*)$/', $fGoto, $match)) $fGoto = "@" . $match[1]; - - $result = db_query("INSERT INTO alias (address,goto,domain,created,modified) VALUES ('$fAddress','$fGoto','$fDomain',NOW(),NOW())"); - if ($result['rows'] != 1) { - $tDomain = $fDomain; - $tMessage = $LANG['Create_alias_result_error'] . "
($fAddress -> $fGoto)
\n"; - } else { - db_log($SESSID_USERNAME, $fDomain, "create alias", "$fAddress -> $fGoto"); - - $tDomain = $fDomain; - $tMessage = $LANG['Create_alias_result_succes'] . "
($fAddress -> $fGoto)
\n"; - } - } -} -include("./templates/header.tpl"); -include("./templates/menu.tpl"); -include("./templates/create-alias.tpl"); -include("./templates/footer.tpl"); -?> blob - 3c3b82917b9dc0488dd52cf0af1f9a8a2ee62010 (mode 644) blob + /dev/null --- create-mailbox.php +++ /dev/null @@ -1,193 +0,0 @@ - -// Copyright (c) 2022 High5! -// License Info: LICENSE.TXT -// -// File: create-mailbox.php -// -// Template File: create-mailbox.tpl -// -// Template Variables: -// -// tMessage -// tUsername -// tName -// tQuota -// tDomain -// -// Form POST \ GET Variables: -// -// fUsername -// fPassword -// fPassword2 -// fName -// fQuota -// fDomain -// fActive -// fMail -// -require("./variables.inc.php"); -require("./config.inc.php"); -require("./functions.inc.php"); -include("./languages/" . check_language() . ".lang"); - -$SESSID_USERNAME = check_session(); -$list_domains = list_domains_for_admin($SESSID_USERNAME); - -if ($_SERVER['REQUEST_METHOD'] == "GET") { - $tQuota = $CONF['maxquota']; - - $pCreate_mailbox_password_text = $LANG['Create_mailbox_password_text']; - $pCreate_mailbox_name_text = $LANG['Create_mailbox_name_text']; - $pCreate_mailbox_quota_text = $LANG['Create_mailbox_quota_text']; - - if (isset($_GET['domain'])) $tDomain = escape_string($_GET['domain']); -} - -if ($_SERVER['REQUEST_METHOD'] == "POST") { - $pCreate_mailbox_password_text = $LANG['Create_mailbox_password_text']; - $pCreate_mailbox_name_text = $LANG['Create_mailbox_name_text']; - $pCreate_mailbox_quota_text = $LANG['Create_mailbox_quota_text']; - - $fUsername = escape_string($_POST['fUsername']) . "@" . escape_string($_POST['fDomain']); - $fUsername = strtolower($fUsername); - $fPassword = escape_string($_POST['fPassword']); - $fPassword2 = escape_string($_POST['fPassword2']); - $fName = escape_string($_POST['fName']); - $fDomain = escape_string($_POST['fDomain']); - if (isset($_POST['fQuota'])) $fQuota = escape_string($_POST['fQuota']); - if (isset($_POST['fActive'])) $fActive = escape_string($_POST['fActive']); - if (isset($_POST['fMail'])) $fMail = escape_string($_POST['fMail']); - - if (!check_owner($SESSID_USERNAME, $fDomain)) { - $error = 1; - $tUsername = escape_string($_POST['fUsername']); - $tName = $fName; - $tQuota = $fQuota; - $tDomain = $fDomain; - $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error1']; - } - - if (!check_mailbox($fDomain)) { - $error = 1; - $tUsername = escape_string($_POST['fUsername']); - $tName = $fName; - $tQuota = $fQuota; - $tDomain = $fDomain; - $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error3']; - } - - if (empty($fUsername) or !check_email($fUsername)) { - $error = 1; - $tUsername = escape_string($_POST['fUsername']); - $tName = $fName; - $tQuota = $fQuota; - $tDomain = $fDomain; - $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error1']; - } - - if (empty($fPassword) or ($fPassword != $fPassword2)) { - if ($CONF['generate_password'] == "YES") { - $fPassword = generate_password(); - } else { - $error = 1; - $tUsername = escape_string($_POST['fUsername']); - $tName = $fName; - $tQuota = $fQuota; - $tDomain = $fDomain; - $pCreate_mailbox_password_text = $LANG['Create_mailbox_password_text_error']; - } - } - - if ($CONF['quota'] == "YES") { - if (!check_quota($fQuota, $fDomain)) { - $error = 1; - $tUsername = escape_string($_POST['fUsername']); - $tName = $fName; - $tQuota = $fQuota; - $tDomain = $fDomain; - $pCreate_mailbox_quota_text = $LANG['Create_mailbox_quota_text_error']; - } - } - - $result = db_query("SELECT * FROM alias WHERE address='$fUsername'"); - if ($result['rows'] == 1) { - $error = 1; - $tUsername = escape_string($_POST['fUsername']); - $tName = $fName; - $tQuota = $fQuota; - $tDomain = $fDomain; - $pCreate_mailbox_username_text = $LANG['Create_mailbox_username_text_error2']; - } - - if ($error != 1) { - $password = pacrypt($fPassword); - - if ($CONF['domain_path'] == "YES") { - if ($CONF['domain_in_mailbox'] == "YES") { - $maildir = $fDomain . "/" . $fUsername . "/"; - } else { - $maildir = $fDomain . "/" . escape_string($_POST['fUsername']) . "/"; - } - } else { - $maildir = $fUsername . "/"; - } - - if (!empty($fQuota)) { - $quota = $fQuota * $CONF['quota_multiplier']; - } else { - $quota = 0; - } - - if ($fActive == "on") { - $fActive = 1; - } else { - $fActive = 0; - } - - $result = db_query("INSERT INTO alias (address,goto,domain,created,modified,active) VALUES ('$fUsername','vmail','$fDomain',NOW(),NOW(),'$fActive')"); - if ($result['rows'] != 1) { - $tDomain = $fDomain; - $tMessage = $LANG['Alias_result_error'] . "
($fUsername -> $fUsername)
"; - } - - $result = db_query("INSERT INTO mailbox (username,password,name,maildir,quota,domain,created,modified,active) VALUES ('$fUsername','$password','$fName','$maildir','$quota','$fDomain',NOW(),NOW(),'$fActive')"); - if ($result['rows'] != 1) { - $tDomain = $fDomain; - $tMessage .= $LANG['Create_mailbox_result_error'] . "
($fUsername)
"; - } else { - db_log($SESSID_USERNAME, $fDomain, "create mailbox", "$fUsername"); - - $tDomain = $fDomain; - $tMessage = $LANG['Create_mailbox_result_succes'] . "
($fUsername"; - if ($CONF['generate_password'] == "YES") { - $tMessage .= " / $fPassword)
"; - } else { - $tMessage .= ")
"; - } - - $tQuota = $CONF['maxquota']; - - if ($fMail == "on") { - $fTo = $fUsername; - $fSubject = $LANG['Sendmail_subject_text']; - $fHeaders = "From: " . $SESSID_USERNAME . "\r\n"; - $fHeaders .= "Content-Type: text/plain; charset=utf-8\r\n"; - $fBody = $CONF['welcome_text']; - - if (!mail($fTo, $fSubject, $fBody, $fHeaders)) { - $tMessage .= "
" . $LANG['Sendmail_result_error'] . "
"; - } else { - $tMessage .= "
" . $LANG['Sendmail_result_succes'] . "
"; - } - } - } - } -} -include("./templates/header.tpl"); -include("./templates/menu.tpl"); -include("./templates/create-mailbox.tpl"); -include("./templates/footer.tpl"); -?> blob - b10de07cab0b29113833827477611ba24c3fe7f0 blob + 6683e3ca78804bccc6557681ea8ec13fedfb82b9 --- list-virtuals.php +++ list-virtuals.php @@ -14,14 +14,13 @@ // list_alias // list_mailbox // -// Form GET Variables: +// Form POST \ GET Variables: // // domain // offset // require_once './functions.inc.php'; include './languages/' . check_language() . '.lang'; -include './templates/header.tpl'; $SESSID_USERNAME = check_session(); $list_domains = list_domains($SESSID_USERNAME); @@ -34,10 +33,11 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") { $domain_key = array_search($domain, array_column($list_domains, 'domain')); $list_alias = list_aliases($domain, $offset, $limit); $list_mailbox = list_mailboxes($domain, $offset, $limit); - $template = "list-virtual.tpl"; - include './templates/menu.tpl'; - include './templates/list-virtuals.tpl'; } } + +include './templates/header.tpl'; +include './templates/menu.tpl'; +include './templates/list-virtuals.tpl'; include './templates/footer.tpl'; ?> blob - 4284426cc11f5177ebb5797c8cdfd438ed582639 blob + d03a0e01955cfc3ca8563002e735a3675076c5fe --- password.php +++ password.php @@ -19,8 +19,6 @@ // fPassword // fPassword2 // -require("./variables.inc.php"); -require("./config.inc.php"); require("./functions.inc.php"); include("./languages/" . check_language() . ".lang"); blob - f89cf7665c93e49a6907b67be3b47e15ecc077df blob + b6834445cf0ca7e83c3a68df1e35391aaf45c5a3 --- sendmail.php +++ sendmail.php @@ -22,8 +22,6 @@ // fSubject // fBody // -require("./variables.inc.php"); -require("./config.inc.php"); require("./functions.inc.php"); include("./languages/" . check_language() . ".lang"); blob - 28b655da4b9457821bf5f59531f6f1d07a602846 blob + bca4f981557c09f14cfe121fb4b23dbf11e739e9 --- templates/add-alias.tpl +++ templates/add-alias.tpl @@ -12,7 +12,7 @@ " . $row['domain'] . "\n"; } ?> blob - 35306c5ce015513547253270e76600c2b10982c2 blob + 96286bf393c82b0e7e6040d28495156a6323e34a --- templates/add-mailbox.tpl +++ templates/add-mailbox.tpl @@ -12,7 +12,7 @@ " . $row['domain'] . "\n"; } ?> blob - 2338630383156dbebde1231b158b330dbfa9f646 blob + 366f82fc4edbb5b5fe12d15467486f830996758b --- templates/admin_list-domain.tpl +++ templates/admin_list-domain.tpl @@ -5,7 +5,7 @@ if (count($list_admins) > 0) { foreach ($list_admins as $row) { echo '\n"; } } blob - 0bce6853846f5121e996f898f8ab1bf7db943a28 blob + 6688e7d0a016517a1eb2c616fc1eded79967bc47 --- templates/admin_list-virtual.tpl +++ templates/admin_list-virtual.tpl @@ -5,7 +5,7 @@ if (count($list_domains) > 0) { foreach ($list_domains as $row) { echo '\n"; } } @@ -16,8 +16,8 @@ if (count($list_domains) > 0) {

-

-

+

+

@@ -25,18 +25,18 @@ if (count($list_domains) > 0) { $limit || $list_domains[$selected_domain]['mailbox_count'] > $limit) { +if ($list_domains[$domain_key]['alias_count'] > $limit || $list_domains[$domain_key]['mailbox_count'] > $limit) { echo "
\n"; if ($offset >= $limit) { - echo "\n"; + echo "\n"; } - if (($list_domains[$selected_domain]['alias_count'] > $limit) || ($list_domains[$selected_domain]['mailbox_count'] > $limit)) { + if (($list_domains[$domain_key]['alias_count'] > $limit) || ($list_domains[$domain_key]['mailbox_count'] > $limit)) { - echo "\n"; + echo "\n"; } - if ((($offset + $limit) < $list_domains[$selected_domain]['alias_count']) || (($offset + $limit) < $list_domains[$selected_domain]['mailbox_count'])) { - echo "\n"; + if ((($offset + $limit) < $list_domains[$domain_key]['alias_count']) || (($offset + $limit) < $list_domains[$domain_key]['mailbox_count'])) { + echo "\n"; } echo "
\n"; } @@ -57,8 +57,8 @@ if (count($list_alias) > 0) { echo " " . $row['address'] . "\n"; echo " " . preg_replace("/,/", "
", $row['goto']) . "\n"; echo " " . $row['modified'] . "\n"; - echo " " . $LANG['edit'] . "\n"; - echo " " . $LANG['del'] . "\n"; + echo " " . $LANG['edit'] . "\n"; + echo " " . $LANG['del'] . "\n"; echo " \n"; } echo "\n"; @@ -81,8 +81,8 @@ if (count($list_mailbox) > 0) { echo " " . $row['username'] . "\n"; echo " " . $row['name'] . "\n"; echo " " . $row['modified'] . "\n"; - echo " " . $LANG['edit'] . "\n"; - echo " " . $LANG['del'] . "\n"; + echo " " . $LANG['edit'] . "\n"; + echo " " . $LANG['del'] . "\n"; echo " \n"; } echo "\n"; blob - bf573c0b6198fde45f6b4d768ef48a19af98e03b (mode 644) blob + /dev/null --- templates/create-alias.tpl +++ /dev/null @@ -1,35 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - -

- -
-
blob - 2c69af0699947f1f32fbea1b8264b86faad77fb5 (mode 644) blob + /dev/null --- templates/create-mailbox.tpl +++ /dev/null @@ -1,65 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - -
 
 
 
- -
blob - 4c3327ec82ff5a548939c12a8ae157c449e1167c blob + 839685cf778a722874b7bbf123ce392b6d39a08a --- templates/list-virtuals.tpl +++ templates/list-virtuals.tpl @@ -5,7 +5,7 @@ if (count($list_domains) > 0) { foreach ($list_domains as $row) { echo '\n"; } } @@ -63,22 +63,10 @@ if (count($list_alias) > 0) { echo " " . $row['address'] . "\n"; echo " " . preg_replace("/,/", "
", $row['goto']) . "\n"; echo " " . $row['modified'] . "\n"; - - if ($CONF['special_alias_control'] == 'YES') { - echo " " . $LANG['edit'] . "\n"; - echo " " . $LANG['del'] . "\n"; - } else { - if (!in_array($row['goto'], $CONF['default_aliases'])) { - echo " " . $LANG['edit'] . "\n"; - echo " " . $LANG['del'] . "\n"; - } else { - echo "  \n"; - echo "  \n"; - } - } + echo " " . $LANG['edit'] . "\n"; + echo " " . $LANG['del'] . "\n"; echo " \n"; } - echo "\n"; } @@ -91,7 +79,6 @@ if (count($list_mailbox) > 0) { echo " " . $LANG['Overview_mailbox_username'] . "\n"; echo " " . $LANG['Overview_mailbox_name'] . "\n"; echo " " . $LANG['Overview_mailbox_modified'] . "\n"; - echo " " . $LANG['Overview_mailbox_active'] . "\n"; echo "  \n"; echo " \n"; @@ -100,8 +87,8 @@ if (count($list_mailbox) > 0) { echo " " . $row['username'] . "\n"; echo " " . $row['name'] . "\n"; echo " " . $row['modified'] . "\n"; - echo " " . $LANG['edit'] . "\n"; - echo " " . $LANG['del'] . "\n"; + echo " " . $LANG['edit'] . "\n"; + echo " " . $LANG['del'] . "\n"; echo " \n"; } echo "\n"; blob - cc43a3aed2ba0a7a4178eea6dd0640ecc95cad3d blob + 8e65d72f3de8328882c59a88cd2b4bec610cfae0 --- templates/menu.tpl +++ templates/menu.tpl @@ -1,8 +1,8 @@