application/controllers/Upload.php
//function to display files of a user
function to display files of a user
function to display files of a user
public function files($username)
	{
		if($this->session->userdata('logged') == true && $this->session->userdata('username') == $username)
		{
			$data = $this->upload_model->user_files();
			$info = array('info' => $data);
			$this->load->view('files_view', $info);
		}
		else
		{
			redirect();
		}
	}
public function files ( $ username ) { if ( $ this -> session -> userdata ( 'logged' ) == true && $ this -> session -> userdata ( 'username' ) == $ username ) { $ data = $ this -> upload_model -> user_files ( ) ; $ info = array ( 'info' => $ data ) ; $ this -> load -> view ( 'files_view' , $ info ) ; } else { redirect ( ) ; } }
function to display files of a user
function to display files of a user
//if the user is logged and his username if the same as the profile he's trying to access //get the files of this user //show the files view //else redirect to the index