当前位置: 首页>>代码示例>>PHP>>正文


PHP Booking::checkAvailablity方法代码示例

本文整理汇总了PHP中Booking::checkAvailablity方法的典型用法代码示例。如果您正苦于以下问题:PHP Booking::checkAvailablity方法的具体用法?PHP Booking::checkAvailablity怎么用?PHP Booking::checkAvailablity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Booking的用法示例。


在下文中一共展示了Booking::checkAvailablity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkavailabilityAction

 public function checkavailabilityAction()
 {
     global $mySession;
     $db = new Db();
     $res = array("error" => "true", "success" => "true", "message" => "no posted data");
     $book = new Booking();
     if ($this->getRequest()->isPost()) {
         $dataForm = $this->getRequest()->getParams();
         $result = $book->checkAvailablity($dataForm, $dataForm['pptyId']);
         if ($result["output"]) {
             $res["cost"] = $result["cost"] ? $result["cost"] : 0;
             $res["error"] = "false";
             $res["success"] = "true";
         } else {
             $res["message"] = $result["message"];
             $res["error"] = "true";
             $res["success"] = "false";
         }
     }
     echo $this->_helper->json($res);
 }
开发者ID:ankuradhey,项目名称:dealtrip,代码行数:21,代码来源:BookingController-7-06-2015.php

示例2: processbookAction

 public function processbookAction()
 {
     global $mySession;
     $db = new Db();
     $dataForm = array();
     $dataextraForm = array();
     $this->core();
     $myform = new Form_Booking($this->ppty);
     $this->view->myform = $myform;
     $request = $this->getRequest();
     if ($this->getRequest()->isPost() && isset($_REQUEST['agree'])) {
         if ($myform->isValid($request->getPost())) {
             $book = new Booking();
             $dataForm = $myform->getValues();
             $result = $book->checkAvailablity($dataForm, $this->ppty);
             if ($result === 1) {
                 $this->_redirect("booking/index/step/2/ppty/" . $this->ppty);
             } else {
                 $mySession->errorMsg = $result;
                 $this->render("index");
             }
         } else {
             $this->_redirect("booking/index/step/2/ppty/" . $this->ppty);
         }
     } else {
         $this->_redirect("booking/index/ppty/" . $this->ppty);
     }
 }
开发者ID:ankuradhey,项目名称:dealtrip,代码行数:28,代码来源:_BookingController.php


注:本文中的Booking::checkAvailablity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。