Просмотр исходного кода

improved pma and webmail links

Serghey Rodin 13 лет назад
Родитель
Сommit
caa024b0c8

+ 1 - 2
web/templates/admin/list_db.html

@@ -1,6 +1,7 @@
 <table class='data'>
 
 <?php
+list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
 foreach ($data as $key => $value) {
     ++$i;
     if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -10,8 +11,6 @@ foreach ($data as $key => $value) {
         $status = 'active';
         $spnd_action = 'suspend' ;
     }
-
-    list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
     if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
     if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
     if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";

+ 3 - 1
web/templates/admin/list_mail.html

@@ -1,6 +1,8 @@
 <table class='data'>
 
+
 <?php
+list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
 foreach ($data as $key => $value) {
     ++$i;
     if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -69,7 +71,7 @@ foreach ($data as $key => $value) {
             <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://".$_SERVER["HTTP_HOST"]."/webmail/"; ?>" target="_blank"> open webmail</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">

+ 2 - 1
web/templates/user/list_db.html

@@ -1,6 +1,7 @@
 <table class='data'>
 
 <?php
+list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
 foreach ($data as $key => $value) {
     ++$i;
     if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -11,7 +12,7 @@ foreach ($data as $key => $value) {
         $spnd_action = 'suspend' ;
     }
 
-    list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
+
     if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
     if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/";
     ?>

+ 2 - 1
web/templates/user/list_mail.html

@@ -1,6 +1,7 @@
 <table class='data'>
 
 <?php
+list($http_host, $port) = split(':', $_SERVER["HTTP_HOST"]);
 foreach ($data as $key => $value) {
     ++$i;
     if ($data[$key]['SUSPENDED'] == 'yes') {
@@ -51,7 +52,7 @@ foreach ($data as $key => $value) {
             <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://".$_SERVER["HTTP_HOST"]."/webmail/"; ?>" target="_blank"> open webmail</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">