-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbooking.php
157 lines (146 loc) · 3.94 KB
/
booking.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
session_start();
require("config.php");
if(isset($_SESSION['id']))
{
$uid = $_SESSION['id'];
$bus = $_GET['bus'];
$bust = $bus.'bus';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Booking</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
<link rel="stylesheet" href="css/layout.css" type="text/css" media="all">
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<script type="text/javascript" src="js/jquery-1.4.2.js" ></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-replace.js"></script>
<script type="text/javascript" src="js/Myriad_Pro_600.font.js"></script>
<!--[if lt IE 9]>
<script type="text/javascript" src="http://info.template-help.com/files/ie6_warning/ie6_script_other.js"></script>
<script type="text/javascript" src="js/html5.js"></script>
<![endif]-->
</head>
<body id="page2">
<div class="extra">
<div class="main">
<!-- header -->
<header>
<div class="wrapper1">
<div class="logo1"><h1><a href="index.html">Sigma Travels</a></h1></div>
<?php
if(isset($_SESSION['id']))
{
$uid = $_SESSION['id'];
$sql = mysql_query("select * from `customers` where id = '$uid'");
if(mysql_num_rows($sql)>0)
{
$r = mysql_fetch_array($sql);
$name = $r['name'];
}
?>
<ul id="top_nav1">
<li>Welcome! <?php echo $name;?></li><br />
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
<nav>
<ul id="menu">
<li><a href="index.php" class="nav1">Home</a></li>
<li><a href="About.html" class="nav2">About Us </a></li>
<li><a href="Tours.html" class="nav3">Our Tours</a></li>
<li><a href="Destinations.html" class="nav4">Destinations</a></li>
<li class="end"><a href="Contacts.html" class="nav5">Contacts</a></li>
</ul>
</nav>
<br />
<div class="text">
<h2 style="color:red>"Book Your tickets</h2>
<?php
$uid = $_SESSION['id'];
echo $bus = $_GET['bus'];
$bust = $bus.'bus';
?>
<?php
if(isset($_POST['book']))
{
$seat = $_POST['seat'];
$choice = $_POST['choice'];
$date = date("Y-m-d");
echo "<br>";
if($seat !='')
{
if($choice !='')
{
$book="<b style:font-size:><br>Your ticket is booked</b>";
}
else
{
?>
<script>
alert("Enter your Choice:");
</script>
<?php
}
}
else
{
?>
<script>
alert("Enter Number of seats to be booked:");
</script>
<?php
}
}
?>
<form id="ContactForm" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>?id=<?php echo $uid;?>&bus=<?php echo $bus;?>">
<div class="wrapper1">
<b style="font-size:18px">No. of Seats:</b> <input style="width:280px;" class="input" type="text" name="seat" required></div>
<div class="wrapper1" style="margin-left:-120px; margin-top:-30px">
<b style="font-size:18px"> Choice: </b>
<select style="width:280px; height:25px;" name="choice" required>
<option value=""></option>
<option value="N">No Choice</option>
<option value="W">Window</option>
</select></div>
<br />
<input class="button" type="submit" name="book" value="Book">
<div class="book">
<?php
if (isset($_POST['book']))
echo $book;
?>
</div>
</form>
<br /><br /><br />
</div>
<div class="img"> </div>
<!--<div class="img" style="margin-top:20px;"> <img src="images/vvv.jpg" alt=""></div>-->
<div class="img" style="margin-top:20px;"><b><?php echo date("D d-M-Y");?></b></div>
</header>
<!-- / header -->
</div>
</div>
<div class="body1">
<div class="main">
<!-- footer -->
<footer>
<a rel="nofollow" href="" target="_blank"></a>© 2012 Sigma Travels<br>
</footer>
<!-- / footer -->
</div>
</div>
<script type="text/javascript"> Cufon.now(); </script>
<?php
}
}
else
{
header("Location:Home.php?id=$uid");
}
?>
</body>
</html>