-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess.php
59 lines (56 loc) · 1.84 KB
/
process.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
require "includes/functions.php";
$response = "error";
if(
!empty($_POST['customerName']) &&
!empty($_POST['reservationDate']) &&
!empty($_POST['reservationTime']) ){
$customerName = $_POST['customerName'];
$contactNo = $_POST['contactNo'];
$reservationDate = $_POST['reservationDate'];
$persons = $_POST['persons'];
$adults = $_POST['adults'];
$child = $_POST['child'];
$reservationTime = $_POST['reservationTime'];
$formType = $_POST['formType'];
$note = $_POST['note'];
$address = "";
$perHeadCharges = "";
$deposite = "";
$totalAmount = "";
$minimumPayment = "";
$paymentMode = "";
$zone = "";
$status = 0;
if($formType == 2){
$address = $_POST['address'];
$perHeadCharges = $_POST['perHeadCharges'];
$deposite = $_POST['deposite'];
$totalAmount = $_POST['totalAmount'];
$minimumPayment = $_POST['minimumPayment'];
$paymentMode = $_POST['paymentMode'];
$zone = $_POST['zone'];
}
$getAvailableSeats = getAvailableSeats($_POST['reservationDate']);
$seatsAvailablityCheck = $getAvailableSeats + $persons;
if($seatsAvailablityCheck <= 600 ){
echo $response = addBooking($customerName,$contactNo,$address,$reservationDate,$persons,$adults,$child,$reservationTime,$perHeadCharges,$deposite,$totalAmount,$minimumPayment,$paymentMode,$zone,$status,$note);
}else{
$availableSeat = 600-$getAvailableSeats;
$response = "Sorry booking can't complete. Only ".$availableSeat. " of seats is/are left.";
}
}else{
echo("error11");
}
//}
/*if($response == "success"){
//header('location:../AddCities.php?response=Record Save Successfully');
echo $response;
}elseif($response == "error"){
echo $response;
}else{
//header('location:../AddCities.php?response=Error While Saving Record ');
echo $response;
}
*/
?>