Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public function customerloginAction()
 {
     if ($this->getRequest()->isPost()) {
         $formdata = $this->getRequest()->getPost();
         $user_name = $formdata['user_name'];
         $password = $formdata['password'];
         $db_user = new Application_Model_DbTable_DbCustomer();
         if ($db_user->customerAuthenticate($user_name, $password)) {
             $step_four = new Zend_Session_Namespace('step_four');
             $step_four->step4 = 1;
             $session_user = new Zend_Session_Namespace('customer');
             $user_id = $db_user->getCustomerId($user_name);
             $user_info = $db_user->getUserById($user_id, 1);
             $session_user->customer_session = 1;
             $session_user->customer_id = $user_id;
             $session_user->customer_name = $user_name;
             $session_user->pwd = $password;
             $session_user->last_name = $user_info['last_name'];
             $session_user->first_name = $user_info['first_name'];
             $dbbooking = new Application_Model_DbTable_Dbbookingtaxi();
             $dbbooking->createSessionTaxiBooking($formdata, 3);
         } else {
             Application_Form_FrmMessage::message("ឈ្មោះ​អ្នក​ប្រើ​ប្រាស់ និង ពាក្យ​​សំងាត់ មិន​ត្រឺម​ត្រូវ​ទេ ");
             $this->view->msg = 'ឈ្មោះ​អ្នក​ប្រើ​ប្រាស់ និង ពាក្យ​​សំងាត់ មិន​ត្រឺម​ត្រូវ​ទេ ';
         }
         Application_Form_FrmMessage::redirectUrl("/taxi/index");
         // 				}
     }
     $frmbooks = new Application_Form_FrmBooking();
     $frmbooking = $frmbooks->FromBooking();
     Application_Model_Decorator::removeAllDecorator($frmbooking);
     $this->view->frmbooking = $frmbooking;
 }
Ejemplo n.º 3
0
 function citytourbookingAction()
 {
     $session_tour = new Zend_Session_Namespace('bookcitytour');
     $dbbooking = new Application_Model_DbTable_Dbbookingcitytour();
     if (empty($session_tour->step1)) {
         $this->_redirect("/index/citytour");
     }
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if (isset($post["confirm_book"])) {
             $dbbooking->createSessionBookingCityTour($post, 6);
         } elseif (isset($post["term_condiction"])) {
             $dbbooking->createSessionBookingCityTour($post, 5);
         }
     }
     $db = new Application_Model_DbTable_DbGlobal();
     $row_vehicle = array();
     $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->user_session = $customer_user_session;
     $frmbooks = new Application_Form_FrmBooking();
     $frmbooking = $frmbooks->FromBooking();
     Application_Model_Decorator::removeAllDecorator($frmbooking);
     $this->view->frmbooking = $frmbooking;
     $this->view->pickup_info = $session_tour;
     /*********************Step 3 sucess*/
     //     	if(!empty($session_tour->step3)){
     //     	}
     //     	/*********************step 4 sucess*/
     //     	if(!empty($session_tour->step4)){
     //     	}
 }
Ejemplo n.º 4
0
 function forgetpassAction()
 {
     $db = new Application_Model_DbTable_DbCustomer();
     $url = $this->getRequest()->getParam("url");
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         if (!empty($url)) {
             $db->updatePassword($data, $url);
             Application_Form_FrmMessage::Sucessfull("Your password have been updated!", "/customer/customerlogin");
         } else {
             $db->passLink($data["email"]);
             Application_Form_FrmMessage::Sucessfull("Your E-mail Have Been Sent./n Please Check Your E-mali !", "/customer/customerlogin");
         }
     }
     $frm = new Application_Form_FrmBooking();
     $form = $frm->FrmCustomer();
     $this->view->frms = $form;
     $this->view->url = $url;
 }