Ejemplo n.º 1
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('lession_model');
     $this->load->library('form_validation');
     $this->layout->add_javascripts(array('common'));
 }
 function __construct()
 {
     parent::__construct();
     $this->template->set_js('pedidos.js');
     $this->load->model('pedidos_model');
     $this->load->model('pedidos_itens_model');
 }
Ejemplo n.º 3
0
 public function __construct()
 {
     parent::__construct();
     if (!identity()->get_session('is_login')) {
         return redirect(array('admin'));
     }
 }
Ejemplo n.º 4
0
 function __construct()
 {
     parent::__construct();
     $this->layout->add_javascripts(array('fileinput.min', 'fileinput'));
     $this->layout->add_stylesheets(array('fileinput.min', 'fileinput'));
     $this->load->model('product_model');
 }
Ejemplo n.º 5
0
 public function __construct()
 {
     parent::__construct();
     $this->restricted_pages = array('add_emails', 'edit', 'edit_emails', 'delete', 'index');
     $this->load->model('emails_model');
     $this->load->library('form_validation');
 }
 function __construct()
 {
     parent::__construct();
     $this->load->helper('number');
     $this->load->helper('imagem');
     $this->load->model('produtos_fotos_model');
 }
Ejemplo n.º 7
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('order_model');
     if (!is_logged_in()) {
         redirect("login");
     }
 }
 function __construct()
 {
     parent::__construct();
     $this->load->model('submittedforms_model');
     $this->load->library('form_validation');
     $this->layout->add_javascripts(array('common'));
     $this->data['img_url'] = $this->layout->get_img_dir();
 }
Ejemplo n.º 9
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('category_model');
     $this->load->library('form_validation');
     if (!is_logged_in()) {
         redirect("login");
     }
 }
Ejemplo n.º 10
0
 public function create_database_test()
 {
     $admin = new YawfAdmin();
     $test_db_exists = file_exists($this->database_filename);
     $this->should_not('have a test database already', $test_db_exists, $admin->get_database());
     parent::create_database();
     $test_db_exists = file_exists($this->database_filename);
     $this->should('have a test database now', $test_db_exists, $admin->get_database());
 }
Ejemplo n.º 11
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('blogs_model');
     $this->load->model('blogs_categorias_has_blogs_model');
     $this->load->model('blogs_tags_has_blogs_model');
     $this->load->model('blogs_tags_model');
     $this->template->set_js("blogs.js");
     $this->load->helper('text');
 }
 function __construct()
 {
     parent::__construct();
     $this->template->set_js('jquery_upload_arquivos.js');
     $this->template->set_js('produtos.js');
     $this->load->helper('imagem');
     $this->load->helper('file');
     $this->load->model('produtos_model');
     $this->load->model('produtos_fotos_model');
 }
Ejemplo n.º 13
0
 public function __construct()
 {
     parent::__construct();
     if (in_array($this->uri->rsegments(2, 0), array('edit', 'update', 'destroy', 'sort'))) {
         if (!(($id = $this->uri->rsegments(3, 0)) && ($this->work = Work::find('one', array('conditions' => array('id = ? AND destroy_user_id IS NULL', $id)))))) {
             return redirect_message(array('admin', $this->get_class()), array('_flash_message' => '找不到該筆資料。'));
         }
     }
     $this->add_tab('作品列表', array('href' => base_url('admin', $this->get_class()), 'index' => 1))->add_tab('新增作品', array('href' => base_url('admin', $this->get_class(), 'add'), 'index' => 2));
 }
Ejemplo n.º 14
0
 public function __construct()
 {
     parent::__construct();
     if (in_array($this->uri->rsegments(2, 0), array('edit', 'update', 'destroy'))) {
         if (!(($id = $this->uri->rsegments(3, 0)) && ($this->tag = ArticleTag::find_by_id($id)))) {
             return redirect_message(array('admin', $this->get_class()), array('_flash_message' => '找不到該筆資料。'));
         }
     }
     $this->add_tab('類別列表', array('href' => base_url('admin', $this->get_class()), 'index' => 1))->add_tab('新增類別', array('href' => base_url('admin', $this->get_class(), 'add'), 'index' => 2));
 }
