public function __construct() { parent::__construct(); $this->load->model('gallery_model', 'gallery_m'); $assets = array('css' => array(array('url' => 'bootstrap.min.css', 'order' => 0), array('url' => 'gallery.css', 'order' => 1), array('url' => 'portfolio.css', 'order' => 3), array('url' => 'style-shop.css', 'in_footer' => FALSE, 'order' => 2, 'is_cached' => FALSE), array('url' => 'style-layer-slider.css', 'in_footer' => TRUE, 'order' => 4)), 'js' => array(array('url' => 'jquery.min.js', 'order' => 0), array('url' => 'bootstrap.min.js', 'order' => 1), array('url' => 'mysite.js', 'order' => 3), array('url' => 'mysite1.js', 'order' => 2), array('url' => 'mysite2.js', 'in_footer' => FALSE, 'order' => 4)), 'style' => array(array('url' => 'mysite1.js')), 'script' => array(array('url' => 'mysite2.js'))); $this->theme->enQueueAssets($assets); }
function __construct() { parent::__construct(); $this->load->database(); //载入前台模板 $this->load->set_front_theme('default'); }
public function __construct() { parent::__construct(); $this->submenu = Navigation::submenu('inventory'); // Registering unique category validator Validator::register('cat_exists', function ($attribute, $value, $parameters) { if ($value == 'null') { return true; } $category = DB::table('categories')->where_id($value)->first(); if ($category !== null) { return true; } }); // Registering unique item code validator Validator::register('code_unique', function ($attribute, $value, $parameters = array()) { $id = !empty($parameters) ? $parameters[0] : null; $existing_item = DB::table('items')->where_code($value)->first('code'); if ($existing_item !== null) { if ($id === null) { return false; } $current_item = DB::table('items')->where_id($id)->first('code'); if ($current_item->code == $value) { return true; } } elseif ($existing_item == null) { return true; } }); }
public function __construct() { parent::__construct(); $this->load->language('welcome'); $this->template->title('Lex Parser Test'); $this->registry->set('nav', 'playground/lex'); }
public function __construct() { parent::__construct(); $this->filter('before', 'no_auth')->only(array('new', 'create')); $this->filter('before', 'officer_only')->only(array('index', 'show')); $this->filter('before', 'vendor_exists')->only(array('show')); }
public function __construct() { parent::__construct(); $this->filter('before', 'project_exists'); $this->filter('before', 'i_am_collaborator'); $this->filter('before', 'deliverable_exists')->only(array('update', 'delete')); }
public function __construct() { parent::__construct(); $this->load->helper('html_filters'); $this->template->set_partial('ckeditor', 'partials/ckeditor')->set_partial('subnavbar', 'playground/online_editor/subnavbar')->set('subnavbar_item_active', 'user-mode'); $this->registry->set('nav', 'playground'); }
function __construct() { parent::__construct(); if (!$this->session->userdata('logged_in')) { redirect('/login'); } }
/** * Construct */ public function __construct() { parent::__construct(); $this->submenu = Navigation::submenu('inventory'); // Generating buttons $this->item_buttons = Navigation::item_buttons()->add_item_button(array('icon' => 'icon-plus-sign', 'link' => 'contact@add', 'text' => __('site.add_contact')))->get_item_buttons(); }
public function __construct() { parent::__construct(); $this->vars = new config_vars(); $this->vars->load_vars(); $this->modulo = 'almacen'; $this->submodulo = 'historial_ajuste'; $this->seccion = 'ajustes'; $this->icon = 'fa fa-list'; //Icono de modulo $this->path = $this->modulo . '/' . $this->submodulo . '/'; //almacen/entradas_recepcion/ $this->view_content = 'content'; $this->limit_max = 10; $this->offset = 0; // Tabs $this->tab1 = 'agregar'; $this->tab2 = 'listado'; $this->tab3 = 'detalle'; // DB Model $this->load->model($this->modulo . '/' . $this->seccion . '_model', 'db_model'); $this->load->model($this->modulo . '/catalogos_model', 'catalogos_model'); $this->load->model('stock_model', 'stock_model'); // Diccionario $this->lang->load($this->modulo . '/' . $this->seccion, "es_ES"); // Tabs $this->tab_inicial = 2; $this->tab_indice = array($this->tab1, $this->tab2, $this->tab3); for ($i = 0; $i <= count($this->tab_indice) - 1; $i++) { $this->tab[$this->tab_indice[$i]] = $this->tab_indice[$i]; } }
public function index() { if ($this->input->post()) { $data['optional'] = $this->input->post('optional'); $quiz_session_id = $this->quiz_session->insert($data); foreach ($this->input->post('answers') as $question_id => $answer) { unset($data); $data['quiz_session_id'] = $quiz_session_id; $data['question_id'] = $question_id; if (isset($answer['answer'])) { // Dicertive $data['answer'] = $answer['answer']; $this->response->insert($data); } else { // Multichoice $data['choice_id'] = $answer['choice']; $this->response->insert($data); } } exit; } $questions = $this->question->get_all(); foreach ($questions as $key => $q) { $questions[$key]['choices'] = $this->choice->get_all('', array('question_id' => $q['id'])); //$questions[$key]['type'] = $this->config->item('questions_type')[$q['type']]; } $this->data['questions'] = $questions; $this->layout = $this->config->item('ci_my_admin_template_dir_quiz') . "includes/layout"; $this->view = $this->config->item('ci_my_admin_template_dir_quiz') . "quiz_index"; parent::page(); }
public function __construct() { parent::__construct(); $this->load->helper('html_filters'); $this->template->append_metadata($this->load->view('partials/ckeditor', null, true))->set_partial('subnavbar', 'playground/online_editor/subnavbar')->set('subnavbar_item_active', 'admin-mode'); $this->registry->set('nav', 'playground'); }
public function __construct() { parent::__construct(); error_reporting(-1); ini_set('display_errors', 'On'); $this->load->library('Buscape_Loader', array('applicationId' => '757347736264524b6936303d'), 'buscape'); }
public function __construct() { parent::__construct(); $user_data = $this->session->userdata; $this->load->vars($user_data); $this->load->model('penetapan_model', 'data_model'); }
public function __construct() { parent::__construct(); $this->template->title('Assign Rating Example'); $this->template->set_partial('subnavbar', 'assign_rating_subnavbar')->set('subnavbar_item_active', 'v1'); $this->registry->set('nav', 'playground'); }
public function __construct() { parent::__construct(); $this->load->language('mailer')->library('kcaptcha', null, 'captcha')->language('captcha')->parser(); $this->template->title('Email Test'); $this->registry->set('nav', 'playground'); }
public function __construct() { parent::__construct(); //admin访问控制 $this->load->helper('auth'); is_admin_exit(); }
public function __construct() { parent::__construct(); $this->load->helper('html_filters'); $this->template->set_partial('pjax_subnavbar', 'playground/pjax/pjax_subnavbar')->set_partial('scripts', 'playground/pjax/pjax_scripts'); $this->registry->set('nav', 'playground'); }
public function __construct() { parent::__construct(); $this->breadcrumbs->add()->url('account')->title('Account'); $this->breadcrumbs->add()->url('lightboxes')->title('Lightboxes'); $this->css_classes[] = 'account'; }
public function __construct($required_key, $required_val) { parent::__construct(); if ($this->session->userdata($required_key) != $required_val) { redirect('sessions/login'); } }
public function __construct() { parent::__construct(); $this->load->library('merchant'); $this->load->library('encrypt'); $this->load->model('invoices/mdl_invoices'); }
/** * Constructor * */ public function __construct() { parent::__construct(); // Models $this->load->model(array('media_model'), '', TRUE); $this->load->library('medias'); }
public function __construct() { parent::__construct(); $this->load->parser(); $this->template->title('Less Compiler Test'); $this->registry->set('nav', 'playground'); }
public function __construct() { parent::__construct(); $this->breadcrumbs->push('<i class="icon-text-height"></i> Translates', 'translates'); $this->data['navigation_panel'] = $this->actions->navigation_panel(true); $this->data['search_panel'] = $this->actions->search_panel(true); }
public function __construct() { parent::__construct(); $this->load->parser(); $this->template->title('CodeIgniter\'s Parser Test'); $this->registry->set('nav', 'playground/parser_test'); }
public function __construct() { parent::__construct(); $this->modulo = 'compras'; $this->seccion = 'ordenes'; $this->submodulo = 'ordenes'; $this->icon = 'fa fa-pencil-square'; #Icono de modulo $this->path = $this->modulo . '/' . $this->seccion . '/' . $this->submodulo . '/'; $this->view_content = 'content'; $this->uri_view_principal = $this->modulo . '/' . $this->view_content; $this->limit_max = 10; $this->offset = 0; // Tabs $this->tab_inicial = 2; $this->tab_indice = array('agregar', 'listado', 'detalle', 'articulos'); for ($i = 0; $i <= count($this->tab_indice) - 1; $i++) { $this->tab[$this->tab_indice[$i]] = $this->tab_indice[$i]; } // DB Model $this->load->model($this->modulo . '/' . $this->submodulo . '_model', 'db_model'); $this->load->model('users_model', 'users_model'); $this->load->model('sucursales/listado_sucursales_model', 'sucursales_model'); $this->load->model('administracion/formas_de_pago_model', 'formas_de_pago_model'); $this->load->model('administracion/creditos_model', 'creditos_model'); $this->load->model('administracion/variables_model', 'variables_model'); $this->load->model('compras/listado_precios_model', 'listado_precios_model'); // Diccionario $this->lang->load($this->modulo . '/' . $this->submodulo, "es_ES"); }
public function __construct() { parent::__construct(); $this->modulo = 'compras'; $this->seccion = 'listado_precios'; $this->icon = 'fa fa-list-alt'; //Icono de modulo $this->path = $this->modulo . '/' . $this->seccion . '/'; //compras/listado_precios/ $this->view_content = 'content'; $this->limit_max = 10; $this->offset = 0; // Tabs $this->tab1 = 'agregar'; $this->tab2 = 'listado'; $this->tab3 = 'detalle'; // DB Model $this->load->model($this->modulo . '/' . $this->seccion . '_model', 'db_model'); $this->load->model($this->modulo . '/catalogos_model', 'catalogos_model'); $this->load->model($this->modulo . '/proveedores_model', 'proveedores_model'); $this->load->model('administracion/impuestos_model', 'impuestos_model'); $this->load->model('administracion/regiones_model', 'regiones_model'); // Diccionario $this->lang->load($this->modulo . '/' . $this->seccion, "es_ES"); }
public function __construct() { parent::__construct(); //$this->filter('before', 'ajax')->except('issue_upload_attachment'); $this->filter('before', 'permission:project-modify')->only(array('inactive_users', 'add_user', 'remove_user')); $this->filter('before', 'permission:issue-modify')->only(array('issue_assign')); }
public function __construct() { parent::__construct(); $this->load->parser(); $this->template->title('JSON Minification Test'); $this->registry->set('nav', 'playground'); }
function Member() { parent::Base_Controller(); $this->email = $this->_Authentication(); if (empty($this->subdomain)) { exit('This controller is only for subdomains.'); } // This controller is only for subdomains. if (!$this->isOwnerOfSite() && !$this->isMemberOfSite() && $this->uri->segment(2) != 'create') { exit('You cannot access this controller.'); } // Only members and owner can access this controller. $this->userSettings = $userSettings = $this->User_is_member_of_site_model->getWhere(array('user_id' => $this->getUserId(), 'site_id' => $this->subdomainId), 1); if (!empty($userSettings)) { if ($userSettings[0]['facebook_pics_y_n'] == 1 || $userSettings[0]['facebook_vids_y_n'] == 1) { $this->facebook = new Facebook($this->facebookApiKey, $this->facebookAppSecret); try { $this->fbUserId = $this->facebook->api_client->users_getLoggedInUser(); $this->facebook->require_login(); //$facebook->require_frame(); } catch (Exception $ex) { // user needs to link with facebook $this->flashMsg = "You need to link with Facebook. <a href='http://" . $_SERVER['HTTP_HOST'] . "/member/settings/'>Go to settings and link.</a>"; } } } $this->isSiteOwner = $this->isOwnerOfSite(); //print "<pre>"; var_dump($this->facebook->api_client->users_getLoggedInUser()); print "</pre>"; //print "<pre>"; var_dump($this->fbUserId); print "</pre>"; /*var_dump($this->subdomain); var_dump($this->subdomainId); var_dump($this->isMemberOfSite());*/ }