Exemplo n.º 1
0
 function __construct()
 {
     parent::__construct();
     if (!$this->session->userdata('lang')) {
         $this->session->set_userdata('lang', 'th');
     }
     $this->template->title('สำนักโรคติดต่อทั่วไป :: Bureau of General Communicable Department of Disease Control MOPH, Thailand');
     $this->session->userdata('th', "gcdnew");
     $this->session->userdata('en', "gcdeng");
     $this->template->set_theme('thaigcd2015');
     $this->template->set_layout('layout');
     // Set js
     $this->lang->load('admin');
     $this->template->append_metadata(js_notify());
     $this->template->append_metadata(js_lightbox());
     // set lang
     if (!$this->session->userdata('lang')) {
         $this->session->set_userdata('lang', 'th');
     }
     if (@$this->session->userdata('lang') == "th") {
         $this->lang->load('public', 'thai');
     } else {
         $this->lang->load('public', 'english');
     }
 }
Exemplo n.º 2
0
 function index()
 {
     $webboard_relate_dels = new Webboard_relate_del();
     $data['webboard_relate_dels'] = $webboard_relate_dels->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/webboard_relate_del_index', $data);
 }
Exemplo n.º 3
0
 function index()
 {
     $categories = new Category();
     $data['categories'] = $categories->where("module = 'webboard_quizs' and parents <> 0")->order_by('orderlist', 'asc')->get_page();
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/category_index', $data);
 }
Exemplo n.º 4
0
 function index()
 {
     $this->template->set_layout('lightbox');
     $categories = new Category();
     $data['categories'] = $categories->where("module = 'newsletters' and parents <> 0")->order_by('id', 'desc')->get_page();
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/category_index', $data);
 }
Exemplo n.º 5
0
 function index()
 {
     $data['users'] = new User();
     @$_POST['search'] ? $data['users']->like('username', $_POST['search']) : '';
     $data['users']->order_by('chat_operator', 'approve')->get_page();
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/operator_index', $data);
 }
Exemplo n.º 6
0
 function index()
 {
     $webboard_quizs = new Webboard_quiz();
     if (@$_POST['category_id']) {
         $webboard_quizs->where('category_id', $_POST['category_id']);
     }
     $data['webboard_quizs'] = $webboard_quizs->order_by('id', 'desc')->get_page();
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/webboard_index', $data);
 }
Exemplo n.º 7
0
 function index()
 {
     $data['hilights'] = new hilight();
     if (@$_GET['status']) {
         $data['hilights']->where('status', $_GET['status']);
     }
     auth_filter($data['hilights'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/hilight_index', $data);
 }
Exemplo n.º 8
0
 function __construct()
 {
     parent::__construct();
     // Check Auth Login
     $this->template->title('Thaigcd.ddc.moph.go.th - ระบบแบบสอบถาม');
     $this->template->set_theme('question');
     $this->template->set_layout('layout');
     $this->lang->load('admin');
     $this->template->append_metadata(js_notify());
     $this->template->append_metadata(js_lightbox());
 }
Exemplo n.º 9
0
 function index($category_id = FALSE)
 {
     $articles = new Article();
     if ($category_id) {
         $category = new Category($category_id);
         $articles->where("category_id in (select id from categories where lft >= " . $category->lft . " and rgt <= " . $category->rgt . " and module = '" . $category->module . "')");
     }
     $data['articles'] = $articles->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/article_index', $data);
 }
Exemplo n.º 10
0
 function index($id = FALSE)
 {
     $data['categories'] = new Category($id);
     $galleries = new Gallery();
     if (@$_POST['category_id']) {
         $id = $_POST['category_id'];
     }
     $data['galleries'] = $galleries->where('category_id', $id)->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/gallery_index', $data);
 }
Exemplo n.º 11
0
 function index()
 {
     $data['weblinks'] = new Weblink();
     if (@$_GET['search']) {
         $data['weblinks']->where("title like '%" . $_GET['search'] . "%'");
     }
     if (@$_GET['category_id']) {
         $data['weblinks']->where("category_id = " . $_GET['category_id']);
     }
     $data['weblinks']->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->build('admin/weblinks_index', $data);
 }
Exemplo n.º 12
0
 function index()
 {
     $data['faqs'] = new Faq();
     if (@$_GET['search']) {
         $data['faqs']->where("question like '%" . $_GET['search'] . "%'");
     }
     if (@$_GET['category_id']) {
         $data['faqs']->where("category_id = " . $_GET['category_id']);
     }
     $data['faqs']->order_by('orderlist', 'asc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/faqs_index', $data);
 }
Exemplo n.º 13
0
 function index()
 {
     $vdo = new Vdo();
     if (@$_GET['search']) {
         $vdo->where("title like '%" . $_GET['search'] . "%'");
     }
     if (@$_GET['category_id']) {
         $vdo->where("category_id = " . $_GET['category_id']);
     }
     $data['rs'] = $vdo->order_by('id', 'desc')->get();
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/index', $data);
 }
Exemplo n.º 14
0
 function index()
 {
     $categories = new Category();
     if (!empty($_POST['search'])) {
         $categories->where("name like '%" . $_POST['search'] . "%'");
     }
     if (@$_GET['status']) {
         $categories->where('status', $_GET['status']);
     }
     $data['categories'] = auth_filter($categories)->where("module = 'galleries' and parents <> 0")->order_by('id', 'desc')->get_page();
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/category_index', $data);
 }
Exemplo n.º 15
0
 function index()
 {
     $data['executives'] = new Executive();
     if (isset($_GET['search'])) {
         $data['executives']->where('title like \'%' . $_GET['search'] . '%\'');
     }
     if (@$_GET['status']) {
         $data['executives']->where('status', $_GET['status']);
     }
     auth_filter($data['executives'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/executive_index', $data);
 }
Exemplo n.º 16
0
 function index()
 {
     $data['notices'] = new Notice();
     if (@$_GET['search']) {
         $data['notices']->where("title like '%" . $_GET['search'] . "%'");
     }
     if (@$_GET['status']) {
         $data['notices']->where('status', $_GET['status']);
     }
     if (@$_GET['category_id']) {
         $data['notices']->where("category_id = " . $_GET['category_id']);
     }
     auth_filter($data['notices'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_lightbox())->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/notice_index', $data);
 }
Exemplo n.º 17
0
 function __construct()
 {
     parent::__construct();
     // Check Auth Login
     if (!is_login()) {
         set_notify('error', 'คุณไม่มีสิทธิเข้าใช้งานในส่วนนี้ค่ะ');
         redirect('home');
     } else {
         if (!is_publish('documents')) {
             set_notify('error', 'คุณไม่มีสิทธิเข้าใช้งานในส่วนนี้ค่ะ');
             redirect('home');
         }
     }
     $this->template->title('Thaigcd.ddc.moph.go.th - ระบบลงทะเบียนการประชุม');
     $this->template->set_theme('document');
     $this->template->set_layout('layout');
     $this->lang->load('admin');
     $this->template->append_metadata(js_notify());
     $this->template->append_metadata(js_lightbox());
 }