Inheritance: extends CI_Controller
Esempio n. 1
0
 function __construct()
 {
     parent::__construct();
     $this->load->model(array('Customer_model', 'Location_model'));
     $this->load->helper('formatting_helper');
     $this->lang->load('customer');
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     $user_data = $this->session->userdata;
     $this->load->vars($user_data);
     $this->load->model('penyetoran_model', 'data_model');
 }
Esempio n. 3
0
 function __construct()
 {
     parent::__construct();
     $this->auth->check_access('Admin', true);
     $this->load->model('Page_model');
     $this->lang->load('page');
 }
Esempio n. 4
0
    /**
     * Constructor method
     * @access public
     * @return void
     */
    public function __construct()
    {
        // Call the parent's constructor
        parent::__construct();
        $this->load->model('permissions_m');
        $this->load->helper('array');
        $this->lang->load('permissions');
        $this->load->library('form_validation');
        // Validation rules
        $this->validation_rules = array(array('field' => 'module', 'label' => lang('perm_module_label'), 'rules' => 'trim|required'), array('field' => 'controller', 'label' => lang('perm_controller_label'), 'rules' => 'trim|required'), array('field' => 'method', 'label' => lang('perm_method_label'), 'rules' => 'trim|required'), array('field' => 'role_type', 'label' => lang('perm_type_label'), 'rules' => 'trim|required'), array('field' => 'user_id', 'label' => lang('perm_user_label'), 'rules' => 'trim|numeric'), array('field' => 'permission_role_id', 'label' => lang('perm_role_label'), 'rules' => 'trim|numeric'));
        // Get "roles" (like access levels)
        $this->data->roles = $this->permissions_m->get_roles(array('except' => array('admin')));
        $this->data->roles_select = array_for_select($this->data->roles, 'id', 'title');
        $this->data->users = $this->users_m->get_all();
        $this->data->users_select = array_for_select($this->data->users, 'id', 'full_name');
        $modules = $this->modules_m->get_modules(array('is_backend' => true));
        $this->data->modules_select = array('*' => lang('perm_module_select_default')) + array_for_select($modules, 'slug', 'name');
        $this->template->append_metadata('
			<script type="text/javascript">
				var roleDeleteConfirm = "' . $this->lang->line('perm_role_delete_confirm') . '";
				var permControllerSelectDefault = "' . $this->lang->line('perm_controller_select_default') . '";
				var permMethodSelectDefault = "' . $this->lang->line('perm_method_select_default') . '";
			</script>
		');
        $this->template->append_metadata(js('permissions.js', 'permissions'));
        $this->template->set_partial('sidebar', 'admin/sidebar');
    }
Esempio n. 5
0
 public function __construct()
 {
     parent::__construct();
     $this->lang->load(array('download'));
     $this->load->model(array('files/image_m'));
     $this->load->helper(array('url'));
     $download_dir = UPLOAD_PATH . 'download';
     if (!is_dir($download_dir)) {
         mkdir($download_dir, 0777);
     }
     $this->_download_base_file_dir = $download_dir;
     $this->_download_base_file_cache_dir = $download_dir;
     $this->_download_base_file_url = base_url($download_dir);
     /*$_categories = array();
     		if ($categories = $this->gallery_categories_m->order_by('title')->get_all())
     		{
     			foreach ($categories as $category)
     			{
     				$_categories[$category->id] = $category->title;
     			}
     		}
     
     		$this->template
     			->set('categories', $_categories);*/
 }
Esempio n. 6
0
 /**
  * constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->model("usermodel");
     $this->load->library('pagination');
     $this->load->library('app/paginationlib');
 }
Esempio n. 7
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('teacher_m');
     $this->load->model('profile_m');
     $this->load->model('admin_m');
 }
 public function __construct()
 {
     parent::__construct();
     $this->load->model(array('assessment_view_model', 'subject/subject_model', 'levels/levels_model'));
     $this->data['js_lang']['create_rubric_group'] = lang('create_rubric_group');
     $this->data['js_lang']['create_rubric'] = lang('create_rubric');
     $this->data['js_lang']['create_assessments'] = lang('create_assessments');
     $this->data['js_lang']['rubric_added_successfully'] = lang('rubric_added_successfully');
     $this->data['js_lang']['rubric_group_added_successfully'] = lang('rubric_group_added_successfully');
     $this->data['js_lang']['category_added_successfully'] = lang('category_added_successfully');
     $this->data['js_lang']['assessment_added_successfully'] = lang('assessment_added_successfully');
     $this->data['js_lang']['update_rubric_group'] = lang('update_rubric_group');
     $this->data['js_lang']['rubric_updated_successfully'] = lang('rubric_updated_successfully');
     $this->data['js_lang']['update_rubric'] = lang('update_rubric');
     $this->data['js_lang']['update_assessment'] = lang('update_assessment');
     $this->data['js_lang']['assessment_updated_successfully'] = lang('assessment_updated_successfully');
     $this->data['js_lang']['category_name_required'] = lang('category_name_required');
     $this->data['js_lang']['assessment_category_saved'] = lang('assessment_category_saved');
     $this->data['js_lang']['confirm_delete'] = lang('confirm_delete');
     $this->data['js_lang']['confirm_delete_assessment'] = lang('confirm_delete_assessment');
     $this->data['js_lang']['assessment_deleted_successfully'] = lang('assessment_deleted_successfully');
     $this->data['js_lang']['delete_assessment_rubric'] = lang('delete_assessment_rubric');
     $this->data['js_lang']['assessment_rubric_deleted'] = lang('assessment_rubric_deleted');
     $this->data['js_lang']['delete_assessment_category'] = lang('delete_assessment_category');
     $this->data['js_lang']['assessmeny_category_deleted_successfully'] = lang('assessmeny_category_deleted_successfully');
     $this->data['js_lang']['confirm_delete_level'] = lang('confirm_delete_level');
     $this->data['js_lang']['level_deleted_successfully'] = lang('level_deleted_successfully');
     $this->data['js_lang']['level_added_successfully'] = lang('level_added_successfully');
     $this->data['js_lang']['rubric_added_to_assessment_successfully'] = lang('rubric_added_to_assessment_successfully');
     $this->data['js_lang']['rubric_group_deleted'] = lang('rubric_group_deleted');
     $this->data['js_lang']['rubric_deleted'] = lang('rubric_deleted');
     $this->breadcrumb->append_crumb(lang('assessment'), site_url('assessment'));
 }
Esempio n. 9
0
	public function __construct()
	{
		parent::Admin_Controller();

		$this->load->models(array('file_m', 'file_folders_m'));
		$this->lang->load('files');
		$this->config->load('files');

		$this->load->library('form_validation');
		$this->form_validation->set_rules($this->_validation_rules);

		$this->_folders = $this->file_folders_m->get_folders();

		// Array for select
		$this->data->folders_tree = array();
		foreach ($this->_folders as $folder)
		{
			$this->data->folders_tree[$folder->id] = repeater('&raquo; ', $folder->depth) . $folder->name;
		}

		$this->template
			->set_partial('shortcuts', 'admin/partials/shortcuts')
			->set_partial('nav', 'admin/partials/nav', array(
				'file_folders'	=> $this->_folders,
				'current_id'	=> 0
			));
	}
Esempio n. 10
0
 function __construct()
 {
     parent::Admin_Controller();
     $this->load->model('products_m');
     $this->load->module_model('categories', 'categories_m');
     $this->lang->load('products');
 }
Esempio n. 11
0
 public function __construct()
 {
     parent::__construct();
     $this->user->restrict('Admin.Payments');
     $this->load->model('Extensions_model');
     $this->lang->load('payments');
 }
Esempio n. 12
0
File: admin.php Progetto: 68kb/68kb
 /**
  * Constructor
  *
  * Requires needed models and helpers.
  * 
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('form');
     $this->load->helper('cookie');
     $this->load->dbutil();
 }
Esempio n. 13
0
 function __construct()
 {
     parent::__construct();
     $this->load->model("module_m");
     $language = $this->session->userdata('lang');
     $this->lang->load('permissions', $language);
 }
Esempio n. 14
0
 function __construct()
 {
     parent::Admin_Controller();
     $this->load->model('newsletters_m');
     $this->lang->load('newsletter');
     $this->newsletters_m->emailFrom = $this->settings->item('contact_email');
 }
Esempio n. 15
0
 public function __construct()
 {
     parent::__construct();
     $this->lang->load('calendar');
     $this->load->library('calendar_lib');
     $this->load->model('calendar_m');
 }
Esempio n. 16
0
 function __construct()
 {
     parent::__construct();
     $this->load->model("grade_m");
     $language = $this->session->userdata('lang');
     $this->lang->load('grade', $language);
 }
Esempio n. 17
0
 function __construct()
 {
     parent::__construct();
     $this->auth->check_access('Seller', true);
     $this->lang->load('category');
     $this->load->model('Category_model');
 }
Esempio n. 18
0
 /**
  * @author : Roledene
  * Type : Constructor
  * Name : __construct
  * Description : this is the default construtor of project class
  */
 public function __construct()
 {
     parent::__construct();
     //			var_dump("hello world");
     $d = $this->project_m->getAllProjects();
     var_dump($d);
 }
Esempio n. 19
0
	/**
	 * The constructor
	 * @access public
	 * @return void
	 */
	public function __construct()
	{
		parent::Admin_Controller();

		$this->load->model('blog_m');
		$this->load->model('blog_categories_m');
		$this->lang->load('blog');
		$this->lang->load('categories');

		// Date ranges for select boxes
		$this->data->hours = array_combine($hours = range(0, 23), $hours);
		$this->data->minutes = array_combine($minutes = range(0, 59), $minutes);

		$this->data->categories = array();
		if ($categories = $this->blog_categories_m->order_by('title')->get_all())
		{
			foreach ($categories as $category)
			{
				$this->data->categories[$category->id] = $category->title;
			}
		}

		$this->template
			->append_metadata( css('blog.css', 'blog') )
			->set_partial('shortcuts', 'admin/partials/shortcuts');
	}
Esempio n. 20
0
 function __construct()
 {
     parent::Admin_Controller();
     $this->load->module_library('users', 'user_lib');
     $this->load->module_language('users', 'user');
     $this->load->module_helper('users', 'user');
 }
Esempio n. 21
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model(array('levels/levels_model', 'sow_model', 'tag/tag_model', 'tag_item/tag_item_model', 'subject/subject_model'));
     $this->breadcrumb->append_crumb(lang('sow'), site_url('sow'));
     $this->load->model('Sow_model');
     $this->append_javascript($this->data['theme_path'] . 'plugins/uploadifive/jquery.uploadifive.js');
     $this->append_stylesheet($this->data['theme_path'] . 'plugins/uploadifive/uploadifive.css');
     $this->data['js_lang']['url_added'] = lang('url_added');
     $this->data['js_lang']['note_updated'] = lang('note_updated');
     $this->data['js_lang']['note_deleted'] = lang('note_deleted');
     $this->data['js_lang']['interval_updated'] = lang('interval_updated');
     $this->data['js_lang']['delete_note'] = lang('delete_note');
     $this->data['js_lang']['delete_period'] = lang('delete_period');
     $this->data['js_lang']['sow_added_successfully'] = lang('sow_added_successfully');
     $this->data['js_lang']['sow_updated_successfully'] = lang('sow_updated_successfully');
     $this->data['js_lang']['confirm_delete_url'] = lang('confirm_delete_url');
     $this->data['js_lang']['url_deleted_successfully'] = lang('url_deleted_successfully');
     $this->data['js_lang']['update_revision'] = lang('update_revision');
     $this->data['js_lang']['revision_added_successfully'] = lang('revision_added_successfully');
     $this->data['js_lang']['confirm_delete_sow'] = lang('confirm_delete_sow');
     if (!_can('Curriculum Planning') and !_can('Curriculum View')) {
         $this->_set_flashdata(lang('scheme_of_work_permission_denied'), 'error');
         redirect(site_url('dashboard'));
     } else {
         if (!_can('Curriculum Planning') and !in_array($this->data['current_controller_method'], array('index', 'get_sow', 'download_file_path', 'download_file'))) {
             $this->_set_flashdata(lang('scheme_of_work_permission_denied'), 'error');
             redirect(site_url('dashboard'));
         }
     }
     // $this->selected_year_term_id = $this->curriculum_year_term;
 }
