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/www/application/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ikioworld/www/application/models/Projectmodel.php
<?php
class Projectmodel extends CI_Model
{
    function __construct()
    {
        parent::__construct();
         $this->load->database();
        $this->table_name = 'project';
    }
    function add($data){
        if(!empty($data)){
            // print_r($data);exit;
             unset($data['sbt']);
             unset($data['project_type']);
             unset($data['application_area']);
             unset($data['project_images']);
             unset($data['project_variant']);
             unset($data['project_features']);
             unset($data['project_rating']);
             unset($data['project_color']);
             unset($data['project_tech']);
             unset($data['tech_heading']);
             $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']);
             unset($data['project_type']);
             unset($data['application_area']);
             unset($data['project_images']);
             unset($data['project_variant']);
             unset($data['project_features']);
             unset($data['project_rating']);
             unset($data['project_color']);
          $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->from('project');
           $this->db->where('project.id',$id); 
           $query = $this->db->get();
           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 deleteproject($id){
       $this->db->where('id', $id); 
       $this->db->delete($this->table_name);
    }

function deleteallproject($id){
       $this->db->where('id', $id); 
       $this->db->delete('project_images');
    }

    function getAllCategories()
    {
        $query = $this->db->get('category');
        return $query->result();
    }

    function getAllSubCategories()
    {
        $query = $this->db->get('subcategory');
        return $query->result();
    }

    function getAllType()
    {
        $query = $this->db->get('type');
        return $query->result();
    }

    function getAllApps()
    {
        $query = $this->db->get('application');
        return $query->result();
    }

    function getAllVariant()
    {
        $query = $this->db->get('variant');
        return $query->result();
        
    }

    function getAllFeatures()
    {
        $query = $this->db->get('feature');
        return $query->result();
    }

    function getAllRating()
    {
        $query = $this->db->get('rating');
        return $query->result();
    }
    
    function get_Prods($slug)
    {
        $this->db->select('*');
        $this->db->select('project.slug as projID');
        $this->db->from('project');
        $this->db->join('project_images',"project.id=project_images.project_id");
        $this->db->where('project.slug !=',$slug);
        $this->db->where('project.status','active');
        $this->db->limit(1);
        $query = $this->db->get(); 
        
        return $query->result();
    }

    


 function fetch_subcategory($item_id)
 {
  $this->db->where('category_type', $item_id);
  $this->db->order_by('name', 'ASC');
  $query = $this->db->get('subcategory');
  $output = '<option value="">Select Sub Category</option>';
  foreach($query->result() as $row)
  {
   $output .= '<option value="'.$row->subcategory_id.'">'.$row->subcategory_name.'</option>';
  }
  return $output;
 }
 
function get_category(){
       $this->db->select('*');
       $query = $this->db->get('category');
       return $query->result();
}

function get_subcategory($item_id){
    if($item_id!=''){
       $this->db->select('*');
       $this->db->order_by("name", "ASC");
       $query = $this->db->where('category_type',$item_id);
       $query = $this->db->get('subcategory');
       return $query->result(); 
     }
   }


function count_feature_project($project_id){
        $this->db->where('project_id',$project_id);
        $this->db->where('features','yes');
       return $query = $this->db->count_all_results('project_images');
    }

    function get_export_data(){
        $this->db->select(['sku','project_name','project_tagline','project_short_description','project_long_description','heading1','data1','heading2','data2','heading3','data3','heading4','data4','heading5','data5','heading6','data6','heading7','data7','heading8','data8','heading9','data9','heading10','data10','heading11','data11','heading12','data12','heading13','data13','heading14','data14','heading15','data15','heading16','data16','document','tags']);
        $this->db->order_by($this->table_name.".id", "desc");
        $query = $this->db->get($this->table_name);
        return $query->result_array();
     }
     
     
     
function make_query()
 {
  $query = "
  SELECT DISTINCT project.*,project.slug as prodID,project.featured_image FROM project 
  left JOIN project_images  ON 	project_images.project_id=project.id
   WHERE project.status = 'active' order by id desc
  ";
  
  if(isset($application))
  {
   $application_filter = implode("','", $application);
   $query .= "
    AND project_application.project_application IN ('".$application_filter."')
   ";
  }
 
if(isset($type))
  {
   $type_filter = implode("','", $type);
   $query .= "
    AND project_type.project_type IN('".$type_filter."')
   ";
  }
  
  if(isset($variant))
  {
   $variant_filter = implode("','", $variant);
   $query .= "
    AND project_variant.project_variant IN ('".$variant_filter."')
   ";
  }
 
  if(isset($feature))
  {
   $feature_filter = implode("','", $feature);
   $query .= "
    AND project_feature.project_feature IN ('".$feature_filter."')
   ";
  }
  
if(isset($rating))
  {
   $rating_filter = implode("','", $rating);
   $query .= "
    AND project_rating.project_rating IN ('".$rating_filter."')
   ";
  }
  
  
 
  return $query;
 }   
 function count_all()
 {
  $query = $this->make_query();
  $data = $this->db->query($query);
  return $data->num_rows();
 }  

 function fetch_data($limit,$start)
 {
  $query = $this->make_query();

  $query .= ' LIMIT '.$start.', ' . $limit;

  $data = $this->db->query($query);

  $output = '';
  if($data->num_rows() > 0)
  {
   foreach($data->result_array() as $row)
   {
       
     $project_id = $row['prodID'];
     
     $project_name =$row['project_name'];
     
     $item_name = $row['project_short_description'];
     
    $date = $row['updated_at'];
    $dateToPrint = date('j F, Y', strtotime($date) ) ;
                                             
     
       
     $output.='<div class="col-md-3">
                <div class="ikio_blogListing__wrap">
                    <div class="ikio_blogLising__image">
                        <a href='.base_url().'case-studies/'.$project_id.'><img src='.base_url().'uploads/project/'. $row['featured_image'] .' alt=""></a>
                    </div>
                    <div class="ikio__blogListing--content">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="blog_date">
                                     <a href='.base_url().'case-studies/'.$project_id.' target="_blank"><span>'.$dateToPrint.'</span></a>
                                </div>

                            </div>
                            <div class="col-md-6">
                                <div class="blog_share_icon">
                                    <ul>
                                        <div class="a2a_kit a2a_kit_size_32 a2a_default_style" id="social__large">
                                            <a class="a2a_button_linkedin"></a>
                                            <a class="a2a_button_whatsapp"></a>
                                             <a class="a2a_button_email"></a>
                                            <a class="a2a_dd" href="https://www.addtoany.com/share"></a>
                                           </div>
                                         <script async src="https://static.addtoany.com/menu/page.js"></script>
                                    </ul>
                                </div>
                            </div>
                            <div class="blog_Content">
                                 <a href='.base_url().'case-studies/'.$project_id.'>
                                    <h6>'.$project_name.'</h6>

                                    <p>
                                        '.$item_name.'
                                    </p>
                                 </a>
                                <a href='.base_url().'case-studies/'.$project_id.'  class="button_underline" id="hsize14">Read More</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    ';    
   }
  }
  else
  {
   $output = '<img src="'.base_url().'assets/img/404.jpg" class="no_data">';
  }
  return $output;
 }  
 
 
 function get_details($slug){
       $this->db->select(['*']);
       $this->db->select('project.id as prodID');
       $this->db->select('project.features as featured');
       $this->db->select('featured_image');
       $this->db->join('project_images',"project.id=project_images.project_id");
       $this->db->where('project.slug',$slug);
       $query=$this->db->get($this->table_name);
       return $query->row();
    } 

   
}   

Youez - 2016 - github.com/yon3zu
LinuXploit