added Language variabes for logging, never worked

This commit is contained in:
mischa 2022-09-04 14:28:04 +00:00
parent 826796d161
commit 71b5e665b0
15 changed files with 148 additions and 63 deletions

View File

@ -64,7 +64,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(2, $goto, PDO::PARAM_STR); $sth->bindParam(2, $goto, PDO::PARAM_STR);
$sth->bindParam(3, $domain, PDO::PARAM_STR); $sth->bindParam(3, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "create alias", "$from -> $goto"); logging($admin, $domain, $LANG['Logging_alias_add'], "$from -> $goto");
$message = $LANG['Create_alias_result_succes'] . "<br />($from -> $goto)</br />"; $message = $LANG['Create_alias_result_succes'] . "<br />($from -> $goto)</br />";
$address = ''; $address = '';
$goto = ''; $goto = '';

View File

@ -83,7 +83,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(4, $maildir, PDO::PARAM_STR); $sth->bindParam(4, $maildir, PDO::PARAM_STR);
$sth->bindParam(5, $domain, PDO::PARAM_STR); $sth->bindParam(5, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "create mailbox", "$from"); logging($admin, $domain, $LANG['Logging_mailbox_add'], "$from");
$message = $LANG['Create_mailbox_result_succes'] . "<br />($from)"; $message = $LANG['Create_mailbox_result_succes'] . "<br />($from)";
$username = ''; $username = '';
$name = ''; $name = '';

View File

@ -63,7 +63,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(2, $goto, PDO::PARAM_STR); $sth->bindParam(2, $goto, PDO::PARAM_STR);
$sth->bindParam(3, $domain, PDO::PARAM_STR); $sth->bindParam(3, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "create alias", "$from -> $goto"); logging($admin, $domain, $LANG['Logging_alias_add'], "$from -> $goto");
$message = $LANG['Create_alias_result_succes'] . "<br />($from -> $goto)</br />"; $message = $LANG['Create_alias_result_succes'] . "<br />($from -> $goto)</br />";
$address = ''; $address = '';
$goto = ''; $goto = '';

View File

@ -82,7 +82,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(4, $maildir, PDO::PARAM_STR); $sth->bindParam(4, $maildir, PDO::PARAM_STR);
$sth->bindParam(5, $domain, PDO::PARAM_STR); $sth->bindParam(5, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "create mailbox", "$from"); logging($admin, $domain, $LANG['Logging_mailbox_add'], "$from");
$message = $LANG['Create_mailbox_result_succes'] . "<br />($from)"; $message = $LANG['Create_mailbox_result_succes'] . "<br />($from)";
$username = ''; $username = '';
$name = ''; $name = '';

View File

