/** * This method initialize the current language and the current step * */ private function init() { //get the current post-request and check if the language was given by POST $s_post = \Globals::get('_POST'); if (!is_null($s_post['game_language'])) { \Session::get_session()->set_value('language', $s_post['game_language']); } //Initialize the I18N-Class for templates-usage \I18N::init(); //if we have no language-value in the session, set the default install-language to ENGLISH if (is_null(\Session::get_session()->get_value('language'))) { \I18N::set_language('en_EN'); } else { \I18N::set_language(\Session::get_session()->get_value('language')); } \Replacer::set_language(\I18N::get_language()); //set the current step by POST $this->i_step = $s_post['install_step']; }
define('WT_SCRIPT_NAME', 'site-offline.php'); // We use some PHP5.5 features, but need to run on older servers if (version_compare(PHP_VERSION, '5.4', '<')) { require WT_ROOT . 'includes/php_53_compatibility.php'; } require 'vendor/autoload.php'; // This script does not load session.php. // session.php won’t run until a configuration file and database connection exist... // This next block of code is a minimal version of session.php define('WT_WEBTREES', 'webtrees'); define('WT_BASE_URL', ''); define('WT_ROOT', ''); define('WT_DATA_DIR', realpath('data') . DIRECTORY_SEPARATOR); define('WT_MODULES_DIR', 'modules_v3/'); Session::start(); define('WT_LOCALE', I18N::init()); if (file_exists(WT_DATA_DIR . 'offline.txt')) { $offline_txt = file_get_contents(WT_DATA_DIR . 'offline.txt'); } else { // offline.txt has gone - we're back online! header('Location: index.php'); return; } http_response_code(503); header('Content-Type: text/html; charset=UTF-8'); echo '<!DOCTYPE html>', '<html ', I18N::htmlAttributes(), '>', '<head>', '<meta charset="UTF-8">', '<title>', WT_WEBTREES, '</title>', '<meta name="robots" content="noindex,follow">', '<style type="text/css"> body {color: gray; background-color: white; font: 14px tahoma, arial, helvetica, sans-serif; padding:10px; } a {color: #81A9CB; font-weight: bold; text-decoration: none;} a:hover {text-decoration: underline;} h1 {color: #81A9CB; font-weight:normal; text-align:center;} li {line-height:2;}
// BLAETTERN ANFANG if (isset($_GET['seite'])) { $seite = intval($_GET['seite']); } else { $seite = 1; } $eintraege_pro_seite = 15; // ANGEBEN DER BEITRAEGE PRO SEITE $start = $seite * $eintraege_pro_seite - $eintraege_pro_seite; // ERMITTELN DER STARTZAHL FÜR DIE ABFRAGE // BLAETTERN ENDE require_once './classes/I18N.php'; if (isset($_GET['setLocale'])) { I18N::changeLanguage($_GET['setLocale']); } I18N::init('messages', './i18n', 'en_US', array('/^de((-|_).*?)?$/i' => 'de_DE', '/^en((-|_).*?)?$/i' => 'en_US', '/^es((-|_).*?)?$/i' => 'es_ES')); // INFO-BOXEN-ARRAY ANFANG $showInfoBox = array(); function addInfoBox($text) { global $showInfoBox; $showInfoBox[] = trim($text); } function setTaskDone($shortName) { global $prefix, $cookie_id, $cookie_team; if ($_SESSION['hasLicense'] == 0 && $cookie_team != '__' . $cookie_id) { $taskDone1 = "INSERT INTO " . $prefix . "licenseTasks_Completed (user, task) VALUES ('" . $cookie_id . "', '" . mysql_real_escape_string(trim($shortName)) . "')"; $taskDone2 = mysql_query($taskDone1); if ($taskDone2 != FALSE) { addInfoBox(__('Herzlichen Glückwunsch, Du hast gerade einen weiteren Teil deiner %1$s abgeschlossen!', '<a class="inText" href="/managerPruefung.php">' . _('Manager-Prüfung') . '</a>'));