
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Privacy_and_policy extends CI_Controller {


	private $cart_qty   = '' ;
	private $logged 	= 0  ;	
	private $user 		= '' ;
	
	
	public function __construct()
	{
		parent::__construct();
		
		$this->load->model('Db_model');
		
		$this->load->library('cart');
		
		$this->load->helper('basic_helper');
		
		$this->load->library('user_loginfunctions');
		
		$ic=0;
		foreach ($this->cart->contents() as $items):
		$ic++;
		endforeach;
		$this->cart_qty = ''.$ic.'';
		//$this->cart_qty = ''.$this->cart->total_items().'';
		
		if($this->session->userdata('shop_user2'))
		{
			$this->load->library('encrypt') ;
			$this->user = $this->encrypt->decode($this->session->userdata('shop_user2'));
			$this->logged = 1;
		}
		
		if($_COOKIE['username_m'] !='' && $_COOKIE['password_m']!='' )
		{	
		if($this->user_loginfunctions->mobile_log($_COOKIE['username_m'],$_COOKIE['password_m']))
		{
			// echo $_COOKIE['username_m'];
			$this->load->library('encrypt') ;
			$this->user = $_COOKIE['username_m'];
			$this->logged = 1;
		}	
		}
		
		
		
		
		
		
		
	}
	
	public function index()
	{		
		$data['result'] = array() ;
		$data['details']=array();
		$data['cart_qty'] = $this->cart_qty;
		$data['email'] = $this->user;
		$data['logged'] = $this->logged;
		$data['page'] = 'privacy' ;
		$data['title'] = 'Privacy Policy' ;
				
		$data['result'] = $this->Db_model->get_where_by_order('shop_category',array(),'order','asc') ;
		$data['about'] = $this->Db_model->get_where_by_order('shop_pages',array('type'=>'about','active'=>'Y'),'order','desc') ;
		$data['contactus'] = $this->Db_model->get_where_by_order('shop_contact',array('status'=>'1'),'id','desc') ;
		$product = $this->Db_model->get_all_by_order('shop_product','order','asc') ;
		if($product!==FALSE)
		{
			$data['product'] = $product;
		}
		
		$data['category']=$data['offer'] = $this->Db_model->get_all_by_order('shop_category','order','asc');
		
		$data['details1'] = $this->Db_model->get_where_by_order('shop_pages',array('active'=>'Y','type'=>'privacy_and_policy'),'order','asc') ;
		
		$details = $this->Db_model->get_where_by_order('shop_pages',array('active'=>'Y','type'=>'about'),'order','asc') ;
		
		if($details!==FALSE)
		{
			$data['details'] = $details ;
		}
		
	
		//$this->load->view('website/base_header');
		//$this->load->view('website/menu',$data);
		//$this->load->view('website/about',$data);
		//$this->load->view('website/right');
		//$this->load->view('website/footer');
		

	$this->load->view('website/header',$data);
	$this->load->view('website/menu',$data);
	//$this->load->view('website/banner',$data);
	$this->load->view('website/privacy',$data);
	$this->load->view('website/footer',$data);
		
	
	}
	
	

	

}
