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 '',
|
`password` varchar(255) NOT NULL DEFAULT '',
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`modified` 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` (
|
CREATE TABLE `alias` (
|
||||||
`address` varchar(255) NOT NULL DEFAULT '',
|
`address` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
@ -20,7 +22,9 @@ Database needed to use SQL with OpenSMTPD
|
||||||
`domain` varchar(255) NOT NULL DEFAULT '',
|
`domain` varchar(255) NOT NULL DEFAULT '',
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`modified` 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` (
|
CREATE TABLE `domain` (
|
||||||
`domain` varchar(255) NOT NULL DEFAULT '',
|
`domain` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
@ -29,22 +33,48 @@ Database needed to use SQL with OpenSMTPD
|
||||||
`mailboxes` int(10) NOT NULL DEFAULT 0,
|
`mailboxes` int(10) NOT NULL DEFAULT 0,
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`modified` 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` (
|
CREATE TABLE `domain_admins` (
|
||||||
`username` varchar(255) NOT NULL DEFAULT '',
|
`username` varchar(255) NOT NULL DEFAULT '',
|
||||||
`domain` varchar(255) NOT NULL DEFAULT '',
|
`domain` varchar(255) NOT NULL DEFAULT '',
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`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` (
|
CREATE TABLE `log` (
|
||||||
`timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`username` varchar(255) NOT NULL DEFAULT '',
|
`username` varchar(255) NOT NULL DEFAULT '',
|
||||||
`domain` varchar(255) NOT NULL DEFAULT '',
|
`domain` varchar(255) NOT NULL DEFAULT '',
|
||||||
`action` varchar(255) NOT NULL DEFAULT '',
|
`action` varchar(255) NOT NULL DEFAULT '',
|
||||||
`data` varchar(255) NOT NULL DEFAULT ''
|
`data` varchar(255) NOT NULL DEFAULT '',
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='OpenSMTPD Admin - Log';
|
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:
|
Config for OpenSMTPTD, MySQL/MariaDB example:
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
// goto
|
// goto
|
||||||
//
|
//
|
||||||
require_once '../functions.inc.php';
|
require_once '../functions.inc.php';
|
||||||
include '../languages/' . check_language() . ".lang';
|
include '../languages/' . check_language() . '.lang';
|
||||||
|
|
||||||
$list_domains = list_domains();
|
$list_domains = list_domains();
|
||||||
|
|
||||||
|
|
|
@ -84,10 +84,10 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||||
if ($password1 != $password2) {
|
if ($password1 != $password2) {
|
||||||
$message = $LANG['AdminAdd_admin_password_error'];
|
$message = $LANG['AdminAdd_admin_password_error'];
|
||||||
}
|
}
|
||||||
if (empty($message)) {
|
if (!empty($password1) && empty($message)) {
|
||||||
|
$hashed = bcrypt($password1);
|
||||||
try {
|
try {
|
||||||
$dbh = connect_db();
|
$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(1, $hashed, PDO::PARAM_STR);
|
||||||
$sth->bindParam(2, $username, PDO::PARAM_STR);
|
$sth->bindParam(2, $username, PDO::PARAM_STR);
|
||||||
|
|
|
@ -17,55 +17,45 @@
|
||||||
//
|
//
|
||||||
// -none-
|
// -none-
|
||||||
//
|
//
|
||||||
require("../config.inc.php");
|
require_once '../functions.inc.php';
|
||||||
require("../functions.inc.php");
|
include '../languages/' . check_language() . '.lang';
|
||||||
include("../languages/" . check_language() . ".lang");
|
|
||||||
date_default_timezone_set('Europe/Amsterdam');
|
date_default_timezone_set('Europe/Amsterdam');
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
||||||
umask(077);
|
umask(077);
|
||||||
$path = "/tmp/";
|
|
||||||
$filename = "opensmtpadmin-" . date("Ymd") . "-" . getmypid() . ".sql";
|
$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";
|
||||||
$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");
|
|
||||||
} else {
|
|
||||||
fwrite($fh, $header);
|
|
||||||
|
|
||||||
$tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation');
|
$tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation');
|
||||||
|
|
||||||
for ($i = 0 ; $i < count($tables) ; ++$i) {
|
if (!$fh = fopen($backup, 'w')) {
|
||||||
$result = db_query("SHOW CREATE TABLE $tables[$i]");
|
$message = "<div class=\"error_msg\">Cannot open file ($backup)</div>";
|
||||||
if ($result['rows'] > 0) {
|
include '../templates/header.tpl';
|
||||||
while ($row = db_array($result['result'])) {
|
include '../templates/admin_menu.tpl';
|
||||||
fwrite ($fh, "$row[1]\n\n");
|
include '../templates/message.tpl';
|
||||||
}
|
include '../templates/footer.tpl';
|
||||||
}
|
} else {
|
||||||
|
fwrite($fh, $header);
|
||||||
|
$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) {
|
foreach ($tables as $table) {
|
||||||
$result = db_query("SELECT * FROM $tables[$i]");
|
$sth = $dbh->query("SELECT * FROM $table");
|
||||||
if ($result['rows'] > 0) {
|
while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
|
||||||
while ($row = db_assoc($result['result'])) {
|
foreach ($row as $k => $v) {
|
||||||
foreach ($row as $key => $val) {
|
$keys[] = $k;
|
||||||
$fields[] = $key;
|
$values[] = $v;
|
||||||
$values[] = $val;
|
|
||||||
}
|
}
|
||||||
|
fwrite($fh, "INSERT INTO ". $table . " (". implode (',',$keys) . ") VALUES ('" . implode ('\',\'',$values) . "')\n");
|
||||||
fwrite($fh, "INSERT INTO ". $tables[$i] . " (". implode (',',$fields) . ") VALUES ('" . implode ('\',\'',$values) . "')\n");
|
$keys = array();
|
||||||
$fields = array();
|
|
||||||
$values = array();
|
$values = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
header("Content-Disposition: attachment; filename=\"$filename\"");
|
header("Content-Disposition: attachment; filename=\"$filename\"");
|
||||||
header("Content-Transfer-Encoding: binary");
|
header("Content-Transfer-Encoding: binary");
|
||||||
|
|
|
@ -11,77 +11,74 @@
|
||||||
//
|
//
|
||||||
// Template Variables:
|
// Template Variables:
|
||||||
//
|
//
|
||||||
// tMessage
|
// message
|
||||||
// tGoto
|
// goto
|
||||||
//
|
//
|
||||||
// Form POST \ GET Variables:
|
// Form POST \ GET Variables:
|
||||||
//
|
//
|
||||||
// fAddress
|
// address
|
||||||
// fDomain
|
// domain
|
||||||
// fGoto
|
// goto
|
||||||
//
|
//
|
||||||
require("../functions.inc.php");
|
require_once '../functions.inc.php';
|
||||||
include("../languages/" . check_language() . ".lang");
|
include '../languages/' . check_language() . '.lang';
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
||||||
$fAddress = escape_string($_GET['address']);
|
$address = filter_input(INPUT_GET, 'address', FILTER_VALIDATE_EMAIL);
|
||||||
$fDomain = escape_string($_GET['domain']);
|
$domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN);
|
||||||
|
|
||||||
$result = db_query("SELECT * FROM alias WHERE address='$fAddress' AND domain='$fDomain'");
|
try {
|
||||||
if ($result['rows'] == 1) {
|
$dbh = connect_db();
|
||||||
$row = db_array($result['result']);
|
$sth = $dbh->prepare("SELECT goto FROM alias WHERE address=? AND domain=?");
|
||||||
$tGoto = $row['goto'];
|
$sth->bindParam(1, $address, PDO::PARAM_STR);
|
||||||
} else {
|
$sth->bindParam(2, $domain, PDO::PARAM_STR);
|
||||||
$tMessage = $LANG['Edit_alias_address_error'];
|
$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") {
|
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']);
|
if (empty($goto)) {
|
||||||
$fAddress = strtolower($fAddress);
|
$goto = array();
|
||||||
$fDomain = escape_string($_GET['domain']);
|
$message = $LANG['Edit_alias_goto_text_error1'];
|
||||||
$fGoto = escape_string($_POST['fGoto']);
|
} else {
|
||||||
$fGoto = strtolower($fGoto);
|
$goto = preg_replace('/\\\r\\\n/', ',', $goto);
|
||||||
|
|
||||||
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('/\r\n/', ',', $goto);
|
||||||
$goto = preg_replace('/[\s]+/i', '', $goto);
|
$goto = preg_replace('/[\s]+/i', '', $goto);
|
||||||
$goto = preg_replace('/\,*$/', '', $goto);
|
$goto = preg_replace('/\,*$/', '', $goto);
|
||||||
$array = preg_split('/,/', $goto);
|
$validate_goto = explode(',', $goto);
|
||||||
|
foreach ($validate_goto as $row) {
|
||||||
for ($i = 0; $i < count($array); $i++) {
|
if (!filter_var($row, FILTER_VALIDATE_EMAIL)) {
|
||||||
if (in_array("$array[$i]", $CONF['default_aliases'])) continue;
|
$goto = explode(',', $goto);
|
||||||
if (empty($array[$i])) continue;
|
$message = $LANG['Edit_alias_goto_text_error2'] . "$row</div>";
|
||||||
if (!check_email($array[$i]))
|
}
|
||||||
{
|
|
||||||
$error = 1;
|
|
||||||
$tGoto = $goto;
|
|
||||||
$tMessage = $LANG['Edit_alias_goto_text_error2'] . "$array[$i]</div>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($error != 1) {
|
if (empty($message)) {
|
||||||
$result = db_query("UPDATE alias SET goto='$goto',modified=NOW() WHERE address='$fAddress' AND domain='$fDomain'");
|
try {
|
||||||
if ($result['rows'] != 1) {
|
$dbh = connect_db();
|
||||||
$tMessage = $LANG['Edit_alias_result_error'];
|
$sth = $dbh->prepare("UPDATE alias SET goto=?,modified=NOW() WHERE address=? AND domain=?");
|
||||||
} else {
|
$sth->bindParam(1, $goto, PDO::PARAM_STR);
|
||||||
db_log($CONF['admin_email'], $fDomain, "edit alias", "$fAddress -> $goto");
|
$sth->bindParam(2, $address, PDO::PARAM_STR);
|
||||||
|
$sth->bindParam(3, $domain, PDO::PARAM_STR);
|
||||||
header("Location: list-virtual.php?domain=$fDomain");
|
$sth->execute();
|
||||||
exit;
|
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/header.tpl';
|
||||||
include("../templates/admin_menu.tpl");
|
include '../templates/admin_menu.tpl';
|
||||||
include("../templates/edit-alias.tpl");
|
include '../templates/edit-alias.tpl';
|
||||||
include("../templates/footer.tpl");
|
include '../templates/footer.tpl';
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -11,102 +11,80 @@
|
||||||
//
|
//
|
||||||
// Template Variables:
|
// Template Variables:
|
||||||
//
|
//
|
||||||
// tMessage
|
// message
|
||||||
// tName
|
// name
|
||||||
// tQuota
|
|
||||||
//
|
//
|
||||||
// Form POST \ GET Variables:
|
// Form POST \ GET Variables:
|
||||||
//
|
//
|
||||||
// fUsername
|
// username
|
||||||
// fDomain
|
// domain
|
||||||
// fPassword
|
// password1
|
||||||
// fPassword2
|
// password2
|
||||||
// fName
|
// name
|
||||||
// fQuota
|
|
||||||
// fActive
|
|
||||||
//
|
//
|
||||||
require("../functions.inc.php");
|
require_once '../functions.inc.php';
|
||||||
include("../languages/" . check_language() . ".lang");
|
include '../languages/' . check_language() . '.lang';
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
||||||
$fUsername = escape_string($_GET['username']);
|
$username = strtolower(filter_input(INPUT_GET, 'username', FILTER_DEFAULT));
|
||||||
$fDomain = escape_string($_GET['domain']);
|
$domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN);
|
||||||
|
|
||||||
$result = db_query("SELECT * FROM mailbox WHERE username='$fUsername' AND domain='$fDomain'");
|
try {
|
||||||
if ($result['rows'] == 1) {
|
$dbh = connect_db();
|
||||||
$row = db_array($result['result']);
|
$sth = $dbh->prepare("SELECT * FROM mailbox WHERE username=? AND domain=?");
|
||||||
$tName = $row['name'];
|
$sth->bindParam(1, $username, PDO::PARAM_STR);
|
||||||
$tQuota = $row['quota'] / $CONF['quota_multiplier'];
|
$sth->bindParam(2, $domain, PDO::PARAM_STR);
|
||||||
$tActive = $row['active'];
|
$sth->execute();
|
||||||
} else {
|
$mailbox_details = $sth->fetch();
|
||||||
$tMessage = $LANG['Edit_mailbox_login_error'];
|
$name = $mailbox_details['name'];
|
||||||
|
} catch(PDOException $e) {
|
||||||
|
$message = $LANG['Edit_mailbox_login_error'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||||
$pEdit_mailbox_password_text = $LANG['Edit_mailbox_password_text_error'];
|
$username = strtolower(filter_input(INPUT_GET, 'username', FILTER_DEFAULT));
|
||||||
$pEdit_mailbox_quota_text = $LANG['Edit_mailbox_quota_text'];
|
$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);
|
||||||
|
|
||||||
$fUsername = escape_string($_GET['username']);
|
if ($password1 != $password2) {
|
||||||
$fUsername = strtolower($fUsername);
|
$message = $LANG['Edit_mailbox_password_text_error'];
|
||||||
$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'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($CONF['quota'] == "YES") {
|
if (!empty($pqassword1) && empty($message)) {
|
||||||
if (!check_quota($fQuota, $fDomain)) {
|
$hashed = bcrypt($password1);
|
||||||
$error = 1;
|
try {
|
||||||
$tName = $fName;
|
$dbh = connect_db();
|
||||||
$tQuota = $fQuota;
|
$sth = $dbh->prepare("UPDATE mailbox SET password=?,name=?,modified=NOW() WHERE username=? AND domain=?");
|
||||||
$tActive = $fActive;
|
$sth->bindParam(1, $hashed, PDO::PARAM_STR);
|
||||||
$pEdit_mailbox_quota_text = $LANG['Edit_mailbox_quota_text_error'];
|
$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($message)) {
|
||||||
if (!empty($fQuota)) {
|
try {
|
||||||
$quota = $fQuota * $CONF['quota_multiplier'];
|
$dbh = connect_db();
|
||||||
} else {
|
$sth = $dbh->prepare("UPDATE mailbox SET name=?,modified=NOW() WHERE username=? AND domain=?");
|
||||||
$quota = 0;
|
$sth->bindParam(1, $name, PDO::PARAM_STR);
|
||||||
}
|
$sth->bindParam(2, $username, PDO::PARAM_STR);
|
||||||
|
$sth->bindParam(3, $domain, PDO::PARAM_STR);
|
||||||
if ($fActive == "on") {
|
$sth->execute();
|
||||||
$fActive = 1;
|
logging(ADMIN_EMAIL, $domain, "edit mailbox", $username);
|
||||||
} else {
|
header("Location: list-virtual.php?domain=$domain");
|
||||||
$fActive = 0;
|
} catch(PDOException $e) {
|
||||||
}
|
$message = $LANG['Edit_mailbox_result_error'];
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
include("../templates/header.tpl");
|
include '../templates/header.tpl';
|
||||||
include("../templates/admin_menu.tpl");
|
include '../templates/admin_menu.tpl';
|
||||||
include("../templates/edit-mailbox.tpl");
|
include '../templates/edit-mailbox.tpl';
|
||||||
include("../templates/footer.tpl");
|
include '../templates/footer.tpl';
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -11,42 +11,28 @@
|
||||||
//
|
//
|
||||||
// Template Variables:
|
// Template Variables:
|
||||||
//
|
//
|
||||||
// tMessage
|
// log
|
||||||
// tLog
|
|
||||||
//
|
//
|
||||||
// Form POST \ GET Variables:
|
// Form POST \ GET Variables:
|
||||||
//
|
//
|
||||||
// fDomain
|
// domain
|
||||||
//
|
//
|
||||||
require("../functions.inc.php");
|
require_once '../functions.inc.php';
|
||||||
include("../languages/" . check_language() . ".lang");
|
include '../languages/' . check_language() . '.lang';
|
||||||
|
|
||||||
$list_domains = list_domains();
|
$list_domains = list_domains();
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
||||||
|
$domain = filter_input(INPUT_GET, 'domain', FILTER_VALIDATE_DOMAIN) ?? $list_domains[0]['domain'];
|
||||||
if ((is_array($list_domains) and count($list_domains) > 0)) $fDomain = $list_domains[0];
|
$dbh = connect_db();
|
||||||
|
$sth = $dbh->prepare("SELECT * FROM log WHERE domain=? ORDER BY timestamp DESC LIMIT 10");
|
||||||
$result = db_query("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
|
$sth->bindParam(1, $domain, PDO::PARAM_STR);
|
||||||
if ($result['rows'] > 0) {
|
$sth->execute();
|
||||||
while ($row = db_array($result['result'])) {
|
$log = $sth->fetchAll();
|
||||||
$tLog[] = $row;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
include '../templates/header.tpl';
|
||||||
$fDomain = escape_string($_POST['fDomain']);
|
include '../templates/admin_menu.tpl';
|
||||||
|
include '../templates/viewlog.tpl';
|
||||||
$result = db_query("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
|
include '../templates/footer.tpl';
|
||||||
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");
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<form name="create_mailbox" method="post">
|
<form name="create_mailbox" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Create_mailbox_username'] . ":"; ?></td>
|
<td><?php echo $LANG['Create_mailbox_username'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="username" value="<?php print $username ?? ''; ?>" /></td>
|
<td><input class="flat" type="text" name="username" value="<?php echo $username ?? ''; ?>" /></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="domain">
|
<select name="domain">
|
||||||
<?php
|
<?php
|
||||||
|
@ -20,25 +20,25 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><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>
|
||||||
<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><input class="flat" type="password" name="password2" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Create_mailbox_name'] . ":"; ?></td>
|
<td><?php echo $LANG['Create_mailbox_name'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="name" value="<?php print $name ?? ''; ?>" /></td>
|
<td><input class="flat" type="text" name="name" value="<?php echo $name ?? ''; ?>" /></td>
|
||||||
<td><?php print $LANG['Create_mailbox_name_text']; ?></td>
|
<td><?php echo $LANG['Create_mailbox_name_text']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $message ?? ' '; ?></td>
|
<td colspan="3" class="standout"><?php echo $message ?? ' '; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $LANG['AdminAdd_admin_username'] . ":"; ?></td>
|
<td><?php echo $LANG['AdminAdd_admin_username'] . ":"; ?></td>
|
||||||
<?php if ($action == 'edit') { ?>
|
<?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 { ?>
|
<?php } else { ?>
|
||||||
<td><input class="flat" type="text" name="username" value="<?php echo $username ?? ''; ?>" /></td>
|
<td><input class="flat" type="text" name="username" value="<?php echo $username ?? ''; ?>" /></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if ($action == 'edit') { ?>
|
<?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 { ?>
|
<?php } else { ?>
|
||||||
<td colspan="3"><h3><?php echo $LANG['AdminAdd_domain_welcome']; ?></h3></td>
|
<td colspan="3"><h3><?php echo $LANG['AdminAdd_domain_welcome']; ?></h3></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $LANG['AdminAdd_domain_domain'] . ":"; ?></td>
|
<td><?php echo $LANG['AdminAdd_domain_domain'] . ":"; ?></td>
|
||||||
<?php if ($action == 'edit') { ?>
|
<?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 { ?>
|
<?php } else { ?>
|
||||||
<td><input class="flat" type="text" name="domain" value="<?php echo $domain ?? ''; ?>" /></td>
|
<td><input class="flat" type="text" name="domain" value="<?php echo $domain ?? ''; ?>" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
|
|
|
@ -12,12 +12,12 @@ if (count($list_domains) > 0) {
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<input type="hidden" name="limit" value="0">
|
<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>
|
</form>
|
||||||
|
|
||||||
<h4><?php print $LANG['AdminList_virtual_welcome'] . $domain; ?></h4>
|
<h4><?php echo $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 echo $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>
|
<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">
|
<form name="search" method="post" action="search.php">
|
||||||
<input type="textbox" name="search" size="25">
|
<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";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
if (count($list_alias) > 0) {
|
if (count($list_alias) > 0) {
|
||||||
print "<table id=\"alias_table\">\n";
|
echo "<table id=\"alias_table\">\n";
|
||||||
print " <tr>\n";
|
echo " <tr>\n";
|
||||||
print " <td colspan=\"5\"><h3>" . $LANG['Overview_alias_title'] . "</h3></td>";
|
echo " <td colspan=\"5\"><h3>" . $LANG['Overview_alias_title'] . "</h3></td>";
|
||||||
print " </tr>";
|
echo " </tr>";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " <td>" . $LANG['AdminList_virtual_alias_address'] . "</td>\n";
|
echo " <td>" . $LANG['AdminList_virtual_alias_address'] . "</td>\n";
|
||||||
print " <td>" . $LANG['AdminList_virtual_alias_goto'] . "</td>\n";
|
echo " <td>" . $LANG['AdminList_virtual_alias_goto'] . "</td>\n";
|
||||||
print " <td>" . $LANG['AdminList_virtual_alias_modified'] . "</td>\n";
|
echo " <td>" . $LANG['AdminList_virtual_alias_modified'] . "</td>\n";
|
||||||
print " <td colspan=\"2\"> </td>\n";
|
echo " <td colspan=\"2\"> </td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
foreach ($list_alias as $row) {
|
foreach ($list_alias as $row) {
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
||||||
print " <td>" . $row['address'] . "</td>\n";
|
echo " <td>" . $row['address'] . "</td>\n";
|
||||||
print " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
|
echo " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
|
||||||
print " <td>" . $row['modified'] . "</td>\n";
|
echo " <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";
|
echo " <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";
|
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";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($list_mailbox) > 0) {
|
if (count($list_mailbox) > 0) {
|
||||||
print "<table id=\"mailbox_table\">\n";
|
echo "<table id=\"mailbox_table\">\n";
|
||||||
print " <tr>\n";
|
echo " <tr>\n";
|
||||||
print " <td colspan=\"7\"><h3>" . $LANG['Overview_mailbox_title'] . "</h3></td>";
|
echo " <td colspan=\"7\"><h3>" . $LANG['Overview_mailbox_title'] . "</h3></td>";
|
||||||
print " </tr>";
|
echo " </tr>";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " <td>" . $LANG['AdminList_virtual_mailbox_username'] . "</td>\n";
|
echo " <td>" . $LANG['AdminList_virtual_mailbox_username'] . "</td>\n";
|
||||||
print " <td>" . $LANG['AdminList_virtual_mailbox_name'] . "</td>\n";
|
echo " <td>" . $LANG['AdminList_virtual_mailbox_name'] . "</td>\n";
|
||||||
print " <td>" . $LANG['AdminList_virtual_mailbox_modified'] . "</td>\n";
|
echo " <td>" . $LANG['AdminList_virtual_mailbox_modified'] . "</td>\n";
|
||||||
print " <td colspan=\"2\"> </td>\n";
|
echo " <td colspan=\"2\"> </td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
foreach ($list_mailbox as $row) {
|
foreach ($list_mailbox as $row) {
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
||||||
print " <td>" . $row['username'] . "</td>\n";
|
echo " <td>" . $row['username'] . "</td>\n";
|
||||||
print " <td>" . $row['name'] . "</td>\n";
|
echo " <td>" . $row['name'] . "</td>\n";
|
||||||
print " <td>" . $row['modified'] . "</td>\n";
|
echo " <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";
|
echo " <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";
|
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";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
<div id="overview">
|
<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">
|
<form name="search" method="post" action="search.php">
|
||||||
<input type="textbox" name="search">
|
<input type="textbox" name="search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (count($list_alias) > 0) {
|
if (count($list_alias) > 0) {
|
||||||
print "<table id=\"alias_table\">\n";
|
echo "<table id=\"alias_table\">\n";
|
||||||
print " <tr>\n";
|
echo " <tr>\n";
|
||||||
print " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
|
echo " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
|
||||||
print " </tr>";
|
echo " </tr>";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
|
||||||
print " <td colspan=\"2\"> </td>\n";
|
echo " <td colspan=\"2\"> </td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
foreach ($list_alias as $row) {
|
foreach ($list_alias as $row) {
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
||||||
print " <td>" . $row['address'] . "</td>\n";
|
echo " <td>" . $row['address'] . "</td>\n";
|
||||||
print " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
|
echo " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
|
||||||
print " <td>" . $row['modified'] . "</td>\n";
|
echo " <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";
|
echo " <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";
|
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";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($list_mailbox) > 0) {
|
if (count($list_mailbox) > 0) {
|
||||||
print "<table id=\"mailbox_table\">\n";
|
echo "<table id=\"mailbox_table\">\n";
|
||||||
print " <tr>\n";
|
echo " <tr>\n";
|
||||||
print " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
|
echo " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
|
||||||
print " </tr>";
|
echo " </tr>";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
|
||||||
print " <td colspan=\"2\"> </td>\n";
|
echo " <td colspan=\"2\"> </td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
foreach ($list_mailbox as $row) {
|
foreach ($list_mailbox as $row) {
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
||||||
print " <td>" . $row['username'] . "</td>\n";
|
echo " <td>" . $row['username'] . "</td>\n";
|
||||||
print " <td>" . $row['name'] . "</td>\n";
|
echo " <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";
|
echo " <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";
|
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";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2,63 +2,63 @@
|
||||||
<form name="create_mailbox" method="post">
|
<form name="create_mailbox" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Create_mailbox_username'] . ":"; ?></td>
|
<td><?php echo $LANG['Create_mailbox_username'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td>
|
<td><input class="flat" type="text" name="fUsername" value="<?php echo $tUsername; ?>" /></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="fDomain">
|
<select name="fDomain">
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $i < count($list_domains); $i++) {
|
for ($i = 0; $i < count($list_domains); $i++) {
|
||||||
if ($tDomain == $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 {
|
} else {
|
||||||
print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
|
echo "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<?php print $pCreate_mailbox_username_text; ?>
|
<?php echo $pCreate_mailbox_username_text; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><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>
|
||||||
<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><input class="flat" type="password" name="fPassword2" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Create_mailbox_name'] . ":"; ?></td>
|
<td><?php echo $LANG['Create_mailbox_name'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="fName" value="<?php print $tName; ?>" /></td>
|
<td><input class="flat" type="text" name="fName" value="<?php echo $tName; ?>" /></td>
|
||||||
<td><?php print $pCreate_mailbox_name_text; ?></td>
|
<td><?php echo $pCreate_mailbox_name_text; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($CONF['quota'] == 'YES') { ?>
|
<?php if ($CONF['quota'] == 'YES') { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Create_mailbox_quota'] . ":"; ?></td>
|
<td><?php echo $LANG['Create_mailbox_quota'] . ":"; ?></td>
|
||||||
<td><input type="text" name="fQuota" value="<?php print $tQuota; ?>" /></td>
|
<td><input type="text" name="fQuota" value="<?php echo $tQuota; ?>" /></td>
|
||||||
<td><?php print $pCreate_mailbox_quota_text; ?></td>
|
<td><?php echo $pCreate_mailbox_quota_text; ?></td>
|
||||||
<tr>
|
<tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr>
|
<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><input class="flat" type="checkbox" name="fActive" checked /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><input class="flat" type="checkbox" name="fMail" checked /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="3" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,22 +2,20 @@
|
||||||
<form name="edit_alias" method="post">
|
<form name="edit_alias" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Edit_alias_address'] . ":"; ?></td>
|
<td><?php echo $LANG['Edit_alias_address'] . ":"; ?></td>
|
||||||
<td><?php print $fAddress; ?></td>
|
<td><?php echo $address; ?></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Edit_alias_goto'] . ":"; ?></td>
|
<td><?php echo $LANG['Edit_alias_goto'] . ":"; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<textarea class="flat" rows="10" cols="60" name="fGoto">
|
<textarea class="flat" rows="10" cols="60" name="goto">
|
||||||
<?php
|
<?php
|
||||||
$array = preg_split('/,/', $tGoto);
|
foreach ($goto as $row) {
|
||||||
for ($i = 0 ; $i < count($array) ; $i++) {
|
echo "$row\n";
|
||||||
if (empty($array[$i])) continue;
|
|
||||||
print "$array[$i]\n";
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</textarea>
|
</textarea>
|
||||||
|
@ -25,10 +23,10 @@ for ($i = 0 ; $i < count($array) ; $i++) {
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="3" class="standout"><?php echo $message ?? ' '; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,45 +2,33 @@
|
||||||
<form name="edit_mailbox" method="post">
|
<form name="edit_mailbox" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Edit_mailbox_username']; ?></td>
|
<td><?php echo $LANG['Edit_mailbox_username']; ?></td>
|
||||||
<td><?php print $fUsername; ?></td>
|
<td><?php echo $username; ?></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> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Edit_mailbox_name'] . ":"; ?></td>
|
<td><?php echo $LANG['Edit_mailbox_password'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="fName" value="<?php print htmlspecialchars($tName,ENT_QUOTES); ?>" /></td>
|
<td><input class="flat" type="password" name="password1" /></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> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<a href="https://git.high5.nl/opensmtpdadmin/">OpenSMTPD Admin <?php echo VERSION ?></a>
|
<a href="https://git.high5.nl/opensmtpdadmin/">OpenSMTPD Admin <?php echo VERSION ?></a>
|
||||||
<?php
|
<?php
|
||||||
if (($CONF['show_footer_text'] == "YES") and ($CONF['footer_link'])) {
|
if (($CONF['show_footer_text'] == "YES") and ($CONF['footer_link'])) {
|
||||||
print " | ";
|
echo " | ";
|
||||||
print "<a href=\"" . $CONF['footer_link'] . "\">" . $CONF['footer_text'] . "</a>\n";
|
echo "<a href=\"" . $CONF['footer_link'] . "\">" . $CONF['footer_text'] . "</a>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</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">
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<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">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<?php
|
<?php
|
||||||
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"))) print "<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="login_header">
|
<div id="login_header">
|
||||||
<?php
|
<?php
|
||||||
if (file_exists(realpath("./stylesheet.css"))) {
|
if (file_exists(realpath("./stylesheet.css"))) {
|
||||||
print "<img id=\"login_header_logo\" src=\"images/postbox.png\" />\n";
|
echo "<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\" height=\"30px\" src=\"images/opensmtpdadmin.png\" />\n";
|
||||||
}
|
}
|
||||||
if (file_exists(realpath("../stylesheet.css"))) {
|
if (file_exists(realpath("../stylesheet.css"))) {
|
||||||
print "<img id=\"login_header_logo\" src=\"../images/postbox.png\" />\n";
|
echo "<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\" height=\"30px\"% src=\"../images/opensmtpdadmin.png\" />\n";
|
||||||
}
|
}
|
||||||
if (($CONF['show_header_text'] == "YES") and ($CONF['header_text'])) {
|
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>
|
</div>
|
||||||
|
|
|
@ -2,24 +2,24 @@
|
||||||
<form name="login" method="post">
|
<form name="login" method="post">
|
||||||
<table id="login_table" cellspacing="10">
|
<table id="login_table" cellspacing="10">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Login_username'] . ":"; ?></td>
|
<td><?php echo $LANG['Login_username'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td>
|
<td><input class="flat" type="text" name="fUsername" value="<?php echo $tUsername; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td><input class="flat" type="password" name="fPassword" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="2" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
<div id="main_menu">
|
<div id="main_menu">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="list-domains.php"><?php print $LANG['Menu_overview']; ?></a></td>
|
<td nowrap><a target="_top" href="list-domains.php"><?php echo $LANG['Menu_overview']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_overview']; ?></td>
|
<td><?php echo $LANG['Main_overview']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="create-alias.php"><?php print $LANG['Menu_create_alias']; ?></a></td>
|
<td nowrap><a target="_top" href="create-alias.php"><?php echo $LANG['Menu_create_alias']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_create_alias']; ?></td>
|
<td><?php echo $LANG['Main_create_alias']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="create-mailbox.php"><?php print $LANG['Menu_create_mailbox']; ?></a></td>
|
<td nowrap><a target="_top" href="create-mailbox.php"><?php echo $LANG['Menu_create_mailbox']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_create_mailbox']; ?></td>
|
<td><?php echo $LANG['Main_create_mailbox']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="sendmail.php"><?php print $LANG['Menu_sendmail']; ?></a></td>
|
<td nowrap><a target="_top" href="sendmail.php"><?php echo $LANG['Menu_sendmail']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_sendmail']; ?></td>
|
<td><?php echo $LANG['Main_sendmail']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="password.php"><?php print $LANG['Menu_password']; ?></a></td>
|
<td nowrap><a target="_top" href="password.php"><?php echo $LANG['Menu_password']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_password']; ?></td>
|
<td><?php echo $LANG['Main_password']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="viewlog.php"><?php print $LANG['Menu_viewlog']; ?></a></td>
|
<td nowrap><a target="_top" href="viewlog.php"><?php echo $LANG['Menu_viewlog']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_viewlog']; ?></td>
|
<td><?php echo $LANG['Main_viewlog']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></td>
|
<td nowrap><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_logout']; ?></td>
|
<td><?php echo $LANG['Main_logout']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
/div>
|
/div>
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
<ul>
|
<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-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="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="sendmail.php"><?php echo $LANG['Menu_sendmail']; ?></a></li>
|
||||||
<li><a target="_top" href="password.php"><?php print $LANG['Menu_password']; ?></a></li>
|
<li><a target="_top" href="password.php"><?php echo $LANG['Menu_password']; ?></a></li>
|
||||||
<li><a target="_top" href="viewlog.php"><?php print $LANG['Menu_viewlog']; ?></a></li>
|
<li><a target="_top" href="viewlog.php"><?php echo $LANG['Menu_viewlog']; ?></a></li>
|
||||||
<li><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></li>
|
<li><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (file_exists(realpath("motd.txt"))) {
|
if (file_exists(realpath("motd.txt"))) {
|
||||||
print "<div id=\"motd\">\n";
|
echo "<div id=\"motd\">\n";
|
||||||
include("motd.txt");
|
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
|
<?php
|
||||||
for ($i = 0; $i < count($list_domains); $i++) {
|
for ($i = 0; $i < count($list_domains); $i++) {
|
||||||
if ($fDomain == $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 {
|
} else {
|
||||||
print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
|
echo "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</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>
|
||||||
<form name="search" method="post" action="search.php">
|
<form name="search" method="post" action="search.php">
|
||||||
<input type="textbox" name="search" size="10">
|
<input type="textbox" name="search" size="10">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
print "<table id=\"overview_table\">\n";
|
echo "<table id=\"overview_table\">\n";
|
||||||
print " <tr>\n";
|
echo " <tr>\n";
|
||||||
print " <td colspan=\"5\"><h3>".$LANG['Overview_title']."</h3></td>";
|
echo " <td colspan=\"5\"><h3>".$LANG['Overview_title']."</h3></td>";
|
||||||
print " </tr>";
|
echo " </tr>";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " <td>" . $LANG['Overview_get_domain'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_get_domain'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_get_aliases'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_get_aliases'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_get_mailboxes'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_get_mailboxes'] . "</td>\n";
|
||||||
if ($CONF['quota'] == 'YES') print " <td>" . $LANG['Overview_get_quota'] . "</td>\n";
|
if ($CONF['quota'] == 'YES') echo " <td>" . $LANG['Overview_get_quota'] . "</td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
for ($i = 0; $i < count($list_domains); $i++) {
|
for ($i = 0; $i < count($list_domains); $i++) {
|
||||||
if ((is_array($list_domains) and count($list_domains) > 0)) {
|
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['mailboxes'] < 0) $limit['mailboxes'] = $LANG['Overview_disabled'];
|
||||||
if ($limit['maxquota'] < 0) $limit['maxquota'] = $LANG['Overview_disabled'];
|
if ($limit['maxquota'] < 0) $limit['maxquota'] = $LANG['Overview_disabled'];
|
||||||
|
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <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";
|
echo " <td><a href=\"overview.php?domain=" . $list_domains[$i] . "\">" . $list_domains[$i] . "</a></td>\n";
|
||||||
print " <td>" . $limit['alias_count'] . " / " . $limit['aliases'] . "</td>\n";
|
echo " <td>" . $limit['alias_count'] . " / " . $limit['aliases'] . "</td>\n";
|
||||||
print " <td>" . $limit['mailbox_count'] . " / " . $limit['mailboxes'] . "</td>\n";
|
echo " <td>" . $limit['mailbox_count'] . " / " . $limit['mailboxes'] . "</td>\n";
|
||||||
if ($CONF['quota'] == 'YES') print " <td>" . $limit['maxquota'] . "</td>\n";
|
if ($CONF['quota'] == 'YES') echo " <td>" . $limit['maxquota'] . "</td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
echo "</table>\n";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2,33 +2,33 @@
|
||||||
<form name="password" method="post">
|
<form name="password" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Password_admin'] . ":"; ?></td>
|
<td><?php echo $LANG['Password_admin'] . ":"; ?></td>
|
||||||
<td><?php print $SESSID_USERNAME; ?></td>
|
<td><?php echo $SESSID_USERNAME; ?></td>
|
||||||
<td><?php print $pPassword_admin_text; ?></td>
|
<td><?php echo $pPassword_admin_text; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><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>
|
||||||
<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><input class="flat" type="password" name="fPassword" /></td>
|
||||||
<td><?php print $pPassword_password_text; ?></td>
|
<td><?php echo $pPassword_password_text; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><input class="flat" type="password" name="fPassword2" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="3" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,61 +1,61 @@
|
||||||
<div id="overview">
|
<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">
|
<form name="search" method="post" action="search.php">
|
||||||
<input type="textbox" name="search">
|
<input type="textbox" name="search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (count($tAlias) > 0) {
|
if (count($tAlias) > 0) {
|
||||||
print "<table id=\"alias_table\">\n";
|
echo "<table id=\"alias_table\">\n";
|
||||||
print " <tr>\n";
|
echo " <tr>\n";
|
||||||
print " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
|
echo " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
|
||||||
print " </tr>";
|
echo " </tr>";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
|
||||||
print " <td colspan=\"2\"> </td>\n";
|
echo " <td colspan=\"2\"> </td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
for ($i = 0; $i < count($tAlias); $i++) {
|
for ($i = 0; $i < count($tAlias); $i++) {
|
||||||
if ((is_array($tAlias) and count($tAlias) > 0)) {
|
if ((is_array($tAlias) and count($tAlias) > 0)) {
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
||||||
print " <td>" . $tAlias[$i]['address'] . "</td>\n";
|
echo " <td>" . $tAlias[$i]['address'] . "</td>\n";
|
||||||
print " <td>" . preg_replace("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
|
echo " <td>" . preg_replace("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
|
||||||
print " <td>" . $tAlias[$i]['modified'] . "</td>\n";
|
echo " <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";
|
echo " <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";
|
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";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($tMailbox) > 0) {
|
if (count($tMailbox) > 0) {
|
||||||
print "<table id=\"mailbox_table\">\n";
|
echo "<table id=\"mailbox_table\">\n";
|
||||||
print " <tr>\n";
|
echo " <tr>\n";
|
||||||
print " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
|
echo " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
|
||||||
print " </tr>";
|
echo " </tr>";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
|
||||||
if ($CONF['quota'] == 'YES') print " <td>" . $LANG['Overview_mailbox_quota'] . "</td>\n";
|
if ($CONF['quota'] == 'YES') echo " <td>" . $LANG['Overview_mailbox_quota'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Overview_mailbox_active'] . "</td>\n";
|
echo " <td>" . $LANG['Overview_mailbox_active'] . "</td>\n";
|
||||||
print " <td colspan=\"2\"> </td>\n";
|
echo " <td colspan=\"2\"> </td>\n";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
for ($i = 0; $i < count($tMailbox); $i++) {
|
for ($i = 0; $i < count($tMailbox); $i++) {
|
||||||
if ((is_array($tMailbox) and count($tMailbox) > 0)) {
|
if ((is_array($tMailbox) and count($tMailbox) > 0)) {
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
||||||
print " <td>" . $tMailbox[$i]['username'] . "</td>\n";
|
echo " <td>" . $tMailbox[$i]['username'] . "</td>\n";
|
||||||
print " <td>" . $tMailbox[$i]['name'] . "</td>\n";
|
echo " <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";
|
echo " <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";
|
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";
|
||||||
print " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2,35 +2,35 @@
|
||||||
<form name="sendmail" method="post">
|
<form name="sendmail" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Sendmail_admin'] . ":"; ?></td>
|
<td><?php echo $LANG['Sendmail_admin'] . ":"; ?></td>
|
||||||
<td><?php print $SESSID_USERNAME; ?></td>
|
<td><?php echo $SESSID_USERNAME; ?></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><input class="flat" type="text" name="fTo" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Sendmail_subject'] . ":"; ?></td>
|
<td><?php echo $LANG['Sendmail_subject'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="fSubject" value="<?php print $LANG['Sendmail_subject_text']; ?>" /></td>
|
<td><input class="flat" type="text" name="fSubject" value="<?php echo $LANG['Sendmail_subject_text']; ?>" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Sendmail_body'] . ":" ?></td>
|
<td><?php echo $LANG['Sendmail_body'] . ":" ?></td>
|
||||||
<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> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="3" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
<form name="edit_alias" method="post">
|
<form name="edit_alias" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Edit_alias_address'] . ":"; ?></td>
|
<td><?php echo $LANG['Edit_alias_address'] . ":"; ?></td>
|
||||||
<td><?php print $USERID_USERNAME; ?></td>
|
<td><?php echo $USERID_USERNAME; ?></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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">
|
<td><textarea class="flat" rows="4" cols="30" name="fGoto">
|
||||||
<?php
|
<?php
|
||||||
$array = preg_split('/,/', $tGoto);
|
$array = preg_split('/,/', $tGoto);
|
||||||
|
@ -18,7 +18,7 @@ $array = preg_split('/,/', $tGoto);
|
||||||
for ($i = 0 ; $i < count($array) ; $i++) {
|
for ($i = 0 ; $i < count($array) ; $i++) {
|
||||||
if (empty($array[$i])) continue;
|
if (empty($array[$i])) continue;
|
||||||
if ($array[$i] == $USERID_USERNAME) continue;
|
if ($array[$i] == $USERID_USERNAME) continue;
|
||||||
print "$array[$i]\n";
|
echo "$array[$i]\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</textarea>
|
</textarea>
|
||||||
|
@ -26,10 +26,10 @@ for ($i = 0 ; $i < count($array) ; $i++) {
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="3" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,21 +2,21 @@
|
||||||
<form name="login" method="post">
|
<form name="login" method="post">
|
||||||
<table id="login_table" cellspacing="10">
|
<table id="login_table" cellspacing="10">
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['UsersLogin_username'] . ":"; ?></td>
|
<td><?php echo $LANG['UsersLogin_username'] . ":"; ?></td>
|
||||||
<td><input class="flat" type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td>
|
<td><input class="flat" type="text" name="fUsername" value="<?php echo $tUsername; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td><input class="flat" type="password" name="fPassword" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="2" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,25 +2,25 @@
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td><?php print $_SESSION['userid']['username']; ?></td>
|
<td><?php echo $_SESSION['userid']['username']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($CONF['vacation'] == 'YES') { ?>
|
<?php if ($CONF['vacation'] == 'YES') { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="vacation.php"><?php print $LANG['UsersMenu_vacation']; ?></a></td>
|
<td nowrap><a target="_top" href="vacation.php"><?php echo $LANG['UsersMenu_vacation']; ?></a></td>
|
||||||
<td><?php print $LANG['UsersMain_vacation']; ?></td>
|
<td><?php echo $LANG['UsersMain_vacation']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="edit-alias.php"><?php print $LANG['UsersMenu_edit_alias']; ?></a></td>
|
<td nowrap><a target="_top" href="edit-alias.php"><?php echo $LANG['UsersMenu_edit_alias']; ?></a></td>
|
||||||
<td><?php print $LANG['UsersMain_edit_alias']; ?></td>
|
<td><?php echo $LANG['UsersMain_edit_alias']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="password.php"><?php print $LANG['UsersMenu_password']; ?></a></td>
|
<td nowrap><a target="_top" href="password.php"><?php echo $LANG['UsersMenu_password']; ?></a></td>
|
||||||
<td><?php print $LANG['UsersMain_password']; ?></td>
|
<td><?php echo $LANG['UsersMain_password']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></td>
|
<td nowrap><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></td>
|
||||||
<td><?php print $LANG['Main_logout']; ?></td>
|
<td><?php echo $LANG['Main_logout']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
<ul>
|
<ul>
|
||||||
<?php if ($CONF['vacation'] == "YES") { ?>
|
<?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 } ?>
|
<?php } ?>
|
||||||
<li><a target="_top" href="edit-alias.php"><?php print $LANG['UsersMenu_edit_alias']; ?></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 print $LANG['UsersMenu_password']; ?></a></li>
|
<li><a target="_top" href="password.php"><?php echo $LANG['UsersMenu_password']; ?></a></li>
|
||||||
<li><a target="_top" href="logout.php"><?php print $LANG['Menu_logout']; ?></a></li>
|
<li><a target="_top" href="logout.php"><?php echo $LANG['Menu_logout']; ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (file_exists(realpath("../motd-users.txt"))) {
|
if (file_exists(realpath("../motd-users.txt"))) {
|
||||||
print "<div id=\"motd\">\n";
|
echo "<div id=\"motd\">\n";
|
||||||
include("../motd-users.txt");
|
include("../motd-users.txt");
|
||||||
print "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2,33 +2,33 @@
|
||||||
<form name="password" method="post">
|
<form name="password" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3"><h3><?php print $LANG['Password_welcome']; ?></td>
|
<td colspan="3"><h3><?php echo $LANG['Password_welcome']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['Password_admin'] . ":"; ?></td>
|
<td><?php echo $LANG['Password_admin'] . ":"; ?></td>
|
||||||
<td><?php print $USERID_USERNAME; ?></td>
|
<td><?php echo $USERID_USERNAME; ?></td>
|
||||||
<td><?php print $pPassword_admin_text; ?></td>
|
<td><?php echo $pPassword_admin_text; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><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>
|
||||||
<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><input class="flat" type="password" name="fPassword" ></td>
|
||||||
<td><?php print $pPassword_password_text; ?></td>
|
<td><?php echo $pPassword_password_text; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<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><input class="flat" type="password" name="fPassword2" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="3" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<form name="vacation" method="post">
|
<form name="vacation" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,27 +2,27 @@
|
||||||
<form name="vacation" method="post">
|
<form name="vacation" method="post">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['UsersVacation_subject'] . ":"; ?></td>
|
<td><?php echo $LANG['UsersVacation_subject'] . ":"; ?></td>
|
||||||
<td><input type="text" name="fSubject" value="<?php print $LANG['UsersVacation_subject_text']; ?>" /></td>
|
<td><input type="text" name="fSubject" value="<?php echo $LANG['UsersVacation_subject_text']; ?>" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $LANG['UsersVacation_body'] . ":"; ?></td>
|
<td><?php echo $LANG['UsersVacation_body'] . ":"; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<textarea rows="10" cols="80" name="fBody">
|
<textarea rows="10" cols="80" name="fBody">
|
||||||
<?php print $LANG['UsersVacation_body_text']; ?>
|
<?php echo $LANG['UsersVacation_body_text']; ?>
|
||||||
</textarea>
|
</textarea>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="standout"><?php print $tMessage; ?></td>
|
<td colspan="3" class="standout"><?php echo $tMessage; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,53 +1,44 @@
|
||||||
<div id="overview">
|
<div id="overview">
|
||||||
<form name="viewlog" method="post">
|
<form name="viewlog" method="get">
|
||||||
<select name="fDomain" onChange="this.form.submit()";>
|
<select name="domain" onChange="this.form.submit()";>
|
||||||
<?php
|
<?php
|
||||||
$count = count($list_domains);
|
if (count($list_domains) > 0) {
|
||||||
for ($i = 0; $i < $count; $i++) {
|
foreach ($list_domains as $row) {
|
||||||
if ($fDomain == $list_domains[$i]) {
|
echo '<option value="' . $row['domain'] . '"';
|
||||||
print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
|
if (isset($domain) && $domain == $row['domain']) echo ' selected';
|
||||||
} else {
|
echo ">" . $row['domain'] . "</option>\n";
|
||||||
print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($tLog)) {
|
if (count($log) > 0) {
|
||||||
$tLog_count = count($tLog);
|
echo "<table id=\"log_table\">\n";
|
||||||
if ($tLog_count > 0) {
|
echo " <tr>\n";
|
||||||
print "<table id=\"log_table\">\n";
|
echo " <td colspan=\"5\"><h3>".$LANG['Viewlog_welcome']." ".$domain."</h3></td>\n";
|
||||||
print " <tr>\n";
|
echo " </tr>\n";
|
||||||
print " <td colspan=\"5\"><h3>".$LANG['Viewlog_welcome']." ".$fDomain."</h3></td>\n";
|
echo " <tr class=\"header\">\n";
|
||||||
print " </tr>\n";
|
echo " <td>" . $LANG['Viewlog_timestamp'] . "</td>\n";
|
||||||
print " <tr class=\"header\">\n";
|
echo " <td>" . $LANG['Viewlog_username'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Viewlog_timestamp'] . "</td>\n";
|
echo " <td>" . $LANG['Viewlog_domain'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Viewlog_username'] . "</td>\n";
|
echo " <td>" . $LANG['Viewlog_action'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Viewlog_domain'] . "</td>\n";
|
echo " <td>" . $LANG['Viewlog_data'] . "</td>\n";
|
||||||
print " <td>" . $LANG['Viewlog_action'] . "</td>\n";
|
echo " </tr>\n";
|
||||||
print " <td>" . $LANG['Viewlog_data'] . "</td>\n";
|
|
||||||
print " </tr>\n";
|
|
||||||
|
|
||||||
for ($i = 0; $i < $tLog_count; $i++) {
|
foreach ($log as $row) {
|
||||||
if ((is_array($tLog) and $tLog_count > 0)) {
|
if (strlen($row['data']) > 35) $row['data'] = substr($row['data'], 0, 35) . " ...";
|
||||||
$log_data = $tLog[$i]['data'];
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
||||||
$data_length = strlen($log_data);
|
echo " <td nowrap>" . $row['timestamp'] . "</td>\n";
|
||||||
if ($data_length > 35) $log_data = substr($log_data, 0, 35) . " ...";
|
echo " <td nowrap>" . $row['username'] . "</td>\n";
|
||||||
|
echo " <td nowrap>" . $row['domain'] . "</td>\n";
|
||||||
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
echo " <td nowrap>" . $row['action'] . "</td>\n";
|
||||||
print " <td nowrap>" . $tLog[$i]['timestamp'] . "</td>\n";
|
echo " <td nowrap>" . $row['data'] . "</td>\n";
|
||||||
print " <td nowrap>" . $tLog[$i]['username'] . "</td>\n";
|
echo " </tr>\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";
|
|
||||||
}
|
}
|
||||||
|
echo "</table>\n";
|
||||||
|
echo "<p />\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue