<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/


error_Reporting(0);

require_once "../../lib/sessions.php";

SessionManager::sessionStart("STB");

if (!$_SESSION["store"]["minibase"]["user"]) {
	die("Invalid access !");
} 

require_once "../../../upload/conf/database.php";

$_GET["username"] = $_CONF["database"]["login"];
$_GET["db"] = $_CONF["database"]["default"];
$_GET["ns"] = "no";

function adminer_object() {

	class AdminerAutologin extends Adminer {

		function credentials() {
			global $_CONF;

			$_GET["username"] = "root";
			return array(
				$_CONF['database']["server"],
				$_CONF['database']["login"],
				$_CONF['database']["password"]
			);			
		}

		function database() {
			global $_CONF;

			return $_CONF['database']["default"];
		}

	   function permanentLogin($f = false) {
		  // key used for permanent login
		  return "ddeb5caadbdc114703f6cff64223498f";
		}

		function headers() {
			header("X-Frame-Options: SameOrigin");
			header("X-XSS-Protection: 0");
			return false;
		}
		
	}

	return new AdminerAutologin;
}


include_once "./adminer.php";

?>