Commit 8d6a2e4d by Visgha Olivia

Upload New File

parent 02eeb2eb
<!DOCTYPE html>
<html lang="en">
<?php
require_once 'common/database.php';
if(!isset($_SESSION['logged_in'])){
header('location: index.php');
}
?>
<!-- Basic -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Site Metas -->
<title>Tiket</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<!-- Site Icons -->
<link rel="shortcut icon" href="images/logos/mikhol-logo.jpg" type="image/x-icon" />
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Site CSS -->
<link rel="stylesheet" href="style.css">
<!-- Colors CSS -->
<link rel="stylesheet" href="css/colors.css">
<!-- ALL VERSION CSS -->
<link rel="stylesheet" href="css/versions.css">
<!-- Responsive CSS -->
<link rel="stylesheet" href="css/responsive.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="css/custom.css">
<link rel="stylesheet" href="css/paket.css">
<!-- Modernizer for Portfolio -->
<script src="js/modernizer.js"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="host_version">
<!-- Modal -->
<!-- LOADER -->
<div id="preloader">
<div class="loading">
<div class="finger finger-1">
<div class="finger-item">
<span></span><i></i>
</div>
</div>
<div class="finger finger-2">
<div class="finger-item">
<span></span><i></i>
</div>
</div>
<div class="finger finger-3">
<div class="finger-item">
<span></span><i></i>
</div>
</div>
<div class="finger finger-4">
<div class="finger-item">
<span></span><i></i>
</div>
</div>
<div class="last-finger">
<div class="last-finger-item"><i></i></div>
</div>
</div>
</div>
<!-- END LOADER -->
<header class="header header_style_01">
<nav class="megamenu navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="dashboard.php"><img src="images/logos/logo1.png" alt="image"></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="dashboard.php">Beranda</a></li>
<li><a href="paket.php">Paket</a></li>
<li><a class="active" href="tiket.php">Tiket</a></li>
<li><a href="contact.php">Kontak</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a class="btn-light btn-radius btn-brd log" href="logout.php"><i class="flaticon-padlock"></i> Keluar</a></li>
</ul>
</div>
</div>
</nav>
</header>
<?php
// $AllPaket = GetAllPaket();
?>
<div class="all-title-box">
<div class="container text-center">
<h1>Tiket<span class="m_1">Lihat daftar tiket yang sudah dipesan oleh seluruh pembeli .</span></h1>
<!-- <a href="#addnew" class="btn btn-light btn-radius btn-brd grd1 effect-1 fa fa-plus" data-toggle="modal">&nbsp Tambah Paket</a> -->
</div>
</div>
<hr>
<section class="courses-section spad">
<div class="container">
<div class="row">
<tr ></tr>
<!-- course item -->
<?php
$jumlahDataPerHalaman =5;
$jumlahData = count(query("SELECT * FROM tiket")); // jumlah halaman = total data/ data per halaman
$jumlahHalaman = ceil($jumlahData / $jumlahDataPerHalaman);
$halamanAktif = (isset($_GET["halaman"] ) ) ? $_GET["halaman"] : 1; // ? = if, :=else
$awalData = ($jumlahDataPerHalaman * $halamanAktif) - $jumlahDataPerHalaman;
$AllTiket = query("SELECT * FROM tiket LIMIT $awalData, $jumlahDataPerHalaman");
if(isset($_POST['kode'])){
$AllTiket = query("SELECT * FROM tiket ORDER BY kode_paket ");
}
if(isset($_POST['pembeli'])){
$AllTiket = query("SELECT * FROM tiket ORDER BY id_akun");
}
?>
<?php
if((!isset($_POST['kode'])) && (!isset($_POST['pembeli']))){
?>
<?php if($halamanAktif > 1) : ?>
<a href="?halaman=<?= $halamanAktif - 1; ?>">Previous</a>
<?php endif; ?>
<?php for($i = 1; $i <= $jumlahHalaman; $i++) : ?>
<?php if($i == $halamanAktif ) : ?>
<a href="?halaman=<?= $i; ?>" style="font-weight: bold; color: red;"><?= $i; ?></a>
<?php else : ?>
<a href="?halaman=<?= $i; ?>"><?= $i; ?></a>
<?php endif; ?>
<?php endfor; ?>
<?php if($halamanAktif < $jumlahHalaman) : ?>
<a href="?halaman=<?= $halamanAktif + 1; ?>">Next</a>
<?php endif; } ?>
<center>
<table style="width:90%;margin-top:25px;" border="5">
<tr style="color:black;">
<th><strong>No Tiket</strong></th>
<th><strong>ID Pembeli</strong></th>
<th><strong>Kode Paket</strong></th>
<th><strong>No Kursi</strong></th>
<th style="border-bottom:none"></th>
</tr>
<?php
$id = 1;
foreach($AllTiket as $tiket){
if($id%2==0){
$color = '#add8e6';
}
else{
$color = '#ffffe0';
}?>
<tr style="color:black;">
<td id="<?= $id; ?>" style="background-color:<?= $color; ?>"><?= $tiket['id_tiket']; ?></td>
<td id="<?= $id; ?>" style="background-color:<?= $color; ?>"><?= $tiket['id_akun']; ?></td>
<td id="<?= $id; ?>" style="background-color:<?= $color; ?>"><?= $tiket['kode_paket']; ?></td>
<td id="<?= $id; ?>" style="background-color:<?= $color; ?>"><?= $tiket['no_kursi']; ?></td>
<td>
<a href="deletetiket.php?id=<?=$tiket['id_tiket'];?>">
<center><button type="button" class="btn btn-danger btn-lihat" style="color:white;" onclick="return confirm('Apakah anda ingin menghapus tiket ini?')">
<span class="glyphicon glyphicon-trash btn-acara" ></span>&nbspHapus Tiket</center>
</button>
</a>
</td>
</tr>
<?php
++$id;
}
?>
</table>
</center><br>
<div class="col-sm-10">
<form method="post" action="">
<button type="submit" class="btn btn-primary grd1" name="kode">Urut berdasarkan kode paket</button>
<button type="submit" class="btn btn-primary grd1" name="pembeli">Urut berdasarkan ID Pembeli</button><br><br>
</form>
<form method="post" action="export_excel.php">
<input type="submit" name="export" class="btn btn-success" value="Export" />
</form>
</div>
</div>
</section><br>
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="widget clearfix">
<div class="widget-title">
<img src="images/logos/logo1.png" alt="">
<small>Mickie Funland</small>
</div>
<p>Taman bermain nomor 1 di Sumatera Utara.</p>
</div><!-- end clearfix -->
</div><!-- end col -->
<div class="col-md-3 col-sm-3 col-xs-12">
<div class="widget clearfix">
<div class="widget-title">
<h3>Information Link</h3>
</div>
<ul class="footer-links">
<li><a href="dashboard.php">Beranda</a></li>
<li><a href="paket.php">Paket</a></li>
<li><a href="tiket.php">Tiket</a></li>
<li><a href="contact.php">Kontak</a></li>
</ul><!-- end links -->
</div><!-- end clearfix -->
</div><!-- end col -->
<div class="col-md-2 col-sm-2 col-xs-12">
<div class="widget clearfix">
<div class="widget-title">
<h3>Social</h3>
</div>
<ul class="footer-links">
<li><a href="#"><i class="fa fa-facebook"></i> 22.543 Likes</a></li>
<li><a href="#"><i class="fa fa-github"></i> 128 Projects</a></li>
<li><a href="#"><i class="fa fa-twitter"></i> 12.860 Followers</a></li>
<li><a href="#"><i class="fa fa-dribbble"></i> 3312 Shots</a></li>
<li><a href="#"><i class="fa fa-pinterest"></i>3331 Pins</a></li>
</ul><!-- end links -->
</div><!-- end clearfix -->
</div><!-- end col -->
</div><!-- end row -->
</div><!-- end container -->
</footer><!-- end footer -->
<div class="copyrights">
<div class="container">
<div class="footer-distributed">
<div class="footer-left">
<p class="footer-company-name">&copy; 2020 <a href="#">Funland</a> Design By : PSW-01 </p>
</div>
<!-- <div class="footer-right"> -->
<!-- <form method="get" action="#"> -->
<!-- <input placeholder="Subscribe our newsletter.." name="search"> -->
<!-- <i class="fa fa-envelope-o"></i> -->
<!-- </form> -->
<!-- </div> -->
</div>
</div><!-- end container -->
</div><!-- end copyrights -->
<a href="#" id="scroll-to-top" class="dmtop global-radius"><i class="fa fa-angle-up"></i></a>
<!-- ALL JS FILES -->
<script src="js/all.js"></script>
<!-- ALL PLUGINS -->
<script src="js/custom.js"></script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment