Exemplo n.º 1
0
 function inc_home()
 {
     $hilight = new Hilight();
     //$data['rs'] = $hilight->where('status = "approve"')->order_by('id','desc')->limit(5)->get();
     $data['rs'] = $hilight->where('status = "approve"')->order_by('id', 'desc')->get();
     $this->load->view('inc_home', $data);
 }
 public function delete($id)
 {
     if ($id) {
         $data = new Hilight($id);
         $action = 'DELETE';
         save_logs($this->menu_id, $action, @$data->id, $action . ' ' . $data->org_name . ' Organizations ');
         $data->delete();
     }
     redirect("admin/organizations");
 }
 public function delete($id)
 {
     if ($this->perm->can_delete == 'y') {
         if ($id) {
             $data = new Hilight($id);
             $action = 'DELETE';
             save_logs($this->menu_id, $action, $data->id, $action . ' Hilights ');
             $data->delete();
         }
     }
     redirect("admin/hilights");
 }
Exemplo n.º 4
0
 function save_orderlist($id = FALSE)
 {
     if ($_POST) {
         foreach ($_POST['orderlist'] as $key => $item) {
             if ($item) {
                 $hilight = new Hilight(@$_POST['orderid'][$key]);
                 $hilight->from_array(array('orderlist' => $item));
                 $hilight->save();
             }
         }
         set_notify('success', lang('save_data_complete'));
     }
     redirect($_SERVER['HTTP_REFERER']);
 }