����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 18.191.136.109 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/pos11/core/app/model/ |
Upload File : |
<?php class AsistData { public static $tablename = "valores"; public function AsistData(){ $this->id = ""; $this->valor = ""; $this->tiempo = ""; $this->t_registro = ""; $this->validado_empleado = "0"; $this->king = "0"; $this->user_from = "0"; } public static function getAllByRegistro($name,$start,$end){ $sql = "select * from ".self::$tablename." where (date(tiempo) >= \"$start\" and date(tiempo) <= \"$end\") and t_registro=\"$name\" order by tiempo desc"; $query = Executor::doit($sql); return Model::many($query[0],new AsistData()); } public static function getAllByRegistroSalida($name,$start,$end){ $sql = "select * from ".self::$tablename." where (date(tiempo) >= \"$start\" and date(tiempo) <= \"$end\") and t_registro=\"$name\" order by tiempo desc"; $query = Executor::doit($sql); return Model::many($query[0],new AsistData()); } public static function getAll(){ $sql = "select * from ".self::$tablename; $query = Executor::doit($sql); return Model::many($query[0],new AsistData()); } /* public function getCategory(){ return CategoryData::getById($this->category_id);} public function add(){ $sql = "insert into ".self::$tablename." (barcode,name,description,price_in,price_out,user_id,presentation,unit,category_id,inventary_min,created_at) "; $sql .= "value (\"$this->barcode\",\"$this->name\",\"$this->description\",\"$this->price_in\",\"$this->price_out\",$this->user_id,\"$this->presentation\",\"$this->unit\",$this->category_id,$this->inventary_min,NOW())"; return Executor::doit($sql); } public function add_with_image(){ $sql = "insert into ".self::$tablename." (barcode,image,name,description,price_in,price_out,user_id,presentation,unit,category_id,inventary_min) "; $sql .= "value (\"$this->barcode\",\"$this->image\",\"$this->name\",\"$this->description\",\"$this->price_in\",\"$this->price_out\",$this->user_id,\"$this->presentation\",\"$this->unit\",$this->category_id,$this->inventary_min)"; return Executor::doit($sql); } public static function delById($id){ $sql = "delete from ".self::$tablename." where id=$id"; Executor::doit($sql); } public function del(){ $sql = "delete from ".self::$tablename." where id=$this->id"; Executor::doit($sql); } // partiendo de que ya tenemos creado un objecto ProductData previamente utilizamos el contexto public function update(){ $sql = "update ".self::$tablename." set barcode=\"$this->barcode\",name=\"$this->name\",price_in=\"$this->price_in\",price_out=\"$this->price_out\",unit=\"$this->unit\",presentation=\"$this->presentation\",category_id=$this->category_id,inventary_min=\"$this->inventary_min\",description=\"$this->description\",is_active=\"$this->is_active\" where id=$this->id"; Executor::doit($sql); } public function del_category(){ $sql = "update ".self::$tablename." set category_id=NULL where id=$this->id"; Executor::doit($sql); } public function update_image(){ $sql = "update ".self::$tablename." set image=\"$this->image\" where id=$this->id"; Executor::doit($sql); } public static function getById($id){ $sql = "select * from ".self::$tablename." where id=$id"; $query = Executor::doit($sql); return Model::one($query[0],new ProductData()); } public static function getAll(){ $sql = "select * from ".self::$tablename; $query = Executor::doit($sql); return Model::many($query[0],new ProductData()); } public static function getAllByCategoryId($id){ $sql = "select * from ".self::$tablename." where category_id=$id"; $query = Executor::doit($sql); return Model::many($query[0],new ProductData()); } public static function getAllByPage($start_from,$limit){ $sql = "select * from ".self::$tablename." where id>=$start_from limit $limit"; $query = Executor::doit($sql); return Model::many($query[0],new ProductData()); } public static function getLike($p){ $sql = "select * from ".self::$tablename." where barcode like '%$p%' or name like '%$p%' or id like '%$p%'"; $query = Executor::doit($sql); return Model::many($query[0],new ProductData()); } public static function getAllByUserId($user_id){ $sql = "select * from ".self::$tablename." where user_id=$user_id order by created_at desc"; $query = Executor::doit($sql); return Model::many($query[0],new ProductData()); } */ } ?>