Example #1
0
    {
        $project = $this->projectrepository->get_by_id($_GET['p_id']);
        include_once ROOT_PATH . 'profile/views/container.php';
    }
    public function error_page()
    {
        include_once ROOT_PATH . 'profile/views/error_page.php';
    }
}
$project_controller = new ProjectController();
if (isset($_GET['id'])) {
    $user_profile_id = $_GET['id'];
    $user = NULL;
    if (isset($_GET['p_id'])) {
        $p_id = $_GET['p_id'];
        $project_controller->selectProject($user_profile_id, $p_id);
    }
    if (isset($_SESSION['user_hash'])) {
        $user = $_SESSION['user_hash'];
    }
    switch ($user_profile_id) {
        case $user:
            if ($_SESSION['user_type'] == "organization") {
                if (isset($_GET['m'])) {
                    $method = $_GET['m'];
                    switch ($method) {
                        case 'add':
                            $project_controller->add();
                            break;
                        case 'save':
                            $project_controller->save();