Exemplo n.º 1
0
 function setconfig($key, $value)
 {
     $c = new cauhinh();
     $c->where('fieldname', $key);
     $c->get();
     if (!$c->exists()) {
         show_error('Could not find config field ' . $key);
     }
     $c->value = $value;
     $c->save();
 }
Exemplo n.º 2
0
 function delete()
 {
     $id = $this->uri->segment(4);
     $cauhinh = new cauhinh($id);
     if (!$cauhinh->exists()) {
         show_404();
     }
     $cauhinh->delete();
     redirect($this->admin . 'cauhinhs/list_all/');
 }