
<?php
	
	
require_once APPPATH."controllers/Secure_area.php";

	class Myprofile   extends  Secure_area {
		
		function __construct() {
			// Call the Model constructor
			parent::__construct();
			$this->load->database();
			$this->load->library('session');
			$this->load->helper('form');
			$this->load->library('form_validation');
			$this->load->model('ProfileModel');
			
			$this->load->helper('url');
			$this->load->library('parser');
			//$this->load->library('encrypt');
			
		}
		
		 
		public	function editProfile() {
				echo 	  $login_id = $this->session->userdata('login_id');
				$data['profile_data']  = $this->ProfileModel->getProfile($login_id); 
				$this->load->view('editProfile', $data);
			}
		
		
		
		
	public	function save_update_profile() {
		$login_id=$_SESSION['login_id'];
				
			 $super_name = $this->input->post("super_name");
			$super_email_id = $this->input->post("super_email_id");
			$super_contact = $this->input->post("super_contact");
			$userName = $this->input->post("userName");
			$password = $this->input->post("password");
			 
			$res = $this->ProfileModel->save_update_profile($super_name,$super_email_id,$super_contact,$userName,$password,$login_id);
		
		}
		
		
	}
	
?>	