%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64
User : ndkhermy ( 1200)
PHP Version : 8.5.12
Disable Function : NONE
Directory :  /home1/ndkhermy/public_html/website_1ec2d7c2/apps/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home1/ndkhermy/public_html/website_1ec2d7c2/apps/models/Project_model.php
<?php 
defined('BASEPATH') OR exit('No direct script access allowed');

class  Project_Model extends CI_Model {
	
public function GetALLPackageListing($type=""){
        $this->db->select("*");
		$this->db->from('bh_projects');
        if($type=='today'){
	    $this->db->like('add_date', date("Y-m-d"), 'after');
         }  
		$this->db->order_by("id","desc");
		 $this->db->where('status !=', '2');
		$query=$this->db->get();
		return $query->result_array();  
}


public function getALLSliderProducts(){
        $this->db->select("*");
		$this->db->from('bh_projects');
      
		$this->db->order_by("rand()");
		$this->db->limit("4");
		 $this->db->where('show_in_slider', '1');
		 $this->db->where('status', '1');
		$query=$this->db->get();
		return $query->result_array();  
}

public function getALLTopRatedProducts(){
        $this->db->select("*");
		$this->db->from('bh_projects');
      
		$this->db->order_by("id","desc");
		 $this->db->where('top_rated', '1');
		
		 $this->db->where('status', '1');
		 $this->db->order_by("rand()");
		
		$query=$this->db->get();
		return $query->result_array();  
}

public function GetALLPackageListingByCategoryId($category_id=""){
        $this->db->select("*");
		$this->db->from('bh_projects');
       
	   if($category_id!="")
		 
         $this->db->where('category_id', $category_id);
         $this->db->where('status !=', '2');
		$this->db->order_by("id","desc");
		
		$query=$this->db->get();
		return $query->result_array();  
}
public function GetUserPackageListing(){
         $this->db->select("*");
		$this->db->from('bh_projects');	
	
		$this->db->where("user_id",$this->session->userdata('bh_front_user_id'));
		
		$this->db->order_by("id","desc");
		
		$query=$this->db->get();
		return $query->result_array();  
}




public function GetALLPackageListingArchive(){
        $this->db->select("*");
		$this->db->from('bh_projects');
       
		$this->db->order_by("id","desc");
		$this->db->where('status', '2');
		$query=$this->db->get();
		return $query->result_array();  
}



public function GetPackageListingByID($id){
         $this->db->select("*");
		$this->db->from('bh_projects');		
		$this->db->where("id",$id);
		$this->db->order_by("id","desc");
		
		$query=$this->db->get();
		$ContentData = $query->result_array(); 
        return $ContentData;
}
public function GetPackageListingImagesDetails($id){
         $this->db->select("*");
		$this->db->from('bh_listing_images');		
		$this->db->where("listing_id",$id);
		$this->db->where("status","1");
		$this->db->order_by("id","desc");
		
		$query=$this->db->get();
		$ContentData = $query->result_array(); 
        return $ContentData;
}


public function GetOthersCategoryByID($id){
         $this->db->select("*");
		$this->db->from('bh_others_categories');		
		$this->db->where("id",$id);
		$this->db->order_by("id","desc");
		
		$query=$this->db->get();
		$userData = $query->result_array(); 
        return $userData;
}

public function GetOthersParentCategorys($type){
         $this->db->select("*");
		$this->db->from('bh_others_categories');		
		$this->db->where("category_type",$type);
		$this->db->where("status","1");
		$this->db->order_by("id","desc");
		
		$query=$this->db->get();
		$userData = $query->result_array(); 
        return $userData;
}

public function getALLFeaturedProducts(){
         $this->db->select("*");
		$this->db->from('bh_projects');		
		
		$this->db->where('status', '1');
		$this->db->where('new_status =', '1');
		
		$this->db->order_by("add_date","desc");
		$this->db->limit(12);
		$query=$this->db->get();
		return $query->result_array();  
} 


/*  Front End Function */




public function GetSingleListingImages($id){

  $this->db->select("*");
		$this->db->from('bh_listing_images');
       
		$this->db->where("id",$id);	
		$this->db->order_by("id","asc");
		
		$query=$this->db->get();
		return $query->result_array(); 
}

public function GetPackageListingImagesByListingId($id){
            $this->db->select("*");
		$this->db->from('bh_listing_images');
       
		$this->db->where("listing_id",$id);	
		$this->db->order_by("id","asc");
		
		$query=$this->db->get();
		return $query->result_array();  
	}
	
	public function GetPackageListingImagesByCategoryId($id,$category_id=""){
            $this->db->select("*");
		$this->db->from('bh_listing_images');
       
		$this->db->where("listing_id",$id);	
		if($category_id)
		$this->db->where("category_id",$category_id);	
		$this->db->order_by("id","asc");
		
		$query=$this->db->get();
		return $query->result_array();  
	}
	

	
	
	
}

VaKeR 2022