Example #1
0
 function index()
 {
     $rs = new Category();
     $data['rs'] = $rs->where('module = "services"')->order_by('id', 'desc')->get();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/index', $data);
 }
Example #2
0
 function index()
 {
     $coverpages = new Coverpage();
     $data['coverpages'] = $coverpages->get_page();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/cover_index', $data);
 }
Example #3
0
 function index()
 {
     $data['rs'] = new Talk();
     $data['rs']->order_by('id', 'desc')->get();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/index', $data);
 }
Example #4
0
 function index()
 {
     $highlight = new Hilight();
     $data['rs'] = $highlight->order_by('id', 'desc')->get();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/hilight_index', $data);
 }
Example #5
0
 public function index()
 {
     $data['rs'] = new Patient();
     // if(!empty($_POST['search']))$data['users']->where("username like '%".$_POST['search']."%'");
     $data['rs']->get();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/index', $data);
 }
Example #6
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);
 }
Example #7
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);
 }
Example #8
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);
 }
Example #9
0
 function form($id = FALSE)
 {
     $data['level'] = new Level($id);
     $data['level']->auth = json_decode($data['level']->auth);
     $modules = new Module();
     $data['modules'] = $modules->get();
     $this->template->append_metadata(js_checkbox());
     $this->template->build('admin/level_form', $data);
 }
Example #10
0
 function index()
 {
     $data['polls'] = new poll();
     if (isset($_POST['search'])) {
         $data['polls']->where('title like \'%' . $_POST['search'] . '%\'');
     }
     $data['polls']->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_checkbox());
     $this->template->build('admin/poll_index', $data);
 }
Example #11
0
 function index()
 {
     $menus = new Menu();
     if (@$_GET['status']) {
         $menus->where('status', $_GET['status']);
     }
     $data['menus'] = $menus->order_by('orderlist', 'asc')->get_page(limit());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/menu_index', $data);
 }
Example #12
0
 function index()
 {
     $data['english_zones'] = new English_zone();
     if (@$_GET['search']) {
         $data['informations']->where("title like '%" . $_GET['search'] . "%'");
     }
     auth_filter($data['english_zones'])->order_by('id', 'desc')->get_page(limit());
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/english_zone_index', $data);
 }
Example #13
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);
 }
Example #14
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();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/weblinks_index', $data);
 }
Example #15
0
 function index()
 {
     $data['contents'] = new Content();
     if (@$_GET['title']) {
         $data['books']->where("title like '%" . $_GET['title'] . "%'");
     }
     if (@$_GET['category_id']) {
         $data['books']->where('category_id', $_GET['category_id']);
     }
     $data['contents']->order_by('orderlist', 'asc')->order_by('id', 'desc')->get();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/index', $data);
 }
Example #16
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);
 }
Example #17
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);
 }
Example #18
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);
 }
Example #19
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);
 }
Example #20
0
 function get_intranet_data()
 {
     include 'themes/msosocial/odbc_connect.php';
     $this->load->helper('html');
     $rs_intranet = $db->Execute("select * from INTRANET_ACTCALENDAR WHERE ROWNUM <=12 ORDER BY ID DESC");
     //insert data to db mso
     foreach ($rs_intranet as $row) {
         dbConvert($row);
         $intranet_id = $row['id'];
         $type_cal = $row['actcalendar_type_id'];
         $type_name = 'อบรม';
         if ($type_cal == '7') {
             $type_name = 'อบรม';
         } elseif ($type_cal == '8') {
             $type_name = 'ประชุม';
         } elseif ($type_cal == '9') {
             $type_name = 'กิจกรรม';
         }
         $rs_check = new content_calendar();
         $rs_check->where('intranet_id = "' . $intranet_id . '"')->order_by('id', 'desc')->get();
         if (!$rs_check->id) {
             $rs = new content_calendar();
             $rs->title = $row['title'];
             $rs->detail = $row['detail'];
             $rs->image = 'no image';
             $rs->created = date('Y-m-d H:i:s');
             $rs->updated = date('Y-m-d H:i:s');
             $rs->module = 'mso';
             $rs->category = $row['actcalendar_type_id'];
             $rs->slug = $type_name;
             $rs->status = 'approve';
             $rs->user_id = 49;
             $rs->orderlist = 0;
             $rs->counter = 0;
             $rs->start_date = date('Y-m-d H:i:s');
             $rs->end_date = date('Y-m-d H:i:s');
             $rs->intranet_id = $row['id'];
             $rs->source_data = 'mso';
             $rs->place = 'mso';
             $rs->save();
         }
     }
     //set_notify('success', lang('save_data_complete'));
     //**********
     $data['rs'] = new content_calendar();
     $data['rs']->where("module = 'mso'")->order_by('id desc')->get();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/index', $data);
 }
Example #21
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);
 }
Example #22
0
 function get_intranet_data()
 {
     include 'themes/fundv2/odbc_connect.php';
     $this->load->helper('html');
     $rs_intranet = $db->Execute("select * from WEB_NEWS WHERE ROWNUM <=12 ORDER BY ID DESC");
     //insert data to db mso
     $count_news_mso = 0;
     foreach ($rs_intranet as $row) {
         dbConvert($row);
         //http://intranet.m-society.go.th/upload/newsletters/
         $intranet_id = $row['id'];
         $rs_check = new Info();
         $rs_check->where('intranet_id = "' . $intranet_id . '"')->order_by('id', 'desc')->get();
         if (!$rs_check->id) {
             $rs = new Info();
             $rs->title = $row['title'];
             $rs->detail = $row['detail'];
             $rs->image = $row['img_title'];
             $rs->created = date('Y-m-d H:i:s');
             $rs->updated = date('Y-m-d H:i:s');
             $rs->start_date = date('Y-m-d H:i:s');
             $rs->end_date = date('Y-m-d H:i:s');
             $rs->module = 'ข่าวประชาสัมพันธ์';
             $rs->slug = 'mso';
             $rs->status = 'approve';
             $rs->user_id = 49;
             $rs->counter = 0;
             $rs->intranet_id = $row['id'];
             $rs->save();
             $count_news_mso++;
         }
     }
     //set_notify('success', lang('save_data_complete'));
     //**********
     $data['count_news_mso'] = $count_news_mso;
     $data['get_intranet'] = 'mso';
     $data['rs'] = new Info();
     $data['rs']->where('module = "ข่าวประชาสัมพันธ์"')->order_by('id', 'desc')->get();
     $this->template->append_metadata(js_checkbox('approve'));
     $this->template->build('admin/index', $data);
 }
Example #23
0
 function banner()
 {
     if ($this->session->userdata('facebook_id') == '1122018497830648') {
         $data['rs'] = new Banner();
         $data['rs']->order_by('end_date asc')->get_page();
         $this->template->append_metadata(js_checkbox('approve'));
         $this->template->build('banner', $data);
     } else {
         set_notify('error', 'คำสั่งไม่ถูกต้อง');
         redirect('home');
     }
 }