application/controllers/Folder.php
//function to display the folder list
function to display the folder list
function to display the folder list
public function showFolders($username)
	{
		if($this->session->userdata('logged') == true && $this->session->userdata('username') == $username)
		{
			$data = $this->folder_model->get_folders($this->session->userdata('user_id'));
			$info = array('info' => $data);
			$this->load->view('folder_view', $info);
		}
		else
		{
			redirect();
		}
	}
public function showFolders ( $ username ) { if ( $ this -> session -> userdata ( 'logged' ) == true && $ this -> session -> userdata ( 'username' ) == $ username ) { $ data = $ this -> folder_model -> get_folders ( $ this -> session -> userdata ( 'user_id' ) ) ; $ info = array ( 'info' => $ data ) ; $ this -> load -> view ( 'folder_view' , $ info ) ; } else { redirect ( ) ; } }
function to display the folder list
function to display the folder list
//if the user is logged and his username if the same as the profile he's trying to access //get the list of folder already existing //show the folder view //else redirect to the index