コード例 #1
0
    $_SESSION['impactType'] = array();
}
if (!isset($_SESSION['hotelLocation'])) {
    $_SESSION['hotelLocation'] = array();
}
if (!isset($_SESSION['hotelType'])) {
    $_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']);