Example #1
0
 /**
  * Initialize Bootstrap Configuration
  * @param bool|true $WithConfig     - Specifies Should Bootstrap Class Initialize Itself With Configuration File Or Without It
  */
 public static function Initialize($WithConfig = true)
 {
     if ($WithConfig) {
         Bootstrap::LoadConfig();
     }
     Bootstrap::LoadComponents();
     if (Bootstrap::$isDebugEnabled) {
         Bootstrap::$PageLoadTime = System\Utilities::PageLoadTime(true);
     }
 }
Example #2
0
 function display($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL)
 {
     global $FCCore;
     if ($FCCore['debug']) {
         $this->assign('PageLoadTime', System\Utilities::PageLoadTime());
         $this->assign('MemoryUsage', System\Utilities::GetMemoryUsage());
         $this->assign('Debug', true);
     } else {
         $this->assign('Debug', false);
     }
     try {
         Smarty::Display($template . ".tpl");
     } catch (Exception $e) {
         Debugger::ReportError(3, 1, $template . ".tpl");
     }
 }
Example #3
0
 public static function Info($PageType, $FreedomCore = null)
 {
     $ChosenLanguage = explode('/', $_SERVER['REQUEST_URI']);
     if (isset($_SESSION['currentlocaleid'])) {
         $LocaleID = $_SESSION['currentlocaleid'];
     } else {
         $LocaleID = 0;
     }
     if ($ChosenLanguage[1] != NULL) {
         $Language = $ChosenLanguage[1];
     } else {
         $Language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
     }
     $Page = array('type' => $PageType, 'localeid' => $LocaleID, 'language' => $Language, 'readabletime' => date('D, d M Y H:i:s O', time()), 'timestamp' => Utilities::GetCurrentTimestamp());
     if (!is_null($FreedomCore)) {
         return array_merge($Page, $FreedomCore);
     } else {
         return $Page;
     }
 }
 /**
  * Get User Language
  *
  * @return string Returning Preferred User Language base on Browser Language
  */
 public function loadLanguage()
 {
     $UserLanguage = System\Utilities::GetLanguage();
     return $UserLanguage;
 }
 public static function LanguageCode()
 {
     return Utilities::GetLanguage(true);
 }