Esempio n. 22
0
File: Role.php Progetto: flycorn/ACI
 function __construct()
 {
     parent::__construct();
     $this->load->model(array('Member_role_model'));
     $this->load->helper(array('array'));
     $this->load->library('tree');
 }
 public function __construct()
 {
     parent::__construct();
     $this->load->library('grocery_CRUD');
     //        $this->upload_path = '../assets/uploads/' . 'packages';
     $this->wrapper = 'gc_admin_wrapper';
 }
 public function __construct()
 {
     parent::__construct();
     if (!$this->auth->is_allowed_to('manage_categories', 'all')) {
         show_error('You do not have permission to view this part of the website.');
     }
 }
Esempio n. 25
0
 /**
  * Constructor
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->auth->restrict('Samples.Content.View');
     $this->load->model('samples_model', null, true);
     $this->load->model(array('uom/uom_model', 'product/product_model', 'customers/customers_model', 'vendor_profile/vendor_profile_model'));
     $this->lang->load('samples');
     Assets::add_css('flick/jquery-ui-1.8.13.custom.css');
     Assets::add_js('jquery-ui-1.8.13.min.js');
     Template::set_block('sub_nav', 'content/_sub_nav');
     Assets::add_module_js('samples', 'samples.js');
     $profile_id = NULL;
     if (isset($this->curr_user_profile['id'])) {
         $profile_id = $this->curr_user_profile['id'];
     }
     $uoms_select = $this->uom_model->get_uoms_select();
     Template::set('uoms_select', $uoms_select);
     $uoms = $this->uom_model->get_uoms();
     Template::set('uoms', $uoms);
     $products_select = $this->product_model->get_products_select();
     Template::set('products_select', $products_select);
     $products = $this->product_model->get_products();
     Template::set('products', $products);
     $party_select = $this->customers_model->get_party_select();
     Template::set('party_select', $party_select);
     $party = $this->customers_model->get_party();
     Template::set('party', $party);
     Template::set('vendors', $vendors);
 }
Esempio n. 26
0
 /**
  * Constructor method
  *
  * @access public
  * @return void
  */
 public function __construct()
 {
     // Call the parent's constructor
     parent::Admin_Controller();
     $this->load->model('themes_m');
     $this->lang->load('themes');
 }
Esempio n. 27
0
 function __construct()
 {
     parent::__construct();
     $this->load->model(array('seller_model', 'sharepage'));
     $this->model = $this->seller_model;
     $this->agentId = $this->user_info->agentid;
 }
Esempio n. 28
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('newsletter_m', 'newsletters');
     $this->lang->load('newsletters');
     $this->data = new stdClass();
 }
Esempio n. 29
0
 function __construct()
 {
     parent::__construct();
     remove_ssl();
     $this->load->model('Newsletter_model');
     $this->load->helper(array('formatting', 'utility'));
 }
Esempio n. 30
0
 function __construct()
 {
     parent::__construct();
     $this->module = strtolower(get_class());
     $this->load->model('Mlienhe');
     $this->load->library('session');
 }