Example #1
0
 /**
  * @brief Language Settings menu, the output
  */
 function displayLangSelect()
 {
     $childs = array();
     $this->lang = FileHandler::readFile('./files/cache/addons/mobile/setLangType/personal_settings/' . md5(trim($_SERVER['HTTP_USER_AGENT']) . trim($_SERVER['HTTP_PHONE_NUMBER']) . trim($_SERVER['HTTP_HTTP_PHONE_NUMBER'])) . '.php');
     if ($this->lang) {
         $this->lang = str_replace(array('<?php /**', '**/ ?>'), array('', ''), $this->lang);
         Context::setLangType($this->lang);
     }
     $lang_supported = Context::get('lang_supported');
     $lang_type = Context::getLangType();
     $obj = array();
     $obj['link'] = $obj['text'] = Context::getLang('president_lang') . ' : ' . $lang_supported[$lang_type];
     $obj['href'] = getUrl('sel_lang', $lang_type);
     $childs[] = $obj;
     if (is_array($lang_supported)) {
         foreach ($lang_supported as $key => $val) {
             $obj = array();
             $obj['link'] = $obj['text'] = $val;
             $obj['href'] = getUrl('sel_lang', $key);
             $childs[] = $obj;
         }
     }
     $this->setChilds($childs);
     $this->display();
 }
 /**
  * @brief Make DB Information by Install Config
  */
 function _makeDbInfoByInstallConfig()
 {
     $db_info = new stdClass();
     $db_info->master_db = array('db_type' => Context::get('db_type'), 'db_port' => Context::get('db_port'), 'db_hostname' => Context::get('db_hostname'), 'db_userid' => Context::get('db_userid'), 'db_password' => Context::get('db_password'), 'db_database' => Context::get('db_database'), 'db_table_prefix' => Context::get('db_table_prefix'));
     $db_info->slave_db = array($db_info->master_db);
     $db_info->default_url = Context::getRequestUri();
     $db_info->lang_type = Context::get('lang_type') ? Context::get('lang_type') : Context::getLangType();
     Context::setLangType($db_info->lang_type);
     $db_info->use_rewrite = Context::get('use_rewrite');
     $db_info->time_zone = Context::get('time_zone');
     return $db_info;
 }
Example #3
0
<?php

if(!defined('__DEBUG__')) define('__DEBUG__', 1);
if(!defined('__XE__')) define('__XE__', TRUE);
if(!defined('__ZBXE__')) define('__ZBXE__', TRUE);
if(!defined('_XE_PATH_')) define('_XE_PATH_', realpath(dirname(__FILE__) . '/../../../../') . '/');

require_once(_XE_PATH_ . 'config/config.inc.php');
require_once(_XE_PATH_ . 'modules/shop/libs/autoload/autoload.php');

// Delete any cache files
FileHandler::removeFilesInDir(_XE_PATH_ . 'files/cache');

$oContext = Context::getInstance();
Context::setLangType('en');

// Load common language files, for the error messages to be displayed
Context::loadLang(_XE_PATH_.'common/lang/');

/* End of file Bootstrap.php */
/* Location: ./modules/shop/tests/lib/Bootstrap.php */