Exemplo n.º 1
0
     //header('Location: /News/News.php?preview=true');
     //exit;
 } else {
     if (isset($_POST['button_resetParameters'])) {
         $value = $newsController->startOverPage();
     } else {
         if (isset($_POST['button_clearSession'])) {
             unset($_SESSION['impactType']);
             unset($_SESSION['hotelType']);
             unset($_SESSION['hotelLocation']);
             $value = "<b>Successful</b>.<br />Parameters for this session have been removed.";
             $table = $newsController->getTable($_SESSION['news_id'], null, null, null);
             $value .= $newsController->CreatePage_admin($_SESSION['game_id'], $_SESSION['period'], $_SESSION['article'], $table . $newsController->affectsParameters());
         } else {
             if (isset($_POST['button_clearDBParams'])) {
                 $value = $newsController->clearParameters($_SESSION['news_id']);
                 $table = $newsController->getTable($_SESSION['news_id'], $_SESSION['hotelType'], $_SESSION['hotelLocation'], $_SESSION['impactType']);
                 $value .= $newsController->CreatePage_admin($_SESSION['game_id'], $_SESSION['period'], $_SESSION['article'], $table . $newsController->affectsParameters());
             } else {
                 if (isset($_POST['button_addParameters'])) {
                     $article = "";
                     $counter = 0;
                     /*if(!isset($_SESSION['impactType']) || !isset($_SESSION['hotelLocation'])||!isset($_SESSION['hotelType']))
                     		{
                     			$_SESSION['impactType'] = array();
                     			$_SESSION['hotelLocation'] = array();
                     			$_SESSION['hotelType'] = array();
                     		}*/
                     if (!isset($_POST['impactType']) || !isset($_POST['hotelType']) || !isset($_POST['hotelLocation'])) {
                         $value .= "<b>Failed</b>.<br />You had unset values";
                     } else {