p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/dpmptsp/public_html/newsigniter/application/models/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /home/dpmptsp/public_html/newsigniter/application/models/My_model.php
<?php 
defined('BASEPATH') OR exit('No direct script access allowed');
#[\AllowDynamicProperties]
class My_Model extends CI_Model {

   public function get_datatables_query()
   {
      if($this->tableJoin != ''){
         $this->db->select($this->select);
         $this->db->from($this->table);
         $this->db->join($this->tableJoin, $this->tableJoin . '.id = ' . $this->table . '.id_' . $this->tableJoin);
      }else{
         $this->db->from($this->table);
      }

      $i = 0;

      foreach($this->column_search as $item){
         if($_POST['search']['value']){
            if($i === 0){
               $this->db->group_start();
               $this->db->like($item, $_POST['search']['value']);
            }else{
               $this->db->or_like($item, $_POST['search']['value']);
            }

            if(count($this->column_search) - 1 === $i){
               $this->db->group_end();
            }
         }

         $i++;
      }

      if(isset($_POST['order'])){
         $this->db->order_by($this->column_order[$_POST['order']['0']['column']], $_POST['order']['0']['dir']);
      }else if(isset($this->order)){
         $order = $this->order;
         $this->db->order_by(key($order), $order[key($order)]);
      }
   }

   public function get_datatables()
   {
      $this->get_datatables_query();
      
      if($_POST['length'] != -1){
         $this->db->limit($_POST['length'], $_POST['start']);
      }

      return $this->db->get()->result();
   }

   public function count_filtered()
   {
      $this->get_datatables_query();
      return $this->db->get()->num_rows();
   }

   public function count_all()
   {
      $this->db->from($this->table);
      return $this->db->count_all_results();
   }

   public function countRows($table)
   {
      return $this->db->get($table)->num_rows();
   }

   public function get_by_id($id)
   {
      $this->db->from($this->table);
      $this->db->where($this->id, $id);
      return $this->db->get()->row();
   }

   public function delete($id){
      $this->db->where($this->id, $id);
      $this->db->delete($this->table);
   }

   public function save($data){
      $this->db->insert($this->table, $data);
   }

   public function update($where, $data){
      $this->db->update($this->table, $data, $where);
      return $this->db->affected_rows();
   }   

}

/* End of file My_Model.php */
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 03 2025 03:29:09
0 / 0
0755
Admin_model.php
0.783 KB
January 20 2025 04:15:08
0 / 0
0644
Album_model.php
1.129 KB
December 31 2020 02:24:50
0 / 0
0644
Banner_model.php
1.041 KB
January 14 2025 08:12:08
0 / 0
0644
Category_model.php
0.279 KB
December 31 2020 02:24:50
0 / 0
0644
Contact_model.php
0.233 KB
December 31 2020 02:24:50
0 / 0
0644
Gallery_model.php
1.027 KB
December 31 2020 02:24:50
0 / 0
0644
Identity_model.php
1.02 KB
December 31 2020 02:24:50
0 / 0
0644
Ion_auth_model.php
64.402 KB
December 31 2020 02:24:50
0 / 0
0644
Menu_model.php
0.813 KB
December 31 2020 02:24:50
0 / 0
0644
My_model.php
2.32 KB
January 03 2025 03:22:49
0 / 0
0644
Posting_model.php
8.661 KB
April 17 2025 01:48:34
0 / 0
0644
Submenu_model.php
0.438 KB
December 31 2020 02:24:50
0 / 0
0644
index.html
0.128 KB
December 31 2020 02:24:50
0 / 0
0644