Ejemplo n.º 15
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('inspection_model');
     $this->load->library('form_validation');
     $this->layout->add_javascripts(array('common'));
     if (!is_logged_in()) {
         redirect("login");
     }
 }
Ejemplo n.º 16
0
 public function __construct()
 {
     parent::__construct();
     if (in_array($this->uri->rsegments(2, 0), array('edit', 'update', 'destroy'))) {
         if (!(($id = $this->uri->rsegments(3, 0)) && ($this->article = Article::find('one', array('conditions' => array('id = ? AND destroy_user_id IS NULL', $id)))))) {
             return redirect_message(array('admin', $this->get_class()), array('_flash_message' => '找不到該筆資料。'));
         }
     }
     $this->add_tab('文章列表', array('href' => base_url('admin', $this->get_class()), 'index' => 1))->add_tab('新增文章', array('href' => base_url('admin', $this->get_class(), 'add'), 'index' => 2))->add_hidden(array('id' => 'tools_ckeditors_upload_image_url', 'value' => base_url('admin', 'tools', 'ckeditors_upload_image')))->add_hidden(array('id' => 'tools_ckeditors_browser_image_url', 'value' => base_url('admin', 'tools', 'ckeditors_browser_image')));
 }
Ejemplo n.º 17
0
 public function __construct()
 {
     parent::__construct();
     if (in_array($this->uri->rsegments(2, 0), array('edit', 'update', 'destroy'))) {
         if (!(($id = $this->uri->rsegments(3, 0)) && ($this->invoice = Invoice::find('one', array('conditions' => array('id = ? AND destroy_user_id IS NULL', $id)))))) {
             return redirect_message(array('admin', $this->get_class()), array('_flash_message' => '找不到該筆資料。'));
         }
     }
     $this->add_tab('帳務列表', array('href' => base_url('admin', $this->get_class()), 'index' => 1))->add_tab('新增帳務', array('href' => base_url('admin', $this->get_class(), 'add'), 'index' => 2))->add_css(resource_url('resource', 'css', 'jquery-ui_v1.10.3', 'jquery-ui-1.10.3.custom.min.css'))->add_js(resource_url('resource', 'javascript', 'jquery-ui_v1.10.3', 'jquery-ui-1.10.3.custom.min.js'))->add_js(resource_url('resource', 'javascript', 'jquery-ui_v1.10.3', 'datepicker.lang', 'jquery.ui.datepicker-zh-TW.js'));
 }
Ejemplo n.º 18
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('employee_model');
     $this->load->library('form_validation');
     $this->layout->add_javascripts(array('common'));
     $this->data['img_url'] = $this->layout->get_img_dir();
     if (!is_logged_in()) {
         redirect("login");
     }
 }
Ejemplo n.º 19
0
 public function __construct()
 {
     parent::__construct();
     if (in_array($this->uri->rsegments(2, 0), array('edit', 'update', 'destroy', 'sort'))) {
         if (!(($id = $this->uri->rsegments(3, 0)) && ($this->contact = Contact::find_by_id($id)))) {
             return redirect_message(array('admin', $this->get_class()), array('_flash_message' => '找不到該筆資料。'));
         }
     }
     $this->add_tab('留言列表', array('href' => base_url('admin', $this->get_class()), 'index' => 1));
     $this->add_tab('留言列表(隱藏)', array('href' => base_url('admin', $this->get_class(), 'hidden'), 'index' => 2));
 }
Ejemplo n.º 20
0
 function __construct()
 {
     parent::__construct();
     $this->template->set_js('jquery.flash.js');
     $this->template->set_js('jquery_upload_arquivos.js');
     $this->template->set_js('tiny_mce/jquery.tinymce.js');
     $this->template->set_js('banners.js');
     $this->load->model('banners_tipos_model');
     $this->load->model('banners_model');
     $this->load->helper('combos');
     $this->load->helper('number');
     $this->load->helper('imagem');
 }
