Exemplo n.º 1
0
if (isset($_GET['id'])) {
    $user_profile_id = $_GET['id'];
    $user = NULL;
    if (isset($_SESSION['user_hash'])) {
        $user = $_SESSION['user_hash'];
    }
    switch ($user_profile_id) {
        case $user:
            if (isset($_GET['m'])) {
                $method = $_GET['m'];
                switch ($method) {
                    case 'edit':
                        $profile_controller->edit($_SESSION['user_id']);
                        break;
                    default:
                        $profile_controller->error_page();
                        break;
                }
            } else {
                $profile_controller->index($user_profile_id);
            }
            break;
        default:
            if (isset($_GET['m'])) {
                $profile_controller->error_page();
                exit;
            }
            $profile_controller->index($user_profile_id);
            break;
    }
} else {