refactoring mail section: new html formating

This commit is contained in:
Serghey Rodin 2012-09-13 12:05:30 +03:00
commit 0f1c6a8151
31 changed files with 1266 additions and 961 deletions

View file

@ -1 +0,0 @@
# Default template with common records such as www, mail, ftp, etc..

View file

@ -1 +0,0 @@
# Template with MX redirected to google gmail

View file

@ -1,3 +0,0 @@
# Default template with basic php module restrictions.
# Best performance. Not recomended for shared hosting.
PHP='module' CGI='yes' ELOG='no'

View file

@ -1,3 +0,0 @@
# Template with php as cgi for better security.
# (it use post instal script)
PHP='cgi' CGI='yes' ELOG='no'

View file

@ -1,3 +0,0 @@
# Template with php as FastCGI for best performance and security.
# (it use post instal script)
PHP='fcgid' CGI='yes' ELOG='no'

View file

@ -1,2 +0,0 @@
# Almost unlimited php options and vhost configuration.
PHP='module' CGI='yes' ELOG='yes'

View file

@ -1,2 +0,0 @@
# Default template for static content speed optimization.
# Best in most cases.

View file

@ -1,36 +0,0 @@
server {
listen %ip%:%proxy_ssl_port%;
server_name %domain_idn% %alias_idn%;
ssl on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
%elog%error_log /var/log/httpd/domains/%domain%.error.log error;
location / {
proxy_pass https://%ip%:%web_ssl_port%;
location ~* ^.+\.(%nginx_extentions%)$ {
root %sdocroot%;
access_log /var/log/httpd/domains/%domain%.log combined;
access_log /var/log/httpd/domains/%domain%.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location @fallback {
proxy_pass https://%ip%:%web_ssl_port%;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include %home%/%user%/conf/snginx.%domain%.conf*;
}

View file

@ -1,33 +0,0 @@
server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
%elog%error_log /var/log/httpd/domains/%domain%.error.log error;
location / {
proxy_pass http://%ip%:%web_port%;
location ~* ^.+\.(%nginx_extentions%)$ {
root %docroot%;
access_log /var/log/httpd/domains/%domain%.log combined;
access_log /var/log/httpd/domains/%domain%.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location @fallback {
proxy_pass http://%ip%:%web_port%;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include %home%/%user%/conf/nginx.%domain%.conf*;
}

View file

@ -163,13 +163,11 @@ top_panel($user,$TAB);
if ((empty($_GET['domain'])) && (empty($_POST['domain']))) {
$v_domain = $_GET['domain'];
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_add_mail.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_mail.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
} else {
$v_domain = $_GET['domain'];
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_add_mail_acc.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_mail_acc.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -163,7 +163,6 @@ top_panel($user,$TAB);
$_SESSION['ok_msg'] = "OK: changes has been saved.";
}
}
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_edit_mail.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
@ -359,7 +358,6 @@ top_panel($user,$TAB);
}
}
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_edit_mail_acc.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail_acc.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -20,8 +20,6 @@ if ($_SESSION['user'] == 'admin') {
$data = json_decode(implode('', $output), true);
$data = array_reverse($data);
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_mail.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail.html');
} else {
exec (VESTA_CMD."v_list_mail_accounts '".$user."' '".$_GET['domain']."' 'json'", $output, $return_var);
@ -29,7 +27,6 @@ if ($_SESSION['user'] == 'admin') {
$data = json_decode(implode('', $output), true);
$data = array_reverse($data);
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_mail_acc.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail_acc.html');
}
} else {
@ -41,7 +38,6 @@ if ($_SESSION['user'] == 'admin') {
$data = array_reverse($data);
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/menu_mail.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_mail.html');
} else {
exec (VESTA_CMD."v_list_mail_accounts '".$user."' '".$_GET['domain']."' 'json'", $output, $return_var);
@ -49,10 +45,8 @@ if ($_SESSION['user'] == 'admin') {
$data = json_decode(implode('', $output), true);
$data = array_reverse($data);
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/menu_mail_acc.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_mail_acc.html');
}
}
// Footer

View file

@ -1,28 +0,0 @@
<?php
// Init
error_reporting(NULL);
session_start();
$TAB = 'PACKAGES';
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Header
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
// Panel
top_panel($user,$TAB);
// Data
if ($_SESSION['user'] == 'admin') {
exec (VESTA_CMD."v_list_user_packages json", $output, $return_var);
check_error($return_var);
$data = json_decode(implode('', $output), true);
$data = array_reverse($data);
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_packages.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_packages.html');
}
// Footer
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

View file

@ -1,30 +1,88 @@
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
</tr></table>
<table class="data-col2" width="600px">
<form method="post" name="v_add_user">
<tr><td class="add-text" style="padding: 10 0 0 2px;">Domain</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?> ></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">AntiSpam Support</td></tr>
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo "checked=yes"; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">AntiVirus Support</td></tr>
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo "checked=yes"; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">DKIM Support</td></tr>
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_dkim" <?php if ($v_dkim == 'yes') echo "checked=yes"; ?>></tr>
<tr><td style="padding: 24px 0 0 0;">
<input type="submit" name="ok" value="OK" class="add-button"></form>
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/mail/'">
</td></tr>
</table>
</td>
</tr>
</table>
<table class="data-spacer" style="height:18px"><tr><td></td></tr></table>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Adding Mail Domain</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects" name="v_add_mail" method="post">
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
</tr>
</table>
<table class="data-col2" width="600px">
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Domain
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?> >
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
AntiSpam Support
</td>
</tr>
<tr>
<td>
<input type="checkbox" size="20" class="add-checkbox" name="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo "checked=yes"; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
AntiVirus Support
</td>
</tr>
<tr>
<td>
<input type="checkbox" size="20" class="add-checkbox" name="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo "checked=yes"; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
DKIM Support
</td>
</tr>
<tr>
<td>
<input type="checkbox" size="20" class="add-checkbox" name="v_dkim" <?php if ($v_dkim == 'yes') echo "checked=yes"; ?>>
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" name="ok" value="OK" class="button">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/mail/'">
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="data-spacer" style="height:18px"><tr><td></td></tr></table>
</form>

View file

@ -1,62 +1,141 @@
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_add_user.v_password.value = randomstring;
}
</script>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Adding Mail Domain</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects" name="v_add_mail_acc" method="post">
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_add_user.v_password.value = randomstring;
}
</script>
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
</tr></table>
<table class="data-col2" width="600px">
<form method="post" name="v_add_user">
<tr><td class="add-text" style="padding: 10 0 0 2px;">Domain</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_domain" <?php echo "value=".$v_domain; ?> disabled ><input type="hidden" name="v_domain" <?php echo "value=".$v_domain; ?>></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Account</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_account" <?php if (!empty($v_account)) echo "value=".$v_account; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_password"></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;"><a href="javascript:elementHideShow('advtable');" class="add-advanced">Advanced Options ⇢</a></td></tr>
<tr><td class="add-text" style="padding: 9px 0 0 0px;">
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
<tr><td class="add-text" style="padding: 0 0 0 2px;">Quota <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(in megabytes)</span></td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_quota" <?php if (!empty($v_quota)) echo "value=".$v_quota; ?>></tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Aliases <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(use local-part)</span></td></tr>
<tr><td><textarea size="20" class="add-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea></td></tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Forward to <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(email address or addresses)</span></td></tr>
<tr><td><textarea size="20" class="add-textinput" name="v_fwd"><?php if (!empty($v_fwd)) echo $v_fwd; ?></textarea></td></tr>
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
</tr>
</table>
<table class="data-col2" width="600px">
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Domain
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_domain" <?php echo "value=".$v_domain; ?> disabled ><input type="hidden" name="v_domain" <?php echo "value=".$v_domain; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Account
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_account" <?php if (!empty($v_account)) echo "value=".$v_account; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Password <a href="javascript:randomString();" class="genpass">generate</a>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_password">
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
<a href="javascript:elementHideShow('advtable');" class="add-advanced"> Advanced Options</a>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 9px 0 0 0px;">
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
<tr>
<td class="add-text" style="padding: 0 0 0 2px;">
Quota <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(in megabytes)</span>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_quota" <?php if (!empty($v_quota)) echo "value=".$v_quota; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Aliases <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(use local-part)</span>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="add-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Forward to <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(email address or addresses)</span>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="add-textinput" name="v_fwd"><?php if (!empty($v_fwd)) echo $v_fwd; ?></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" name="ok_acc" value="OK" class="button">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/mail/<?php echo "?domain=".$v_domain; ?>'">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
<tr><td style="padding: 24px 0 0 0;">
<input type="submit" name="ok_acc" value="OK" class="add-button"></form>
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/mail/<?php echo "?domain=".$v_domain; ?>'">
</td></tr>
</table>
</td>
</tr>
</table>
<table class="data-spacer" style="height:5px"><tr><td></td></tr></table>
<table class="data-spacer" style="height:5px"><tr><td></td></tr></table>
</form>

View file

@ -1,35 +1,98 @@
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr>
<tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr>
<tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
</tr></table>
<form method="post" name="v_edit_user">
<table class="data-col2" width="830px">
<tr><td class="add-text" style="padding: 10 0 0 2px;">Domain</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?> disabled> <input type="hidden" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?>></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">AntiSpam Support</td></tr>
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_antispam" <?php if ($v_antispam == 'yes') echo "checked=yes"; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">AntiVirus Support</td></tr>
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_antivirus" <?php if ($v_antivirus == 'yes') echo "checked=yes"; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">DKIM Support</td></tr>
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_dkim" <?php if ($v_dkim == 'yes') echo "checked=yes"; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Catchall Email</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_catchall" <?php if (!empty($v_catchall)) echo "value=".$v_catchall; ?> ></td></tr>
<tr><td style="padding: 24px 0 0 0;">
<input type="submit" class="add-button" name="save" value="Save"></form>
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/mail/'">
</td></tr>
</form>
</table>
</td>
</tr>
</table>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Editing Mail Domain</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects" name="v_edit_mail" method="post">
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr>
<tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr>
<tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Domain
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?> disabled> <input type="hidden" name="v_domain" <?php if (!empty($v_domain)) echo "value=".$v_domain; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
AntiSpam Support
</td>
</tr>
<tr>
<td>
<input type="checkbox" size="20" class="add-checkbox" name="v_antispam" <?php if ($v_antispam == 'yes') echo "checked=yes"; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
AntiVirus Support
</td>
</tr>
<tr>
<td>
<input type="checkbox" size="20" class="add-checkbox" name="v_antivirus" <?php if ($v_antivirus == 'yes') echo "checked=yes"; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
DKIM Support
</td>
</tr>
<tr>
<td>
<input type="checkbox" size="20" class="add-checkbox" name="v_dkim" <?php if ($v_dkim == 'yes') echo "checked=yes"; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Catchall Email
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_catchall" <?php if (!empty($v_catchall)) echo "value=".$v_catchall; ?> >
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" class="button" name="save" value="Save">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/mail/'">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View file

@ -1,65 +1,155 @@
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_add_user.v_password.value = randomstring;
}
</script>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Adding Mail Domain</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects" name="v_edit_mail_acc" method="post">
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) {
var el = document.getElementById(elementToHideOrShow);
if (el.style.display == "block") {
el.style.display = "none";
} else {
el.style.display = "block";
}
}
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_add_user.v_password.value = randomstring;
}
</script>
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr>
<tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr>
<tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
</tr></table>
<table class="data-col2" width="600px">
<form method="post" name="v_add_user">
<tr><td class="add-text" style="padding: 10 0 0 2px;">Domain</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_domain" <?php echo "value=".$v_domain; ?> disabled ><input type="hidden" name="v_domain" <?php echo "value=".$v_domain; ?>></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Account</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_account" <?php if (!empty($v_account)) echo "value=".$v_account; ?> disabled > <input type="hidden" name="v_account" <?php if (!empty($v_account)) echo "value=".$v_account; ?> ></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Password <a href="javascript:randomString();" class="genpass">generate</a></td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_password" <?php if (!empty($v_password)) echo "value=".$v_password; ?> </tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Quota <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(in megabytes)</span></td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_quota" <?php if (!empty($v_quota)) {echo "value=".$v_quota;} else { echo "value=0";}; ?>></tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Aliases <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(use local-part)</span></td></tr>
<tr><td><textarea size="20" class="add-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea></td></tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Forward to <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(email address or addresses)</span></td></tr>
<tr><td><textarea size="20" class="add-textinput" name="v_fwd"><?php if (!empty($v_fwd)) echo $v_fwd; ?></textarea></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Autoreply</td></tr>
<tr><td><input type="checkbox" size="20" class="add-checkbox" name="v_autoreply" <?php if ($v_autoreply == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('autoreplytable');"></tr>
<tr><td><table style="display:<?php if ($v_autoreply == 'no') { echo 'none';} else {echo 'block';}?> ;" id="autoreplytable"><tr>
<tr><td class="add-text" style="padding: 9px 0 0 2px;">Autoreply Message</td></tr>
<tr><td><textarea size="20" class="add-textinput" name="v_autoreply_message"><?php if (!empty($v_autoreply_message)) echo $v_autoreply_message; ?></textarea></tr>
</td></tr></tr></table></td></tr>
<tr><td style="padding: 24px 0 0 0;">
<input type="submit" name="save" value="Save" class="add-button"></form>
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/mail/<?php echo "?domain=".$_GET['domain']; ?>'">
</td></tr>
</table>
</td>
</tr>
</table>
<table class='data'>
<tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 24px 0 2px 4px;"><a class="data-date" ?><?php echo date("d M Y", strtotime($v_date))?></a></td></tr>
<tr><td style="padding: 0 0 6px 4px;"><a class="data-date" ?><?php echo $v_time?></a></td></tr>
<tr><td style="padding: 0 0 0 21px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
</tr>
</table>
<table class="data-col2" width="600px">
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Domain
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_domain" <?php echo "value=".$v_domain; ?> disabled ><input type="hidden" name="v_domain" <?php echo "value=".$v_domain; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Account
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_account" <?php if (!empty($v_account)) echo "value=".$v_account; ?> disabled > <input type="hidden" name="v_account" <?php if (!empty($v_account)) echo "value=".$v_account; ?> >
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Password <a href="javascript:randomString();" class="genpass">generate</a>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_password" <?php if (!empty($v_password)) echo "value=".$v_password; ?>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Quota <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(in megabytes)</span>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_quota" <?php if (!empty($v_quota)) {echo "value=".$v_quota;} else { echo "value=0";}; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Aliases <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(use local-part)</span>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="add-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo $v_aliases; ?></textarea>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10 0 0 2px;">
Forward to <span style="padding: 0pt 0pt 0pt 6px; font-size: 10pt; color: rgb(85, 85, 85);">(email address or addresses)</span>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="add-textinput" name="v_fwd"><?php if (!empty($v_fwd)) echo $v_fwd; ?></textarea>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Autoreply
</td>
</tr>
<tr>
<td>
<input type="checkbox" size="20" class="add-checkbox" name="v_autoreply" <?php if ($v_autoreply == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('autoreplytable');">
</td>
</tr>
<tr>
<td>
<table style="display:<?php if ($v_autoreply == 'no') { echo 'none';} else {echo 'block';}?> ;" id="autoreplytable">
<tr>
<td class="add-text" style="padding: 9px 0 0 2px;">
Autoreply Message
</td>
</tr>
<tr>
<td>
<textarea size="20" class="add-textinput" name="v_autoreply_message"><?php if (!empty($v_autoreply_message)) echo $v_autoreply_message; ?></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" name="save" value="Save" class="button">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/mail/<?php echo "?domain=".$_GET['domain']; ?>'">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View file

@ -1,142 +1,214 @@
<table class='data'>
<?php
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
}
if (empty($data[$key]['CATCHALL'])) {
$data[$key]['CATCHALL'] = '/dev/null';
}
?>
<script type="text/javascript">
$(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/<?php echo $spnd_action ?>/mail/?domain=<?php echo "$key" ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo "$key" ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
<td class="data-controls" width="100px"><img src="/images/more.png" width="8px" height="8px"><a href="?domain=<?php echo $key ?>"> list accounts</a></td>
<td class="data-controls" width="98px"><img src="/images/add.png" width="8px" height="8px"><a href="/add/mail/?domain=<?php echo $key ?>"> add account</a></td>
<td class="data-controls" width="104px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo "http://".$http_host."/webmail/"; ?>" target="_blank"> open webmail</a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="80px">
<img src="/images/suspend.png" width="7px" height="8px">
<a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$i" ?>"> <?php echo $spnd_action ?></a>
<div id="<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to <?php echo $spnd_action ?> <b><?php echo "$key" ?></b> domain?</p>
</div>
</td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
<div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
</div>
</td>
</tr></table>
<table class="data-col2" width="830px">
<tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b></td></tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr><td class="counter-name" style="padding: 2px 0 2px 0">catchall > <?php echo $data[$key]['CATCHALL'] ?></td></tr>
<tr><td class="chart1">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div></div></td></tr>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="float:left">
<button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/mail/'"> Add Mail Domain </button>
</div>
<div style="text-align: right; float: right;">
<input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
<button> Search </button>
</div>
<div style="float:left; padding-left: 26px;">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 2px 0 0px;" >
<option>apply to selected</option>
<option>rebuild</option>
<option>update counters</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select>
<button style="width:27px;"> </button>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr><td class="counter-name">Antivirus:</td><td class="counter-value"><?php echo $data[$key]['ANTIVIRUS'] ?></td></tr>
<tr><td class="counter-name">Antispam:</td><td class="counter-value"><?php echo $data[$key]['ANTISPAM'] ?></td></tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr><td class="counter-name">DKIM:</td><td class="counter-value"><?php echo $data[$key]['DKIM'] ?></td></tr>
<tr><td class="counter-name">Accounts:</td><td class="counter-value"><?php echo $data[$key]['ACCOUNTS'] ?></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<form id="vstobjects">
<table class="data">
<?php
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
}
if (empty($data[$key]['CATCHALL'])) {
$data[$key]['CATCHALL'] = '/dev/null';
}
?>
<script type="text/javascript">
$(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/<?php echo $spnd_action ?>/mail/?domain=<?php echo "$key" ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo "$key" ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td>
<?php
if ( $i == 1) {
echo "1 mail domain ";
} else {
echo "$i mail domains ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<td class="data-controls" width="100px"><img src="/images/more.png" width="8px" height="8px"><a href="?domain=<?php echo $key ?>"> list accounts</a></td>
<td class="data-controls" width="98px"><img src="/images/add.png" width="8px" height="8px"><a href="/add/mail/?domain=<?php echo $key ?>"> add account</a></td>
<td class="data-controls" width="104px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo "http://".$http_host."/webmail/"; ?>" target="_blank"> open webmail</a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="80px">
<img src="/images/suspend.png" width="7px" height="8px">
<a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$i" ?>"> <?php echo $spnd_action ?></a>
<div id="<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to <?php echo $spnd_action ?> <b><?php echo "$key" ?></b> domain?</p>
</div>
</td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
<div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
</div>
</td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr>
<td colspan=3 class="domain" style="padding: 0 0 0 4px;">
<b><?php echo $key ?></b>
</td>
</tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr>
<td class="counter-name" style="padding: 2px 0 2px 0">
catchall > <?php echo $data[$key]['CATCHALL'] ?>
</td>
</tr>
<tr>
<td class="chart1">
Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr>
<td class="counter-name">
Antivirus:
</td>
<td class="counter-value">
<?php echo $data[$key]['ANTIVIRUS'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Antispam:
</td>
<td class="counter-value">
<?php echo $data[$key]['ANTISPAM'] ?>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr>
<td class="counter-name">
DKIM:
</td>
<td class="counter-value">
<?php echo $data[$key]['DKIM'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Accounts:
</td>
<td class="counter-value">
<?php echo $data[$key]['ACCOUNTS'] ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td width="160px"></td>
<td>
<?php
if ( $i == 1) {
echo "1 mail domain ";
} else {
echo "$i mail domains ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,131 +1,197 @@
<table class='data'>
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend';
}
?>
<script type="text/javascript">
$(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/<?php echo $spnd_action ?>/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="80px">
<img src="/images/suspend.png" width="7px" height="8px">
<a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$i" ?>"> <?php echo $spnd_action ?></a>
<div id="<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to <?php echo $spnd_action ?><b><?php echo $key ?></b> account?</p>
</div>
</td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo "$i" ?>"> delete</a>
<div id="delete_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo $key ?></b> account?</p>
</div>
</td>
</tr></table>
<table class="data-col2" width="830px">
<tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key."@".$_GET['domain'] ?></b> <a class="aliases" style="padding: 0 20px 0 4px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a></td></tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr><td class="counter-name" style="padding: 4px 0 0 0;"><?php echo $data[$key]['IP'] ?></td>
<tr><td class="chart1" style="padding: 0 0 2px 0">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div></div></td></tr>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="float:left">
<button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/mail/?domain=<?php echo $_GET['domain'] ?>'"> Add Mail Account </button>
</div>
<div style="text-align: right; float: right;">
<input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
<button> Search </button>
</div>
<div style="float:left; padding-left: 26px;">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 2px 0 0px;" >
<option>apply to selected</option>
<option>rebuild</option>
<option>update counters</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select>
<button style="width:27px;"> </button>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="200">
<table>
<tr><td class="counter-name">Quota:</td><td class="counter-value"><?php echo $data[$key]['QUOTA'] ?></td></tr>
<tr><td class="counter-name">Autoreply:</td><td class="counter-value"><?php echo $data[$key]['AUTOREPLY'] ?></td></tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="350">
<table width="350">
<tr><td class="counter-name">Forward:</td><td class="counter-value" style="padding: 0 0 0 8px;" ><?php echo str_replace(',', ', ', $data[$key]['FWD']) ?></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<form id="vstobjects">
<table class="data">
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend';
}
?>
<script type="text/javascript">
$(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/<?php echo $spnd_action ?>/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="80px">
<img src="/images/suspend.png" width="7px" height="8px">
<a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$i" ?>"> <?php echo $spnd_action ?></a>
<div id="<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to <?php echo $spnd_action ?><b><?php echo $key ?></b> account?</p>
</div>
</td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo "$i" ?>"> delete</a>
<div id="delete_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo $key ?></b> account?</p>
</div>
</td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key."@".$_GET['domain'] ?></b> <a class="aliases" style="padding: 0 20px 0 4px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a></td></tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr>
<td class="counter-name" style="padding: 4px 0 0 0;">
<?php echo $data[$key]['IP'] ?>
</td>
<tr>
<td class="chart1" style="padding: 0 0 2px 0">
Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="200">
<table>
<tr>
<td class="counter-name">
Quota:
</td>
<td class="counter-value">
<?php echo $data[$key]['QUOTA'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Autoreply:
</td>
<td class="counter-value">
<?php echo $data[$key]['AUTOREPLY'] ?>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="350">
<table width="350">
<tr>
<td class="counter-name">
Forward:
</td>
<td class="counter-value" style="padding: 0 0 0 8px;" >
<?php echo str_replace(',', ', ', $data[$key]['FWD']) ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td width="160px"></td>
<td>
<?php
if ( $i == 1) {
echo "1 mail account ";
} else {
echo "$i mail accounts ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:173px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:57px\"><tr><td></td></tr></table>"; ?>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td>
<?php
if ( $i == 1) {
echo "1 mail account ";
} else {
echo "$i mail accounts ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:173px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:57px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Adding Mail Domain</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Adding Mail Account</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Editing Mail Domain</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Editing Mail Account</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,41 +0,0 @@
<?php
if (!empty($_SESSION['error_msg'])) {
?>
<script type="text/javascript">
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
<div id="dialog-message" title="Error">
<p><?php echo $_SESSION['error_msg'] ?>.</p>
</div>
<?php
unset($_SESSION['error_msg']);
}
?>
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/mail/'">Add Domain</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>rebuild</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">

View file

@ -1,40 +0,0 @@
<?php
if (!empty($_SESSION['error_msg'])) {
?>
<script type="text/javascript">
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
<div id="dialog-message" title="Error">
<p><?php echo $_SESSION['error_msg'] ?>.</p>
</div>
<?php
unset($_SESSION['error_msg']);
}
?>
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/mail/?domain=<?php echo $_GET['domain'] ?>'">Add Account</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">

View file

@ -142,7 +142,7 @@
}
.nav-link {
letter-spacing: -1.2px;
letter-spacing: -1.0px;
font-size: 16pt;
color: #555;
font-family: Arial, sans-serif;
@ -161,7 +161,7 @@
}
.nav-slink {
letter-spacing: -1.2px;
letter-spacing: -1.0px;
font-size: 16pt;
color: #7fa1cb;
font-family: Arial, sans-serif;
@ -218,7 +218,7 @@
line-height: 1.4em;
font-size: 9pt;
font-family: Arial, sans-serif;
color: #2d2d2d;
color: #555;
padding: 8px 0 0 0;
margin: 0;
}

View file

@ -218,7 +218,7 @@
<tr><td><input type="text" size="20" class="add-input" name="v_stats_password" <?php if (!empty($v_stats_password)) echo "value=".$v_stats_password; ?> id="v_password"></tr>
</td></tr></tr></table>
<tr><td style="padding: 24px 0 0 0;">
<input type="submit" class="button" name="save" value="Save"></form>
<input type="submit" class="button" name="save" value="Save">
<input type="button" class="button" value="Cancel" onClick="location.href='/list/web/'">
</td></tr>
</form>

View file

@ -1,116 +1,205 @@
<table class='data'>
<?php
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
}
if (empty($data[$key]['CATCHALL'])) {
$data[$key]['CATCHALL'] = '/dev/null';
}
?>
<script type="text/javascript">
$(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo "$key" ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
<td class="data-controls" width="100px"><img src="/images/more.png" width="8px" height="8px"><a href="?domain=<?php echo $key ?>"> list accounts</a></td>
<td class="data-controls" width="98px"><img src="/images/add.png" width="8px" height="8px"><a href="/add/mail/?domain=<?php echo $key ?>"> add account</a></td>
<td class="data-controls" width="104px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo "http://".$http_host."/webmail/"; ?>" target="_blank"> open webmail</a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
<div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
</div>
</td>
</tr></table>
<table class="data-col2" width="830px">
<tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b></td></tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr><td class="counter-name" style="padding: 2px 0 2px 0">catchall > <?php echo $data[$key]['CATCHALL'] ?></td></tr>
<tr><td class="chart1">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div></div></td></tr>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="float:left">
<button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/mail/'"> Add Mail Domain </button>
</div>
<div style="text-align: right; float: right;">
<input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
<button> Search </button>
</div>
<div style="float:left; padding-left: 26px;">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 2px 0 0px;" >
<option>apply to selected</option>
<option>rebuild</option>
<option>update counters</option>
<option>delete</option>
</select>
<button style="width:27px;"> </button>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr><td class="counter-name">Antivirus:</td><td class="counter-value"><?php echo $data[$key]['ANTIVIRUS'] ?></td></tr>
<tr><td class="counter-name">Antispam:</td><td class="counter-value"><?php echo $data[$key]['ANTISPAM'] ?></td></tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr><td class="counter-name">DKIM:</td><td class="counter-value"><?php echo $data[$key]['DKIM'] ?></td></tr>
<tr><td class="counter-name">Accounts:</td><td class="counter-value"><?php echo $data[$key]['ACCOUNTS'] ?></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<form id="vstobjects">
<table class="data">
<?php
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
}
if (empty($data[$key]['CATCHALL'])) {
$data[$key]['CATCHALL'] = '/dev/null';
}
?>
<script type="text/javascript">
$(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/<?php echo $spnd_action ?>/mail/?domain=<?php echo "$key" ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo "$key" ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td>
<?php
if ( $i == 1) {
echo "1 mail domain ";
} else {
echo "$i mail domains ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<td class="data-controls" width="100px"><img src="/images/more.png" width="8px" height="8px"><a href="?domain=<?php echo $key ?>"> list accounts</a></td>
<td class="data-controls" width="98px"><img src="/images/add.png" width="8px" height="8px"><a href="/add/mail/?domain=<?php echo $key ?>"> add account</a></td>
<td class="data-controls" width="104px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo "http://".$http_host."/webmail/"; ?>" target="_blank"> open webmail</a></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
<div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
</div>
</td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr>
<td colspan=3 class="domain" style="padding: 0 0 0 4px;">
<b><?php echo $key ?></b>
</td>
</tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr>
<td class="counter-name" style="padding: 2px 0 2px 0">
catchall > <?php echo $data[$key]['CATCHALL'] ?>
</td>
</tr>
<tr>
<td class="chart1">
Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr>
<td class="counter-name">
Antivirus:
</td>
<td class="counter-value">
<?php echo $data[$key]['ANTIVIRUS'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Antispam:
</td>
<td class="counter-value">
<?php echo $data[$key]['ANTISPAM'] ?>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr>
<td class="counter-name">
DKIM:
</td>
<td class="counter-value">
<?php echo $data[$key]['DKIM'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Accounts:
</td>
<td class="counter-value">
<?php echo $data[$key]['ACCOUNTS'] ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td width="160px"></td>
<td>
<?php
if ( $i == 1) {
echo "1 mail domain ";
} else {
echo "$i mail domains ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:166px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:43px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,106 +1,188 @@
<table class='data'>
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend';
}
?>
<script type="text/javascript">
$(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr>
<td></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo "$i" ?>"> delete</a>
<div id="delete_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo $key ?></b> account?</p>
</div>
</td>
</tr></table>
<table class="data-col2" width="830px">
<tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key."@".$_GET['domain'] ?></b> <a class="aliases" style="padding: 0 20px 0 4px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a></td></tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr><td class="counter-name" style="padding: 4px 0 0 0;"><?php echo $data[$key]['IP'] ?></td>
<tr><td class="chart1" style="padding: 0 0 2px 0">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;"><div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div></div></td></tr>
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="float:left">
<button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/mail/?domain=<?php echo $_GET['domain'] ?>'"> Add Mail Account </button>
</div>
<div style="text-align: right; float: right;">
<input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
<button> Search </button>
</div>
<div style="float:left; padding-left: 26px;">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 2px 0 0px;" >
<option>apply to selected</option>
<option>rebuild</option>
<option>update counters</option>
<option>delete</option>
</select>
<button style="width:27px;"> </button>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="200">
<table>
<tr><td class="counter-name">Quota:</td><td class="counter-value"><?php echo $data[$key]['QUOTA'] ?></td></tr>
<tr><td class="counter-name">Autoreply:</td><td class="counter-value"><?php echo $data[$key]['AUTOREPLY'] ?></td></tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="350">
<table width="350">
<tr><td class="counter-name">Forward:</td><td class="counter-value" style="padding: 0 0 0 8px;" ><?php echo str_replace(',', ', ', $data[$key]['FWD']) ?></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<form id="vstobjects">
<table class="data">
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend';
}
?>
<script type="text/javascript">
$(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/<?php echo $spnd_action ?>/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
$('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true,
autoOpen: false,
width: 360,
buttons: {
"Ok": function(event, ui) {
location.href = '/delete/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>';
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#delete_link_<?php echo "$i" ?>').click(function(){
$('#delete_dialog_<?php echo "$i" ?>').dialog('open');
return false;
});
});
</script>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $_GET['domain'] ?>&account=<?php echo $key ?>"> edit</a></td>
<td class="data-controls" width="70px">
<img src="/images/delete.png" width="7px" height="7px">
<a href="#" id="delete_link_<?php echo "$i" ?>"> delete</a>
<div id="delete_dialog_<?php echo "$i" ?>" title="Confirmation">
<p class="counter-value">Are you sure you want to delete <b><?php echo $key ?></b> account?</p>
</div>
</td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr><td colspan=3 class="domain" style="padding: 0 0 0 4px;"><b><?php echo $key."@".$_GET['domain'] ?></b> <a class="aliases" style="padding: 0 20px 0 4px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a></td></tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr>
<td class="counter-name" style="padding: 4px 0 0 0;">
<?php echo $data[$key]['IP'] ?>
</td>
<tr>
<td class="chart1" style="padding: 0 0 2px 0">
Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="200">
<table>
<tr>
<td class="counter-name">
Quota:
</td>
<td class="counter-value">
<?php echo $data[$key]['QUOTA'] ?>
</td>
</tr>
<tr>
<td class="counter-name">
Autoreply:
</td>
<td class="counter-value">
<?php echo $data[$key]['AUTOREPLY'] ?>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="350">
<table width="350">
<tr>
<td class="counter-name">
Forward:
</td>
<td class="counter-value" style="padding: 0 0 0 8px;" >
<?php echo str_replace(',', ', ', $data[$key]['FWD']) ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td width="160px"></td>
<td>
<?php
if ( $i == 1) {
echo "1 mail account ";
} else {
echo "$i mail accounts ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:173px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:57px\"><tr><td></td></tr></table>"; ?>
<?php
}
?>
</table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count">
<tr>
<td>
<?php
if ( $i == 1) {
echo "1 mail account ";
} else {
echo "$i mail accounts ";
}
?>
</td>
</tr>
</table>
</form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:173px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:57px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,16 +0,0 @@
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/mail/'">Add Domain</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>update counters</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/mail/?domain=<?php echo $_GET['domain'] ?>'">Add Account</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">