����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 216.73.216.230 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 : /proc/self/root/proc/thread-self/root/var/www/html/muebles/application/model/ |
Upload File : |
<?php class sql extends dbconn { public function __construct() { $this->initDBO(); } public function list_employee() { $db = $this->dblocal; try { $stmt = $db->prepare("select * from employee where id_puesto = 2"); $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; } } /* SELECT pr.sale_id,pr.total,pr.pay_min,pr.balance,pr.payday,pr.pay_period, cus.name,cus.direccion,cus.contract FROM pending_route pr left JOIN customer cus ON cus.contract= pr.contract where collector_id = :id_collector */ //recupera registros de employed y de routes public function list_employee_route() { $db = $this->dblocal; try { $stmt = $db->prepare("select emp.id_cust, emp.poblacion, emp.contract,emp.name as name, rou.name as id_ruta, emp.phone, emp.created_at as created_at from employee emp left JOIN routes rou ON rou.id = emp.id_ruta where id_puesto = 2"); $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; } } //registro empleado nuevo public function new_customer($contrato,$name,$country,$phone,$gender,$ruta) { $db = $this->dblocal; try { $kind=2; $stmt = $db->prepare("insert into employee(contract, name,poblacion,phone,id_ruta,id_puesto) values (:contrato,:name,:country,:phone,:gender,:ruta)"); $stmt->bindParam("contrato",$contrato); $stmt->bindParam("name",$name); $stmt->bindParam("country",$country); $stmt->bindParam("phone",$phone); $stmt->bindParam("gender",$gender); $stmt->bindParam("ruta",$ruta); $stmt->execute(); $stat[0] = true; $stat[1] = "Registro De empleado"; 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 supplier "); $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; } } //edicion de empleado public function edit_employee($code,$nombre,$contract,$id_ruta,$country,$telefono,$puesto) { $db = $this->dblocal; try { $stmt = $db->prepare("update employee set name = :nombre, contract = :contract,id_ruta=:id_ruta, poblacion=:country, phone = :telefono , id_puesto = :puesto where id_cust = :code "); $stmt->bindParam("code",$code); $stmt->bindParam("nombre",$nombre); $stmt->bindParam("contract",$contract); $stmt->bindParam("id_ruta",$id_ruta); $stmt->bindParam("country",$country); $stmt->bindParam("telefono",$telefono); $stmt->bindParam("puesto",$puesto); $stmt->execute(); $stat[0] = true; $stat[1] = "Actualizacion de empleaado"; return $stat; } catch(PDOException $ex) { $stat[0] = false; $stat[1] = $ex->getMessage(); return $stat; } } public function delete_employee($id) { $db = $this->dblocal; try { $stmt = $db->prepare("delete from employee 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; } } }