custom phpMyAdmin and phpPgAdmin links

This commit is contained in:
Serghey Rodin 2013-11-23 14:56:58 +02:00
commit 563d00dd02
3 changed files with 9 additions and 0 deletions

View file

@ -11,6 +11,11 @@ include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
// Panel
top_panel($user,$TAB);
// SYS
exec (VESTA_CMD."v-list-sys-config json", $output, $return_var);
$sys = json_decode(implode('', $output), true);
unset($output);
// Data
exec (VESTA_CMD."v-list-databases $user json", $output, $return_var);
$data = json_decode(implode('', $output), true);

View file

@ -45,8 +45,10 @@
if ($data[$key]['HOST'] != 'localhost' ) $http_host = $data[$key]['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'] == 'mysql') && (!empty($sys['config']['DB_PMA_URL']))) $db_admin_link = $sys['config']['DB_PMA_URL'];
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phppgadmin/";
if (($data[$key]['TYPE'] == 'pgsql') && (!empty($sys['config']['DB_PGA_URL']))) $db_admin_link = $sys['config']['DB_PGA_URL'];
?>
<tr class="data-row">
<td class="data-dotted" width="150">

View file

@ -41,8 +41,10 @@
if ($data[$key]['HOST'] != 'localhost' ) $http_host = $data[$key]['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'] == 'mysql') && (!empty($sys['config']['DB_PMA_URL']))) $db_admin_link = $sys['config']['DB_PMA_URL'];
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phppgadmin/";
if (($data[$key]['TYPE'] == 'pgsql') && (!empty($sys['config']['DB_PGA_URL']))) $db_admin_link = $sys['config']['DB_PGA_URL'];
?>
<tr class="data-row">
<td class="data-dotted" width="150">