当前位置: 首页>>代码示例>>PHP>>正文


PHP setLang函数代码示例

本文整理汇总了PHP中setLang函数的典型用法代码示例。如果您正苦于以下问题:PHP setLang函数的具体用法?PHP setLang怎么用?PHP setLang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setLang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = $this->defFields();
     $storeVar = isset($_GET['act']) && $_GET['act'] == 'list';
     // if true store the filter variables
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     if ($init || $reset) {
         $storeVar = true;
     }
     $this->id = initVar('id');
     $this->last_id = initVar('last_id');
     $this->parent_act = initVar('parent_act');
     $this->tab_mode = initVar('tab_mode');
     $this->act = initVar('act', 'list');
     $this->do_id = $_SESSION['do_id'];
     $this->gpr_id = initVar('gpr_id');
     $this->order = PageVar('order', '1A', $init, false, $this->baseName, $storeVar);
     $this->pg = PageVar('pg', 0, $init | $reset, false, $this->baseName, $storeVar);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('submitFormData');
     $this->registerAjaxFunction('askDelGlobalPlainGauge');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:25,代码来源:obj.global_plain_gauge.php

示例2: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     $this->id = initVar('id');
     $this->ge_id = (int) initVar('ge_id');
     $this->gs_id = (int) initVar('gs_id');
     $this->gc_id = initVar('gc_id');
     $this->act = initVar('act', initVar('parent_act', 'mod'));
     $this->parent_act = initVar('parent_act', 'mod');
     $this->kind = strToUpper(initVar('kind'));
     $this->new_udm_divider = initVar('udm_divider');
     $this->merge_municipality_data = PageVar('merge_municipality_data', 'T') == 'T' ? true : false;
     $this->toggle_subcategory = initVar('toggle_subcategory');
     $this->do_id = PageVar('do_id', $_SESSION['do_id'], $init | $reset, false, $this->baseName);
     $this->pr_id = PageVar('pr_id', null, $init | $reset, false, $this->baseName);
     $this->mu_id = PageVar('mu_id', null, $init | $reset, false, $this->baseName);
     $this->bpu_id = PageVar('bpu_id', null, $init | $reset, false, $this->baseName);
     $this->order = PageVar('order', '1A', $init, false, $this->baseName);
     $this->pg = PageVar('pg', 0, $init | $reset, false, $this->baseName);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('getHelp');
     $this->registerAjaxFunction('toggleSubcategory');
     $this->registerAjaxFunction('updateLastOpenCloseStatus');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:27,代码来源:obj.global_result_table.php

示例3: userLogin

function userLogin($username, $password, $log = true)
{
    global $USER, $MSG;
    if ($username == "") {
        array_push($MSG, getstring('warning.login.noemail'));
        return false;
    }
    if ($password == "") {
        array_push($MSG, getstring('warning.login.nopassword'));
        return false;
    }
    $USER = new User($username);
    $USER->setUsername($username);
    $USER->password = $password;
    if ($USER instanceof User) {
        if ($USER->validPassword($password)) {
            $_SESSION["session_username"] = $USER->getUsername();
            setcookie("user", $USER->getUsername(), time() + 60 * 60 * 24 * 30, "/");
            setLang($USER->getProp('lang'));
            if ($log) {
                writeToLog('info', 'login', 'user logged in');
            }
            return true;
        } else {
            array_push($MSG, getstring('warning.login.invalid'));
            writeToLog('info', 'loginfailure', 'username: ' . $username);
            unset($USER);
            return false;
        }
    } else {
        return false;
    }
}
开发者ID:nfreear,项目名称:mQuiz,代码行数:33,代码来源:accesslib.php

示例4: testSetLang

 public function testSetLang()
 {
     // set default lang
     setLang("");
     $this->assertEquals(getLang(), "testLang");
     //set lang testLang2
     setLang("testLang2");
     $this->assertEquals(getLang(), "testLang2");
 }
开发者ID:vmizoules,项目名称:ZZTasksPHP,代码行数:9,代码来源:translationTest.php

示例5: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = $this->defFields();
     $this->act = initVar('act', 'mod');
     $this->do_id = $_SESSION['do_id'];
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('getHelp');
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:11,代码来源:obj.stat_general.php

示例6: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $init = array_key_exists('init', $this->request);
     $this->act = initVar('act', 'list');
     $this->sl_id = PageVar('sl_id');
     $this->last_id = initVar('consumption_last_id');
     $this->parent_act = PageVar('parent_act');
     $this->tab_mode = initVar('tab_mode');
     $this->order = PageVar('order', '6A', $init, false, $this->baseName);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:13,代码来源:obj.street_lighting_consumption.php

示例7: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = $this->defFields();
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     $this->id = initVar('id');
     $this->act = initVar('act', 'list');
     $this->kind = PageVar('kind');
     $this->em_id = PageVar('em_id', null, $init | $reset, false, $this->baseName);
     $this->tabMode = PageVar('tab_mode', null, $init | $reset, false, $this->baseName);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('confirm_delete_device');
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:16,代码来源:obj.device.php

示例8: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->kind = initVar('kind');
     $this->act = initVar('act', 'add');
     $this->mu_id = initVar('mu_id');
     $this->mu_name = initVar('mu_name');
     if ($this->mu_name != '') {
         // Convert municipality text into id
         $db = ezcDbInstance::get();
         $lang = R3Locale::getLanguageID();
         $this->mu_id = (int) $db->query("SELECT mu_id FROM municipality WHERE mu_name_{$lang} ILIKE " . $db->quote($request['mu_name']))->fetchColumn();
     }
     setLang(R3Locale::getLanguageCode());
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:16,代码来源:obj.building_fr_st_cm.php

