function __construct($TourId = 0) { $this->TourId = $TourId ? $TourId : ($this->TourId = $_SESSION['TourId']); if (!empty($_SESSION['ActiveSession'])) { $this->ActiveSessions = $_SESSION['ActiveSession']; } elseif ($tmp = Get_Tournament_Option('ActiveSession', '', $this->TourId)) { $this->ActiveSessions = $tmp; } }
<?php require_once dirname(__FILE__) . '/config.php'; require_once 'Common/GlobalsLanguage.inc.php'; require_once 'Common/Lib/CommonLib.php'; $json_array = array(); if (empty($_REQUEST['lang'])) { $ServerUrl = Get_Tournament_Option('ISK-Lite-ServerUrl', '', $CompId); foreach ($Lingue as $lang => $text) { if (!file_exists($CFG->LANGUAGE_PATH . $lang . '/ISK-Lite.php')) { continue; } $json_array[] = array('id' => $lang, 'name' => $text, 'md5' => md5_file($CFG->LANGUAGE_PATH . $lang . '/ISK-Lite.php'), 'urlFlag' => $ServerUrl . $CFG->ROOT_DIR . 'Common/Languages/' . $lang . '/' . $lang . '.png', 'urlFile' => $ServerUrl . $CFG->ROOT_DIR . 'Api/ISK-Lite/' . basename(__FILE__) . '?lang=' . $lang); } } elseif (preg_match('/^[a-z_0-9-]+$/sim', $_REQUEST['lang'])) { $json_array = getArrayLang($CFG->LANGUAGE_PATH . $_REQUEST['lang'] . '/ISK-Lite.php'); $json_array['MD5'] = md5_file($CFG->LANGUAGE_PATH . $_REQUEST['lang'] . '/ISK-Lite.php'); $json_array['LanguageName'] = $Lingue[$_REQUEST['lang']]; } // Return the json structure with the callback function that is needed by the app SendResult($json_array); function getArrayLang($file) { $lang = array(); include $file; return $lang; }
require_once 'Common/Lib/CommonLib.php'; $TourId = getIdFromCode($TourCode); $JS_SCRIPT[] = '<style>'; $JS_SCRIPT[] = 'body {color:#0F0F0F; background-color:#D0D0D0; font-size:30px;} @media screen { #PopupContent {background-color:#D0D0D0; } }'; $JS_SCRIPT[] = '</style>'; $JS_SCRIPT[] = '<script type="text/javascript" src="' . $CFG->ROOT_DIR . 'Common/Fun_JS.inc.js"></script>'; $JS_SCRIPT[] = '<script type="text/javascript" src="' . $CFG->ROOT_DIR . 'Common/ajax/ObjXMLHttpRequest.js"></script>'; $JS_SCRIPT[] = '<script type="text/javascript" src="Fun_AJAX_ShowFlags.js"></script>'; $JS_SCRIPT[] = '<script type="text/javascript">var TourCode="' . $TourCode . '";</script>'; // $JS_SCRIPT[]='<script type="text/javascript">var minHeight="'.$_SESSION['WINHEIGHT'] .'";</script>'; // $JS_SCRIPT[]='<script type="text/javascript">var minWidth="'.$_SESSION['WINWIDTH'] .'";</script>'; $ONLOAD = ' onload="GetFlags()"'; $BackColor = Get_Tournament_Option('AwardBackColor', '#d0d0d0'); $BackPhoto = $CFG->ROOT_DIR . 'TV/Photos/' . $TourCodeSafe . '--Award--.jpg'; if (!file_exists($CFG->DOCUMENT_PATH . 'TV/Photos/' . $TourCodeSafe . '--Award--.jpg')) { $BackPhoto = ''; } $JS_SCRIPT[] = '<style> body {margin:0; padding:0;} #PopupContent {height:100%; width:100%;margin:0; padding:0;background-color:' . $BackColor . '; } #FlagContent {position: relative;height:100%; width:100%;background-color:' . $BackColor . '; ' . ($BackPhoto ? 'background-image=url("' . $BackPhoto . '");' : '') . ' background-position="center center"; background-repeat="no-repeat"; background-size="cover"; } .p-pole {position:absolute; width:3%; text-align:right; overflow:hidden;} .f-flag {position:absolute; text-align:left; width: 22%; vertical-align:top; overflow:hidden;}