本文整理汇总了PHP中HC_Lib::nts_config方法的典型用法代码示例。如果您正苦于以下问题:PHP HC_Lib::nts_config方法的具体用法?PHP HC_Lib::nts_config怎么用?PHP HC_Lib::nts_config使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HC_Lib
的用法示例。
在下文中一共展示了HC_Lib::nts_config方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($check_active = TRUE)
{
parent::__construct();
$this->load->library('migration');
if (!$this->migration->current()) {
// show_error($this->migration->error_string());
return false;
}
$nts_config = HC_Lib::nts_config();
if (isset($nts_config['FORCE_LOGIN_ID'])) {
$id = $nts_config['FORCE_LOGIN_ID'];
$this->auth->login($id);
}
if ($check_active) {
$user = $this->auth->user();
$user_active = 1;
if ($user && $user->id) {
$user_active = $user->active;
}
if (!$user_active) {
$to = 'auth/notallowed';
$this->redirect($to);
exit;
}
}
}
示例2: __construct
function __construct($user_level = 0)
{
parent::__construct();
$this->load->library('migration');
if (!$this->migration->current()) {
// show_error($this->migration->error_string());
return false;
}
$nts_config = HC_Lib::nts_config();
if (isset($nts_config['FORCE_LOGIN_ID'])) {
$id = $nts_config['FORCE_LOGIN_ID'];
$this->auth->login($id);
}
if (!$this->auth->check()) {
$this->redirect('auth/login');
exit;
}
/* check user active */
$user_active = 0;
if ($test_user = $this->auth->user()) {
$user_active = $test_user->active;
}
if (!$user_active) {
$to = 'auth/notallowed';
$this->redirect($to);
exit;
}
/* check user level */
if ($user_level) {
$this->check_level($user_level);
}
/* check license code */
if ($this->hc_modules->exists('license')) {
$license_model = HC_App::model('hitcode_license');
$code = $license_model->get();
if (!$code) {
$to = 'license/admin';
$current_slug = $this->get_current_slug();
if ($current_slug != $to) {
$this->session->set_flashdata('error', 'license_code_required');
$this->redirect($to);
exit;
}
}
}
}
示例3: ri
static function ri()
{
$return = '';
$nts_config = HC_Lib::nts_config();
if (isset($nts_config['REMOTE_INTEGRATION'])) {
$return = $nts_config['REMOTE_INTEGRATION'];
}
return $return;
}