-
Notifications
You must be signed in to change notification settings - Fork 0
/
laporan_TiketPerPertandingan.php
81 lines (73 loc) · 2.4 KB
/
laporan_TiketPerPertandingan.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
<?php
include "koneksi.php";
session_start();
if(!isset($_SESSION['username'])) {
header('location:index.php'); }
else { $username = $_SESSION['username'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<title>Elja Ticket</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout_admin.css" type="text/css" />
<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>
<body id="top">
<?php
include "header.php";
?>
<?php
include "menu.php";
?>
<!-- ####################################################################################################### -->
<div class="container">
<div align="center">
<?php
include "koneksi.php";
$tanggal=$_POST['tanggal'];
$tampil="SELECT kode_tiket,
SUM(IF( DATE(tanggal) = 2017-03-11, jumlah, 0)) AS jumlah
FROM pesan
LEFT JOIN tiket USING(kode_tiket)
WHERE status = 'Bayar'
GROUP BY kode_tiket
UNION ALL
SELECT 'TOTAL' kode_tiket,
SUM(IF( DATE(tanggal) = 2017-03-11, jumlah, 0)) AS jumlah
FROM pesan WHERE status = 'Bayar'";
$hasil=mysql_query($tampil);
if ($hasil === FALSE) {
die(mysql_error());
}
?>
<td> <table border="1">
<tr><td colspan="7" align="center">
<h2><b><font face="Calibri">LAPORAN PENJUALAN TIKET<br>PERTANDINGAN<br>Tanggal <?php echo "$tanggal" ?></b> </h2></td></tr>
<tr bgcolor="yellow" width=1000 height=50>
<th>Jenis Tiket</th>
<th>Jumlah Tiket Terjual</th>
</tr>
<?php
while($data=mysql_fetch_array($hasil)){
echo "<tr height=50>";
echo "<td><center><h3>$data[kode_tiket]</h3></center></td>";
echo "<td><center><h3>$data[jumlah] Tiket</h3></center></td>";
}
echo"</td></tr></table>";
echo"<a href = print2.php?tahun_pesan=$tahun_pesan>
<button>Cetak</button></a>";
?>
</div>
</div>
<?php
include "footer.php";
?>
</body>
</html>