Exemplo n.º 1
0
    $_SESSION['hotelType'] = array();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (isset($_POST['button_viewStudent'])) {
    $isAdmin = false;
    //$value = "you're in student session if statement";
    if (!isset($email)) {
        $email = "fail";
    }
    $value = $newsController->student_news($email);
} else {
    if (isset($_POST['button_viewAdmin'])) {
        $isAdmin = true;
        $article = "";
        if (!isset($_SESSION['game_id'])) {
            $value = $newsController->chooseGame();
        } else {
            $value = $newsController->getTable($_SESSION['news_id'], $_SESSION['hotelType'], $_SESSION['hotelLocation'], $_SESSION['impactType']);
            $value = $newsController->CreatePage_admin($_SESSION['game_id'], $_SESSION['period'], $_SESSION['article'], $value . $newsController->affectsParameters());
        }
    } else {
        if (isset($_POST['button_saveAndPreview'])) {
            if (!isset($_POST['impactType']) || !isset($_POST['hotelType']) || !isset($_POST['hotelLocation'])) {
            } else {
                array_push($_SESSION['impactType'], $_POST['impactType']);
                array_push($_SESSION['hotelLocation'], $_POST['hotelLocation']);
                array_push($_SESSION['hotelType'], $_POST['hotelType']);
            }
            if (isset($_POST['textarea_news'])) {
                $article = $_SESSION['article'] = $_POST['textarea_news'];
            } else {