本文整理汇总了PHP中Booking::getBookingById方法的典型用法代码示例。如果您正苦于以下问题:PHP Booking::getBookingById方法的具体用法?PHP Booking::getBookingById怎么用?PHP Booking::getBookingById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Booking
的用法示例。
在下文中一共展示了Booking::getBookingById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DatabaseBean
<?php
include_once 'config.php';
include_once '../checkAdminPagePermissions.php';
$dbBean = new DatabaseBean();
$general = new General($dbBean);
$menu_id = empty($_REQUEST['menu_id']) ? $_SESSION['menu_id'] : $_REQUEST['menu_id'];
$heading = $general->getPageHeading($menu_id);
$Booking = new Booking($dbBean);
$rows = $Booking->getBookingById($_REQUEST['id']);
?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<?php
include '../common.php';
?>
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="<?php
echo ADMIN_URL;
?>
/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="<?php
echo ADMIN_URL;
?>
示例2:
if ($resource[5] == 'UserId') {
if (isset($resource[6]) && $resource[6] != "" && is_numeric($resource[6])) {
//[6] => user id
if (isset($resource[7]) && $resource[7] != "" && $resource[7] == 'pending') {
$results['booking'] = Booking::getBookingByUserIdPending($resource[6]);
} else {
$results['booking'] = Booking::getBookingByUserId($resource[6]);
}
//if given is id
}
//else echo json_encode(array('error'=>'true', 'error_message'=>'Invalid User ID.'));
} else {
if ($resource[5] == 'BookingId') {
if (isset($resource[6]) && $resource[6] != "" && is_numeric($resource[6])) {
//[6] => booking id
$results['booking'] = Booking::getBookingById($resource[6]);
//if given is id and pending
}
//else echo json_encode(array('error'=>'true', 'error_message'=>'Invalid Booking ID.'));
} else {
if ($resource[5] == 'EventSchedId') {
if (isset($resource[6]) && $resource[6] != "" && is_numeric($resource[6])) {
//[6] => event id
$results['booking'] = Booking::getBookingByEventSchedId($resource[6]);
//if given is id and pending
}
} else {
if ($resource[5] == 'BookSched') {
if (isset($resource[6]) && $resource[6] != "" && isset($resource[7]) && $resource[7] != "" && is_numeric($resource[7]) && isset($resource[8]) && $resource[8] != "" && is_numeric($resource[8])) {
//[6] => entry/exit [7] => book id [8] => sched id
if ($resource[6] == "entry") {
示例3: array
if ($_REQUEST['status'] == '4') {
$totprice = $_REQUEST['totalprice'] * 50 / 100;
$field_values = array('customerid' => $_REQUEST['customer'], 'bookingid' => $updated, 'credit' => -$totprice, 'credittype' => '1', 'date_added' => date('Y-m-d H:i:s'));
$add = $Booking->addcreditmanagement($field_values);
if ($add) {
$data = $Booking->getCustomerById($_REQUEST['customer']);
$usercredit = $data->credit;
$newcredit = $usercredit - $totprice;
$fieldvalues1 = array('credit' => $newcredit);
$cond = array('id' => $_REQUEST['customer']);
$Booking->updateCustomer($fieldvalues1, $cond);
}
}
}
}
$details = $Booking->getBookingById($updated);
$user = $details->customername;
$servicenm = $details->servicename;
if ($updated) {
$mail = new PHPMailer();
$mail->IsSMTP();
// telling the class to use SMTP
$mail->Host = "smtp.gmail.com";
// SMTP server
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->Username = SMPT_EMAIL;
// SMTP account username
$mail->Password = SMPT_PASS;