<?php

class View_data extends CI_Model
{

    function getprofile()
    {
        return $this->db->select('*')
                    ->from('company_profile')
                    ->get()->result();
    }

   function get_images($s_id)
   {
    return $this->db->select('*')
                    ->from('add_image')
					->where('a_status','1')
					->where('s_id',$s_id)
                    ->get()->result();
   }
	function all_images()
   {
    return $this->db->select('*')
                    ->from('add_image')
					->where('a_status','1')
                    ->get()->result();
   }

    function getslider()
    {
        return $this->db->select('*')
                    ->from('slider')
                    ->get()->result();
    }

    function get_enquiry()
    {
        return $this->db->select('*')
                    ->from('enquiry')
                    ->get()->result();
    }

 function get_slider_id($s_id)
 {
      return $this->db->select('*')
                    ->from('slider')
					->where('s_status','1')
					->where('s_id',$s_id)

                    ->get()->result();
 }

	function about()
    {
        return $this->db->select('*')
                    ->from('about')
                    ->get()->result();

    }

	function password()
    {
        return $this->db->select('*')
                    ->from('user')
                    ->get()->result();

    }

	function article()
    {
        return $this->db->select('*')
                    ->from('articles')
                    ->get()->result();

    }

	function article_id($a_id)
    {
        return $this->db->select('*')
                    ->from('articles')
					->where('a_id',$a_id)
                    ->get()->result();

    }

	function get_vission()
    {
        return $this->db->select('*')
                    ->from('pages')
					->where('p_name','Vission')
                    ->get()->result();

    }
	function get_case()
    {
        return $this->db->select('*')
                    ->from('pages')
					->where('p_name','Case Study')
                    ->get()->result();

    }

   function get_gallery()
   {
    	return $this->db->select('*')
                        ->from('gallery')
    					->where('g_status','1')
    					->get()->result();
   }
    function get_gallery_random()
   {
	return $this->db->select('*')
                    ->from('gallery')
					->where('g_status','1')
					->order_by('g_id','random')
					->limit(6)
					->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_video_random()
   {
	return $this->db->select('*')
                ->from('video')
				->where('v_status','1')
				->order_by('v_id','random')
				->limit(3)
				->get()->result();
   }
     function get_testmonial()
   {
	return $this->db->select('*')
                ->from('testimonials')
				->where('t_status','1')

				->get()->result();
   }
   function get_test_random()
   {
	return $this->db->select('*')
                ->from('testimonials')
				->where('t_status','1')
				->order_by('t_id', 'random')
				->limit(12)
				->get()->result();
   }
   
   function get_testmonial_id($t_id)
   {
	return $this->db->select('*')
                ->from('testimonials')
				->where('t_status','1')
				->where('t_id', $t_id)
				->get()->result();
   }
   
   function get_client()
   {
	return $this->db->select('*')
                ->from('client')
				->where('c_status','1')
				->get()->result();
   }

     function get_product()
   {
	return $this->db->select('*')
                ->from('product')
				->where('p_status','1')
				->get()->result();
   }
   function get_project()
   {
	return $this->db->select('*')
                ->from('projects')
				->where('p_status','1')
				->get()->result();
   }
   function get_project_random()
   {
	return $this->db->select('*')
                ->from('projects')
				->where('p_status','1')
				->order_by('p_id','random')
				->limit(4)
				->get()->result();
   }

   function get_product_random()
   {
	return $this->db->select('*')
                ->from('product')
				->where('p_status','1')
				->order_by('p_id','random')
				->limit(9)
				->get()->result();
   }

    function get_product_id($p_id)
   {
    return $this->db->select('*')
                    ->from('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();
   }
}
?>
