Example #1
0
 public static function translator()
 {
     static $translator = true;
     if ($translator === true) {
         $module = Module_GWF::instance();
         $translator = $module->onLoadLanguage();
     }
     return $translator;
 }
Example #2
0
 public function onStartup()
 {
     //		var_dump('GWF::onStartup()');
     self::$instance = $this;
     if ($this->isAjax()) {
         return;
     }
     //		if ($this->cfgRobotUsers()) {
     //			$this->onRobotUsers();
     //		}
     if ($this->cfgPagecountEnabled()) {
         $this->increasePageView();
     }
     if ($this->cfgUserrecordEnabled()) {
         $this->checkUserRecord();
     }
     if (false !== ($user = GWF_Session::getUser())) {
         $user->saveVar('user_lastactivity', time());
     }
     //		GWF_Website::addJavascript(GWF_WEB_ROOT.'js/gwf3.js?v=1');
     //		GWF_Website::addJavascript(GWF_WEB_ROOT.'js/jquery-1.4.2.min.js');
     //		$is_bot = GWF_Browser::isBot();
     //		if ($is_bot) {s()
     //	{
     //
     //			return; # have fun;
     //		}
     //
     //		GWF_Website::addJavascript(GWF_WEB_ROOT.'js/gwf_core.js?v=2');
     //
     //		if (!GWF_Session::haveCookies())
     //		{
     //			if ($this->isMethodSelected('CookieCheck')) {
     //				return; # we are running cookie check
     //			}
     //
     //			$current_url = GWF_Session::getLastURL();
     //			$level1_url = GWF_WEB_ROOT.'index.php?mo=GWF&me=CookieCheck&level=1&url='.urlencode($current_url);
     //
     //			if ($this->cfgJavascriptCheck())
     //			{
     //				GWF_Website::addJavascriptInline($this->getDetectScript($current_url)); # redirect with js
     ////				GWF_Website::redirectMeta($level1_url, 1);
     //			}
     //			else
     //			{
     //				GWF_Website::redirect($level1_url);
     //			}
     //
     //			return GWF_HTML::message('Startup', 'Initiating your Session...', false);
     //		}
     //		elseif (false !== ($user = GWF_Session::getUser()))
     //		{
     //			$user->saveVar('user_lastactivity', time());
     //		}
 }