56 lines
1.6 KiB
PHP
Executable File
56 lines
1.6 KiB
PHP
Executable File
<?php
|
|
|
|
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
function required() {
|
|
$CI = & get_instance();
|
|
|
|
|
|
$CI->load->library('Ion_auth');
|
|
$CI->load->library('session');
|
|
$CI->load->library('form_validation');
|
|
$CI->load->library('upload');
|
|
|
|
$CI->load->config('paypal');
|
|
|
|
|
|
$RTR = & load_class('Router');
|
|
|
|
|
|
if ($RTR->class != "frontend" && $RTR->class != "auth" && $RTR->class != "onboarding") {
|
|
if (!$CI->ion_auth->logged_in()) {
|
|
redirect('auth/login');
|
|
}
|
|
}
|
|
|
|
if ($RTR->class != "frontend" && $RTR->class != "auth") {
|
|
$CI->language = $CI->db->get('settings')->row()->language;
|
|
$CI->lang->load('system_syntax', $CI->language);
|
|
}
|
|
|
|
// $CI->language = $CI->db->get('settings')->row()->language;
|
|
// $CI->lang->load('system_syntax', $CI->language);
|
|
if(get_cookie('pref_language')!="")
|
|
{
|
|
$CI->language = get_cookie('pref_language');
|
|
$CI->lang->load('system_syntax', $CI->language);
|
|
}
|
|
else
|
|
{
|
|
$CI->language = $CI->db->get('settings')->row()->language;
|
|
$CI->lang->load('system_syntax', $CI->language);
|
|
}
|
|
$settings = $CI->db->get('settings')->row();
|
|
$CI->currency = $settings->currency;
|
|
$CI->load->model('settings/settings_model');
|
|
$CI->load->model('sms/sms_model');
|
|
$CI->load->model('email/email_model');
|
|
$CI->load->model('ion_auth_model');
|
|
$CI->load->library('parser');
|
|
$CI->load->helper('security');
|
|
}
|