Exemplo n.º 1
0
 public function mainReaction()
 {
     // drop if no checkbox have been checked
     if (!$this->fc->chkReqVar('chk')) {
         // -TODO- show error
         $this->fc->redirect($this->fc->getUrl('task', 'main'), '[error]none_checked');
     }
     // check action request
     $action = $this->fc->chkReqVar('report,open,close,valid,archive,unarchive');
     // do it then
     TaskModel::updateManyAtOnce($action, $_POST['chk']);
     // reload entire page
     $this->fc->redirect($this->fc->getUrl('task', 'main'));
 }