private function processPost($p) { if (!isset($this->options['borrow'])) { $p['take-from-group'] = -999; } else { if (!$this->options['borrow']) { $p['take-from-group'] = -999; } } if (!$this->options['deferral']) { $p['deferral'] = 0; } if (isset($p['order'])) { $b = new ReservationBooking($this->user, $this->title); if ('add_booking_overnight' == $p['order']) { $this->deleteOldMessages($this->getUser()->getID()); $this->messages[] = $b->submitBookingOvernight($p); } else { if ('add_booking' == $p['order']) { $this->deleteOldMessages($this->getUser()->getID()); $this->messages[] = $b->submitBooking($p); } else { if ('cancel_booking' == $p['order']) { $this->deleteOldMessages($this->getUser()->getID()); $this->messages[] = $b->cancelBooking($p); } } } } if (count($this->messages) > 0) { foreach ($this->messages as $m) { if (isset($m['type']) && isset($m['message'])) { $this->addMessage($this->getUser()->getID(), time(), $m['message'], $m['type']); } } } //echo __FILE__ . " messages " . print_r($this->messages,1); }