示例9: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $storeVar = isset($_GET['act']) && $_GET['act'] == 'list';
     // if true store the filter variables
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     if ($init || $reset) {
         $storeVar = true;
     }
     $this->gc_id_filter = PageVar('gc_id_filter', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->gp_name = PageVar('gp_name', null, $init | $reset, false, $this->baseName, $storeVar);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('getHelp');
     $this->registerAjaxFunction('countGaugeAndMonitor');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:17,代码来源:obj.global_plain_action.php

示例10: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     $this->id = initVar('id');
     $this->act = initVar('act', 'list');
     $this->kind = PageVar('kind');
     $this->em_id = PageVar('em_id', null, $init | $reset, false, $this->baseName);
     $this->sl_id = PageVar('sl_id', null, $init | $reset, false, $this->baseName);
     $this->tabMode = PageVar('tab_mode', null, $init | $reset, false, $this->baseName);
     $data = R3EcoGisHelper::getMeterData($_SESSION['do_id'], $this->em_id);
     $this->fields = $this->defFields($data['em_is_production'] == 'T');
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('confirm_delete_consumption');
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:18,代码来源:obj.consumption.php

示例11: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = $this->defFields();
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     $this->do_id = $_SESSION['do_id'];
     $this->id = initVar('id');
     $this->act = initVar('act', 'list');
     $this->kind = initVar('kind');
     $this->bu_id = initVar('bu_id');
     $this->tabMode = initVar('tab_mode');
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('fetchUDM');
     $this->registerAjaxFunction('getEnergySourceList');
     $this->registerAjaxFunction('getUtilityProductList');
     $this->registerAjaxFunction('confirmDeleteMeter');
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:20,代码来源:obj.meter.php

示例12: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->id = initVar('id');
     $this->act = initVar('act', 'list');
     $this->tab_mode = initVar('tab_mode');
     $this->kind = initVar('kind');
     $this->ge_id = (int) initVar('ge_id');
     $this->gc_id = (int) initVar('gc_id');
     $this->limit = 0;
     $this->do_id = PageVar('do_id', $_SESSION['do_id'], false, false, $this->baseName);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->fields = $this->defFields();
     $this->registerAjaxFunction('fetchUDM');
     $this->registerAjaxFunction('performEnergySourceRowCalc');
     $this->registerAjaxFunction('confirmDeleteGlobalConsumptionRow');
     $this->registerAjaxFunction('getEnergySource');
     $this->registerAjaxFunction('getEnergyUDM');
     $this->registerAjaxFunction('performActionCatalogCalc');
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:22,代码来源:obj.global_consumption_row.php

示例13: initLang

function initLang()
{
    global $languageArray;
    if (isset($_COOKIE["Language"])) {
        $browerLang = $_COOKIE["Language"];
    } else {
        if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
            $browerLang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
        } else {
            $browerLang = "en";
        }
    }
    if (isset($_SESSION["langindex"])) {
        $index = $_SESSION["langindex"];
    } else {
        $index = array_search($browerLang, $languageArray);
    }
    if ($index) {
        setLang($index);
    } else {
        setLang(0);
    }
}
开发者ID:qichangjun,项目名称:HTMLLearn,代码行数:23,代码来源:language.php

示例14: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = $this->defFields();
     $storeVar = isset($_GET['act']) && $_GET['act'] == 'list';
     // if true store the filter variables
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     if ($init || $reset) {
         $storeVar = true;
     }
     $this->id = initVar('id');
     if (initVar('sl_id') !== null) {
         $this->id = initVar('sl_id');
     }
     $this->act = initVar('act', 'list');
     $this->last_id = initVar('last_id');
     $this->parent_act = initVar('parent_act');
     $this->do_id = $_SESSION['do_id'];
     $this->pr_id = PageVar('pr_id', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->mu_id = PageVar('mu_id', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->mu_name = PageVar('mu_name', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->st_id = PageVar('st_id', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->st_name = PageVar('st_name', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->sl_full_name = PageVar('sl_full_name', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->sl_to_check = PageVar('sl_to_check', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->order = PageVar('order', '1A', $init, false, $this->baseName, $storeVar);
     $this->pg = PageVar('pg', 0, $init | $reset, false, $this->baseName, $storeVar);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('getHelp');
     $this->registerAjaxFunction('getMunicipalityList');
     $this->registerAjaxFunction('getStreetList');
     $this->registerAjaxFunction('getStreetLength');
     $this->registerAjaxFunction('confirmDeleteStreetLighting');
     $this->registerAjaxFunction('submitFormData');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:37,代码来源:obj.street_lighting.php

示例15: __construct

 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = array();
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     $this->id = initVar('id');
     $this->act = initVar('act', 'list');
     $this->order = PageVar('order', '1A', $init, false, $this->baseName);
     $this->pg = PageVar('pg', 0, $init | $reset, false, $this->baseName);
     $storeVar = isset($_GET['act']) && $_GET['act'] == 'list' || $reset || $init;
     // if true store the filter variables
     if ($init || $reset) {
         $storeVar = true;
     }
     $this->do_id_filter = (int) PageVar('do_id_filter', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->mu_name_collection = PageVar('mu_name_collection', null, $init | $reset, false, $this->baseName, $storeVar);
     $this->mu_name = PageVar('mu_name', null, $init | $reset, false, $this->baseName, $storeVar);
     setLang(R3Locale::getLanguageCode());
     setLangInfo(array('thousands_sep' => "."));
     $this->registerAjaxFunction('submitFormData');
     $this->registerAjaxFunction('confirmDeleteMunicipalityCollection');
     $this->registerAjaxFunction('getAvailableMunicipalityForCollection');
 }
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:24,代码来源:obj.municipality_collection.php


注:本文中的setLang函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。