if ($no_resource_flag) { tmpl_set($template, "NOTICKER", array('dummy' => "")); } if (!$no_resource_flag) { // ADDED by chris--- for ticker if ($params->SESSION->user['show_ticker']) { // Getting the last 20 messages $ticker_text = ticker_text(); tmpl_set($template, "/", array('ticker_text' => $ticker_text)); tmpl_set($template, "TICKER", array('ticker_text' => $ticker_text, 'link1' => TICKER_ENTRY, 'link2' => TICKER_ARCHIVE)); } else { tmpl_set($template, "NOTICKER", array('dummy' => "")); } $resources = array(); for ($i = 0; $i < sizeof($resourceTypeList); ++$i) { $delta = $meineHoehlen[$caveID][$resourceTypeList[$i]->dbFieldName . "_delta"]; if ($delta > 0) { $delta = "+" . $delta; } //echo formula_parseToPHP("{$resourceTypeList[$i]->maxLevel};", '$meineHoehlen[$caveID]')."<br>"; $maxlevel = round(eval('return ' . formula_parseToPHP("{$resourceTypeList[$i]->maxLevel};", '$meineHoehlen[$caveID]'))); $prozent = round(floor($meineHoehlen[$caveID][$resourceTypeList[$i]->dbFieldName]) / $maxlevel * 100, 0); $resources[$i] = array('dbFieldName' => $resourceTypeList[$i]->dbFieldName, 'name' => $resourceTypeList[$i]->name, 'amount' => floor($meineHoehlen[$caveID][$resourceTypeList[$i]->dbFieldName]), 'delta' => $delta, 'maxLevel' => $maxlevel, 'prozent' => $prozent); } tmpl_set($template, "RESOURCES/RESOURCE", $resources); } tmpl_set($template, "", array('cave_name' => $meineHoehlen[$caveID]['name'], 'cave_x_coord' => $meineHoehlen[$caveID]['xCoord'], 'cave_y_coord' => $meineHoehlen[$caveID]['yCoord'])); $gfx = $params->SESSION->nogfx ? DEFAULT_GFX_PATH : $params->SESSION->user['gfxpath']; echo str_replace('%gfx%', $gfx, tmpl_parse($template)); page_end();
$mydir = opendir('../lib'); while ($fn = readdir($mydir)) { if (substr($fn, -3) == 'php') { require_once "../lib/{$fn}"; } } closedir($mydir); require_once '../config.inc.php'; // Force HTTPS if required if (FORCE_SSL == 1 && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")) { $url = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; header("Location: https://{$url}"); } // Set PHP error level phamm_php_error_level(); $page_end = page_end(); $page_exit = page_exit(); // Set Log object $log = new PhammLog(); ///////////////////////////////////////////////////////////////// // Set language and locale $locale = new PhammLocale(); if (isset($_GET["language"])) { $locale->change_language($_GET["language"]); } setlocale(LC_ALL, $locale->get_language()); bindtextdomain("messages", "../locales"); textdomain("messages"); bind_textdomain_codeset("messages", "UTF-8"); // /////////////////////////////////////////////////////////////////