function video($id = false) { if ($id) { $video = db_read('mod_video', array('status' => 1, 'id' => $id)); $view['video'] = $video; $this->load->view(tpldir('page/video'), $view); } else { $video = db_reads('mod_video', array('status' => 1)); $count_video = count_db_reads('mod_video', array('status' => 1)); $view['video'] = $video; $view['count_video'] = $count_video; $this->load->view(tpldir('page/video-list'), $view); } }
function detail($id = false) { if ($id) { $_GET['nooffset'] = true; $view['asset_dir'] = db_read('mod_asset_dir', array('id' => $id)); $_GET['nooffset'] = false; if (!$view['asset_dir']) { redirect(base_url('admin/asset')); } $view['asset'] = db_reads('mod_asset', array('dirid' => $id)); $view['count_asset'] = count_db_reads('mod_asset', array('dirid' => $id)); $this->load->view(tpldir('admin/extension/asset/detail_view'), $view); } }
function index() { $where = array(); $where['type'] = 'page'; if ($this->input->get('title')) { $where['title'] = '%' . $this->input->get('title'); } $order = false; if ($this->input->get('filter')) { if ($this->input->get('filter') == 'oldest') { $order['date'] = 'asc'; } elseif ($this->input->get('filter') == 'latest') { $order['date'] = 'desc'; } } $view['pages'] = db_reads('page', $where, $order); $view['count_pages'] = count_db_reads('page', $where); $this->load->view(tpldir('admin/page/index_view'), $view); }
function index() { $view['event'] = db_reads('page', array('type' => 'event')); $view['count_event'] = count_db_reads('page', array('type' => 'event')); $this->load->view(tpldir('admin/event/index_view'), $view); }
function index() { $view['video'] = db_reads('mod_video'); $view['count_video'] = count_db_reads('mod_video'); $this->load->view(tpldir('admin/extension/video/index_view'), $view); }