-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
127 lines (126 loc) · 3.33 KB
/
profile.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
<?php include('include/header.php');
if(!isset($_SESSION['client']['status']))
{
header('location:login.php');
}
$qry2=mysqli_query($con,"select * from movies where m_id='".$_SESSION['movie']."'");
$movie=mysqli_fetch_array($qry2);
?>
<div class="content">
<div class="wrap">
<div class="content-top">
<div class="section group">
<div class="about span_1_of_2">
<h3>BOOKINGS</h3>
<?php
if(isset($_SESSION['error']))
{
echo'<font color="red" >'.$_SESSION['error'].'</font>';
unset($_SESSION['error']);
}
if(isset($_SESSION['success']))
{
echo'<font color="green" >'.$_SESSION['success'].'</font>';
unset($_SESSION['success']);
}
?>
<?php
$bk=mysqli_query($con,"select * from booking where b_unm='".$_SESSION['client']['uid']."' order by b_id desc");
if(mysqli_num_rows($bk))
{
?>
<table class="table table-bordered">
<thead>
<th>Booking Id</th>
<th>Movie</th>
<th>Theatre</th>
<th>Screen</th>
<th>Show Time</th>
<th>Seats</th>
<th>Amount</th>
<th></th>
</thead>
<tbody>
<?php
while($bkg=mysqli_fetch_array($bk))
{
$m=mysqli_query($con,"select * from movies where m_id=(select show_m from shows where show_id='".$bkg['b_show']."')");
$mov=mysqli_fetch_array($m);
$s=mysqli_query($con,"select * from screen,seat where s_id='".$bkg['b_screen']."'");
$srn=mysqli_fetch_array($s);
$shw=mysqli_query($con,"select * from shows where show_id='".$bkg['b_show']."'");
$shr=mysqli_fetch_array($shw);
$seat=mysqli_query($con,"select * from seat where seat_show='".$bkg['b_show']."' and seat_uid='".$_SESSION['client']['uid']."' ");
$tt=mysqli_query($con,"select * from theatre where t_id='".$bkg['b_theatre']."'");
$thr=mysqli_fetch_array($tt);
?>
<tr>
<td>
<?php echo $bkg['b_bookid'];?>
</td>
<td>
<?php echo $mov['m_nm'];?>
</td>
<td>
<?php echo $thr['t_nm'];?>
</td>
<td>
<?php echo $srn['s_nm'];?>
</td>
<td>
<?php echo $shr['show_date'].'<br>'.$shr['show_time'];?>
</td>
<td>
<?php
while($seatrow=mysqli_fetch_array($seat))
{
echo $seatrow['seat_row'].'-'.$seatrow['seat_col'].' ';
$_SESSION['seat_uid']=$seatrow['seat_uid'];
}
?>
</td>
<td>
Rs. <?php echo $bkg['b_amt'];?>
</td>
<td>
<?php if($bkg['b_date']<date('Y-m-d'))
{
?>
<i class="glyphicon glyphicon-ok"></i>
<?php
}
else
{
echo'<a href="cancel.php?id='.$bkg['b_bookid'].'&sid='.$shr['show_id'].'">Cancel</a>';
}
?>
</td>
</tr>
<?php
}
?></tbody>
</table>
<?php
}
else
{
?>
<h3>No Previous Bookings</h3>
<?php
}
?>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<?php include('include/footer.php');?>
<script type="text/javascript">
$('#seats').change(function(){
var charge=<?php echo $screen['charge'];?>;
amount=charge*$(this).val();
$('#amount').html("Rs "+amount);
$('#hm').val(amount);
});
</script>