function tag($tag) { $data['tag'] = $tag; $data['informations'] = new Information(); lang_filter($data['informations']->where("tag like '%{$tag}%'"))->get_page(limit()); $this->template->build('information_tag', $data); }
function inc_home($id = FALSE) { if ($id) { $data['notices'] = new Notice(); lang_filter($data['notices'])->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and notices.status = 'approve'")->order_by('start_date', 'desc')->where('group_id', $id)->limit(5)->get(); $this->load->view('inc_group', $data); } else { $data['notices'] = new Notice(); lang_filter($data['notices'])->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and status = 'approve'")->order_by('start_date', 'desc')->limit(5)->get(); $this->load->view('inc_index', $data); } }
echo lang_decode($category->name); ?> </a></li> <?php } ?> </ul> <?php foreach ($categories as $key => $category) { ?> <div id="tabs-<?php echo $key + 1; ?> "> <?php foreach (lang_filter($category->information->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and status = 'approve'"))->order_by('id', 'desc')->get() as $information) { ?> <div class="box"> <a href="informations/view/<?php echo $information->id; ?> " class="thumb" <?php echo pathinfo($information->pdf, PATHINFO_EXTENSION) == "pdf" ? 'target="_blank"' : ''; ?> ><img src="<?php echo is_file('uploads/information/thumbnail/' . $information->image) ? 'uploads/information/thumbnail/' . $information->image : 'themes/thaigcd/photo/nophoto.gif'; ?> " width="77" height="64" /></a> <div class="box_info"> <span><?php echo mysql_to_th($information->start_date);
function exe_more() { $executives = new Executive(); lang_filter($executives->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and status = 'approve'")); $data['executives'] = $executives->order_by('id', 'desc')->get(); $this->template->build('exe_more', $data); }