print -> echo
This commit is contained in:
parent
b3e5c8350e
commit
a3641a1896
42
README.md
42
README.md
|
@ -12,7 +12,9 @@ Database needed to use SQL with OpenSMTPD
|
|||
`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 '',
|
||||
|
@ -20,7 +22,9 @@ Database needed to use SQL with OpenSMTPD
|
|||
`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 '',
|
||||
|
@ -29,22 +33,48 @@ Database needed to use SQL with OpenSMTPD
|
|||
`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:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
// goto
|
||||
//
|
||||
require_once '../functions.inc.php';
|
||||
include '../languages/' . check_language() . ".lang';
|
||||
include '../languages/' . check_language() . '.lang';
|
||||
|
||||
$list_domains = list_domains();
|
||||
|
||||
|
|
|
@ -84,11 +84,11 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
|||
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();
|
||||
|
|
|
@ -17,52 +17,42 @@
|
|||
//
|
||||
// -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;
|
||||
|
||||
$header = "#\n# OpenSMTPD Admin $version\n# Date: " . date("D M j G:i:s T Y") . "\n#\n";
|
||||
$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');
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,77 +11,74 @@
|
|||
//
|
||||
// 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'];
|
||||
}
|
||||
|
||||
$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($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>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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'];
|
||||
}
|
||||
}
|
||||
}
|
||||
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';
|
||||
?>
|
||||
|
|
|
@ -11,102 +11,80 @@
|
|||
//
|
||||
// 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';
|
||||
?>
|
||||
|
|
|
@ -11,42 +11,28 @@
|
|||
//
|
||||
// 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';
|
||||
?>
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<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
|
||||
|
@ -20,25 +20,25 @@
|
|||
</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>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<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 } ?>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<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 } ?>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<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>
|
||||
|
|
|
@ -12,12 +12,12 @@ if (count($list_domains) > 0) {
|
|||
?>
|
||||
</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">
|
||||
|
@ -41,50 +41,50 @@ if ($list_domains[$selected_domain]['alias_count'] > $limit || $list_domains[$se
|
|||
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";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
<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";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -2,63 +2,63 @@
|
|||
<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>
|
||||
|
|
|
@ -2,22 +2,20 @@
|
|||
<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>
|
||||
|
@ -25,10 +23,10 @@ for ($i = 0 ; $i < count($array) ; $i++) {
|
|||
<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>
|
||||
|
|
|
@ -2,45 +2,33 @@
|
|||
<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>
|
||||
</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_username']; ?></td>
|
||||
<td><?php echo $username; ?></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> </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_password'] . ":"; ?></td>
|
||||
<td><input class="flat" type="password" name="password1" /></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><?php echo $LANG['Edit_mailbox_password2'] . ":"; ?></td>
|
||||
<td><input class="flat" type="password" name="password2" /></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="standout"><?php print $tMessage; ?></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 echo $LANG['Edit_mailbox_button']; ?>" ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="standout"><?php echo $message ?? ' '; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<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>
|
||||
|
|
|
@ -8,27 +8,27 @@
|
|||
<!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>
|
||||
|
|
|
@ -2,24 +2,24 @@
|
|||
<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>
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<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>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<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>";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
<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>
|
|
@ -1 +1 @@
|
|||
<?php print $message ?? ''; ?>
|
||||
<?php echo $message ?? ''; ?>
|
||||
|
|
|
@ -4,30 +4,30 @@
|
|||
<?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)) {
|
||||
|
@ -40,13 +40,13 @@ for ($i = 0; $i < count($list_domains); $i++) {
|
|||
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";
|
||||
?>
|
||||
|
|
|
@ -2,33 +2,33 @@
|
|||
<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>
|
||||
|
|
|
@ -1,61 +1,61 @@
|
|||
<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?delet |