コード例 #1
0
ファイル: form.php プロジェクト: nephie/AZL-website
 public function confirmed($controller, $title = '')
 {
     $this->id .= '_confirm';
     $this->addField(new hiddenField('confirmed', 'confirmed'));
     if ($this->sentdata['confirmed'] == 'confirmed') {
         $popup = new popupController();
         $popup->destroy(array('name' => 'confirm'));
         foreach ($this->sentdata as $key => $value) {
             $this->sentdata[$key] = stripslashes($value);
         }
         return true;
     } else {
         $this->confirm($controller, $title);
     }
     return false;
 }
コード例 #2
0
 public function deletegast($parameters)
 {
     $gastid = $parameters['gastid'];
     $popupcontroller = new popupController();
     $gastModel = new ingeschrevenModel();
     $gast = $gastModel->getfromId($gastid);
     if (count($gast) == 1) {
         $gast = $gast[0];
     } else {
         return;
     }
     $sure = $parameters['sure'];
     if ($sure != 'sure') {
         $template = new ui($this);
         $template->assign('gast', $gast);
         $ja = new ajaxrequest('myvoorinschrijving', 'deletegast', array('gastid' => $gastid, 'sure' => 'sure'));
         $template->assign('ja', $ja);
         $popupcontroller->create(array('name' => 'confirm', 'content' => $template->fetch('myvoorinschrijving_confirmdelete.tpl')));
     } elseif (myacl::isAllowed(myauth::getCurrentuser(), $gast, 'delete')) {
         $popupcontroller->destroy(array('name' => 'confirm'));
         $gastModel->deletebyId($gastid);
         $this->response->remove($gastid . '_rij');
     }
 }
コード例 #3
0
 public function reprint($parameters = array())
 {
     $sure = $parameters['sure'];
     $popupcontroller = new popupController();
     $model = new mealorderModel();
     $order = $model->getfromId($parameters['id']);
     if (count($order) == 1) {
         $order = $order[0];
         if ($order->getPrinted()) {
             if ($sure != 'sure') {
                 $template = new ui($this);
                 $ja = new ajaxrequest('mycafetaria', 'reprint', array('id' => $parameters['id'], 'sure' => 'sure'));
                 $template->assign('ja', $ja);
                 $popupcontroller->create(array('name' => 'confirm', 'content' => $template->fetch('mycafetaria_confirmreprint.tpl')));
             } else {
                 $popupcontroller->destroy(array('name' => 'confirm'));
                 $order->setPrinted(0);
                 $model->save($order);
                 $this->listallorders();
             }
         }
     }
 }