<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Create_account extends CI_Controller{ 	 

	function __construct(){ 
		parent::__construct();
		$this->data['success_msg']=$this->session->flashdata('success');
		$this->data['error_msg']=$this->session->flashdata('error');
		$this->data['top_title'] = $this->config->item('site_title');
		$this->load->model('User_mdl');
		$this->data['page_name']='';
 	}
	
	public function index(){
		$user_encrypt_id = $this->uri->segment(3);
		if(isset($user_encrypt_id) && $user_encrypt_id!=''){
			$status = $this->User_mdl->chk_user_availability_sts($user_encrypt_id);
 			if($status==1){
				$this->data['title']='Create your Account'; 
				$this->data['user_encrypt_id']=$user_encrypt_id; 
				$this->data['page_name']='create_account';
				$this->load->view('Frontend/create_account/view',$this->data);
			}else{
				echo 'user not found';
			}
		}
	}
	
	public function setup_account_entry(){
		echo $this->User_mdl->setup_account_entry();
	}
	
}