Example #1
0
 /**
  * Invokes the whole application.
  */
 public function invoke()
 {
     $this->_pageKey = getGetValue('page', 'accounts');
     $this->_subKey = getGetValue('sub');
     $sessionLang = jpWotSession::get('active_language');
     if (empty($sessionLang)) {
         jpWotSession::set('active_language', strtolower(trim(jpWotConfig::$lang)));
     }
     $changeLang = getPostValue('lang');
     if (isset($changeLang['current'], $changeLang['new']) && $changeLang['current'] != $changeLang['new']) {
         jpWotSession::set('active_language', $changeLang['new']);
         $langKey = $changeLang['new'];
     } else {
         $langKey = jpWotSession::get('active_language');
     }
     $langKey = $this->getIniLanguageKey($langKey);
     $language = jpWotLanguage::getInstance();
     $language->load('main', BPATH, $langKey);
     $language->load('filter', BPATH, $langKey);
     $language->load($this->_pageKey, BPATH, $langKey);
     $controller = $this->getControllerInstance();
     $page = getPostValue('request');
     if (!empty($page)) {
         $controller->setRequestData($page);
     }
     $controller->index();
 }
Example #2
0
					 style="max-width: 160px; display: inline-block;"/>
				<h1 style="display: inline-block;">SSE (Stats Search Engine)</h1>
			</div>
			<div class="row" id="contentbox">
				<div class="col-lg-12">
					<?php 
$app->invoke();
?>
				</div>
			</div>
			<div class="row">
				<div class="col-lg-12 small text-center">
					<span class="text-muted">
						&copy; <?php 
echo date('Y');
?>
 JPlace <a href="http://www.jplace.de" target="_blank">www.jplace.de</a>
					</span>
					<div class="pull-right">
						<?php 
echo jpWotTemplate::render('filter.lang');
?>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
<?php 
jpWotSession::writeClose();
Example #3
0
<?php

/**
 * @package jpWot
 * @author Philipp John <*****@*****.**>
 * @copyright (c) 2014, Philipp John
 * @license http://opensource.org/licenses/MIT MIT see LICENSE.md
 */
$sessionLang = jpWotSession::get('active_language');
?>
<form method="post" id="changeLangForm">
	<input id="currentLanguageValue" type="hidden" name="lang[current]" value="<?php 
echo $sessionLang;
?>
" />
	<input id="changeLanguageValue" type="hidden" name="lang[new]" value="<?php 
echo $sessionLang;
?>
" />
	<div id="langSwichter">
		<a title="Françai" data-langkey="fr">
			<i class="icon ico_fr <?php 
echo $sessionLang == 'fr' ? '' : 'inactive';
?>
"></i>
			<span class="sr-only">Françai</span>
		</a>
		<a title="English" data-langkey="en">
			<i class="icon ico_en <?php 
echo $sessionLang == 'en' ? '' : 'inactive';
?>