<?php

class View_data extends CI_Model
{
    
    function getprofile()
    {
        return $this->db->select('*')
                    ->from('company_profile')
                    ->get()->result();
    }
    
    function getslider()
    {
        return $this->db->select('*')
                    ->from('slider')
                    ->get()->result();
    }
	function about()
    {
        return $this->db->select('*')
                    ->from('about')                    
                    ->get()->result();
    
    }
	function get_director()
    {
        return $this->db->select('*')
                    ->from('pages')
					->where('p_name','Director')
                    ->get()->result();
    
    }
	function get_quality()
    {
        return $this->db->select('*')
                    ->from('pages')
					->where('p_name','Quality Policy')
                    ->get()->result();
    
    }
	function get_company()
    {
        return $this->db->select('*')
                    ->from('pages')
					->where('p_name','Company Profile')
                    ->get()->result();
    
    }
	function get_service()
   {
    return $this->db->select('*')                    
                    ->from('service')
					->where('s_status','1')
                    ->get()->result();
   }
   
	 function getservice_id($s_id)
   {
    return $this->db->select('*')                    
                    ->from('service')
					->where('s_status','1')
					->where('s_id',$s_id)
                    ->get()->result();
   }
    function getservice_name($s_name)
   {
    return $this->db->select('*')                    
                    ->from('service')
					->where('s_status','1')
					->where('s_name',$s_name)
                    ->get()->result();
   }
   function get_team()
   {
    return $this->db->select('*')                    
                    ->from('team')
					->where('t_status','1')
                    ->get()->result();
   }
     function get_gallery()
   {
	return $this->db->select('*')
                    ->from('gallery')
					->where('g_status','1')
					->get()->result();
   }
   function get_gtype()
   {
	return $this->db->select('*')
                    ->from('gallery_type')
					->where('gt_status','1')
					->get()->result();
   }
    function get_video()
   {
	return $this->db->select('*')
                ->from('video')
				->where('v_status','1')
				
				->get()->result();
   }
     function get_testmonial()
   {
	return $this->db->select('*')
                ->from('testimonials')
				->where('t_status','1')
				
				->get()->result();
   }
   function get_client()
   {
	return $this->db->select('*')
                ->from('client')
				->where('c_status','1')
				->get()->result();
   }
   
   function get_productid($pt_id)
   {
	return $this->db->select('*')
                ->from('sub_product')
				->where('pt_id',$pt_id)
				->where('p_status','1')
				->get()->result();
   }
     function get_product()
   {
	return $this->db->select('*')
                ->from('sub_product')
				->where('p_status','1')
				
				->get()->result();
   }
   function get_product_random()
   {
	return $this->db->select('*')
                ->from('sub_product')
				->where('p_status','1')
				->order_by('p_id','random')
				->limit(4)
				->get()->result();
   }
    function getsub_products()
   {
    return $this->db->select('*')                    
                    ->from('sub_product')
					->where('p_status','1')
					->get()->result();
   }
    function getsub_products_id($p_id)
   {
    return $this->db->select('*')                    
                    ->from('sub_product')
					->where('p_status','1')
					->where('p_id',$p_id)
					
                    ->get()->result();
   }
  function get_news()
   {
	return $this->db->select('*')
                ->from('news')
				->where('n_status','1')
				
				->get()->result();
   }
   function get_news_id($n_id)
   {
	return $this->db->select('*')
                ->from('news')
				->where('n_status','1')
				->where('n_id',$n_id)
				->get()->result();
   }
   function get_pdf()
   {
	return $this->db->select('*')
                ->from('pdf')
				->where('p_status','1')
				
				->get()->result();
   }
}
?>