Ejemplo n.º 21
0
 function __construct()
 {
     parent::__construct();
     $this->params = array('settings' => array('default_search', 'search_label', 'search_button', 'append_search', 'autodetect_button', 'your_location_label', 'start_listing', 'csv_separator', 'measurement', 'search_within', 'map_no_scrollwheel', 'show_sidebar', 'show_distance', 'trigger_autodetect', 'show_print_link', 'show_matched_locations', 'not_found_text', 'group_output', 'limit_output', 'language', 'choose_country'), 'form' => array('form_misc1', 'form_misc2', 'form_misc3', 'form_misc4', 'form_misc5', 'form_misc6', 'form_misc7', 'form_misc8', 'form_misc9', 'form_misc10', 'form_misc1_hide', 'form_misc2_hide', 'form_misc3_hide', 'form_misc4_hide', 'form_misc5_hide', 'form_misc6_hide', 'form_misc7_hide', 'form_misc8_hide', 'form_misc9_hide', 'form_misc10_hide', 'form_products'));
     $this->data['defaults'] = array();
     reset($this->params);
     foreach ($this->params as $pk => $pa) {
         reset($pa);
         foreach ($pa as $p) {
             $this->data['defaults'][$p] = $this->app_conf->get($p);
         }
     }
 }
Ejemplo n.º 22
0
 public function __construct()
 {
     parent::__construct();
     if (!(($id = $this->uri->rsegments(3, 0)) && ($this->tag = WorkTag::find_by_id($id)))) {
         return redirect_message(array('admin', 'work_tags'), array('_flash_message' => '找不到該筆資料。'));
     }
     if (in_array($this->uri->rsegments(2, 0), array('edit', 'update', 'destroy', 'sort'))) {
         if (!(($id = $this->uri->rsegments(4, 0)) && ($this->work = Work::find_by_id($id)))) {
             return redirect_message(array('admin', 'work_tags', $this->tag->id, 'works'), array('_flash_message' => '找不到該筆資料。'));
         }
     }
     $this->add_param('class', 'work_tags')->add_tab('標籤列表', array('href' => base_url($this->tag->work_tag_id ? array('admin', 'work_tags', $this->tag->work_tag_id, 'tags') : array('admin', 'work_tags')), 'index' => 1))->add_tab('作品列表', array('href' => base_url('admin', 'works'), 'index' => 2))->add_tab('新增作品', array('href' => base_url('admin', 'work_tags', $this->tag->id, 'works', 'add'), 'index' => 3));
 }
 function __construct()
 {
     /*		
     $this->conf = array(
     	'model'			=> 'Category_model',
     	'path'			=> 'admin/categories',
     	'validation'	=> 'category',
     	);
     */
     parent::__construct();
     if (!isset($this->conf)) {
         $this->conf = array();
     }
     $this->per_page = 0;
     $this->no_load_view = FALSE;
     $this->fields = array(array('name' => 'name', 'title' => lang('location_name'), 'size' => 24));
     $model = $this->conf['model'];
     $this->load->model($model, 'model');
 }
Ejemplo n.º 24
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('auth_model', 'auth');
     $this->load->library('session');
 }
 function __construct()
 {
     parent::__construct();
     $this->template->set_js('usuarios.js');
     $this->load->model('usuarios_model');
 }
Ejemplo n.º 26
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  *	- or -  
  * 		http://example.com/index.php/welcome/index
  *	- or -
  * Since this controller is set as the default controller in 
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 public function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 27
0
 public function __construct()
 {
     parent::__construct();
     $this->restricted_pages = array('create', 'edit', 'approve', 'index', 'edit', 'view', 'search_result', 'search', 'export');
     $this->load->model('user_model');
 }
Ejemplo n.º 28
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('shared/app_settings_model');
 }
Ejemplo n.º 29
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('Category_model', 'category');
 }
 function __construct()
 {
     parent::__construct();
     $this->template->set_js('categorias.js');
     $this->load->model('categorias_model');
 }