mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
custom mail url
This commit is contained in:
parent
c60bda6b95
commit
a0d4354b38
4 changed files with 22 additions and 3 deletions
|
@ -139,9 +139,16 @@ if (!empty($_POST['ok_acc'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($_SESSION['error_msg'])) {
|
if (empty($_SESSION['error_msg'])) {
|
||||||
|
exec (VESTA_CMD."v-list-sys-config json", $output, $return_var);
|
||||||
|
$sys = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
||||||
|
$webmail = "http://".$http_host."/webmail/";
|
||||||
|
if (!empty($sys['config']['MAIL_URL'])) $webmail = $sys['config']['MAIL_URL'];
|
||||||
|
|
||||||
$_SESSION['ok_msg'] = __('MAIL_ACCOUNT_CREATED_OK',$_POST['v_account'],$_POST[v_domain],$_POST['v_account'],$_POST[v_domain]);
|
$_SESSION['ok_msg'] = __('MAIL_ACCOUNT_CREATED_OK',$_POST['v_account'],$_POST[v_domain],$_POST['v_account'],$_POST[v_domain]);
|
||||||
$_SESSION['ok_msg'] .= " / <a href=http://".$http_host."/webmail target='_blank'>" . __('open webmail') . "</a>";
|
$_SESSION['ok_msg'] .= " / <a href=".$webmail." target='_blank'>" . __('open webmail') . "</a>";
|
||||||
unset($v_account);
|
unset($v_account);
|
||||||
unset($v_password);
|
unset($v_password);
|
||||||
unset($v_password);
|
unset($v_password);
|
||||||
|
|
|
@ -13,6 +13,12 @@ top_panel($user,$TAB);
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
if (empty($_GET['domain'])){
|
if (empty($_GET['domain'])){
|
||||||
|
|
||||||
|
// SYS
|
||||||
|
exec (VESTA_CMD."v-list-sys-config json", $output, $return_var);
|
||||||
|
$sys = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-mail-domains $user json", $output, $return_var);
|
exec (VESTA_CMD."v-list-mail-domains $user json", $output, $return_var);
|
||||||
$data = json_decode(implode('', $output), true);
|
$data = json_decode(implode('', $output), true);
|
||||||
$data = array_reverse($data, true);
|
$data = array_reverse($data, true);
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
<table class="data">
|
<table class="data">
|
||||||
<?php
|
<?php
|
||||||
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
||||||
|
$webmail = "http://".$http_host."/webmail/";
|
||||||
|
if (!empty($sys['config']['MAIL_URL'])) $webmail = $sys['config']['MAIL_URL'];
|
||||||
|
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
++$i;
|
++$i;
|
||||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||||
|
@ -81,7 +84,7 @@
|
||||||
<?php print __('edit');?>
|
<?php print __('edit');?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo "http://".$http_host."/webmail/"; ?>" target="_blank" class="data-controls">
|
<a href="<?php echo $webmail; ?>" target="_blank" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/new_window.png" width="8px" height="8px">
|
<img src="/images/new_window.png" width="8px" height="8px">
|
||||||
<?php print __('open webmail');?>
|
<?php print __('open webmail');?>
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
<table class="data">
|
<table class="data">
|
||||||
<?php
|
<?php
|
||||||
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"] . ":");
|
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"] . ":");
|
||||||
|
$webmail = "http://".$http_host."/webmail/";
|
||||||
|
if (!empty($sys['config']['MAIL_URL'])) $webmail = $sys['config']['MAIL_URL'];
|
||||||
|
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
++$i;
|
++$i;
|
||||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||||
|
@ -67,7 +70,7 @@
|
||||||
<?php print __('edit');?>
|
<?php print __('edit');?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo "http://".$http_host."/webmail/"; ?>" target="_blank" class="data-controls">
|
<a href="<?php echo $webmail; ?>" target="_blank" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/new_window.png" width="8px" height="8px">
|
<img src="/images/new_window.png" width="8px" height="8px">
|
||||||
<?php print __('open webmail');?>
|
<?php print __('open webmail');?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue