function indexAction()
 {
     $dbbooking = new Application_Model_DbTable_Dbstuffrental();
     $db_globle = new Application_Model_DbTable_DbGlobal();
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if (isset($post["term_condiction"])) {
             $dbbooking->createSessionStuffBooking($post, 3);
             //print_r("test");exit();
             $this->_redirect("stuffbooking/index");
         } elseif (isset($post["confirm_book"])) {
             $dbbooking->createSessionStuffBooking($post, 4);
             $this->_redirect("stuffbooking/index");
         }
     }
     $customer_session = new Zend_Session_Namespace('customer');
     $user_session = $customer_session->customer_session;
     if (!empty($user_session)) {
         $customer_user_session = $user_session;
         $customer_user = $customer_session->customer_id;
         $this->view->user_name = $customer_session->customer_name;
         $this->view->user_info = $customer_session->user_info;
     } else {
         $customer_user_session = 0;
     }
     $db = new Application_Model_DbTable_Dbbookingtaxi();
     $session = new Zend_Session_Namespace('stuffbooking');
     $this->view->bookinginfo = $session;
     $this->view->producttermcomdiction = $db_globle->getAllParameter('producttermcomdiction');
     $frmbooks = new Application_Form_FrmBooking();
     $frmbooking = $frmbooks->FromBooking();
     Application_Model_Decorator::removeAllDecorator($frmbooking);
     $this->view->frmbooking = $frmbooking;
     $this->view->user_session = $customer_user_session;
 }
Example #2
0
 function indexAction()
 {
     $db_globle = new Application_Model_DbTable_DbGlobal();
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if (isset($post["search_vehicle"])) {
             $row = $db->getAvailableVehicle($post);
             if ($row) {
                 $session_booking = new Zend_Session_Namespace('booking');
                 $session_booking->step_one = 1;
                 $session_booking->pickup_date = $post["pickup_date"];
                 $session_booking->return_date = $post["return_date"];
                 $session_booking->pickup_time = $post["pickup_time"];
                 $session_booking->return_time = $post["return_time"];
                 $session_booking->pickup_location = $post["pickup_location"];
                 $session_booking->return_location = $post["return_location"];
                 $diff = date_diff($post["pickup_date"], $post["return_date"]);
                 $session_booking->total_day = $diff->format("%a%");
                 Application_Form_FrmMessage::redirectUrl("/index/booking");
             } else {
                 Application_Form_FrmMessage::message("No Vehicle Available!");
             }
         } elseif (isset($post["confirm_book"])) {
             $dbbooking = new Application_Model_DbTable_Dbbookingtaxi();
             $dbbooking->createSessionTaxiBooking($post, 4);
         } elseif (isset($post["term_condiction"])) {
             $dbbooking = new Application_Model_DbTable_Dbbookingtaxi();
             $dbbooking->createSessionTaxiBooking($post, 3);
         }
     }
     $customer_session = new Zend_Session_Namespace('customer');
     $user_session = $customer_session->customer_session;
     if (!empty($user_session)) {
         $customer_user_session = $user_session;
         $customer_user = $customer_session->customer_id;
         $this->view->user_name = $customer_session->customer_name;
         $this->view->user_info = $customer_session->user_info;
     } else {
         $customer_user_session = 0;
     }
     $this->view->termcondiction = $db_globle->getAllParameter('taxitermcondiction');
     $this->view->user_session = $customer_user_session;
     $db = new Application_Model_DbTable_Dbbookingtaxi();
     $this->view->alllocation = $db->getAllLocation();
     $session = new Zend_Session_Namespace('taxibooking');
     $this->view->bookinginfo = $session;
     $frmbooks = new Application_Form_FrmBooking();
     $frmbooking = $frmbooks->FromBooking();
     Application_Model_Decorator::removeAllDecorator($frmbooking);
     $this->view->frmbooking = $frmbooking;
 }
Example #3
0
 function bookingserviceAction()
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $defual_guide = $db->getAllParameter("Defualt Rental Guide");
     $car_rental = $db->getAllParameter("Car Rental Service Guide");
     $city_tour = $db->getAllParameter("City Tour Service");
     $taxi = $db->getAllParameter("Taxi Rental Service Guide");
     $product = $db->getAllParameter("Product Rental Guide");
     $guide = $db->getAllParameter("Guide Rental Service Guide");
     $driver = $db->getAllParameter("Driver Rental Guide");
     $this->view->defual_guide = $defual_guide;
     $this->view->carrental = $car_rental;
     $this->view->citytour = $city_tour;
     $this->view->taxi = $taxi;
     $this->view->product = $product;
     $this->view->guide = $guide;
     $this->view->drive = $driver;
 }