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