-
Notifications
You must be signed in to change notification settings - Fork 2
/
farm_book.php
88 lines (86 loc) · 2.57 KB
/
farm_book.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
<?php
if(empty($_SESSION))
{
session_start();
if(!isset($_SESSION['name']))
header("location:index.php");
}
else
{
if(!isset($_SESSION['name']))
header("location:index.php");
}
include('includes/config.php');
$k=$_SESSION['kcc'];
// echo $k;
$s="SELECT SID,DAY,TOKEN_NO FROM SLOTS_BOOKED WHERE KCC='$k'";
$s2=mysqli_query($con,$s);
$s3=mysqli_num_rows($s2);
if($s3>0)
{
$s4=mysqli_fetch_assoc($s2);
$sid=$s4['SID'];
$day=$s4['DAY'];
$t=$s4['TOKEN_NO'];
$addr="SELECT LOCATION,PINCODE FROM SHOP WHERE SID='$sid'";
$addr1=mysqli_query($con,$addr);
$addr2=mysqli_fetch_assoc($addr1);
$loc=$addr2['LOCATION'];
$pin=$addr2['PINCODE'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>MANAGE YOUR BOOKINGS</title>
<link href="css/bootstrap.css" rel="stylesheet" />
<link href="css/font-awesome.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
</head>
<body>
<div class="navbar navbar-inverse set-radius-zero" >
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" >
<img id=logo src="img/agroLogo.png" height="100" width="100" />
</a>
</div>
</div>
</div>
<section class="menu-section">
<div class="container">
<div class="row ">
<ul id="menu-top" class="nav navbar-nav navbar-right">
<li><a href="farmer_home.php"><b>HOME</b></a></li>
<li><a href="logout.php"><b>LOGOUT</b></a></li>
<!--<li id='wel'><b>WELCOME <?php echo $_SESSION['name'] ?></b></li>-->
</ul>
<div id='wel'>WELCOME <?php echo $_SESSION['name'] ?></div>
</div>
</div>
</section>
<h2>your booking </h2>
<table border='20px'>
<!-- <tr><th> YOUR BOOKING </th> </tr> -->
<tr>
<td> SID </td>
<td> TOKEN </td>
<td>DATE </td>
<td> SHOP LOCATION </td>
<td>PIN CODE </td>
</tr>
<tr>
<td><?php echo $sid; ?> </td>
<td> <?php echo $t; ?></td>
<td><?php echo $day ?> </td>
<td><?php echo $loc;?> </td>
<td><?php echo $pin;?> </td>
</tr>
</table>
<br><a href='book_slot.php'><h2>CLICK TO VIEW SLOTS </a>
</body>
</html>