Skip to content

Commit caa024b

Browse files
committed
improved pma and webmail links
1 parent e94dd4a commit caa024b

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

web/templates/admin/list_db.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<table class='data'>
22

33
<?php
4+
list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
45
foreach ($data as $key => $value) {
56
++$i;
67
if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -10,8 +11,6 @@
1011
$status = 'active';
1112
$spnd_action = 'suspend' ;
1213
}
13-
14-
list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
1514
if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
1615
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
1716
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";

web/templates/admin/list_mail.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<table class='data'>
22

3+
34
<?php
5+
list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
46
foreach ($data as $key => $value) {
57
++$i;
68
if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -69,7 +71,7 @@
6971
<td></td>
7072
<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>
7173
<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>
72-
<td class="data-controls" width="104px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo "http://".$_SERVER["HTTP_HOST"]."/webmail/"; ?>" target="_blank"> open webmail</a></td>
74+
<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>
7375
<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>
7476
<td class="data-controls" width="80px">
7577
<img src="/images/suspend.png" width="7px" height="8px">

web/templates/user/list_db.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<table class='data'>
22

33
<?php
4+
list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
45
foreach ($data as $key => $value) {
56
++$i;
67
if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -11,7 +12,7 @@
1112
$spnd_action = 'suspend' ;
1213
}
1314

14-
list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
15+
1516
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
1617
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/";
1718
?>

web/templates/user/list_mail.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<table class='data'>
22

33
<?php
4+
list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
45
foreach ($data as $key => $value) {
56
++$i;
67
if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -51,7 +52,7 @@
5152
<td></td>
5253
<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>
5354
<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>
54-
<td class="data-controls" width="104px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo "http://".$_SERVER["HTTP_HOST"]."/webmail/"; ?>" target="_blank"> open webmail</a></td>
55+
<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>
5556
<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>
5657
<td class="data-controls" width="70px">
5758
<img src="/images/delete.png" width="7px" height="7px">

0 commit comments

Comments
 (0)