Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- $dbconf = array("hostname" => $conf["db_hostname"], "username" => $conf["db_username"], "password" => $conf["db_password"], "database" => $conf["db_name"], "prefix" => $conf["db_prefix"], "version" => isset($conf["db_version"]) ? ($conf["db_version"]) : "", "debug" => $conf["debug"]);
- $DB = new DB($dbconf);
- $DB->connect_db();
- if ("4.1" <= $DB->version)
- {
- $DB->query("SET NAMES utf8");
- }
- $DB->query("SET @@session.sql_mode= ''");
- if (!(!(!(defined("VIR_PATH") == false) && defined("VIR_CP_PATH") == false) && defined("SYS_PATH") == false) && defined("SYS_LICENSE") == false)
- {
- exit("The system does not appear to be properly installed (1).");
- }
- if (isset($DB) == false)
- {
- exit("The system does not appear to be installed properly (2).");
- }
- class DB {
- public $conn_id = "";
- public $hostname = "";
- public $username = "";
- public $password = "";
- public $database = "";
- public $version = "";
- public $debug = 0;
- public $markers = array();
- public $totalqueries = 0;
- public $mysqli = false;
- public function DB($conf) {
- if ($conf["hostname"] != "")
- {
- $this->hostname = $conf["hostname"];
- }
- if ($conf["username"] != "")
- {
- $this->username = $conf["username"];
- }
- if ($conf["password"] != "")
- {
- $this->password = $conf["password"];
- }
- if ($conf["database"] != "")
- {
- $this->database = $conf["database"];
- }
- if ($conf["prefix"] != "")
- {
- $this->prefix = $conf["prefix"];
- }
- if ($conf["version"] != "")
- {
- $this->version = $conf["version"];
- }
- if ($conf["debug"] != "")
- {
- $this->debug = $conf["debug"];
- }
- if (function_exists("mysqli_connect"))
- {
- $this->mysqli = true;
- }
- return;
- }
- public function connect_db($select_db = true) {
- if (!$this->hostname)
- {
- return false;
- }
- $this->conn_id = $this->mysqli ? (@mysqli_connect($this->hostname, $this->username, $this->password)) : (@mysql_connect($this->hostname, $this->username, $this->password));
- if (!$this->conn_id || $this->debug)
- {
- return $this->error_db("Unable to connect to the database.");
- }
- if ($select_db == true)
- {
- ........................................................................
- ...................................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement