One Hat Cyber Team
Your IP :
3.137.218.48
Server IP :
162.241.123.123
Server :
Linux sh016.hostgator.in 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Server Software :
Apache
PHP Version :
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home1
/
saicsazq
/
portal.smhtechlabs.com
/
app
/
Models
/
View File Name :
Checklist_items_model.php
<?php namespace App\Models; class Checklist_items_model extends Crud_model { protected $table = null; function __construct() { $this->table = 'checklist_items'; parent::__construct($this->table); } function get_details($options = array()) { $checklist_items_table = $this->db->prefixTable("checklist_items"); $tasks_table = $this->db->prefixTable('tasks'); $where = ""; $id = $this->_get_clean_value($options, "id"); if ($id) { $where .= " AND $checklist_items_table.id=$id"; } $task_id = $this->_get_clean_value($options, "task_id"); if ($task_id) { $where .= " AND $checklist_items_table.task_id=$task_id"; } $sql = "SELECT $checklist_items_table.*, IF($checklist_items_table.sort!=0, $checklist_items_table.sort, $checklist_items_table.id) AS new_sort, $tasks_table.client_id FROM $checklist_items_table LEFT JOIN $tasks_table ON $tasks_table.id=$checklist_items_table.task_id WHERE $checklist_items_table.deleted=0 $where ORDER BY new_sort ASC"; return $this->db->query($sql); } function get_all_checklist_of_project($project_id) { $project_id = $this->_get_clean_value($project_id); $checklist_items_table = $this->db->prefixTable('checklist_items'); $tasks_table = $this->db->prefixTable('tasks'); $sql = "SELECT $checklist_items_table.task_id, $checklist_items_table.title FROM $checklist_items_table WHERE $checklist_items_table.deleted=0 AND $checklist_items_table.task_id IN(SELECT $tasks_table.id FROM $tasks_table WHERE $tasks_table.deleted=0 AND $tasks_table.project_id=$project_id)"; return $this->db->query($sql); } }