<?PHP
//header('Refresh: 5'); 
 $session_data = $this->session->userdata('logged_in');

   
 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];

 $data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
		 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	
	 $data['branchid'] = $session_data['branchid'];
	 $branchid = $data['branchid'];		
	
  
								?>	


  
  <?php 
if($receipt=="One Without Automatic Logout"){
redirect('user/viewsales');

}else if($receipt=="One With Automatic Logout"){
	redirect('login');

 
}else  if($receipt=="Two Without Automatic Logout"){
	redirect('user/viewsales');

}else if($receipt=="Two With Automatic Logout"){
	redirect('login');

	}else if($receipt=="Three Without Automatic Logout"){
	redirect('user/viewsales');

}else if($receipt=="Three With Automatic Logout"){
	redirect('login');

}else{
	

	if($nextcounter==1){
			redirect("user/viewmysales?invoice=".$invoiceid."&myview=".$myview);

	
		}else{
			redirect('user/viewsales');

		}
	?>
			

	
<?php 	
}

?>
		  







