-
Notifications
You must be signed in to change notification settings - Fork 0
/
pesan_alert.php
133 lines (120 loc) · 4.58 KB
/
pesan_alert.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
<?php
session_start();
if(!isset($_SESSION['username'])) {
header('location:index.php'); }
else { $username = $_SESSION['username'];
}
?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta charset="UTF-8">
<title>Elja Ticket | Halaman Pesan</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles/style-responsive.css">
<link href="css/bootstrap.min.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="scripts/jquery.timers.1.2.js"></script>
<script type="text/javascript" src="scripts/jquery.galleryview.2.1.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.galleryview.setup.js"></script>
</head>
<script>
function warning() {
return confirm("Yakin Dengan Pesanan Anda?");
}
</script>
<script type="text/javascript">
function hitung()
{
var a = parseFloat (document.forms.form.jum.value);
var b = parseFloat (document.forms.form.harga.value);
var tot = parseFloat(document.forms.form.total.value = a * b);
}
</script>
<body>
<?php
include "menu5.php";
?>
<?php
include "koneksi.php" ;
$sql = "select * from jadwal ";
$hasil = mysql_query($sql);
if (!$hasil)
die("Gagal query..".mysql_error());
?>
<?php
$id_penonton = $_SESSION["id_penonton"];
$tanggal = date('Y-m-d');
include "koneksi.php" ;
$sql = "select * from pesan
inner join tiket on pesan.kode_tiket = tiket.kode_tiket
where id_penonton= '$id_penonton' AND tgl_pesan= '$tanggal'
";
$hasil = mysql_query($sql);
if (!$hasil)
die("Gagal query..".mysql_error());
?>
<!-- ####################################################################################################### -->
<div class="container">
<div align="center" class="container"><b>DETAIL PESAN</b>
<?php
include "koneksi.php" ;
$sql = "select * from jadwal where status = 'Aktif' ";
$jadwal = mysql_query($sql);
if (!$jadwal)
die("Gagal query..".mysql_error());
while ($row = mysql_fetch_array($jadwal)) {
echo " <center><img src='gambar/$row[gambar]'width=90% height=auto></center>"."" ;
}
?><br>
<form action="pesan_cetak.php" method="post" enctype="multipart/form-data">
<table align="center" border="0">
<?php
while ($row = mysql_fetch_array($hasil)) {
echo " <tr bgcolor='ffff66' height=100% width=100%>
<th colspan='3'><h4><center> TIKET PERTANDINGAN </center></h4></th></tr> " ;
echo " <tr bgcolor='ffffcc' height=100% width=100%>
<th colspan='3'><h5><center>".$row['jadwal']."</center></h5></th></tr> " ;
echo " <tr bgcolor='ffff99' height=100% width=100%>";
echo " <th width=50%><h5><center> Jenis Tiket </center></h5></th> " ;
echo " <th width=10%><h5><left> : </left></h5></th> " ;
echo " <th width=50%><h5><center> ".$row['tribun']." </center></h5></th> " ;
echo " </tr> ";
echo " <tr bgcolor='ffffcc' height=100% width=100%>";
echo " <th width=50%><h5><center> Tribun </center></h5></th> " ;
echo " <th width=10%><h5><left> : </left></h5></th> " ;
echo " <th width=50%><h5><center> ".$row['kode_tiket']." </center></h5></th> " ;
echo " </tr> ";
echo " <tr bgcolor='ffff99' height=100% width=100%>";
echo " <th width=50%><h5><center> Harga </center></h5></th> " ;
echo " <th width=10%><h5><left> : </left></h5></th> " ;
echo " <th width=50%><h5><center> Rp ".$row['harga']." </center></h5></th> " ;
echo " </tr> ";
echo " <tr bgcolor='ffffcc' height=100% width=100%>";
echo " <th width=50%><h5><center> Jumlah </center></h5></th> " ;
echo " <th width=10%><h5><left> : </left></h5></th> " ;
echo " <th width=50%><h5><center> ".$row['jumlah']." Tiket</center></h5></th> " ;
echo " </tr> ";
echo " <tr bgcolor='ffcc99' height=100% width=100%>
<th colspan='3'><h4><center> Total Bayar Rp. ".$row['jumlah'] * $row['harga']." </center></h4></th></tr> " ;
}
?>
<table align="center" border="0">
<div align="center">
<button name="submit" type="submit" class="btn btn-default" onClick="return warning();" onClick="return total();">Yakin</button>
<button name="reset" type="reset" class="btn btn-default">Batal</button> </div>
</table>
<br><br>
</form>
<div class="footer">
<?php
include "footer.php";
?>
</div><!--/ .footer -->
</div>
</div>
</body>
</html>