function paymentAction() { $this->_helper->layout()->disableLayout(); $db = new Application_Model_DbTable_DbGlobal(); $db_mail = new Application_Model_DbTable_DbSendEmail(); $id = $this->getRequest()->getParam("id"); if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); if ($id == 1) { $session_step_one = new Zend_Session_Namespace('booking'); $user_ip = $session_step_one->user_ip; $db->updateVisualBookingStebSix($user_ip, $data); $booking_id = $db->addBooking($user_ip); $db_mail->sendInvoiceEmail($booking_id); $session_step_one = new Zend_Session_Namespace('booking'); $session_step_one->unsetAll(); $session_step_two = new Zend_Session_Namespace('step_two'); $session_step_two->unsetAll(); $session_step_three = new Zend_Session_Namespace('step_three'); $session_step_three->unsetAll(); $session_step_four = new Zend_Session_Namespace('step_four'); $session_step_four->unsetAll(); $session_step_five = new Zend_Session_Namespace('step_five'); $session_step_five->unsetAll(); Application_Form_FrmMessage::redirectUrl("/index"); } elseif ($id == 2) { $db_citytour = new Application_Model_DbTable_Dbbookingcitytour(); $booking_id = $db_citytour->addCityTourBooking($data); $db_mail->sendInvoiceEmail($booking_id); $session = new Zend_Session_Namespace('bookcitytour'); $session->unsetAll(); Application_Form_FrmMessage::redirectUrl("/index"); } elseif ($id == 3) { $db_citytour = new Application_Model_DbTable_Dbstuffrental(); $booking_id = $db_citytour->addProductRental($data); $db_mail->sendInvoiceEmail($booking_id); $session = new Zend_Session_Namespace('stuffbooking'); $session->unsetAll(); Application_Form_FrmMessage::redirectUrl("/index"); } elseif ($id == 4) { $db_citytour = new Application_Model_DbTable_Dbguiderental(); $booking_id = $db_citytour->addProductRental($data); $db_mail->sendInvoiceEmail($booking_id); // $session =new Zend_Session_Namespace('guidebooking'); // $session->unsetAll(); // Application_Form_FrmMessage::redirectUrl("/index"); } } }