From 267bfe63efa0088edf729f25c81ef920d52591b5 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 14 Dec 2008 11:15:24 -0500
Subject: [PATCH] Fixed logout url.

---
 interface/web/sites/database_phpmyadmin.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/interface/web/sites/database_phpmyadmin.php b/interface/web/sites/database_phpmyadmin.php
index 9f654a6..481a654 100644
--- a/interface/web/sites/database_phpmyadmin.php
+++ b/interface/web/sites/database_phpmyadmin.php
@@ -65,7 +65,7 @@
  */
 if($_SESSION["s"]["user"]["typ"] == 'user') {
 	/* Get the group of the client */
-	$client_group_id = $_SESSION["s"]["user"]["default_group"];
+	$client_group_id = intval($_SESSION["s"]["user"]["default_group"]);
 	/* compare both */
 	if ($dbData['sys_groupid'] != $client_group_id){
 	    die ("You don't have the right to access this db!");
@@ -75,9 +75,10 @@
 /*
  * Now generate the login-Form
  */
+isset($_SERVER['HTTPS'])? $http = 'https' : $http = 'http';
 echo '
 starting phpMyAdmin...<br>
-<form method="post" action="http://' . $serverData['server_name'] . '/phpmyadmin/index.php" name="login_form" target="_top" style="visibility:hidden">
+<form method="post" action="' . $http . '://' . $serverData['server_name'] . '/phpmyadmin/index.php" name="login_form" target="_top" style="visibility:hidden">
     <input type="text" name="pma_username" id="input_username" value="' .  $dbData['database_user'] . '" />
     <input type="password" name="pma_password" id="input_password" value="' . $dbData['database_password'] . '" size="24" class="textfield" />
 </form>

--
Gitblit v1.9.1