403Webshell
Server IP : 68.178.202.69  /  Your IP : 216.73.216.122
Web Server : Apache
System : Linux 69.202.178.68.host.secureserver.net 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
User : ikioworld ( 1005)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/ikioworld/public_html/application/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ikioworld/public_html/application/models/Pagemodel.php
<?php
class pagemodel extends CI_Model
{
    function __construct()
    {
        parent::__construct();
         $this->load->database();
        $this->table_name = 'page';
    }
    function add($data){
        if(!empty($data)){
            // print_r($data);exit;
             unset($data['sbt']);
            $data['created_at']=date('Y-m-d H:i:s'); 
            $data['updated_at']=date('Y-m-d H:i:s');
            $data['status']="Active";
           $this->db->insert($this->table_name,$data);
            $insert_id = $this->db->insert_id();
            return $insert_id;
        //    echo $this->db->last_query(); die;
        }
    }
   function edit($id,$data){
        if(!empty($data) && $id!=''){
                unset($data['sbt']);
          $this->db->where('id',$id);
          return $this->db->update($this->table_name,$data);
           //echo $this->db->last_query(); die;
        }
    }
    function fetch_details($id){
        if($id!=''){
           $this->db->select('*');
           $this->db->where('id',$id);
           $query = $this->db->get($this->table_name);
           return $query->row();  
           
          
        }
    }
   function get_total_records(){
       return $query = $this->db->count_all_results($this->table_name);
    }
   function get_contents($start, $limit){
       
       $this->db->select('*');
       $this->db->order_by($this->table_name.".id", "desc");
      
       $query = $this->db->get($this->table_name);
       return $query->result();
    }
  function deletepage($id){
       $this->db->where('id', $id);
       $this->db->delete($this->table_name);
    }
   
  function update_status($id,$svalue){
      $svalue=$_REQUEST['svalue'];
      
    
      if($svalue=='active'){
          $status='inactive';
      }else{
          $status='active';
      }
      $data= array(
                        'status' => $status
                  );
     $this->db->where('id',$id);
     return $this->db->update('page',$data);                
     }

     
 function delete_page($id)
 {
  
  $this->db->where('id', $id);
  $this->db->delete('page');

 }


function make_featured($id)
 {
 
  $this->db->set('is_featured','yes');
  $this->db->where('id', $id);
  $this->db->update('page');
 }

function remove_featured($id)
 {
 
  $this->db->set('is_featured','no');
  $this->db->where('id', $id);
  $this->db->update('page');
 }

function make_activated($id)
 {
 
  $this->db->set('status','active');
  $this->db->where('id', $id);
  $this->db->update('page');
 }

 
function remove_activated($id)
 {
 
  $this->db->set('status','inactive');
  $this->db->where('id', $id);
  $this->db->update('page');
 }
    
 
}   

Youez - 2016 - github.com/yon3zu
LinuXploit