require_once "include/basic.lib.php"; require_once "include/vote.html.php"; require_once "modules/Messages/Messages.php"; page_start(); // session expired? if (page_sessionExpired($params)) { page_error403("Sie waren für " . (int) (SESSION_MAX_LIFETIME / 60) . " Minuten oder mehr inaktiv. Letzte Aktion um " . date("H:i:s", $params->SESSION->lastAction . " Uhr.")); } else { $_SESSION['lastAction'] = time(); } // session valid? if (!page_sessionValidate($params, $config)) { page_error403(__FILE__ . ":" . __LINE__ . ": Session ist ungültig."); } // get modus $modus = page_getModus($params, $config); // get caves $caveID = $params->SESSION->caveID; $meineHoehlen = getCaves($params->SESSION->player->playerID); // no caves left if (!$meineHoehlen) { if (!in_array($modus, $config->noCaveModusInclude)) { $modus = NO_CAVE_LEFT; } } else { // caveID is not sent if ($caveID == NULL) { $temp = current($meineHoehlen); $caveID = $temp['caveID']; $_SESSION['caveID'] = $caveID; $params->SESSION->caveID = $caveID;
// session expired? if (page_sessionExpired()) { page_finish('inaktiv'); } else { $_SESSION['lastAction'] = time(); } // session valid? if (!page_sessionValidate()) { page_finish('wrongSessionID'); } // refresh user data page_refreshUserData(); // load template $template = new Template(); // get modus $modus = page_getModus(); // get caves $ownCaves = getCaves($_SESSION['player']->playerID); // no caves left if (!$ownCaves) { if (!in_array($modus, Config::$noCaveModusInclude)) { $modus = NO_CAVE_LEFT; } } else { $caveID = Request::getVar('caveID', 0); // Keine neue Höhle ausgewählt. if ($caveID == 0) { // Bereits eine Höhle mal ausgewählt? if (isset($_SESSION['caveID']) && isset($ownCaves[$_SESSION['caveID']])) { $caveID = $_SESSION['caveID']; // erste Höhle nehmen