403Webshell
Server IP : 51.222.109.124  /  Your IP : 216.73.217.148
Web Server : Apache
System : Linux scl07net.netdom.salvador.br 3.10.0-962.3.2.lve1.5.44.3.el7.x86_64 #1 SMP Mon Feb 22 04:35:33 EST 2021 x86_64
User : vertra94 ( 1153)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/vertra94/public_html/loja/app/class/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/vertra94/public_html/loja/app/class/Conexao.class.php
<?php
/**
 * Conexao class
 *
 * @author Rafael Clares <rafadinix@gmail.com>
 * @version 1.0  <10/2010>
 * web: www.clares.wordpress.com
 *
 *  Conexao com PHP PDO retorna um objeto PDO
 */
Class Conexao extends PDO
{

    protected $config;
    protected $driver;
    protected $sgbd;
    protected $host;
    protected $port;
    protected $user;
    protected $pass;
    protected $dbname;
    protected $strcon;
    protected $con;

    public function __construct( $config )
    {
        try
        {
            #array com dados do banco
            $this->config = $config;
            # Recuperando os dados de conexao do driver
            $this->dbname = $this->config['dbname'];
            $this->driver = $this->config['driver'];
            $this->sgbd = $this->config['sgbd'];
            $this->host = $this->config['host'];
            $this->port = $this->config['port'];
            $this->user = $this->config['user'];
            $this->pass = $this->config['password'];
            $this->strCon = "$this->sgbd:host=$this->host;port=$this->port;";
            # instancia e retorna objeto PDO
            $this->con = parent :: __construct( "$this->strCon dbname=$this->dbname", $this->user, $this->pass, array( PDO::ATTR_PERSISTENT => true ) );
            return $this->con;
        }
        catch( PDOException $e )
        {
            echo 'A Conexão falhou: ' . $e->getMessage();
            exit;
        }
    }

    public function close()
    {
        unset( $this->con );
        unset( $this->dbname );
        unset( $this->config );
    }
}
/* end file */

Youez - 2016 - github.com/yon3zu
LinuXploit