-
Notifications
You must be signed in to change notification settings - Fork 0
/
pay.php
executable file
·92 lines (84 loc) · 3.13 KB
/
pay.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
<!DOCTYPE html>
<html lang="en">
<style>
.carousel-inner > .item > img {
margin: 0 auto;
}
</style>
<head>
<title>K17 Food Stall</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<link rel="icon" href="/k17/img/k.jpg" sizes="16x16" type="image/png">
<body align="center">
<div class="container-fluid">
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/k17/index.html">K17!! Food Stall</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="/k17/index.html">Home</a></li>
<li><a href="#">Non-Veg Combo</a></li>
<li><a href="#">Veg Combo</a></li>
<li><a href="#">Fast Food</a></li>
<li><a href="/k17/food.html">Food For Thought</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/k17/admin.php"><span class="glyphicon glyphicon-send"></span> Admin</a></li>
<li><a href="/k17/register.php"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="/k17/index.php"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</nav>
</div>
<img src="/k17/img/ceg.png" alt="CEG Logo" height="100" width="100" align="left"><img src="/k17/img/k17.png" alt="CTF Logo" height="100" width="250" align="right">
<h1><p align="center" >Welcome to K17!! Food Stall</p></h1>
<br>
<br><hr>
<br><br>
<?php
$d=$_GET["d"];
session_start();
//echo "Payment completed";
$u=$_SESSION['user'];
$c=$_SESSION['sid'];
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "booking";
// Create connection
$conn = new mysqli($servername, $username, $password,$dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$i=0;
$sql="SELECT * FROM `show` WHERE sid=$c";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
$sid=$row['sid'];
$sdes=$row['sdes'];
$theatre=$row['theatre'];
$price=$row['price'];
$tkt=$row['tkt'];
$date=$row['date'];
$movie=$row['movie'];
$i++;
}
$sql="UPDATE `show` SET `tkt`=$d WHERE sid=$sid";
$result = $conn->query($sql);
?>
<h1> <p>Your Order has been confirmed</p></h1><br><br>
<h2>Order Details</h2>
<br><br>
<?php echo "Name : $u<br>Combo Type: $theatre<br>Offer Applicable Till: $date<br>Combo Type: $sdes<br>Star Dish : $movie<br>";?>
<br><br><br>
<button onclick="window.print();" type="button" class="btn btn-warning">Print Bill</button><br><br><br>
<a href="index.php"><button type="button" class="btn btn-success">Click here to Order More </button></a>
</body>
</html>