本文整理汇总了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);
}
示例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);
}
}