@ -154,7 +154,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") {
if ($sth->rowCount() != 1) { if ($sth->rowCount() != 1) {
throw new RuntimeException('alias'); throw new RuntimeException('alias');
} }
logging($admin, $domain, "delete alias", $delete); logging($admin, $domain, $LANG['Logging_alias_delete'], $delete);
header("Location: list-virtual.php?domain=$domain"); header("Location: list-virtual.php?domain=$domain");
} catch (RuntimeException $e) { } catch (RuntimeException $e) {
@ -172,7 +172,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") {
if ($sth->rowCount() != 1) { if ($sth->rowCount() != 1) {
throw new RuntimeException('mailbox'); throw new RuntimeException('mailbox');
} }
logging($admin, $domain, "delete mailbox", $delete); logging($admin, $domain, $LANG['Logging_mailbox_delete'], $delete);
$sth = $dbh->prepare("DELETE FROM vacation WHERE email=? AND domain=?"); $sth = $dbh->prepare("DELETE FROM vacation WHERE email=? AND domain=?");
$sth->bindParam(1, $delete, PDO::PARAM_STR); $sth->bindParam(1, $delete, PDO::PARAM_STR);

View File

@ -79,7 +79,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(2, $address, PDO::PARAM_STR); $sth->bindParam(2, $address, PDO::PARAM_STR);
$sth->bindParam(3, $domain, PDO::PARAM_STR); $sth->bindParam(3, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "edit alias", "$address -> $goto"); logging($admin, $domain, $LANG['Logging_alias_edit'], "$address -> $goto");
header("Location: list-virtual.php?domain=$domain"); header("Location: list-virtual.php?domain=$domain");
} catch(PDOException $e) { } catch(PDOException $e) {
$message = $LANG['Edit_alias_result_error']; $message = $LANG['Edit_alias_result_error'];

View File

@ -85,7 +85,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(2, $username, PDO::PARAM_STR); $sth->bindParam(2, $username, PDO::PARAM_STR);
$sth->bindParam(3, $domain, PDO::PARAM_STR); $sth->bindParam(3, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "edit mailbox", $username); logging($admin, $domain, $LANG['Logging_mailbox_edit'], $username);
header("Location: list-virtual.php?domain=$domain"); header("Location: list-virtual.php?domain=$domain");
} catch(PDOException $e) { } catch(PDOException $e) {
$message = $LANG['Edit_mailbox_result_error']; $message = $LANG['Edit_mailbox_result_error'];

View File

@ -44,7 +44,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") {
if ($sth->rowCount() != 1) { if ($sth->rowCount() != 1) {
throw new RuntimeException('alias'); throw new RuntimeException('alias');
} }
logging($admin, $domain, "delete alias", $delete); logging($admin, $domain, $LANG['Logging_alias_delete'], $delete);
header("Location: list-virtual.php?domain=$domain"); header("Location: list-virtual.php?domain=$domain");
} catch (RuntimeException $e) { } catch (RuntimeException $e) {
@ -67,7 +67,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") {
if ($sth->rowCount() != 1) { if ($sth->rowCount() != 1) {
throw new RuntimeException('mailbox'); throw new RuntimeException('mailbox');
} }
logging($admin, $domain, "delete mailbox", $delete); logging($admin, $domain, $LANG['Logging_mailbox_delete'], $delete);
$sth = $dbh->prepare("DELETE FROM vacation WHERE email=? AND domain=?"); $sth = $dbh->prepare("DELETE FROM vacation WHERE email=? AND domain=?");
$sth->bindParam(1, $delete, PDO::PARAM_STR); $sth->bindParam(1, $delete, PDO::PARAM_STR);

View File

@ -80,7 +80,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(2, $address, PDO::PARAM_STR); $sth->bindParam(2, $address, PDO::PARAM_STR);
$sth->bindParam(3, $domain, PDO::PARAM_STR); $sth->bindParam(3, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "edit alias", "$address -> $goto"); logging($admin, $domain, $LANG['Logging_alias_edit'], "$address -> $goto");
header("Location: list-virtual.php?domain=$domain"); header("Location: list-virtual.php?domain=$domain");
} catch(PDOException $e) { } catch(PDOException $e) {
$message = $LANG['Edit_alias_result_error']; $message = $LANG['Edit_alias_result_error'];

View File

@ -86,7 +86,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$sth->bindParam(2, $username, PDO::PARAM_STR); $sth->bindParam(2, $username, PDO::PARAM_STR);
$sth->bindParam(3, $domain, PDO::PARAM_STR); $sth->bindParam(3, $domain, PDO::PARAM_STR);
$sth->execute(); $sth->execute();
logging($admin, $domain, "edit mailbox", $username); logging($admin, $domain, $LANG['Logging_mailbox_edit'], $username);
header("Location: list-virtual.php?domain=$domain"); header("Location: list-virtual.php?domain=$domain");
} catch(PDOException $e) { } catch(PDOException $e) {
$message = $LANG['Edit_mailbox_result_error']; $message = $LANG['Edit_mailbox_result_error'];

View File

@ -53,7 +53,6 @@ $LANG['Overview_alias_modified'] = 'Last Modified';
$LANG['Overview_mailbox_username'] = 'Email'; $LANG['Overview_mailbox_username'] = 'Email';
$LANG['Overview_mailbox_name'] = 'Name'; $LANG['Overview_mailbox_name'] = 'Name';
$LANG['Overview_mailbox_modified'] = 'Last Modified'; $LANG['Overview_mailbox_modified'] = 'Last Modified';
$LANG['Overview_mailbox_active'] = 'Active';
$LANG['Overview_get_domain'] = 'Domain'; $LANG['Overview_get_domain'] = 'Domain';
$LANG['Overview_get_aliases'] = 'Aliases'; $LANG['Overview_get_aliases'] = 'Aliases';
@ -95,7 +94,6 @@ $LANG['Create_mailbox_password_text'] = 'Password for POP3/IMAP';
$LANG['Create_mailbox_password_text_error'] = '<span class="error_msg">The passwords that you supplied don\'t match, or are empty.</span>'; $LANG['Create_mailbox_password_text_error'] = '<span class="error_msg">The passwords that you supplied don\'t match, or are empty.</span>';
$LANG['Create_mailbox_name'] = 'Name'; $LANG['Create_mailbox_name'] = 'Name';
$LANG['Create_mailbox_name_text'] = 'Full name'; $LANG['Create_mailbox_name_text'] = 'Full name';
$LANG['Create_mailbox_active'] = 'Active';
$LANG['Create_mailbox_mail'] = 'Create mailbox'; $LANG['Create_mailbox_mail'] = 'Create mailbox';
$LANG['Create_mailbox_button'] = 'Add Mailbox'; $LANG['Create_mailbox_button'] = 'Add Mailbox';
$LANG['Create_mailbox_result_error'] = '<span class="error_msg">Unable to add the mailbox to the mailbox table.</span>'; $LANG['Create_mailbox_result_error'] = '<span class="error_msg">Unable to add the mailbox to the mailbox table.</span>';
@ -137,12 +135,12 @@ $LANG['Viewlog_result_error'] = '<span class="error_msg">Unable to find the logs
$LANG['Sendmail_welcome'] = 'Send an email.'; $LANG['Sendmail_welcome'] = 'Send an email.';
$LANG['Sendmail_admin'] = 'From'; $LANG['Sendmail_admin'] = 'From';
$LANG['Sendmail_to'] = 'To'; $LANG['Sendmail_to'] = 'To';
$LANG['Sendmail_to_text_error'] = '<span class="error_msg">To is empty or is not a valid email address.</span>'; $LANG['Sendmail_to_text_error'] = '<span class="error_msg">TO is empty or is not a valid email address.</span>';
$LANG['Sendmail_subject'] = 'Subject'; $LANG['Sendmail_subject'] = 'Subject';
$LANG['Sendmail_subject_text'] = 'Welcome'; $LANG['Sendmail_subject_text'] = 'Welcome';
$LANG['Sendmail_body'] = 'Body'; $LANG['Sendmail_body'] = 'Body';
$LANG['Sendmail_button'] = 'Send Message'; $LANG['Sendmail_button'] = 'Send Message';
$LANG['Sendmail_result_error'] = '<span class="error_msg">Unable to create mailbox.</span>'; $LANG['Sendmail_result_error'] = '<span class="error_msg">Unable to send message.</span>';
$LANG['Sendmail_result_succes'] = 'The mailbox has been created.'; $LANG['Sendmail_result_succes'] = 'The mailbox has been created.';
$LANG['AdminMenu_list_admin'] = 'Admin List'; $LANG['AdminMenu_list_admin'] = 'Admin List';
@ -160,14 +158,12 @@ $LANG['AdminList_admin_domain'] = 'Domain';
$LANG['AdminList_admin_username'] = 'Admin'; $LANG['AdminList_admin_username'] = 'Admin';
$LANG['AdminList_admin_count'] = 'Domains'; $LANG['AdminList_admin_count'] = 'Domains';
$LANG['AdminList_admin_modified'] = 'Last Modified'; $LANG['AdminList_admin_modified'] = 'Last Modified';
$LANG['AdminList_admin_active'] = 'Active';
$LANG['AdminList_domain_domain'] = 'Domain'; $LANG['AdminList_domain_domain'] = 'Domain';
$LANG['AdminList_domain_description'] = 'Description'; $LANG['AdminList_domain_description'] = 'Description';
$LANG['AdminList_domain_aliases'] = 'Aliases'; $LANG['AdminList_domain_aliases'] = 'Aliases';
$LANG['AdminList_domain_mailboxes'] = 'Mailboxes'; $LANG['AdminList_domain_mailboxes'] = 'Mailboxes';
$LANG['AdminList_domain_modified'] = 'Last Modified'; $LANG['AdminList_domain_modified'] = 'Last Modified';
$LANG['AdminList_domain_active'] = 'Active';
$LANG['AdminList_virtual_button'] = 'Go'; $LANG['AdminList_virtual_button'] = 'Go';
$LANG['AdminList_virtual_welcome'] = 'Overview for '; $LANG['AdminList_virtual_welcome'] = 'Overview for ';
@ -179,7 +175,6 @@ $LANG['AdminList_virtual_alias_modified'] = 'Last Modified';
$LANG['AdminList_virtual_mailbox_username'] = 'Email'; $LANG['AdminList_virtual_mailbox_username'] = 'Email';
$LANG['AdminList_virtual_mailbox_name'] = 'Name'; $LANG['AdminList_virtual_mailbox_name'] = 'Name';
$LANG['AdminList_virtual_mailbox_modified'] = 'Last Modified'; $LANG['AdminList_virtual_mailbox_modified'] = 'Last Modified';
$LANG['AdminList_virtual_mailbox_active'] = 'Active';
$LANG['AdminAdd_domain_welcome'] = 'Add a new domain'; $LANG['AdminAdd_domain_welcome'] = 'Add a new domain';
$LANG['AdminAdd_domain_domain'] = 'Domain'; $LANG['AdminAdd_domain_domain'] = 'Domain';
@ -200,7 +195,6 @@ $LANG['AdminEdit_domain_aliases'] = 'Aliases';
$LANG['AdminEdit_domain_aliases_text'] = '-1 = disable | 0 = unlimited'; $LANG['AdminEdit_domain_aliases_text'] = '-1 = disable | 0 = unlimited';
$LANG['AdminEdit_domain_mailboxes'] = 'Mailboxes'; $LANG['AdminEdit_domain_mailboxes'] = 'Mailboxes';
$LANG['AdminEdit_domain_mailboxes_text'] = '-1 = disable | 0 = unlimited'; $LANG['AdminEdit_domain_mailboxes_text'] = '-1 = disable | 0 = unlimited';
$LANG['AdminEdit_domain_active'] = 'Active';
$LANG['AdminEdit_domain_button'] = 'Edit Domain'; $LANG['AdminEdit_domain_button'] = 'Edit Domain';
$LANG['AdminEdit_domain_result_error'] = '<span class="error_msg">Unable to modify domain.</span>'; $LANG['AdminEdit_domain_result_error'] = '<span class="error_msg">Unable to modify domain.</span>';
@ -221,7 +215,6 @@ $LANG['AdminEdit_admin_username'] = 'Admin';
$LANG['AdminEdit_admin_password'] = 'Password'; $LANG['AdminEdit_admin_password'] = 'Password';
$LANG['AdminEdit_admin_password2'] = 'Password (again)'; $LANG['AdminEdit_admin_password2'] = 'Password (again)';
$LANG['AdminEdit_admin_password_text_error'] = '<span class="error_msg">The passwords that you supplied don\'t match, or are empty.</span>'; $LANG['AdminEdit_admin_password_text_error'] = '<span class="error_msg">The passwords that you supplied don\'t match, or are empty.</span>';
$LANG['AdminEdit_admin_active'] = 'Active';
$LANG['AdminEdit_admin_button'] = 'Edit Admin'; $LANG['AdminEdit_admin_button'] = 'Edit Admin';
$LANG['AdminEdit_admin_result_error'] = '<span class="error_msg">Unable to modify admin.</span>'; $LANG['AdminEdit_admin_result_error'] = '<span class="error_msg">Unable to modify admin.</span>';
$LANG['AdminEdit_admin_result_succes'] = 'Admin has been modified.'; $LANG['AdminEdit_admin_result_succes'] = 'Admin has been modified.';
@ -255,14 +248,12 @@ $LANG['UsersVacation_button_back'] = 'Coming Back';
$LANG['UsersVacation_result_error'] = '<span class="error_msg">Unable to update your auto response settings.</span>'; $LANG['UsersVacation_result_error'] = '<span class="error_msg">Unable to update your auto response settings.</span>';
$LANG['UsersVacation_result_succes'] = 'Your auto response has been removed.'; $LANG['UsersVacation_result_succes'] = 'Your auto response has been removed.';
$LANG['Create_dbLog_createmailbox'] = 'create mailbox'; $LANG['Logging_alias_add'] = 'add alias';
$LANG['Create_dbLog_createalias'] = 'create alias'; $LANG['Logging_alias_edit'] = 'edit alias';
$LANG['Delete_dbLog_deletealias'] = 'delete alias'; $LANG['Logging_alias_delete'] = 'delete alias';
$LANG['Delete_dbLog_deletemailbox'] = 'delete mailbox'; $LANG['Logging_mailbox_add'] = 'add mailbox';
$LANG['Logging_mailbox_edit'] = 'edit mailbox';
$LANG['Edit_dbLog_editactive'] = 'change active state'; $LANG['Logging_mailbox_delete'] = 'delete mailbox';
$LANG['Edit_dbLog_editalias'] = 'edit alias';
$LANG['Edit_dbLog_editmailbox'] = 'edit mailbox';
$LANG['Search_welcome'] = 'Searching for: '; $LANG['Search_welcome'] = 'Searching for: ';
?> ?>

View File

@ -11,47 +11,45 @@
// //
// Template Variables: // Template Variables:
// //
// tMessage // message
// tFrom // from
// tSubject // subject
// tBody // body
// //
// Form POST \ GET Variables: // Form POST \ GET Variables:
// //
// fTo // to
// fSubject // subject
// fBody // body
// //
require("./functions.inc.php"); require_once './functions.inc.php';
include("./languages/" . check_language() . ".lang"); include './languages/' . check_language() . '.lang';
$SESSID_USERNAME = check_session(); $SESSID_USERNAME = check_session();
if ($_SERVER['REQUEST_METHOD'] == "POST") { if ($_SERVER['REQUEST_METHOD'] == "POST") {
$fTo = escape_string($_POST['fTo']); $to = strtolower(filter_input(INPUT_POST, 'to', FILTER_VALIDATE_EMAIL));
$fSubject = escape_string($_POST['fSubject']); $subject = filter_input(INPUT_POST, 'subject', FILTER_DEFAULT);
$fHeaders = "From: " . $SESSID_USERNAME . "\r\n"; $body = filter_input(INPUT_POST, 'body', FILTER_DEFAULT);
$fHeaders .= "Content-Type: text/plain; charset=utf-8\r\n";
$fBody = escape_string($_POST['fBody']);
if (empty($fTo) or !check_email($fTo)) { $headers = "From: " . $SESSID_USERNAME . "\r\n";
$error = 1; $headers .= "Content-Type: text/plain; charset=utf-8\r\n";
$tTo = escape_string($_POST['fTo']);
$tSubject = escape_string($_POST['fSubject']); if (empty($to)) {
$tBody = escape_string($_POST['fBody']); $message = $LANG['Sendmail_to_text_error'];
$tMessage = $LANG['Sendmail_to_text_error'];
} }
if ($error != 1) { if (empty($message)) {
if (!mail($fTo, $fSubject, $fBody, $fHeaders)) { if (!mail($to, $subject, $body, $headers)) {
$tMessage .= $LANG['Sendmail_result_error']; $message = $LANG['Sendmail_result_error'];
} else { } else {
$tMessage .= $LANG['Sendmail_result_succes']; $message = $LANG['Sendmail_result_succes'];
} }
} }
} }
include("./templates/header.tpl");
include("./templates/menu.tpl"); include './templates/header.tpl';
include("./templates/sendmail.tpl"); include './templates/menu.tpl';
include("./templates/footer.tpl"); include './templates/sendmail.tpl';
include './templates/footer.tpl';
?> ?>

View File

@ -0,0 +1,96 @@
<div id="overview">
<form name="select_domain" method="get">
<select name="domain" onChange="this.form.submit()";>
<?php
if (count($list_domains) > 0) {
foreach ($list_domains as $row) {
echo '<option value="' . $row['domain'] . '"';
if ($list_domains[$domain_key]['domain'] == $row['domain']) echo ' selected';
echo ">" . $row['domain'] . "</option>\n";
}
}
if ($list_domains[$domain_key]['aliases'] == 0) $list_domains[$domain_key]['aliases'] = $LANG['Overview_unlimited'];
if ($list_domains[$domain_key]['aliases'] < 0) $list_domains[$domain_key]['aliases'] = $LANG['Overview_disabled'];
if ($list_domains[$domain_key]['mailboxes'] == 0) $list_domains[$domain_key]['mailboxes'] = $LANG['Overview_unlimited'];
if ($list_domains[$domain_key]['mailboxes'] < 0) $list_domains[$domain_key]['mailboxes'] = $LANG['Overview_disabled'];
if ($list_domains[$domain_key]['maxquota'] == 0) $list_domains[$domain_key]['maxquota'] = $LANG['Overview_unlimited'];
if ($list_domains[$domain_key]['maxquota'] < 0) $list_domains[$domain_key]['maxquota'] = $LANG['Overview_disabled'];
?>
</select>
<input type="hidden" name="offset" value="0">
<input class="button" type="submit" name="go" value="<?php echo $LANG['Overview_button']; ?>" />
</form>
<h4><?php echo $LANG['Overview_welcome'] . $domain; ?></h4>
<p><?php echo $LANG['Overview_alias_alias_count'] . ": " . $list_domains[$domain_key]['alias_count'] . " / " . $list_domains[$domain_key]['aliases']; ?></p>
<p><?php echo $LANG['Overview_alias_mailbox_count'] . ": " . $list_domains[$domain_key]['mailbox_count'] . " / " . $list_domains[$domain_key]['mailboxes']; ?></p>
<form name="search" method="post" action="search.php">
<input type="textbox" name="search" size="25">
</form>
</div>
<?php
if ($list_domains[$domain_key]['alias_count'] > $limit || $list_domains[$domain_key]['mailbox_count'] > $limit) {
echo "<div id=\"nav_bar\">\n";
if ($offset >= $limit) {
echo "<a href=\"overview.php?domain=" . $_GET['domain'] . "&offset=" . ($offset - $limit) . "\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $LANG['Overview_left_arrow'] . "\"></a>\n";
}
if (($list_domains[$domain_key]['alias_count'] > $limit) || ($list_domains[$domain_key]['mailbox_count'] > $limit)) {
echo "<a href=\"overview.php?domain=" . $_GET['domain'] . "&offset=0\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $LANG['Overview_up_arrow'] . "\"></a>\n";
}
if ((($offset + $limit) < $list_domains[$domain_key]['alias_count']) || (($offset + $limit) < $list_domains[$domain_key]['mailbox_count'])) {
echo "<a href=\"overview.php?domain=" . $_GET['domain'] . "&offset=" . ($offset + $limit) . "\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $LANG['Overview_right_arrow'] . "\"></a>\n";
}
echo "</div>\n";
}
if (count($list_alias) > 0) {
echo "<table id=\"alias_table\">\n";
echo " <tr>\n";
echo " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
echo " </tr>";
echo " <tr class=\"header\">\n";
echo " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
echo " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
echo " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
echo " <td colspan=\"2\">&nbsp;</td>\n";
echo " </tr>\n";
foreach ($list_alias as $row) {
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
echo " <td>" . $row['address'] . "</td>\n";
echo " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
echo " <td>" . $row['modified'] . "</td>\n";
echo " <td><a href=\"edit-alias.php?address=" . $row['address'] . "&domain=" . $list_domains[$domain_key]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
echo " <td><a href=\"delete.php?table=alias&delete=" . $row['address'] . "&domain=" . $list_domains[$domain_key]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $row['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
echo " </tr>\n";
}
echo "</table>\n";
}
if (count($list_mailbox) > 0) {
echo "<table id=\"mailbox_table\">\n";
echo " <tr>\n";
echo " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
echo " </tr>";
echo " <tr class=\"header\">\n";
echo " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
echo " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
echo " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
echo " <td colspan=\"2\">&nbsp;</td>\n";
echo " </tr>\n";
foreach ($list_mailbox as $row) {
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
echo " <td>" . $row['username'] . "</td>\n";
echo " <td>" . $row['name'] . "</td>\n";
echo " <td>" . $row['modified'] . "</td>\n";
echo " <td><a href=\"edit-mailbox.php?username=" . $row['username'] . "&domain=" . $list_domains[$domain_key]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
echo " <td><a href=\"delete.php?table=mailbox&delete=" . $row['username'] . "&domain=" . $list_domains[$domain_key]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
echo " </tr>\n";
}
echo "</table>\n";
}
?>

View File

@ -5,11 +5,11 @@
<td><?php echo $LANG['Main_overview']; ?></td> <td><?php echo $LANG['Main_overview']; ?></td>
</tr> </tr>
<tr> <tr>
<td nowrap><a target="_top" href="create-alias.php"><?php echo $LANG['Menu_create_alias']; ?></a></td> <td nowrap><a target="_top" href="add-alias.php"><?php echo $LANG['Menu_create_alias']; ?></a></td>
<td><?php echo $LANG['Main_create_alias']; ?></td> <td><?php echo $LANG['Main_create_alias']; ?></td>
</tr> </tr>
<tr> <tr>
<td nowrap><a target="_top" href="create-mailbox.php"><?php echo $LANG['Menu_create_mailbox']; ?></a></td> <td nowrap><a target="_top" href="add-mailbox.php"><?php echo $LANG['Menu_create_mailbox']; ?></a></td>
<td><?php echo $LANG['Main_create_mailbox']; ?></td> <td><?php echo $LANG['Main_create_mailbox']; ?></td>
</tr> </tr>
<tr> <tr>

View File

@ -11,18 +11,18 @@
</tr> </tr>
<tr> <tr>
<td><?php echo $LANG['Sendmail_to'] . ":"; ?></td> <td><?php echo $LANG['Sendmail_to'] . ":"; ?></td>
<td><input class="flat" type="text" name="fTo" /></td> <td><input class="flat" type="text" name="to" /></td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td><?php echo $LANG['Sendmail_subject'] . ":"; ?></td> <td><?php echo $LANG['Sendmail_subject'] . ":"; ?></td>
<td><input class="flat" type="text" name="fSubject" value="<?php echo $LANG['Sendmail_subject_text']; ?>" /></td> <td><input class="flat" type="text" name="subject" value="<?php echo $LANG['Sendmail_subject_text']; ?>" /></td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td><?php echo $LANG['Sendmail_body'] . ":" ?></td> <td><?php echo $LANG['Sendmail_body'] . ":" ?></td>
<td> <td>
<textarea class="flat" rows="10" cols="60" name="fBody"><?php echo $CONF['welcome_text']; ?></textarea> <textarea class="flat" rows="10" cols="60" name="body"><?php echo $CONF['welcome_text']; ?></textarea>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
@ -30,7 +30,7 @@
<td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Sendmail_button']; ?>" /></td> <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Sendmail_button']; ?>" /></td>
</tr> </tr>
<tr> <tr>
<td colspan="3" class="standout"><?php echo $tMessage; ?></td> <td colspan="3" class="standout"><?php echo $message ?? '&nbsp;'; ?></td>
</tr> </tr>
</table> </table>
</form> </form>