commit - b3e5c8350e64307c6dd730e9f68fc2692bffb1cc
commit + a3641a1896dc110cab0e135514391a8628bffdb1
blob - 1f2c86f315abe0b0994b5110c8675c3ffb3bf5d4
blob + dcdace0eae9e51aeb8cb0b03da76a13e71d351e9
--- README.md
+++ README.md
`password` varchar(255) NOT NULL DEFAULT '',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='OpenSMTPD Admin - Virtual Admins';
+ PRIMARY KEY (`username`),
+ KEY `username` (`username`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='as60131 Admin - Virtual Admins'
CREATE TABLE `alias` (
`address` varchar(255) NOT NULL DEFAULT '',
`domain` varchar(255) NOT NULL DEFAULT '',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='OpenSMTPD Admin - Virtual Aliases';
+ PRIMARY KEY (`address`),
+ KEY `address` (`address`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='as60131 Admin - Virtual Aliases'
CREATE TABLE `domain` (
`domain` varchar(255) NOT NULL DEFAULT '',
`mailboxes` int(10) NOT NULL DEFAULT 0,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='OpenSMTPD Admin - Virtual Domains';
+ PRIMARY KEY (`domain`),
+ KEY `domain` (`domain`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='as60131 Admin - Virtual Domains'
CREATE TABLE `domain_admins` (
`username` varchar(255) NOT NULL DEFAULT '',
`domain` varchar(255) NOT NULL DEFAULT '',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='OpenSMTPD Admin - Domain Admins';
+ KEY `username` (`username`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='as60131 Admin - Domain Admins'
CREATE TABLE `log` (
`timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`username` varchar(255) NOT NULL DEFAULT '',
`domain` varchar(255) NOT NULL DEFAULT '',
`action` varchar(255) NOT NULL DEFAULT '',
- `data` varchar(255) NOT NULL DEFAULT ''
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='OpenSMTPD Admin - Log';
+ `data` varchar(255) NOT NULL DEFAULT '',
+ KEY `timestamp` (`timestamp`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='as60131 Admin - Log'
+ CREATE TABLE `mailbox` (
+ `username` varchar(255) NOT NULL DEFAULT '',
+ `password` varchar(255) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `maildir` varchar(255) NOT NULL DEFAULT '',
+ `domain` varchar(255) NOT NULL DEFAULT '',
+ `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`username`),
+ KEY `username` (`username`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='as60131 Admin - Virtual Mailboxes'
+ CREATE TABLE `vacation` (
+ `email` varchar(255) NOT NULL DEFAULT '',
+ `subject` varchar(255) NOT NULL DEFAULT '',
+ `body` text NOT NULL,
+ `cache` text NOT NULL,
+ `domain` varchar(255) NOT NULL DEFAULT '',
+ `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`email`),
+ KEY `email` (`email`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='as60131 Admin - Virtual Vacation'
+
Config for OpenSMTPTD, MySQL/MariaDB example:
# /etc/mail/smtpd.conf
blob - 6c742c64d54b459cc10eeb5c6b9976d63f4fdca5
blob + 8d1c032bca3178cc8dd458ee69671254e4caceac
--- admin/add-alias.php
+++ admin/add-alias.php
// goto
//
require_once '../functions.inc.php';
-include '../languages/' . check_language() . ".lang';
+include '../languages/' . check_language() . '.lang';
$list_domains = list_domains();
blob - 60bf51f9828c30bd5f69da6746de3d8edadff0c4
blob + 3c3e4a1cea6402bae2029c65ec53d9cec65e9e41
--- admin/admin.php
+++ admin/admin.php
if ($password1 != $password2) {
$message = $LANG['AdminAdd_admin_password_error'];
}
- if (empty($message)) {
+ if (!empty($password1) && empty($message)) {
+ $hashed = bcrypt($password1);
try {
$dbh = connect_db();
- $hashed = bcrypt($password1);
- $sth= $dbh->prepare("UPDATE admin SET password=?,modified=NOW() WHERE username=?");
+ $sth = $dbh->prepare("UPDATE admin SET password=?,modified=NOW() WHERE username=?");
$sth->bindParam(1, $hashed, PDO::PARAM_STR);
$sth->bindParam(2, $username, PDO::PARAM_STR);
$sth->execute();
blob - 2996e681a5ec8179d671394838e08e4d828ea4dd
blob + aafc11ffa8a4055184f17c2bf621595f67e859e3
--- admin/backup.php
+++ admin/backup.php
//
// -none-
//
-require("../config.inc.php");
-require("../functions.inc.php");
-include("../languages/" . check_language() . ".lang");
+require_once '../functions.inc.php';
+include '../languages/' . check_language() . '.lang';
date_default_timezone_set('Europe/Amsterdam');
if ($_SERVER['REQUEST_METHOD'] == "GET") {
umask(077);
- $path = "/tmp/";
$filename = "opensmtpadmin-" . date("Ymd") . "-" . getmypid() . ".sql";
- $backup = $path . $filename;
+ $backup = "/tmp" . $filename;
+ $header = "#\n# OpenSMTPD Admin " . VERSION . "\n# Date: " . date("D M j G:i:s T Y") . "\n#\n";
+ $tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation');
- $header = "#\n# OpenSMTPD Admin $version\n# Date: " . date("D M j G:i:s T Y") . "\n#\n";
-
if (!$fh = fopen($backup, 'w')) {
- $tMessage = "<div class=\"error_msg\">Cannot open file ($backup)</div>";
- include("../templates/header.tpl");
- include("../templates/admin_menu.tpl");
- include("../templates/message.tpl");
- include("../templates/footer.tpl");
+ $message = "<div class=\"error_msg\">Cannot open file ($backup)</div>";
+ include '../templates/header.tpl';
+ include '../templates/admin_menu.tpl';
+ include '../templates/message.tpl';
+ include '../templates/footer.tpl';
} else {
fwrite($fh, $header);
-
- $tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation');
+ $dbh = connect_db();
+ foreach ($tables as $table) {
+ $sth = $dbh->query("SHOW CREATE TABLE $table");
+ $row = $sth->fetch(PDO::FETCH_ASSOC);
+ fwrite ($fh, $row['Create Table']. "\n\n");
+ }
- for ($i = 0 ; $i < count($tables) ; ++$i) {
- $result = db_query("SHOW CREATE TABLE $tables[$i]");
- if ($result['rows'] > 0) {
- while ($row = db_array($result['result'])) {
- fwrite ($fh, "$row[1]\n\n");
+ foreach ($tables as $table) {
+ $sth = $dbh->query("SELECT * FROM $table");
+ while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($row as $k => $v) {
+ $keys[] = $k;
+ $values[] = $v;
}
+ fwrite($fh, "INSERT INTO ". $table . " (". implode (',',$keys) . ") VALUES ('" . implode ('\',\'',$values) . "')\n");
+ $keys = array();
+ $values = array();
}
- }
-
- for ($i = 0 ; $i < count($tables) ; ++$i) {
- $result = db_query("SELECT * FROM $tables[$i]");
- if ($result['rows'] > 0) {
- while ($row = db_assoc($result['result'])) {
- foreach ($row as $key => $val) {
- $fields[] = $key;
- $values[] = $val;
- }
-
- fwrite($fh, "INSERT INTO ". $tables[$i] . " (". implode (',',$fields) . ") VALUES ('" . implode ('\',\'',$values) . "')\n");
- $fields = array();
- $values = array();
- }
- }
}
}
header("Content-Type: application/octet-stream");
blob - c7544c32c3a6d6e78a58b9911da788724b434d62
blob + 7f1a027de573ab5aae777a005bd848fcdbff0e08
--- admin/edit-alias.php
+++ admin/edit-alias.php
//
// Template Variables:
//
-// tMessage
-// tGoto
+// message
+// goto
//
// Form POST \ GET Variables:
//
-// fAddress
-// fDomain
-// fGoto
+// address
+// domain
+// goto
//
-require("../functions.inc.php");
-include("../languages/" . check_language() . ".lang");
+require_once '../functions.inc.php';
+include '../languages/' . check_language() . '.lang';
if ($_SERVER['REQUEST_METHOD'] == "GET") {
- $fAddress = escape_string($_GET['address']);
- $fDomain = escape_string($_GET['domain']);
-
- $result = db_query("SELECT * FROM alias WHERE address='$fAddress' AND domain='$fDomain'");
- if ($result['rows'] == 1) {
- $row = db_array($result['result']);
- $tGoto = $row['goto'];
- } else {
- $tMessage = $LANG['Edit_alias_address_error'];
+ $address = filter_input(INPUT_GET, 'address', FILTER_VALIDATE_EMAIL);
+ $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN);
+
+ try {
+ $dbh = connect_db();
+ $sth = $dbh->prepare("SELECT goto FROM alias WHERE address=? AND domain=?");
+ $sth->bindParam(1, $address, PDO::PARAM_STR);
+ $sth->bindParam(2, $domain, PDO::PARAM_STR);
+ $sth->execute();
+ $goto = $sth->fetch(PDO::FETCH_COLUMN);
+ $goto = explode(',', $goto);
+ } catch(PDOException $e) {
+ $message = $LANG['Edit_alias_address_error'];
}
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
- $pEdit_alias_goto = $LANG['Edit_alias_goto'];
+ $address = strtolower(filter_input(INPUT_GET, 'address', FILTER_VALIDATE_EMAIL));
+ $domain = strtolower(filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN));
+ $goto = strtolower(filter_input(INPUT_POST, 'goto', FILTER_DEFAULT));
- $fAddress = escape_string($_GET['address']);
- $fAddress = strtolower($fAddress);
- $fDomain = escape_string($_GET['domain']);
- $fGoto = escape_string($_POST['fGoto']);
- $fGoto = strtolower($fGoto);
-
- if (empty($fGoto)) {
- $error = 1;
- $tGoto = $fGoto;
- $tMessage = $LANG['Edit_alias_goto_text_error1'];
+ if (empty($goto)) {
+ $goto = array();
+ $message = $LANG['Edit_alias_goto_text_error1'];
+ } else {
+ $goto = preg_replace('/\\\r\\\n/', ',', $goto);
+ $goto = preg_replace('/\r\n/', ',', $goto);
+ $goto = preg_replace('/[\s]+/i', '', $goto);
+ $goto = preg_replace('/\,*$/', '', $goto);
+ $validate_goto = explode(',', $goto);
+ foreach ($validate_goto as $row) {
+ if (!filter_var($row, FILTER_VALIDATE_EMAIL)) {
+ $goto = explode(',', $goto);
+ $message = $LANG['Edit_alias_goto_text_error2'] . "$row</div>";
+ }
+ }
}
- $goto = preg_replace('/\\\r\\\n/', ',', $fGoto);
- $goto = preg_replace('/\r\n/', ',', $goto);
- $goto = preg_replace('/[\s]+/i', '', $goto);
- $goto = preg_replace('/\,*$/', '', $goto);
- $array = preg_split('/,/', $goto);
-
- for ($i = 0; $i < count($array); $i++) {
- if (in_array("$array[$i]", $CONF['default_aliases'])) continue;
- if (empty($array[$i])) continue;
- if (!check_email($array[$i]))
- {
- $error = 1;
- $tGoto = $goto;
- $tMessage = $LANG['Edit_alias_goto_text_error2'] . "$array[$i]</div>";
+ if (empty($message)) {
+ try {
+ $dbh = connect_db();
+ $sth = $dbh->prepare("UPDATE alias SET goto=?,modified=NOW() WHERE address=? AND domain=?");
+ $sth->bindParam(1, $goto, PDO::PARAM_STR);
+ $sth->bindParam(2, $address, PDO::PARAM_STR);
+ $sth->bindParam(3, $domain, PDO::PARAM_STR);
+ $sth->execute();
+ logging(ADMIN_EMAIL, $domain, "edit alias", "$address -> $goto");
+ header("Location: list-virtual.php?domain=$domain");
+ } catch(PDOException $e) {
+ $message = $LANG['Edit_alias_result_error'];
}
}
-
- if ($error != 1) {
- $result = db_query("UPDATE alias SET goto='$goto',modified=NOW() WHERE address='$fAddress' AND domain='$fDomain'");
- if ($result['rows'] != 1) {
- $tMessage = $LANG['Edit_alias_result_error'];
- } else {
- db_log($CONF['admin_email'], $fDomain, "edit alias", "$fAddress -> $goto");
-
- header("Location: list-virtual.php?domain=$fDomain");
- exit;
- }
- }
}
-include("../templates/header.tpl");
-include("../templates/admin_menu.tpl");
-include("../templates/edit-alias.tpl");
-include("../templates/footer.tpl");
+include '../templates/header.tpl';
+include '../templates/admin_menu.tpl';
+include '../templates/edit-alias.tpl';
+include '../templates/footer.tpl';
?>
blob - 272783280783f4b4ac3178e69c2f82099d873b53
blob + c85fea4d119c8cdcee0f15d53e82c8479afa0701
--- admin/edit-mailbox.php
+++ admin/edit-mailbox.php
//
// Template Variables:
//
-// tMessage
-// tName
-// tQuota
+// message
+// name
//
// Form POST \ GET Variables:
//
-// fUsername
-// fDomain
-// fPassword
-// fPassword2
-// fName
-// fQuota
-// fActive
+// username
+// domain
+// password1
+// password2
+// name
//
-require("../functions.inc.php");
-include("../languages/" . check_language() . ".lang");
+require_once '../functions.inc.php';
+include '../languages/' . check_language() . '.lang';
if ($_SERVER['REQUEST_METHOD'] == "GET") {
- $fUsername = escape_string($_GET['username']);
- $fDomain = escape_string($_GET['domain']);
+ $username = strtolower(filter_input(INPUT_GET, 'username', FILTER_DEFAULT));
+ $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN);
- $result = db_query("SELECT * FROM mailbox WHERE username='$fUsername' AND domain='$fDomain'");
- if ($result['rows'] == 1) {
- $row = db_array($result['result']);
- $tName = $row['name'];
- $tQuota = $row['quota'] / $CONF['quota_multiplier'];
- $tActive = $row['active'];
- } else {
- $tMessage = $LANG['Edit_mailbox_login_error'];
+ try {
+ $dbh = connect_db();
+ $sth = $dbh->prepare("SELECT * FROM mailbox WHERE username=? AND domain=?");
+ $sth->bindParam(1, $username, PDO::PARAM_STR);
+ $sth->bindParam(2, $domain, PDO::PARAM_STR);
+ $sth->execute();
+ $mailbox_details = $sth->fetch();
+ $name = $mailbox_details['name'];
+ } catch(PDOException $e) {
+ $message = $LANG['Edit_mailbox_login_error'];
}
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
- $pEdit_mailbox_password_text = $LANG['Edit_mailbox_password_text_error'];
- $pEdit_mailbox_quota_text = $LANG['Edit_mailbox_quota_text'];
-
- $fUsername = escape_string($_GET['username']);
- $fUsername = strtolower($fUsername);
- $fDomain = escape_string($_GET['domain']);
-
- $fPassword = escape_string($_POST['fPassword']);
- $fPassword2 = escape_string($_POST['fPassword2']);
- $fName = escape_string($_POST['fName']);
- if (isset($_POST['fQuota'])) $fQuota = escape_string($_POST['fQuota']);
- if (isset($_POST['fActive'])) $fActive = escape_string($_POST['fActive']);
-
- if ($fPassword != $fPassword2)
- {
- $error = 1;
- $tName = $fName;
- $tQuota = $fQuota;
- $tActive = $fActive;
- $pEdit_mailbox_password_text = $LANG['Edit_mailbox_password_text_error'];
+ $username = strtolower(filter_input(INPUT_GET, 'username', FILTER_DEFAULT));
+ $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN);
+ $password1 = filter_input(INPUT_POST, 'password1', FILTER_DEFAULT);
+ $password2 = filter_input(INPUT_POST, 'password2', FILTER_DEFAULT);
+ $name = filter_input(INPUT_POST, 'name', FILTER_DEFAULT);
+
+ if ($password1 != $password2) {
+ $message = $LANG['Edit_mailbox_password_text_error'];
}
- if ($CONF['quota'] == "YES") {
- if (!check_quota($fQuota, $fDomain)) {
- $error = 1;
- $tName = $fName;
- $tQuota = $fQuota;
- $tActive = $fActive;
- $pEdit_mailbox_quota_text = $LANG['Edit_mailbox_quota_text_error'];
- }
+ if (!empty($pqassword1) && empty($message)) {
+ $hashed = bcrypt($password1);
+ try {
+ $dbh = connect_db();
+ $sth = $dbh->prepare("UPDATE mailbox SET password=?,name=?,modified=NOW() WHERE username=? AND domain=?");
+ $sth->bindParam(1, $hashed, PDO::PARAM_STR);
+ $sth->bindParam(2, $name, PDO::PARAM_STR);
+ $sth->bindParam(3, $username, PDO::PARAM_STR);
+ $sth->bindParam(4, $domain, PDO::PARAM_STR);
+ $sth->execute();
+ } catch(PDOException $e) {
+ $message = $LANG['Edit_mailbox_result_error'];
+ }
}
- if ($error != 1) {
- if (!empty($fQuota)) {
- $quota = $fQuota * $CONF['quota_multiplier'];
- } else {
- $quota = 0;
- }
-
- if ($fActive == "on") {
- $fActive = 1;
- } else {
- $fActive = 0;
- }
-
- if (empty($fPassword) and empty($fPassword2)) {
- $result = db_query("UPDATE mailbox SET name='$fName',quota='$quota',modified=NOW(),active='$fActive' WHERE username='$fUsername' AND domain='$fDomain'");
- } else {
- $password = pacrypt($fPassword);
- $result = db_query("UPDATE mailbox SET password='$password',name='$fName',quota='$quota',modified=NOW(),active='$fActive',scheme='' WHERE username='$fUsername' AND domain='$fDomain'");
- }
-
- if ($result['rows'] != 1) {
- $tMessage = $LANG['Edit_mailbox_result_error'];
- } else {
- db_log($CONF['admin_email'], $fDomain, "edit mailbox", $fUsername);
- header("Location: list-virtual.php?domain=$fDomain");
- exit;
- }
+ if (empty($message)) {
+ try {
+ $dbh = connect_db();
+ $sth = $dbh->prepare("UPDATE mailbox SET name=?,modified=NOW() WHERE username=? AND domain=?");
+ $sth->bindParam(1, $name, PDO::PARAM_STR);
+ $sth->bindParam(2, $username, PDO::PARAM_STR);
+ $sth->bindParam(3, $domain, PDO::PARAM_STR);
+ $sth->execute();
+ logging(ADMIN_EMAIL, $domain, "edit mailbox", $username);
+ header("Location: list-virtual.php?domain=$domain");
+ } catch(PDOException $e) {
+ $message = $LANG['Edit_mailbox_result_error'];
+ }
}
}
-include("../templates/header.tpl");
-include("../templates/admin_menu.tpl");
-include("../templates/edit-mailbox.tpl");
-include("../templates/footer.tpl");
+include '../templates/header.tpl';
+include '../templates/admin_menu.tpl';
+include '../templates/edit-mailbox.tpl';
+include '../templates/footer.tpl';
?>
blob - 763372e736dbb46a96bf558c25bda6d9ce37de83
blob + 43fdcadb3f53805bd0dcf8aa5d43b4d400f2a5e3
--- admin/viewlog.php
+++ admin/viewlog.php
//
// Template Variables:
//
-// tMessage
-// tLog
+// log
//
// Form POST \ GET Variables:
//
-// fDomain
+// domain
//
-require("../functions.inc.php");
-include("../languages/" . check_language() . ".lang");
+require_once '../functions.inc.php';
+include '../languages/' . check_language() . '.lang';
$list_domains = list_domains();
if ($_SERVER['REQUEST_METHOD'] == "GET") {
-
- if ((is_array($list_domains) and count($list_domains) > 0)) $fDomain = $list_domains[0];
-
- $result = db_query("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
- if ($result['rows'] > 0) {
- while ($row = db_array($result['result'])) {
- $tLog[] = $row;
- }
- }
+ $domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN) ?? $list_domains[0]['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);
+ $sth->execute();
+ $log = $sth->fetchAll();
}
-if ($_SERVER['REQUEST_METHOD'] == "POST") {
- $fDomain = escape_string($_POST['fDomain']);
-
- $result = db_query("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
- if ($result['rows'] > 0) {
- while ($row = db_array($result['result'])) {
- $tLog[] = $row;
- }
- }
-}
-include("../templates/header.tpl");
-include("../templates/admin_menu.tpl");
-include("../templates/viewlog.tpl");
-include("../templates/footer.tpl");
+include '../templates/header.tpl';
+include '../templates/admin_menu.tpl';
+include '../templates/viewlog.tpl';
+include '../templates/footer.tpl';
?>
blob - 416c48eb21780c7b1be4c81b71cfa11bc9596dc7
blob + 35306c5ce015513547253270e76600c2b10982c2
--- templates/add-mailbox.tpl
+++ templates/add-mailbox.tpl
<form name="create_mailbox" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Create_mailbox_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['Create_mailbox_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_username'] . ":"; ?></td>
- <td><input class="flat" type="text" name="username" value="<?php print $username ?? ''; ?>" /></td>
+ <td><?php echo $LANG['Create_mailbox_username'] . ":"; ?></td>
+ <td><input class="flat" type="text" name="username" value="<?php echo $username ?? ''; ?>" /></td>
<td>
<select name="domain">
<?php
</td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_password'] . ":"; ?></td>
+ <td><?php echo $LANG['Create_mailbox_password'] . ":"; ?></td>
<td><input class="flat" type="password" name="password1" /></td>
- <td><?php print $LANG['Create_mailbox_password_text']; ?></td>
+ <td><?php echo $LANG['Create_mailbox_password_text']; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_password2'] . ":"; ?></td>
+ <td><?php echo $LANG['Create_mailbox_password2'] . ":"; ?></td>
<td><input class="flat" type="password" name="password2" /></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_name'] . ":"; ?></td>
- <td><input class="flat" type="text" name="name" value="<?php print $name ?? ''; ?>" /></td>
- <td><?php print $LANG['Create_mailbox_name_text']; ?></td>
+ <td><?php echo $LANG['Create_mailbox_name'] . ":"; ?></td>
+ <td><input class="flat" type="text" name="name" value="<?php echo $name ?? ''; ?>" /></td>
+ <td><?php echo $LANG['Create_mailbox_name_text']; ?></td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $LANG['Create_mailbox_button']; ?>" /></td>
+ <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Create_mailbox_button']; ?>" /></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $message ?? ' '; ?></td>
+ <td colspan="3" class="standout"><?php echo $message ?? ' '; ?></td>
</tr>
</table>
</form>
blob - 7044b78d4093501110ce7c4731af104f7a6592fc
blob + 4c92fb928b4616c125361570706225453d9233c4
--- templates/admin_admin.tpl
+++ templates/admin_admin.tpl
<tr>
<td><?php echo $LANG['AdminAdd_admin_username'] . ":"; ?></td>
<?php if ($action == 'edit') { ?>
- <td><input class="flat" type="hidden" name="username" value="<?php echo $username; ?>" /><?php print $username; ?></td>
+ <td><input class="flat" type="hidden" name="username" value="<?php echo $username; ?>" /><?php echo $username; ?></td>
<?php } else { ?>
<td><input class="flat" type="text" name="username" value="<?php echo $username ?? ''; ?>" /></td>
<?php } ?>
blob - 18de2dab8886489cea6dd5a972b97c361f5c20b7
blob + 1507c4da47a966da93019ca3ad8ac0bf1e3f2486
--- templates/admin_domain.tpl
+++ templates/admin_domain.tpl
<table>
<tr>
<?php if ($action == 'edit') { ?>
- <td colspan="3"><h3><?php print $LANG['AdminEdit_domain_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['AdminEdit_domain_welcome']; ?></h3></td>
<?php } else { ?>
<td colspan="3"><h3><?php echo $LANG['AdminAdd_domain_welcome']; ?></h3></td>
<?php } ?>
<tr>
<td><?php echo $LANG['AdminAdd_domain_domain'] . ":"; ?></td>
<?php if ($action == 'edit') { ?>
- <td><input class="flat" type="hidden" name="domain" value="<?php echo $domain; ?>" /><?php print $domain; ?></td>
+ <td><input class="flat" type="hidden" name="domain" value="<?php echo $domain; ?>" /><?php echo $domain; ?></td>
<?php } else { ?>
<td><input class="flat" type="text" name="domain" value="<?php echo $domain ?? ''; ?>" /></td>
<td> </td>
blob - 15489d232cf022c9ce4576bcf214914b3779a3bd
blob + 0bce6853846f5121e996f898f8ab1bf7db943a28
--- templates/admin_list-virtual.tpl
+++ templates/admin_list-virtual.tpl
?>
</select>
<input type="hidden" name="limit" value="0">
-<input type="submit" name="go" value="<?php print $LANG['AdminList_virtual_button']; ?>" />
+<input type="submit" name="go" value="<?php echo $LANG['AdminList_virtual_button']; ?>" />
</form>
-<h4><?php print $LANG['AdminList_virtual_welcome'] . $domain; ?></h4>
-<p><?php print $LANG['AdminList_virtual_alias_alias_count'] . ": " . $list_domains[$selected_domain]['alias_count'] . " / " . $list_domains[$selected_domain]['aliases']; ?></p>
-<p><?php print $LANG['AdminList_virtual_alias_mailbox_count'] . ": " . $list_domains[$selected_domain]['mailbox_count'] . " / " . $list_domains[$selected_domain]['mailboxes']; ?></p>
+<h4><?php echo $LANG['AdminList_virtual_welcome'] . $domain; ?></h4>
+<p><?php echo $LANG['AdminList_virtual_alias_alias_count'] . ": " . $list_domains[$selected_domain]['alias_count'] . " / " . $list_domains[$selected_domain]['aliases']; ?></p>
+<p><?php echo $LANG['AdminList_virtual_alias_mailbox_count'] . ": " . $list_domains[$selected_domain]['mailbox_count'] . " / " . $list_domains[$selected_domain]['mailboxes']; ?></p>
<form name="search" method="post" action="search.php">
<input type="textbox" name="search" size="25">
echo "</div>\n";
}
if (count($list_alias) > 0) {
- print "<table id=\"alias_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"5\"><h3>" . $LANG['Overview_alias_title'] . "</h3></td>";
- print " </tr>";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['AdminList_virtual_alias_address'] . "</td>\n";
- print " <td>" . $LANG['AdminList_virtual_alias_goto'] . "</td>\n";
- print " <td>" . $LANG['AdminList_virtual_alias_modified'] . "</td>\n";
- print " <td colspan=\"2\"> </td>\n";
- print " </tr>\n";
+ 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['AdminList_virtual_alias_address'] . "</td>\n";
+ echo " <td>" . $LANG['AdminList_virtual_alias_goto'] . "</td>\n";
+ echo " <td>" . $LANG['AdminList_virtual_alias_modified'] . "</td>\n";
+ echo " <td colspan=\"2\"> </td>\n";
+ echo " </tr>\n";
foreach ($list_alias as $row) {
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td>" . $row['address'] . "</td>\n";
- print " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
- print " <td>" . $row['modified'] . "</td>\n";
- print " <td><a href=\"edit-alias.php?address=" . $row['address'] . "&domain=" . $list_domains[$selected_domain]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?table=alias" . "&delete=" . $row['address'] . "&domain=" . $list_domains[$selected_domain]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $row['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
- print " </tr>\n";
+ 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[$selected_domain]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
+ echo " <td><a href=\"delete.php?table=alias" . "&delete=" . $row['address'] . "&domain=" . $list_domains[$selected_domain]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $row['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
+ echo " </tr>\n";
}
- print "</table>\n";
+ echo "</table>\n";
}
if (count($list_mailbox) > 0) {
- print "<table id=\"mailbox_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"7\"><h3>" . $LANG['Overview_mailbox_title'] . "</h3></td>";
- print " </tr>";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['AdminList_virtual_mailbox_username'] . "</td>\n";
- print " <td>" . $LANG['AdminList_virtual_mailbox_name'] . "</td>\n";
- print " <td>" . $LANG['AdminList_virtual_mailbox_modified'] . "</td>\n";
- print " <td colspan=\"2\"> </td>\n";
- print " </tr>\n";
+ 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['AdminList_virtual_mailbox_username'] . "</td>\n";
+ echo " <td>" . $LANG['AdminList_virtual_mailbox_name'] . "</td>\n";
+ echo " <td>" . $LANG['AdminList_virtual_mailbox_modified'] . "</td>\n";
+ echo " <td colspan=\"2\"> </td>\n";
+ echo " </tr>\n";
foreach ($list_mailbox as $row) {
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td>" . $row['username'] . "</td>\n";
- print " <td>" . $row['name'] . "</td>\n";
- print " <td>" . $row['modified'] . "</td>\n";
- print " <td><a href=\"edit-mailbox.php?username=" . $row['username'] . "&domain=" . $list_domains[$selected_domain]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?table=mailbox" . "&delete=" . $row['username'] . "&domain=" . $list_domains[$selected_domain]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
- print " </tr>\n";
+ 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[$selected_domain]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
+ echo " <td><a href=\"delete.php?table=mailbox" . "&delete=" . $row['username'] . "&domain=" . $list_domains[$selected_domain]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
+ echo " </tr>\n";
}
- print "</table>\n";
+ echo "</table>\n";
}
?>
blob - c63b6982626e283821d985c78e7095d7b4d1a37e
blob + ede90483023bac75bee6a2770bb7ed56bb6060f4
--- templates/admin_search.tpl
+++ templates/admin_search.tpl
<div id="overview">
-<h4><?php print $LANG['Search_welcome'] . $search; ?></h4>
+<h4><?php echo $LANG['Search_welcome'] . $search; ?></h4>
<form name="search" method="post" action="search.php">
<input type="textbox" name="search">
</form>
</div>
<?php
if (count($list_alias) > 0) {
- print "<table id=\"alias_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
- print " </tr>";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
- print " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
- print " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
- print " <td colspan=\"2\"> </td>\n";
- print " </tr>\n";
+ 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\"> </td>\n";
+ echo " </tr>\n";
foreach ($list_alias as $row) {
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td>" . $row['address'] . "</td>\n";
- print " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
- print " <td>" . $row['modified'] . "</td>\n";
- print " <td><a href=\"edit-alias.php?action=edit&address=" . $row['address'] . "&domain=" . $row['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?table=alias&delete=" . $row['address'] . "&domain=" . $row['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $row['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
- print " </tr>\n";
+ 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?action=edit&address=" . $row['address'] . "&domain=" . $row['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
+ echo " <td><a href=\"delete.php?table=alias&delete=" . $row['address'] . "&domain=" . $row['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $row['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
+ echo " </tr>\n";
}
- print "</table>\n";
+ echo "</table>\n";
}
if (count($list_mailbox) > 0) {
- print "<table id=\"mailbox_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
- print " </tr>";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
- print " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
- print " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
- print " <td colspan=\"2\"> </td>\n";
- print " </tr>\n";
+ 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\"> </td>\n";
+ echo " </tr>\n";
foreach ($list_mailbox as $row) {
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td>" . $row['username'] . "</td>\n";
- print " <td>" . $row['name'] . "</td>\n";
- print " <td><a href=\"edit-mailbox.php?action=edit&username=" . $row['username'] . "&domain=" . $row['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?table=mailbox&delete=" . $row['username'] . "&domain=" . $row['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
- print " </tr>\n";
+ 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><a href=\"edit-mailbox.php?action=edit&username=" . $row['username'] . "&domain=" . $row['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
+ echo " <td><a href=\"delete.php?table=mailbox&delete=" . $row['username'] . "&domain=" . $row['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
+ echo " </tr>\n";
}
- print "</table>\n";
+ echo "</table>\n";
}
?>
blob - 18db241bf4db20f53ff19b6ee50b42efa60ec0b4
blob + 2c69af0699947f1f32fbea1b8264b86faad77fb5
--- templates/create-mailbox.tpl
+++ templates/create-mailbox.tpl
<form name="create_mailbox" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Create_mailbox_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['Create_mailbox_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_username'] . ":"; ?></td>
- <td><input class="flat" type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td>
+ <td><?php echo $LANG['Create_mailbox_username'] . ":"; ?></td>
+ <td><input class="flat" type="text" name="fUsername" value="<?php echo $tUsername; ?>" /></td>
<td>
<select name="fDomain">
<?php
for ($i = 0; $i < count($list_domains); $i++) {
if ($tDomain == $list_domains[$i]) {
- print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
+ echo "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
} else {
- print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
+ echo "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
}
}
?>
</select>
- <?php print $pCreate_mailbox_username_text; ?>
+ <?php echo $pCreate_mailbox_username_text; ?>
</td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_password'] . ":"; ?></td>
+ <td><?php echo $LANG['Create_mailbox_password'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword" /></td>
- <td><?php print $pCreate_mailbox_password_text; ?></td>
+ <td><?php echo $pCreate_mailbox_password_text; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_password2'] . ":"; ?></td>
+ <td><?php echo $LANG['Create_mailbox_password2'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword2" /></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_name'] . ":"; ?></td>
- <td><input class="flat" type="text" name="fName" value="<?php print $tName; ?>" /></td>
- <td><?php print $pCreate_mailbox_name_text; ?></td>
+ <td><?php echo $LANG['Create_mailbox_name'] . ":"; ?></td>
+ <td><input class="flat" type="text" name="fName" value="<?php echo $tName; ?>" /></td>
+ <td><?php echo $pCreate_mailbox_name_text; ?></td>
</tr>
<?php if ($CONF['quota'] == 'YES') { ?>
<tr>
- <td><?php print $LANG['Create_mailbox_quota'] . ":"; ?></td>
- <td><input type="text" name="fQuota" value="<?php print $tQuota; ?>" /></td>
- <td><?php print $pCreate_mailbox_quota_text; ?></td>
+ <td><?php echo $LANG['Create_mailbox_quota'] . ":"; ?></td>
+ <td><input type="text" name="fQuota" value="<?php echo $tQuota; ?>" /></td>
+ <td><?php echo $pCreate_mailbox_quota_text; ?></td>
<tr>
<?php } ?>
<tr>
- <td><?php print $LANG['Create_mailbox_active'] . ":"; ?></td>
+ <td><?php echo $LANG['Create_mailbox_active'] . ":"; ?></td>
<td><input class="flat" type="checkbox" name="fActive" checked /></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Create_mailbox_mail'] . ":"; ?></td>
+ <td><?php echo $LANG['Create_mailbox_mail'] . ":"; ?></td>
<td><input class="flat" type="checkbox" name="fMail" checked /></td>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $LANG['Create_mailbox_button']; ?>" /></td>
+ <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Create_mailbox_button']; ?>" /></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $tMessage; ?></td>
</tr>
</table>
</form>
blob - 74e52a911fff13d1b1785de683bfbe8f67efa09c
blob + 2e1e522b5fdfbc5b2bccdf3f347ce97678cbcf49
--- templates/edit-alias.tpl
+++ templates/edit-alias.tpl
<form name="edit_alias" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Edit_alias_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['Edit_alias_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['Edit_alias_address'] . ":"; ?></td>
- <td><?php print $fAddress; ?></td>
+ <td><?php echo $LANG['Edit_alias_address'] . ":"; ?></td>
+ <td><?php echo $address; ?></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Edit_alias_goto'] . ":"; ?></td>
+ <td><?php echo $LANG['Edit_alias_goto'] . ":"; ?></td>
<td>
-<textarea class="flat" rows="10" cols="60" name="fGoto">
+<textarea class="flat" rows="10" cols="60" name="goto">
<?php
-$array = preg_split('/,/', $tGoto);
-for ($i = 0 ; $i < count($array) ; $i++) {
- if (empty($array[$i])) continue;
- print "$array[$i]\n";
+foreach ($goto as $row) {
+ echo "$row\n";
}
?>
</textarea>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $LANG['Edit_alias_button']; ?>" /></td>
+ <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Edit_alias_button']; ?>" /></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $message ?? ' '; ?></td>
</tr>
</table>
</form>
blob - 26debaf5046638ec32fddbe69ffb8ccc29096772
blob + 88ad945e3f2ffe8f54fd8b0c5e3f93271a056ae7
--- templates/edit-mailbox.tpl
+++ templates/edit-mailbox.tpl
<form name="edit_mailbox" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Edit_mailbox_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['Edit_mailbox_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['Edit_mailbox_username']; ?></td>
- <td><?php print $fUsername; ?></td>
- <td><?php print $pEdit_mailbox_username_text; ?></td>
+ <td><?php echo $LANG['Edit_mailbox_username']; ?></td>
+ <td><?php echo $username; ?></td>
+ <td> </td>
</tr>
<tr>
- <td><?php print $LANG['Edit_mailbox_password'] . ":"; ?></td>
- <td><input class="flat" type="password" name="fPassword" /></td>
- <td><?php print $pEdit_mailbox_password_text; ?></td>
- </tr>
- <tr>
- <td><?php print $LANG['Edit_mailbox_password2'] . ":"; ?></td>
- <td><input class="flat" type="password" name="fPassword2" /></td>
+ <td><?php echo $LANG['Edit_mailbox_password'] . ":"; ?></td>
+ <td><input class="flat" type="password" name="password1" /></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Edit_mailbox_name'] . ":"; ?></td>
- <td><input class="flat" type="text" name="fName" value="<?php print htmlspecialchars($tName,ENT_QUOTES); ?>" /></td>
+ <td><?php echo $LANG['Edit_mailbox_password2'] . ":"; ?></td>
+ <td><input class="flat" type="password" name="password2" /></td>
<td> </td>
</tr>
- <?php if ($CONF['quota'] == 'YES') { ?>
<tr>
- <td><?php print $LANG['Edit_mailbox_quota'] . ":"; ?></td>
- <td><input class="flat" type="text" name="fQuota" value="<?php print $tQuota; ?>" /></td>
- <td><?php print $pEdit_mailbox_quota_text; ?></td>
- </tr>
- <?php } ?>
- <tr>
- <td><?php print $LANG['Create_mailbox_active'] . ":"; ?></td>
- <td><input class="flat" type="checkbox" name="fActive" <?php print (!empty($tActive)) ? 'checked' : '' ?> ></td>
+ <td><?php echo $LANG['Edit_mailbox_name'] . ":"; ?></td>
+ <td><input class="flat" type="text" name="name" value="<?php echo $name ?? ''; ?>" /></td>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="flat" type="submit" name="submit" value="<?php print $LANG['Edit_mailbox_button']; ?>" ></td>
+ <td colspan="3" class="hlp_center"><input class="flat" type="submit" name="submit" value="<?php echo $LANG['Edit_mailbox_button']; ?>" ></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $message ?? ' '; ?></td>
</tr>
</table>
</form>
blob - 1e2d5f25331c32ee1b488077fc9632ea076e8e2c
blob + 37b19b6600eb9da22fb92fc393de0da21929ebee
--- templates/footer.tpl
+++ templates/footer.tpl
<a href="https://git.high5.nl/opensmtpdadmin/">OpenSMTPD Admin <?php echo VERSION ?></a>
<?php
if (($CONF['show_footer_text'] == "YES") and ($CONF['footer_link'])) {
- print " | ";
- print "<a href=\"" . $CONF['footer_link'] . "\">" . $CONF['footer_text'] . "</a>\n";
+ echo " | ";
+ echo "<a href=\"" . $CONF['footer_link'] . "\">" . $CONF['footer_text'] . "</a>\n";
}
?>
</div>
blob - 580f97bbc683a7a5d67a024525b5da924b098a5f
blob + 8d09479d14b69af0fa1be1738f164695e15a1fb9
--- templates/header.tpl
+++ templates/header.tpl
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php print isset($LANG['charset']) ? $LANG['charset'] : 'iso-8859-1' ?>" />
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo isset($LANG['charset']) ? $LANG['charset'] : 'iso-8859-1' ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
-if (file_exists(realpath("./stylesheet.css"))) print "<link rel=\"stylesheet\" href=\"stylesheet.css\">\n";
-if (file_exists(realpath("../stylesheet.css"))) print "<link rel=\"stylesheet\" href=\"../stylesheet.css\">\n";
+if (file_exists(realpath("./stylesheet.css"))) echo "<link rel=\"stylesheet\" href=\"stylesheet.css\">\n";
+if (file_exists(realpath("../stylesheet.css"))) echo "<link rel=\"stylesheet\" href=\"../stylesheet.css\">\n";
?>
-<title>OpenSMTPD Admin - <?php print $_SERVER['HTTP_HOST']; ?></title>
+<title>OpenSMTPD Admin - <?php echo $_SERVER['HTTP_HOST']; ?></title>
</head>
<body>
<div id="login_header">
<?php
if (file_exists(realpath("./stylesheet.css"))) {
- print "<img id=\"login_header_logo\" src=\"images/postbox.png\" />\n";
- print "<img id=\"login_header_logo\" height=\"30px\" src=\"images/opensmtpdadmin.png\" />\n";
+ echo "<img id=\"login_header_logo\" src=\"images/postbox.png\" />\n";
+ echo "<img id=\"login_header_logo\" height=\"30px\" src=\"images/opensmtpdadmin.png\" />\n";
}
if (file_exists(realpath("../stylesheet.css"))) {
- print "<img id=\"login_header_logo\" src=\"../images/postbox.png\" />\n";
- print "<img id=\"login_header_logo\" height=\"30px\"% src=\"../images/opensmtpdadmin.png\" />\n";
+ echo "<img id=\"login_header_logo\" src=\"../images/postbox.png\" />\n";
+ echo "<img id=\"login_header_logo\" height=\"30px\"% src=\"../images/opensmtpdadmin.png\" />\n";
}
if (($CONF['show_header_text'] == "YES") and ($CONF['header_text'])) {
- print "<h2>" . $CONF['header_text'] . "</h2>\n";
+ echo "<h2>" . $CONF['header_text'] . "</h2>\n";
}
?>
</div>
blob - 9853f1a85084bae42064b3885b62a5ffd7acc0b1
blob + dc50f053fca0a2dc9df386fbe41627df8937c0af
--- templates/login.tpl
+++ templates/login.tpl
<form name="login" method="post">
<table id="login_table" cellspacing="10">
<tr>
- <td colspan="2"><h4><?php print $LANG['Login_welcome']; ?></h4></td>
+ <td colspan="2"><h4><?php echo $LANG['Login_welcome']; ?></h4></td>
</tr>
<tr>
- <td><?php print $LANG['Login_username'] . ":"; ?></td>
- <td><input class="flat" type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td>
+ <td><?php echo $LANG['Login_username'] . ":"; ?></td>
+ <td><input class="flat" type="text" name="fUsername" value="<?php echo $tUsername; ?>" /></td>
</tr>
<tr>
- <td><?php print $LANG['Login_password'] . ":"; ?></td>
+ <td><?php echo $LANG['Login_password'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword" /></td>
</tr>
<tr>
- <td colspan="2" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $LANG['Login_button']; ?>" /></td>
+ <td colspan="2" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Login_button']; ?>" /></td>
</tr>
<tr>
- <td colspan="2" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="2" class="standout"><?php echo $tMessage; ?></td>
</tr>
<tr>
- <td colspan="2"><a href="users/"><?php print $LANG['Login_login_users']; ?></a></td>
+ <td colspan="2"><a href="users/"><?php echo $LANG['Login_login_users']; ?></a></td>
</tr>
</table>
</form>
blob - 8119e66ed3842365cc70e0442e5316a6552cd833
blob + be9515ce6565997db08c4460e11acf6172b38c5f
--- templates/main.tpl
+++ templates/main.tpl
<div id="main_menu">
<table>
<tr>
- <td nowrap><a target="_top" href="list-domains.php"><?php print $LANG['Menu_overview']; ?></a></td>
- <td><?php print $LANG['Main_overview']; ?></td>
+ <td nowrap><a target="_top" href="list-domains.php"><?php echo $LANG['Menu_overview']; ?></a></td>
+ <td><?php echo $LANG['Main_overview']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="create-alias.php"><?php print $LANG['Menu_create_alias']; ?></a></td>
- <td><?php print $LANG['Main_create_alias']; ?></td>
+ <td nowrap><a target="_top" href="create-alias.php"><?php echo $LANG['Menu_create_alias']; ?></a></td>
+ <td><?php echo $LANG['Main_create_alias']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="create-mailbox.php"><?php print $LANG['Menu_create_mailbox']; ?></a></td>
- <td><?php print $LANG['Main_create_mailbox']; ?></td>
+ <td nowrap><a target="_top" href="create-mailbox.php"><?php echo $LANG['Menu_create_mailbox']; ?></a></td>
+ <td><?php echo $LANG['Main_create_mailbox']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="sendmail.php"><?php print $LANG['Menu_sendmail']; ?></a></td>
- <td><?php print $LANG['Main_sendmail']; ?></td>
+ <td nowrap><a target="_top" href="sendmail.php"><?php echo $LANG['Menu_sendmail']; ?></a></td>
+ <td><?php echo $LANG['Main_sendmail']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="password.php"><?php print $LANG['Menu_password']; ?></a></td>
- <td><?php print $LANG['Main_password']; ?></td>
+ <td nowrap><a target="_top" href="password.php"><?php echo $LANG['Menu_password']; ?></a></td>
+ <td><?php echo $LANG['Main_password']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="viewlog.php"><?php print $LANG['Menu_viewlog']; ?></a></td>
- <td><?php print $LANG['Main_viewlog']; ?></td>
+ <td nowrap><a target="_top" href="viewlog.php"><?php echo $LANG['Menu_viewlog']; ?></a></td>
+ <td><?php echo $LANG['Main_viewlog']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></td>
- <td><?php print $LANG['Main_logout']; ?></td>
+ <td nowrap><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></td>
+ <td><?php echo $LANG['Main_logout']; ?></td>
</tr>
</table>
/div>
blob - 713b5bbcc7d95dbb55926370afb2b6b2ba9a708c
blob + cc43a3aed2ba0a7a4178eea6dd0640ecc95cad3d
--- templates/menu.tpl
+++ templates/menu.tpl
<div id="menu">
<ul>
- <li><a target="_top" href="list-domains.php"><?php print $LANG['Menu_overview']; ?></a></li>
+ <li><a target="_top" href="list-domains.php"><?php echo $LANG['Menu_overview']; ?></a></li>
<li><a target="_top" href="create-alias.php<?php if (isset($domain)) echo '?domain=' . $domain; ?>"><?php echo $LANG['Menu_create_alias']; ?></a></li>
<li><a target="_top" href="create-mailbox.php<?php if (isset($domain)) echo '?domain=' . $domain; ?>"><?php echo $LANG['Menu_create_mailbox']; ?></a></li>
- <li><a target="_top" href="sendmail.php"><?php print $LANG['Menu_sendmail']; ?></a></li>
- <li><a target="_top" href="password.php"><?php print $LANG['Menu_password']; ?></a></li>
- <li><a target="_top" href="viewlog.php"><?php print $LANG['Menu_viewlog']; ?></a></li>
- <li><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></li>
+ <li><a target="_top" href="sendmail.php"><?php echo $LANG['Menu_sendmail']; ?></a></li>
+ <li><a target="_top" href="password.php"><?php echo $LANG['Menu_password']; ?></a></li>
+ <li><a target="_top" href="viewlog.php"><?php echo $LANG['Menu_viewlog']; ?></a></li>
+ <li><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></li>
</ul>
</div>
<?php
if (file_exists(realpath("motd.txt"))) {
- print "<div id=\"motd\">\n";
+ echo "<div id=\"motd\">\n";
include("motd.txt");
- print "</div>";
+ echo "</div>";
}
?>
blob - cab095f747a7ac5bc035271c68580cfe8344574d (mode 644)
blob + /dev/null
--- templates/menu.tpl.orig
+++ /dev/null
-<div id="submenu">
-<a target="_top" href="<?php print $_SERVER['PHP_SELF']; ?>"><?php print date("Y/m/d - H:i"); ?></a>·
-<?php
-if (($CONF['show_footer_text'] == "YES") and ($CONF['footer_link']))
-{
- print "<a target=\"_top\" href=\"" . $CONF['footer_link'] . "\">" . $CONF['footer_text'] . "</a>·\n";
-}
-?>
-<a target="_blank" href="http://postfixadmin.com/?version=<?php print $version; ?>"><?php print $PALANG['check_update']; ?></a>·
-<a target="_blank" href="http://postfixadmin.com/">Postfix Admin <?php print $version; ?></a>
-</div>
-<div id="menu">
-<a target="_top" href="overview.php"><?php print $PALANG['pMenu_overview']; ?></a>·
-<?php $url = "create-alias.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?>
-<a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_alias']; ?></a>·
-<?php $url = "create-mailbox.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?>
-<a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_mailbox']; ?></a>·
-<a target="_top" href="sendmail.php"><?php print $PALANG['pMenu_sendmail']; ?></a>·
-<a target="_top" href="password.php"><?php print $PALANG['pMenu_password']; ?></a>·
-<a target="_top" href="viewlog.php"><?php print $PALANG['pMenu_viewlog']; ?></a>·
-<a target="_top" href="logout.php"><?php print $PALANG['pMenu_logout']; ?></a>
-</div>
-<?php if (file_exists (realpath ("motd.txt"))) include ("motd.txt"); ?>
-<p>
blob - 7d2fa98d8b83653a82feb89ac585cc25e2d0df5f
blob + cf59990df4d0132b2c920aceb853a9994ee0d562
--- templates/message.tpl
+++ templates/message.tpl
-<?php print $message ?? ''; ?>
+<?php echo $message ?? ''; ?>
blob - 6a93afd451200e0ba3bd5f07ecee8789ed767e18
blob + 5d40c42308a0cafa2f474c3e74788366ce8e620c
--- templates/overview-get.tpl
+++ templates/overview-get.tpl
<?php
for ($i = 0; $i < count($list_domains); $i++) {
if ($fDomain == $list_domains[$i]) {
- print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
+ echo "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
} else {
- print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
+ echo "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
}
}
?>
</select>
-<input class="button" type="submit" name="go" value="<?php print $LANG['Overview_button']; ?>" />
+<input class="button" type="submit" name="go" value="<?php echo $LANG['Overview_button']; ?>" />
</form>
<form name="search" method="post" action="search.php">
<input type="textbox" name="search" size="10">
</form>
</div>
<?php
- print "<table id=\"overview_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"5\"><h3>".$LANG['Overview_title']."</h3></td>";
- print " </tr>";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['Overview_get_domain'] . "</td>\n";
- print " <td>" . $LANG['Overview_get_aliases'] . "</td>\n";
- print " <td>" . $LANG['Overview_get_mailboxes'] . "</td>\n";
- if ($CONF['quota'] == 'YES') print " <td>" . $LANG['Overview_get_quota'] . "</td>\n";
- print " </tr>\n";
+ echo "<table id=\"overview_table\">\n";
+ echo " <tr>\n";
+ echo " <td colspan=\"5\"><h3>".$LANG['Overview_title']."</h3></td>";
+ echo " </tr>";
+ echo " <tr class=\"header\">\n";
+ echo " <td>" . $LANG['Overview_get_domain'] . "</td>\n";
+ echo " <td>" . $LANG['Overview_get_aliases'] . "</td>\n";
+ echo " <td>" . $LANG['Overview_get_mailboxes'] . "</td>\n";
+ if ($CONF['quota'] == 'YES') echo " <td>" . $LANG['Overview_get_quota'] . "</td>\n";
+ echo " </tr>\n";
for ($i = 0; $i < count($list_domains); $i++) {
if ((is_array($list_domains) and count($list_domains) > 0)) {
if ($limit['mailboxes'] < 0) $limit['mailboxes'] = $LANG['Overview_disabled'];
if ($limit['maxquota'] < 0) $limit['maxquota'] = $LANG['Overview_disabled'];
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td><a href=\"overview.php?domain=" . $list_domains[$i] . "\">" . $list_domains[$i] . "</a></td>\n";
- print " <td>" . $limit['alias_count'] . " / " . $limit['aliases'] . "</td>\n";
- print " <td>" . $limit['mailbox_count'] . " / " . $limit['mailboxes'] . "</td>\n";
- if ($CONF['quota'] == 'YES') print " <td>" . $limit['maxquota'] . "</td>\n";
- print " </tr>\n";
+ echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
+ echo " <td><a href=\"overview.php?domain=" . $list_domains[$i] . "\">" . $list_domains[$i] . "</a></td>\n";
+ echo " <td>" . $limit['alias_count'] . " / " . $limit['aliases'] . "</td>\n";
+ echo " <td>" . $limit['mailbox_count'] . " / " . $limit['mailboxes'] . "</td>\n";
+ if ($CONF['quota'] == 'YES') echo " <td>" . $limit['maxquota'] . "</td>\n";
+ echo " </tr>\n";
}
}
- print "</table>\n";
+ echo "</table>\n";
?>
blob - 2e1f6e448fdf8e1a695329d6f5b23d7682ceed0e
blob + 5672e748579583fe75d5f3889bd8e679a64ca605
--- templates/password.tpl
+++ templates/password.tpl
<form name="password" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Password_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['Password_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['Password_admin'] . ":"; ?></td>
- <td><?php print $SESSID_USERNAME; ?></td>
- <td><?php print $pPassword_admin_text; ?></td>
+ <td><?php echo $LANG['Password_admin'] . ":"; ?></td>
+ <td><?php echo $SESSID_USERNAME; ?></td>
+ <td><?php echo $pPassword_admin_text; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Password_password_current']; ?></td>
+ <td><?php echo $LANG['Password_password_current']; ?></td>
<td><input class="flat" type="password" name="fPassword_current" /></td>
- <td><?php print $pPassword_password_current_text; ?></td>
+ <td><?php echo $pPassword_password_current_text; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Password_password'] . ":"; ?></td>
+ <td><?php echo $LANG['Password_password'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword" /></td>
- <td><?php print $pPassword_password_text; ?></td>
+ <td><?php echo $pPassword_password_text; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Password_password2'] . ":"; ?></td>
+ <td><?php echo $LANG['Password_password2'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword2" /></td>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $LANG['Password_button']; ?>" /></td>
+ <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Password_button']; ?>" /></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $tMessage; ?></td>
</tr>
</table>
</form>
blob - 4de0e5bd36528259cf70ce66aa63a01c2a3213cc
blob + 7fcbd94c4299f09b725e7b0b79dd81ab66775e32
--- templates/search.tpl
+++ templates/search.tpl
<div id="overview">
-<h4><?php print $LANG['Search_welcome'] . $fSearch; ?></h4>
+<h4><?php echo $LANG['Search_welcome'] . $fSearch; ?></h4>
<form name="search" method="post" action="search.php">
<input type="textbox" name="search">
</form>
</div>
<?php
if (count($tAlias) > 0) {
- print "<table id=\"alias_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
- print " </tr>";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
- print " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
- print " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
- print " <td colspan=\"2\"> </td>\n";
- print " </tr>\n";
+ 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\"> </td>\n";
+ echo " </tr>\n";
for ($i = 0; $i < count($tAlias); $i++) {
if ((is_array($tAlias) and count($tAlias) > 0)) {
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td>" . $tAlias[$i]['address'] . "</td>\n";
- print " <td>" . preg_replace("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
- print " <td>" . $tAlias[$i]['modified'] . "</td>\n";
- print " <td><a href=\"edit-alias.php?address=" . $tAlias[$i]['address'] . "&domain=" . $tAlias[$i]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?delete=" . $tAlias[$i]['address'] . "&domain=" . $tAlias[$i]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
- print " </tr>\n";
+ echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
+ echo " <td>" . $tAlias[$i]['address'] . "</td>\n";
+ echo " <td>" . preg_replace("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
+ echo " <td>" . $tAlias[$i]['modified'] . "</td>\n";
+ echo " <td><a href=\"edit-alias.php?address=" . $tAlias[$i]['address'] . "&domain=" . $tAlias[$i]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
+ echo " <td><a href=\"delete.php?delete=" . $tAlias[$i]['address'] . "&domain=" . $tAlias[$i]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
+ echo " </tr>\n";
}
}
- print "</table>\n";
+ echo "</table>\n";
}
if (count($tMailbox) > 0) {
- print "<table id=\"mailbox_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
- print " </tr>";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
- print " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
- if ($CONF['quota'] == 'YES') print " <td>" . $LANG['Overview_mailbox_quota'] . "</td>\n";
- print " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
- print " <td>" . $LANG['Overview_mailbox_active'] . "</td>\n";
- print " <td colspan=\"2\"> </td>\n";
- print " </tr>\n";
+ 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";
+ if ($CONF['quota'] == 'YES') echo " <td>" . $LANG['Overview_mailbox_quota'] . "</td>\n";
+ echo " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
+ echo " <td>" . $LANG['Overview_mailbox_active'] . "</td>\n";
+ echo " <td colspan=\"2\"> </td>\n";
+ echo " </tr>\n";
for ($i = 0; $i < count($tMailbox); $i++) {
if ((is_array($tMailbox) and count($tMailbox) > 0)) {
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td>" . $tMailbox[$i]['username'] . "</td>\n";
- print " <td>" . $tMailbox[$i]['name'] . "</td>\n";
- print " <td><a href=\"edit-mailbox.php?username=" . $tMailbox[$i]['username'] . "&domain=" . $tMailbox[$i]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?delete=" . $tMailbox[$i]['username'] . "&domain=" . $tMailbox[$i]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
- print " </tr>\n";
+ echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
+ echo " <td>" . $tMailbox[$i]['username'] . "</td>\n";
+ echo " <td>" . $tMailbox[$i]['name'] . "</td>\n";
+ echo " <td><a href=\"edit-mailbox.php?username=" . $tMailbox[$i]['username'] . "&domain=" . $tMailbox[$i]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
+ echo " <td><a href=\"delete.php?delete=" . $tMailbox[$i]['username'] . "&domain=" . $tMailbox[$i]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
+ echo " </tr>\n";
}
}
- print "</table>\n";
+ echo "</table>\n";
}
?>
blob - bc9b068ca38f87efb83694d5982aeb43ed5d7eed
blob + 21d2542e18659d5b2745bc9bc5a700f75a251476
--- templates/sendmail.tpl
+++ templates/sendmail.tpl
<form name="sendmail" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Sendmail_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['Sendmail_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['Sendmail_admin'] . ":"; ?></td>
- <td><?php print $SESSID_USERNAME; ?></td>
+ <td><?php echo $LANG['Sendmail_admin'] . ":"; ?></td>
+ <td><?php echo $SESSID_USERNAME; ?></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Sendmail_to'] . ":"; ?></td>
+ <td><?php echo $LANG['Sendmail_to'] . ":"; ?></td>
<td><input class="flat" type="text" name="fTo" /></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Sendmail_subject'] . ":"; ?></td>
- <td><input class="flat" type="text" name="fSubject" value="<?php print $LANG['Sendmail_subject_text']; ?>" /></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> </td>
</tr>
<tr>
- <td><?php print $LANG['Sendmail_body'] . ":" ?></td>
+ <td><?php echo $LANG['Sendmail_body'] . ":" ?></td>
<td>
- <textarea class="flat" rows="10" cols="60" name="fBody"><?php print $CONF['welcome_text']; ?></textarea>
+ <textarea class="flat" rows="10" cols="60" name="fBody"><?php echo $CONF['welcome_text']; ?></textarea>
</td>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $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>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $tMessage; ?></td>
</tr>
</table>
</form>
blob - 1093547cee5cfb23833302f405a63cef638838c9
blob + 9a440873ddbf033ea867db0832724c994770f6d1
--- templates/users_edit-alias.tpl
+++ templates/users_edit-alias.tpl
<form name="edit_alias" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Edit_alias_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['Edit_alias_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['Edit_alias_address'] . ":"; ?></td>
- <td><?php print $USERID_USERNAME; ?></td>
+ <td><?php echo $LANG['Edit_alias_address'] . ":"; ?></td>
+ <td><?php echo $USERID_USERNAME; ?></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['Edit_alias_goto'] . ":"; ?></td>
+ <td><?php echo $LANG['Edit_alias_goto'] . ":"; ?></td>
<td><textarea class="flat" rows="4" cols="30" name="fGoto">
<?php
$array = preg_split('/,/', $tGoto);
for ($i = 0 ; $i < count($array) ; $i++) {
if (empty($array[$i])) continue;
if ($array[$i] == $USERID_USERNAME) continue;
- print "$array[$i]\n";
+ echo "$array[$i]\n";
}
?>
</textarea>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $LANG['Edit_alias_button']; ?>"></td>
+ <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['Edit_alias_button']; ?>"></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $tMessage; ?></td>
</tr>
</table>
</form>
blob - 0f833e274b2843d91ef56491b09fb4bf2a7d053d
blob + 520ceb49f6a58415bf58635444287264bea1cdfe
--- templates/users_login.tpl
+++ templates/users_login.tpl
<form name="login" method="post">
<table id="login_table" cellspacing="10">
<tr>
- <td colspan="2"><h4><?php print $LANG['UsersLogin_welcome']; ?></h4></td>
+ <td colspan="2"><h4><?php echo $LANG['UsersLogin_welcome']; ?></h4></td>
</tr>
<tr>
- <td><?php print $LANG['UsersLogin_username'] . ":"; ?></td>
- <td><input class="flat" type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td>
+ <td><?php echo $LANG['UsersLogin_username'] . ":"; ?></td>
+ <td><input class="flat" type="text" name="fUsername" value="<?php echo $tUsername; ?>" /></td>
</tr>
<tr>
- <td><?php print $LANG['UsersLogin_password'] . ":"; ?></td>
+ <td><?php echo $LANG['UsersLogin_password'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword" /></td>
</tr>
<tr>
- <td colspan="2" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $LANG['UsersLogin_button']; ?>" /></td>
+ <td colspan="2" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php echo $LANG['UsersLogin_button']; ?>" /></td>
</tr>
<tr>
- <td colspan="2" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="2" class="standout"><?php echo $tMessage; ?></td>
</tr>
</table>
</form>
blob - 8986a19c261ad80740b8443ade1540b4b40c9f00
blob + 503f0a99dbea7457fc6ebb305df0a54198e286ac
--- templates/users_main.tpl
+++ templates/users_main.tpl
<table>
<tr>
<td> </td>
- <td><?php print $_SESSION['userid']['username']; ?></td>
+ <td><?php echo $_SESSION['userid']['username']; ?></td>
</tr>
<?php if ($CONF['vacation'] == 'YES') { ?>
<tr>
- <td nowrap><a target="_top" href="vacation.php"><?php print $LANG['UsersMenu_vacation']; ?></a></td>
- <td><?php print $LANG['UsersMain_vacation']; ?></td>
+ <td nowrap><a target="_top" href="vacation.php"><?php echo $LANG['UsersMenu_vacation']; ?></a></td>
+ <td><?php echo $LANG['UsersMain_vacation']; ?></td>
</tr>
<?php } ?>
<tr>
- <td nowrap><a target="_top" href="edit-alias.php"><?php print $LANG['UsersMenu_edit_alias']; ?></a></td>
- <td><?php print $LANG['UsersMain_edit_alias']; ?></td>
+ <td nowrap><a target="_top" href="edit-alias.php"><?php echo $LANG['UsersMenu_edit_alias']; ?></a></td>
+ <td><?php echo $LANG['UsersMain_edit_alias']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="password.php"><?php print $LANG['UsersMenu_password']; ?></a></td>
- <td><?php print $LANG['UsersMain_password']; ?></td>
+ <td nowrap><a target="_top" href="password.php"><?php echo $LANG['UsersMenu_password']; ?></a></td>
+ <td><?php echo $LANG['UsersMain_password']; ?></td>
</tr>
<tr>
- <td nowrap><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></td>
- <td><?php print $LANG['Main_logout']; ?></td>
+ <td nowrap><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></td>
+ <td><?php echo $LANG['Main_logout']; ?></td>
</tr>
</table>
</div>
blob - eb29f443dd9b1d6c5bd06ceaa2a0fe77b7be390c
blob + 37bf7c2fcc73adcc07b3b2be6488a35ea059d467
--- templates/users_menu.tpl
+++ templates/users_menu.tpl
<div id="menu">
<ul>
<?php if ($CONF['vacation'] == "YES") { ?>
- <li><a target="_top" href="vacation.php"><?php print $LANG['UsersMenu_vacation']; ?></a></li>
+ <li><a target="_top" href="vacation.php"><?php echo $LANG['UsersMenu_vacation']; ?></a></li>
<?php } ?>
- <li><a target="_top" href="edit-alias.php"><?php print $LANG['UsersMenu_edit_alias']; ?></a></li>
- <li><a target="_top" href="password.php"><?php print $LANG['UsersMenu_password']; ?></a></li>
- <li><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></li>
+ <li><a target="_top" href="edit-alias.php"><?php echo $LANG['UsersMenu_edit_alias']; ?></a></li>
+ <li><a target="_top" href="password.php"><?php echo $LANG['UsersMenu_password']; ?></a></li>
+ <li><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></li>
</ul>
</div>
<?php
if (file_exists(realpath("../motd-users.txt"))) {
- print "<div id=\"motd\">\n";
+ echo "<div id=\"motd\">\n";
include("../motd-users.txt");
- print "</div>";
+ echo "</div>";
}
?>
blob - fd4b5674def192d265d87813901abe2a66fa4b1e
blob + bbaae9a20988537b821c23cf5e830887fadeacea
--- templates/users_password.tpl
+++ templates/users_password.tpl
<form name="password" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['Password_welcome']; ?></td>
+ <td colspan="3"><h3><?php echo $LANG['Password_welcome']; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Password_admin'] . ":"; ?></td>
- <td><?php print $USERID_USERNAME; ?></td>
- <td><?php print $pPassword_admin_text; ?></td>
+ <td><?php echo $LANG['Password_admin'] . ":"; ?></td>
+ <td><?php echo $USERID_USERNAME; ?></td>
+ <td><?php echo $pPassword_admin_text; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Password_password_current'] . ":"; ?></td>
+ <td><?php echo $LANG['Password_password_current'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword_current" ></td>
- <td><?php print $pPassword_password_current_text; ?></td>
+ <td><?php echo $pPassword_password_current_text; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Password_password'] . ":"; ?></td>
+ <td><?php echo $LANG['Password_password'] . ":"; ?></td>
<td><input class="flat" type="password" name="fPassword" ></td>
- <td><?php print $pPassword_password_text; ?></td>
+ <td><?php echo $pPassword_password_text; ?></td>
</tr>
<tr>
- <td><?php print $LANG['Password_password2'].":" ?></td>
+ <td><?php echo $LANG['Password_password2'].":" ?></td>
<td><input class="flat" type="password" name="fPassword2" /></td>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input type="submit" name="submit" value="<?php print $LANG['Password_button']; ?>" /></td>
+ <td colspan="3" class="hlp_center"><input type="submit" name="submit" value="<?php echo $LANG['Password_button']; ?>" /></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $tMessage; ?></td>
</tr>
</table>
</form>
blob - 5f1a11c6bdb34af756cf85c9e2c61524a6ba7af7
blob + f537d5f01cc65a0bd166be843224bfdc79ba7516
--- templates/users_vacation-get.tpl
+++ templates/users_vacation-get.tpl
<form name="vacation" method="post">
<table>
<tr>
- <td class="hlp_center"><input class="button" type="submit" name="fBack" value="<?php print $LANG['UsersVacation_button_back']; ?>" /></td>
+ <td class="hlp_center"><input class="button" type="submit" name="fBack" value="<?php echo $LANG['UsersVacation_button_back']; ?>" /></td>
</tr>
</table>
</form>
blob - 828d23800eb3e249ac43467edbe7524fd261d638
blob + 809242364d5d79f2608ca3295f280cf00c5803f1
--- templates/users_vacation.tpl
+++ templates/users_vacation.tpl
<form name="vacation" method="post">
<table>
<tr>
- <td colspan="3"><h3><?php print $LANG['UsersVacation_welcome']; ?></h3></td>
+ <td colspan="3"><h3><?php echo $LANG['UsersVacation_welcome']; ?></h3></td>
</tr>
<tr>
- <td><?php print $LANG['UsersVacation_subject'] . ":"; ?></td>
- <td><input type="text" name="fSubject" value="<?php print $LANG['UsersVacation_subject_text']; ?>" /></td>
+ <td><?php echo $LANG['UsersVacation_subject'] . ":"; ?></td>
+ <td><input type="text" name="fSubject" value="<?php echo $LANG['UsersVacation_subject_text']; ?>" /></td>
<td> </td>
</tr>
<tr>
- <td><?php print $LANG['UsersVacation_body'] . ":"; ?></td>
+ <td><?php echo $LANG['UsersVacation_body'] . ":"; ?></td>
<td>
<textarea rows="10" cols="80" name="fBody">
-<?php print $LANG['UsersVacation_body_text']; ?>
+<?php echo $LANG['UsersVacation_body_text']; ?>
</textarea>
</td>
<td> </td>
</tr>
<tr>
- <td colspan="3" class="hlp_center"><input class="button" type="submit" name="fAway" value="<?php print $LANG['UsersVacation_button_away']; ?>" /></td>
+ <td colspan="3" class="hlp_center"><input class="button" type="submit" name="fAway" value="<?php echo $LANG['UsersVacation_button_away']; ?>" /></td>
</tr>
<tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ <td colspan="3" class="standout"><?php echo $tMessage; ?></td>
</tr>
</table>
</form>
blob - a8f655b929ea3a33242e9872018562eec78d2e02
blob + 0350ea99d4c9d0ebc6d6040068b991c085a169b9
--- templates/viewlog.tpl
+++ templates/viewlog.tpl
<div id="overview">
-<form name="viewlog" method="post">
-<select name="fDomain" onChange="this.form.submit()";>
+<form name="viewlog" method="get">
+<select name="domain" onChange="this.form.submit()";>
<?php
-$count = count($list_domains);
-for ($i = 0; $i < $count; $i++) {
- if ($fDomain == $list_domains[$i]) {
- print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
- } else {
- print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
+if (count($list_domains) > 0) {
+ foreach ($list_domains as $row) {
+ echo '<option value="' . $row['domain'] . '"';
+ if (isset($domain) && $domain == $row['domain']) echo ' selected';
+ echo ">" . $row['domain'] . "</option>\n";
}
}
?>
</select>
-<input class="button" type="submit" name="go" value="<?php print $LANG['Viewlog_button']; ?>" />
+<input class="button" type="submit" name="go" value="<?php echo $LANG['Viewlog_button']; ?>" />
</form>
</div>
<?php
-if (!empty($tLog)) {
- $tLog_count = count($tLog);
- if ($tLog_count > 0) {
- print "<table id=\"log_table\">\n";
- print " <tr>\n";
- print " <td colspan=\"5\"><h3>".$LANG['Viewlog_welcome']." ".$fDomain."</h3></td>\n";
- print " </tr>\n";
- print " <tr class=\"header\">\n";
- print " <td>" . $LANG['Viewlog_timestamp'] . "</td>\n";
- print " <td>" . $LANG['Viewlog_username'] . "</td>\n";
- print " <td>" . $LANG['Viewlog_domain'] . "</td>\n";
- print " <td>" . $LANG['Viewlog_action'] . "</td>\n";
- print " <td>" . $LANG['Viewlog_data'] . "</td>\n";
- print " </tr>\n";
+if (count($log) > 0) {
+ echo "<table id=\"log_table\">\n";
+ echo " <tr>\n";
+ echo " <td colspan=\"5\"><h3>".$LANG['Viewlog_welcome']." ".$domain."</h3></td>\n";
+ echo " </tr>\n";
+ echo " <tr class=\"header\">\n";
+ echo " <td>" . $LANG['Viewlog_timestamp'] . "</td>\n";
+ echo " <td>" . $LANG['Viewlog_username'] . "</td>\n";
+ echo " <td>" . $LANG['Viewlog_domain'] . "</td>\n";
+ echo " <td>" . $LANG['Viewlog_action'] . "</td>\n";
+ echo " <td>" . $LANG['Viewlog_data'] . "</td>\n";
+ echo " </tr>\n";
- for ($i = 0; $i < $tLog_count; $i++) {
- if ((is_array($tLog) and $tLog_count > 0)) {
- $log_data = $tLog[$i]['data'];
- $data_length = strlen($log_data);
- if ($data_length > 35) $log_data = substr($log_data, 0, 35) . " ...";
-
- print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
- print " <td nowrap>" . $tLog[$i]['timestamp'] . "</td>\n";
- print " <td nowrap>" . $tLog[$i]['username'] . "</td>\n";
- print " <td nowrap>" . $tLog[$i]['domain'] . "</td>\n";
- print " <td nowrap>" . $tLog[$i]['action'] . "</td>\n";
- print " <td nowrap>" . $log_data . "</td>\n";
- print " </tr>\n";
- }
- }
- print "</table>\n";
- print "<p />\n";
+ foreach ($log as $row) {
+ if (strlen($row['data']) > 35) $row['data'] = substr($row['data'], 0, 35) . " ...";
+ echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
+ echo " <td nowrap>" . $row['timestamp'] . "</td>\n";
+ echo " <td nowrap>" . $row['username'] . "</td>\n";
+ echo " <td nowrap>" . $row['domain'] . "</td>\n";
+ echo " <td nowrap>" . $row['action'] . "</td>\n";
+ echo " <td nowrap>" . $row['data'] . "</td>\n";
+ echo " </tr>\n";
}
+ echo "</table>\n";
+ echo "<p />\n";
}
?>