Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. Controller for the forms
  2.  
  3. public function form($id = NULL)
  4.     {
  5.         if ($this->input->post('btn_cancel'))
  6.         {
  7.             redirect('portlets');
  8.         }
  9.  
  10.         if ($this->wc_portlets->run_validation())
  11.         {
  12.             $id = $this->wc_portlets->save($id);
  13.             redirect('portlets/index/' . $id);
  14.  
  15.         }
  16.  
  17.         if ($id and !$this->input->post('btn_submit'))
  18.         {
  19.             $this->wc_portlets->prep_form($id);
  20.         }
  21.  
  22.         $this->layout->buffer('content', 'portlets/form');
  23.         $this->layout->render();
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement