HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/public_html/m.beatleanalytics.com/application/controllers/Customer.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Customer extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see https://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		$alldata = array();
		$this->load->model('Customer_model');
		
		if(isset($_SESSION['userId'])){
			//if( preg_match('/m.beatle/', $_SERVER['HTTP_HOST'])){
				$tokenID = $this->session->userdata('tokenID');
				redirect('index.php/customer/search_home?token='.$tokenID);
			//}
		}
		
		$type_ = $this->input->post('type_');
		
		if($type_ == 'login') {
		

			//$this->load->model('Survey_model');
			$this->load->model('Admin_model');

			$username = $this->input->post('endusername');
			$password = $this->input->post('password_');
			$dataUsesr  = $this->Customer_model->endUserLogin($username,$password);
			if (!empty($dataUsesr))
			{
				$dataUsesrId = $dataUsesr[0]->userId;  
				$sessiondata = $this->session->set_userdata('userId',$dataUsesrId);
				$tokenID  = md5(date("YmdHis")."_".rand(999999,100000));
				$this->session->set_userdata('tokenID',$tokenID);
				$tokenID = $this->session->userdata('tokenID');
				redirect('index.php/customer/search_home?token='.$tokenID);
			}
			else 
			{
				$alldata['error_masg']  = 'Username or password does not match, please try again';
			}
		}
		
		else if ($type_ == 'registration')
		{
			$this->load->model('Customer_model');
			$this->load->model('Admin_model');

			$username = $this->input->post('endusername');
			$password = $this->input->post('password');
			
			$pass = md5($password);
			$status = '1';
			$date	= date('Y-m-d H:i:s');
			$uniq = rand(999999,1999999);
			$unqId = 'END_'.$uniq;
			$usertype = 'End_user';
			$insertdata = array 
			(
				'db_userRandId' => $unqId,
				'db_phone'		=> $username,
				'db_password'	=> $pass,
				'created_date'	=> $date,
				'db_usertype'	=> $usertype,
				'IndustryID'	=>  0,
				'OrgID'	=>  0,
				'BranchID'	=>  0
				
			);
			
			$result_  = $this->Customer_model->SignUpUserLogin($insertdata,$username);
			
			if ($result_ == 'yes')
			{
				$dataUsesr  = $this->Customer_model->endUserLogin($username,$password);
				$dataUsesrId = $dataUsesr[0]->userId;  
				$sessiondata = $this->session->set_userdata('userId',$dataUsesrId);
				$tokenID  = md5(date("YmdHis")."_".rand(999999,100000));
				$this->session->set_userdata('tokenID',$tokenID);
				$tokenID = $this->session->userdata('tokenID');
				redirect('index.php/customer/search_home?token='.$tokenID);
			}
			else if ($result_ == 'no') 
			{
				$alldata['error_masg']  = 'Here is something wrong to insert data, please try again.';
			}
			else 
			{
				$alldata['error_masg']  = 'Phone number allerady taken, please try again with different phone no.';
			}
		}
		
		$this->load->view('customer/userLogin' , $alldata);
	}
	
	public function profile()
	{
		$this->load->model('Customer_model');
		$returnData = array();
		
		$rsData = $this->Customer_model->LoadCustomerData();
		$returnData['user_info'] = $rsData;
		
		$type_ = $this->input->post('type_');
		
		
		
		if($type_ == 'profilesubmit'){
		
		$updateArr = array();
		
		

		$moveProfilePath = '../newdemo.beatleanalytics.com/assets/customer/img/';
		$sourceProfilePath = 'http://localhost/newdemo.beatleanalytics.com/assets/customer/img/';
		$copyProfilePath = '../owner.beatleanalytics.com/documents/local/webprofileimages/';
		
		if($_SERVER['HTTP_HOST'] != '192.168.2.103' && $_SERVER['HTTP_HOST'] != '192.168.2.105' && $_SERVER['HTTP_HOST'] != 'localhost' && $_SERVER['HTTP_HOST'] != 'kalpeshpc'){
			if( preg_match('/m.beatle/', $_SERVER['HTTP_HOST'])){
				$moveProfilePath = '../m.beatleanalytics.com/assets/customer/img/';
				$sourceProfilePath = 'http://m.beatleanalytics.com/assets/customer/img/';
				$copyProfilePath = '/home/beatleall/manage.beatleanalytics.com/documents/manage/webprofileimages/';
			}else if(preg_match('/admin.beatle/', $_SERVER['HTTP_HOST'])){
				$moveProfilePath = '../m.beatleanalytics.com/documents/assets/customer/img/';
				$sourceProfilePath = 'http://m.beatleanalytics.com/documents/assets/customer/img/';
				$copyProfilePath = '/home/beatleall/manage.beatleanalytics.com/documents/owner/webprofileimages/';
			}else if(preg_match('/newdemo.beatle/', $_SERVER['HTTP_HOST'])){
				$moveProfilePath = '../newdemo.beatleanalytics.com/assets/customer/img/';
				$sourceProfilePath = 'http://newdemo.beatleanalytics.com/assets/customer/img/';
				$copyProfilePath = '/home/beatleall/owner.beatleanalytics.com/documents/owner/webprofileimages/';
			}
		}
		define('MOVE_PATH',$moveProfilePath);
		define('COPY_PATH',$copyProfilePath);
		define('SOURCE_PATH',$sourceProfilePath);
	

				
			
		//	echo "<pre>";
		//	print_r($_REQUEST);
		//	print_r($_FILES);
		//	echo "</pre>";

			$filename = date("YmdHis")."_".rand(10000000,999999999);
			
			if (!empty($_FILES['profilepic']['name']))
			{
					$imageFileType = pathinfo($_FILES['profilepic']['name'],PATHINFO_EXTENSION);
					if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" ) 
					{
						return 'img_ext_error';
						exit;
					}
					else 
					{
						$filename = $filename.".".$imageFileType;
						$filename1 = MOVE_PATH.$filename;
						if(move_uploaded_file($_FILES['profilepic']['tmp_name'],$filename1)) {
							
							echo "MOVED <br />";
							if(copy(SOURCE_PATH."".$filename,COPY_PATH."".$filename))
							{
								$updateArr['webprofileimage'] = $filename;
								echo "COPIED <br />";
								unlink($filename1);
							}else
							echo "ERROR COPIED <br />";
						}
						else {
							echo "ERROR MOVED <br />";
						}
						
					}
			}
			
			
			$name = $this->input->post('name');
			$email = $this->input->post('email');
			$address = $this->input->post('address');
			$pincode = $this->input->post('pincode');
			$state = $this->input->post('state');
			$city = $this->input->post('city');
			
			
			$updateArr['db_username'] = $name;
			$updateArr['db_email'] = $email;
			$updateArr['db_address'] = $address;
			$updateArr['db_pincode'] = $pincode;
			$updateArr['db_state'] = $state;
			$updateArr['db_city'] = $city;
			
			$emailValidate = $this->Customer_model->checkEmailExist($email);
			if($emailValidate == 'Y'){
				$returnData['error_masg']  = 'Email allerady taken, please try again with different email address.<br /><br />';
			}else{
				$this->Customer_model->UpdateCustomerData($updateArr);	
				$returnData['success_masg']  = 'Profile data updated successfuly. <br /><br />';
			}
		}
		
		$this->load->view('customer/profile' , $returnData);
	}
	
	public function fetchCityDataAjax(){
			
			$stateid = $this->uri->segment(3);
			$this->load->database();
			$select = $this->db->get_where("cities" , array("state_id"=>$stateid));
			$rsState = $select->result();
			
			$html = '';
			if(count($rsState) > 0) {
				foreach($rsState as $sKey => $sVal) {
					$html .= '<option value="'.$sVal->id.'">'.$sVal->name.'</option>';
				}
			}else{
				$html .= '<option value="0">No any city found</option>';
			}
			echo $html;
		}
	

	public function change_password()
	{
		$this->load->model('Customer_model');
		
		$this->load->view('customer/change_password' , array());
	}
	
	public function offers()
	{
		$this->load->model('Customer_model');
		
		$alldata = array();
		$alldata['offerdata'] = $this->Customer_model->fetchOffersData();
		
		$action = $this->uri->segment(3);
		if($action == 'details'){
			unset($alldata['offerdata']);
			$offerid = $this->uri->segment(4);
			$alldata['offerdetails'] = $this->Customer_model->fetchOfferUsingOfferid($offerid);
		}else if($action == 'offerapply'){
			$offerid = $this->uri->segment(4);
			unset($alldata['offerdata']);
			$rsOfferApplied = $this->Customer_model->fetchAppliedOfferDataByCustomer($offerid);
			
			if(count($rsOfferApplied) == 0){
				
				$rsOfferData = $this->Customer_model->fetchOfferUsingOfferid($offerid);
				$orgid  = $rsOfferData[0]->orgid;
				
				$tokenid = $this->Customer_model->GeneratePassword(6);
				$userid = $this->session->userdata('userId');
				$expire_time = date("Y-m-d H:i:s",strtotime("+1 hour"));
				$added_date = date("Y-m-d H:i:s");
				$insertData = array();
				$insertData['offerid'] = $offerid;
				$insertData['userid'] = $userid;
				$insertData['orgid'] = $orgid;
				$insertData['added_date'] =  $added_date;
				$insertData['expire_time'] = $expire_time;
				$insertData['cancel'] = 'N';
				$insertData['approved'] = 'N';
				$insertData['tokenid'] = $tokenid;
				
				$result  = $this->Customer_model->insertOfferAppliedDataToCustomer($insertData);
				$alldata['offerappliedsuccessfully'] = array('tokenid' => $tokenid,'inserted'=>'Y','intime','Y','sessionexpired' => 'N','expire_time'=>$expire_time,'added_date'=>$added_date);
				//redirect('index.php/customer/offers/offerappliedsuccessfully/'.$tokenid);
				//exit;
			}else {
				
				$alldata['offerappliedsuccessfully'] = array(
				'tokenid' => $rsOfferApplied[0]->tokenid,
				'inserted'=>'N',
				'intime','Y',
				'sessionexpired' => 'N',
				'expire_time'=>$rsOfferApplied[0]->expire_time,
				'added_date'=>$rsOfferApplied[0]->added_date,
				);
			
			}
		}
		else if($action == 'fetchcurrenttime'){
			echo strtotime(date("Y-m-d H:i:s"));
			exit;
		}
		$this->load->view('customer/offers' , $alldata);
	}
	
	public function search_home()
	{
		$this->load->model('Customer_model');
		$this->load->view('customer/search_home' , array());
		
		
		
	}
	
	public function orderprocess()
	{
		
		//echo "<pre>";
		$this->load->model('Customer_model');
		$this->load->model('Admin_model');
		$alldata = array();
		$prodid = $this->uri->segment(3);
		$type_ = $this->input->post("type_");
		
		if(!empty($prodid)){
			$rsProduct = $this->Admin_model->getAllProductsData($prodid);
			$alldata['product_data'] = $rsProduct;
			
			$userid = $this->session->userdata('userId');
			
			$rsUser = $this->Admin_model->getuserdata($userid);
			$alldata['user_data'] = $rsUser;
		}
		
		if($type_ == 'neworder'){
			
			$stateid = $this->input->post("state");
			$cityid = $this->input->post("city");
			
			$rsState = $this->Customer_model->fetchStateDataIndividual($stateid);
			
			$rsCity = $this->Customer_model->fetchCityDataIndividual($cityid);
			
			
			// code to fetch all post data
			$proid = $this->input->post("proid");
			$prodname = $this->input->post("prodname");
			$prodimage = $this->input->post("prodimage");
			$name = $this->input->post("name");
			$contact_number = $this->input->post("contact_number");
			$email = $this->input->post("email");
			$address = $this->input->post("address");
			$pincode = $this->input->post("pincode");
			$state = $rsState[0]->name;
			$city = $rsCity[0]->name;
			$status = "ordered";
			$created_date = date("Y-m-d H:i:s");
			$isreturn = 'N';
			
			// all post data set into array
			$insertArr = array();
			$insertArr['productid']	= $proid;	
			$insertArr['productname']	= $prodname;	
			$insertArr['quantity']	= 1;
			$insertArr['userid']	= $userid;
			$insertArr['username']	= $name;	
			$insertArr['phoneno']	= $contact_number;	
			$insertArr['email']	= $email;	
			$insertArr['address']	= $address;	
			$insertArr['pincode']	= $pincode;	
			$insertArr['state']	= $state;	
			$insertArr['city']	= $city;	
			$insertArr['status']	= $status;	
			$insertArr['created_date']	= $created_date;	
			$insertArr['isreturn']	= $isreturn;
			$insertArr['prod_image']	= $prodimage;
			$insertArr['viewbyadmin']	= "N";
			//print_r($insertArr);
			
			
			// insert order into database
			$rsInserted = $this->Customer_model->insertOrderData($insertArr);
			$orderid = $this->db->insert_id();
			
			
			// code to update unique id
			$uid = str_pad($orderid, 5, "0", STR_PAD_LEFT);
			$updateArr = array();
			$updateArr['orderuid'] = $uid;
			$this->Customer_model->UpdateOrderUniqueID($orderid,$updateArr);
			
			
			// code to update stock
			$stk = $rsProduct[0]->stock - 1;
			$updateStockArr = array();
			$updateStockArr['stock'] = $stk;
			$this->Customer_model->UpdateProductStockQuantity($prodid,$updateStockArr);	
			
			// insert data into beatle_point
			$insertPointArr = array();
			$insertPointArr['Amount'] =  $rsProduct[0]->points;
			$insertPointArr['AddedDate'] =  $created_date;
			$insertPointArr['OrderID'] =  $orderid;
			$insertPointArr['UserID'] =  $userid;
			$insertPointArr['UserType'] =  "End_user";
			$insertPointArr['IsRedeem'] =  "Y";
			$this->Customer_model->insertPointData($insertPointArr);
			$alldata['for'] = 'orderdone';
			redirect('index.php/customer/thankyou/orderdone/'.$uid.'/');
			exit;
		}
		
		
		$this->load->view('customer/orderprocess' , $alldata);
	}
	
	public function product_list()
	{
		$this->load->model('Admin_model');
		$this->load->model('Customer_model');
		$returnData = array();
		$rsProducts = $this->Admin_model->getAllProductsData("");
		
		$returnData['productList'] = $rsProducts;
		
		$this->load->view('customer/product_list' , $returnData);
	}
	
	public function bonus_point()
	{
		$this->load->model('Customer_model');
		$returnData = array();
		$data = $this->Customer_model->fetchMyBonusPoint();
		$returnData['my_bonus_point'] = $data;
		
		$pointDetails = $this->Customer_model->fetchMyBonusPointDetails();
		$returnData['my_bonus_point_details'] = $pointDetails;
		
		
		$this->load->view('customer/bonus_point' , $returnData);
	}
	
	public function order()
	{
		$this->load->model('Customer_model');
		$returnData = array();
		$data = $this->Customer_model->fetchMyOrders();
		$returnData['order_data'] = $data;
		
		$this->load->view('customer/order' , $returnData);
	}
	
	
	
	
	/*
	
	public function home()
	{
		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		$indId = 	$this->session->userdata('LoginIndid');
		$alldata['LimeData'] = $this->Admin_model->getAllUserByIndustryId($indId);
		$Orgid = $alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] = $this->Admin_model->getOrganizationById($Orgid);
		
		if (isset($_POST['storySubmit']))
		{
			redirect('index.php/customer/end_user_login');
		}
		$this->load->view('customer/home' , $alldata);
	} 
	*/
	
	/*
	public function end_user_login()
	{

		
		// while customer allready logged in 
		//if(isset($_SESSION['tokenID']) &&  isset($_SESSION['tokenID'])){
		//	$tokenID = $this->session->userdata('tokenID');
		//	redirect('index.php/customer/feedback?token='.$tokenID);
		// }
		
		
		
		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		$indId = 	$this->session->userdata('LoginIndid');
		$alldata['LimeData'] = $this->Admin_model->getAllUserByIndustryId($indId);
		$Orgid = $alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] = $this->Admin_model->getOrganizationById($Orgid);
		$token = $this->input->post('token');

		if (isset($_POST['userSubmit']) && empty($token))
		{
			$username = $this->input->post('endusername');
			$password = $this->input->post('enduserpassword');
			$dataUsesr  = $this->Survey_model->endUserLogin($username,$password);
			//print_r($dataUsesr);die;
			if (!empty($dataUsesr))
			{
				$dataUsesrId = $dataUsesr[0]->userId;  
				$sessiondata = $this->session->set_userdata('userId',$dataUsesrId);
				$tokenID  = md5(date("YmdHis"));
				$this->session->set_userdata('tokenID',$tokenID);
				$tokenID = $this->session->userdata('tokenID');
				redirect('index.php/customer/feedback?token='.$tokenID);
			}
			else 
			{
				$alldata['error_masg']  = 'Username or Password Does Not Match Please Confirm Your Username Or Password Again';
			}
		}
		 
		
		$this->load->view('customer/userLogin' , $alldata);
	} */
	/*
	public function usersignup()
	{
		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		$indId = 	$this->session->userdata('LoginIndid');
		$alldata['LimeData'] = $this->Admin_model->getAllUserByIndustryId($indId);
		$BranchID = $alldata['LimeData'][0]->db_bracnchid;
		$Orgid = $alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] = $this->Admin_model->getOrganizationById($Orgid);
		$token = $this->input->post('token');

		if (isset($_POST['userSubmit']))
		{
			$enduseremail = $this->input->post('enduseremail');
			$endusermobile = $this->input->post('endusermobile');
			$endpassword = $this->input->post('endpassword');
			$pass = md5($endpassword);
			$status = '1';
			$date	= date('Y-m-d H:i:s');
			$uniq = rand(1,1000);
			$unqId = 'END_'.$uniq;
			$usertype = 'End_user';
			$insertdata = array 
			(
				'db_userRandId' => $unqId,
				'db_email'		=> "",
				'db_phone'		=> $endusermobile,
				'db_password'	=> $pass,
				'created_date'	=> $date,
				'db_usertype'	=> $usertype,
				'IndustryID'	=>  $indId,
				'OrgID'	=>  $Orgid,
				'BranchID'	=>  $BranchID
				
			);
			
			$alldata  = $this->Survey_model->SignUpUserLogin($insertdata,$enduseremail);
			if ($alldata == 'yes')
			{
				redirect('index.php/customer/end_user_login');
			}
			else if ($alldata == 'no') 
			{
				$alldata['error_masg']  = 'Some Problum In Insert Data';
			}
			else 
			{
				$alldata['error_masg']  = 'Username or Password Already Exists';
			}
		}
		
		$this->load->view('customer/usersignup' , $alldata);
	} */
	
	/*
	public function feedback()
	{

		if(!isset($_SESSION['userId']) || !isset($_SESSION['tokenID']))
		redirect('index.php/customer/end_user_login');
				
		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		$indId		= 	$this->session->userdata('LoginIndid');
		$userid = 	$this->session->userdata('userId');
		$alldata['LimeData'] = $this->Admin_model->getAllUserByIndustryId($indId);
		$Orgid = $alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] = $this->Admin_model->getOrganizationById($Orgid);
		$alldata['Loginuserdata'] = $this->Admin_model->getuserdata($userid);
		//print_r($alldata['orgdata']);
		
		$this->load->view('customer/feedback' , $alldata);
	} */
	
	/* public function userfeedback_question(){

		if(!isset($_SESSION['userId']) || !isset($_SESSION['tokenID']))
		redirect('index.php/customer/end_user_login');
		

		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		$indId		 		 		= 	$this->session->userdata('LoginIndid');
		$userid 					= 	$this->session->userdata('userId');
		
		$alldata['LimeData'] 		= 	$this->Admin_model->getAllUserByIndustryId($indId);
		
		$Orgid 						= 	$alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] 		= 	$this->Admin_model->getOrganizationById($Orgid);
		$alldata['Loginuserdata'] 	= 	$this->Admin_model->getuserdata($userid);
		$alldata['Inddata']		  	= 	$this->Admin_model->getIndustryById($indId);
		
		$this->load->view('customer/userfeedback_question' , $alldata);		
		
	} */
	
	public function logout(){
		
		unset($_SESSION['userId']);
		unset($_SESSION['tokenID']);
		
		redirect('index.php/customer');
	}
	
	/* 
	public function summery(){

		if(!isset($_SESSION['userId']) || !isset($_SESSION['tokenID']))
		redirect('index.php/customer/end_user_login');
		


		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		
		$indId		 		 		= 	$this->session->userdata('LoginIndid');
		$userid 					= 	$this->session->userdata('userId');
		
		$alldata['LimeData'] 		= 	$this->Admin_model->getAllUserByIndustryId($indId);
		
		$Orgid 						= 	$alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] 		= 	$this->Admin_model->getOrganizationById($Orgid);
		$alldata['Loginuserdata'] 	= 	$this->Admin_model->getuserdata($userid);
		$alldata['Inddata']		  	= 	$this->Admin_model->getIndustryById($indId);
		$this->session->userdata('LoginIndid');
		
		$alldata['userPhoneNo']		  	= 	$this->Admin_model->getUserPhoneNo($this->session->userdata('userId'),$this->session->userdata('tokenID'));
		
		$this->load->view('customer/summery' , $alldata);
		
		
	} */
 
	/* 
	public function userfeedback()
	{
		
		if(!isset($_SESSION['userId']) || !isset($_SESSION['tokenID']))
		redirect('index.php/customer/end_user_login');

		
		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		$indId		 		 		= 	$this->session->userdata('LoginIndid');
		$userid 					= 	$this->session->userdata('userId');
		
		$alldata['LimeData'] 		= 	$this->Admin_model->getAllUserByIndustryId($indId);
		
		$Orgid 						= 	$alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] 		= 	$this->Admin_model->getOrganizationById($Orgid);
		$alldata['Loginuserdata'] 	= 	$this->Admin_model->getuserdata($userid);
		$alldata['Inddata']		  	= 	$this->Admin_model->getIndustryById($indId);
		
		$this->load->view('customer/userfeedback' , $alldata);
	}
	*/
	
	/*
	public function insertUserFeedback()
	{ 
		if(!isset($_SESSION['userId']) || !isset($_SESSION['tokenID']))
		redirect('index.php/customer/end_user_login');

		
		$this->load->model('Survey_model');
		
		
		
		$userid			= 	$_REQUEST['userid'];
		$LoginIndid 	= 	$_REQUEST['LoginIndid'];
		$pageid 		= 	$_REQUEST['pageid'];
		$pageConId 		= 	$_REQUEST['pageConId'];
		$avavalue 		= 	$_REQUEST['avavalue']; 
		
		$data = $this->Survey_model->insertUserFeedback($userid,$LoginIndid,$pageid,$pageConId,$avavalue);
		if (!empty($data))
		{
			echo 'yes';
		}
	}
	 */
	
	public function thankyou(){

		$this->load->model('Customer_model');
		$alldata = array();
		$this->load->view('customer/thankyou',$alldata);

	}
	
	/* 
	public function dailyreports(){


		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		
		$indId		 		 		= 	$this->session->userdata('LoginIndid');
		$userid 					= 	$this->session->userdata('userId');
		
		$rsSurveyData = $this->Admin_model->getAllOrgByIndustryId($indId);
		
		
		$userID 						= 	$rsSurveyData[0]->db_userid;
		$OrgID 						= 	$rsSurveyData[0]->OrgId;
		$BranchID 						= 	$rsSurveyData[0]->db_bracnchid;
		$PageID 						= 	$rsSurveyData[0]->db_pagesId;
		
		
		
		$alldata['rsSurveyData'] 		= 	$this->Admin_model->fetchLoginDataFrom($indId,$OrgID,$BranchID,$PageID);
		$alldata['orgdata'] 		= 	$this->Admin_model->getOrganizationById($OrgID);
		
		$alldata['pageData'] 		= 	$this->Admin_model->fetchPageIDDetails($PageID);
		
		
		
		//echo "<pre>";
		//print_r($alldata['rsSurveyData']);
		//echo "</pre>";
		
		$this->load->view('customer/dailyreports' , $alldata);		
		
	} 
	*/
	
	/* 
	public function createticket()
	{

		if(!isset($_SESSION['userId']) || !isset($_SESSION['tokenID']))
		redirect('index.php/customer/end_user_login');
		
		//echo "<pre>";
		//print_r($_POST);
		//print_r($_SESSION);

		
		
		$this->load->model('Survey_model');
		$this->load->model('Admin_model');
		$indId		= 	$this->session->userdata('LoginIndid');
		$userid = 	$this->session->userdata('userId');
		$alldata['LimeData'] = $this->Admin_model->getAllUserByIndustryId($indId);
		
		
		$Orgid = $alldata['LimeData'][0]->db_branchOrg;
		$alldata['orgdata'] = $this->Admin_model->getOrganizationById($Orgid);
		$alldata['Loginuserdata'] = $this->Admin_model->getuserdata($userid);
		
		if($this->input->post('actionfollow') == 'submitticket') {
			$tktid = $this->Admin_model->getLastTicketid();
			
			$indid = $alldata['LimeData'][0]->BranchID;
			$orgid = $alldata['LimeData'][0]->OrgID;
			$branchid = $alldata['LimeData'][0]->db_bracnchid;
			$indid = $alldata['LimeData'][0]->IndId;
			
			
			$alldata['lmData'] = $this->Admin_model->getLinemanagerByIndustryId($indId);
			
			$assign_usrid = $alldata['lmData'][0]->userId;
			$assignto_type = $alldata['lmData'][0]->db_usertype;
			
			
			$usertype	=	$alldata['Loginuserdata'][0]->db_usertype;
			$insertArr = array();
			
			$insertArr['userid']   		   = $userid;
			$insertArr['usertype'] 		 = $usertype;
			$insertArr['orgid'] 			= $orgid;
			$insertArr['branchid'] 		 = $branchid;
			$insertArr['indid'] 			= $indid;
			$insertArr['assignto'] 		 = $assign_usrid;
			$insertArr['assignto_type'] 	= $assignto_type;
			$insertArr['message']  		  = $this->input->post('message');
			$insertArr['forward']  		  = "N";
			$insertArr['status'] 		   = 'new';
			$insertArr['tokenid'] 		  = $this->session->userdata('tokenID');
			$insertArr['created_date'] 	 = date("Y-m-d H:i:s");
			$insertArr['level']  		    = 1;
			$insertArr['contentselection'] = serialize($_SESSION['ticketdata']);
			$insertArr['parentid']  		 = 0;
			$insertArr['id']  		       = $tktid;
			$insertArr['active']  		   = "Y";
			
			
			$returnArr = $this->Admin_model->insertTicketData($insertArr);
			
			if($returnArr[0] == 1){
				$alldata['messageid'] = $returnArr[0];
				$alldata['message'] = "Thank you for using ticket, your ticket no. <strong>".$returnArr[1]."</strong> has been submitted successfully.";
			}
			
			redirect ('index.php/customer/feedback?token='.$this->session->userdata('tokenID')."&msg=".$alldata['message']);
			
		}
		
		//echo "<pre>";
		//print_r($alldata);
		//echo "</pre>";
		
		$this->load->view('customer/createticket' , $alldata);
	}
	 */
	
}