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
- *
- */
- if (isset($db_config))
- {
- if (is_array($db_config))
- {
- $db = new Database();
- }
- }
- class Database {
- private $con = null;
- private $error = "";
- private $queries_to_log = null;
- private $query_log_file = null;
- public function __construct($server = "", $user = "", $pass = "", $dbname = "", $new_connection = false) {
- if ($server == "" && $user == "" && $pass == "" && $dbname == "")
- {
- global $db_config;
- $server = $db_config["server"];
- $user = $db_config["user"];
- $pass = $db_config["pass"];
- $dbname = $db_config["db"];
- }
- $this->con = mysql_connect($server, $user, $pass, $new_connection);
- if (!$this->con)
- {
- $this->error = "Could not Connect to database Server";
- die($this->error);
- return false;
- }
- $rs = mysql_query("SELECT database()");
- $row = mysql_fetch_array($rs);
- $current_db = $row[0];
- if ($row[0] != "" && $row[0] != $dbname)
- {
- $this->con = mysql_connect($server, $user, $pass, true);
- }
- $select = mysql_select_db($dbname, $this->con);
- if (!$select)
- {
- $this->error = "Could not Connect to requested database";
- die($this->error);
- }
- $this->queries_to_log = false;
- $this->query_log_file = "";
- return;
- }
- public function query($qry) {
- $result = mysql_query($qry, $this->con);
- if ($result !== false)
- {
- ........................................................................
- ..............................
- ..........
Advertisement
Add Comment
Please, Sign In to add comment