From caa024b0c884630267c66bfd7613624a741bc82a Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 12 Jul 2012 11:15:25 +0300 Subject: [PATCH] improved pma and webmail links --- web/templates/admin/list_db.html | 3 +-- web/templates/admin/list_mail.html | 4 +++- web/templates/user/list_db.html | 3 ++- web/templates/user/list_mail.html | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web/templates/admin/list_db.html b/web/templates/admin/list_db.html index e96242d71..9593542a5 100644 --- a/web/templates/admin/list_db.html +++ b/web/templates/admin/list_db.html @@ -1,6 +1,7 @@ $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"; diff --git a/web/templates/admin/list_mail.html b/web/templates/admin/list_mail.html index f12e5ae9f..39476ea84 100644 --- a/web/templates/admin/list_mail.html +++ b/web/templates/admin/list_mail.html @@ -1,6 +1,8 @@
+ $value) { ++$i; if ($data[$key]['SUSPENDED'] == 'yes') { @@ -69,7 +71,7 @@ foreach ($data as $key => $value) { - +
list accounts add account " target="_blank"> open webmail " target="_blank"> open webmail edit diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index c4e58a3b9..ec7e87482 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -1,6 +1,7 @@ $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/"; ?> diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index 48dbb4506..b2e327b33 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -1,6 +1,7 @@
$value) { ++$i; if ($data[$key]['SUSPENDED'] == 'yes') { @@ -51,7 +52,7 @@ foreach ($data as $key => $value) { - +
list accounts add account " target="_blank"> open webmail " target="_blank"> open webmail edit