Tambah

parent 4551c806
<?php
include 'fungsi.php';
$id = $_GET['id'];
$status = $_GET['status'];
mysqli_query($conn, "UPDATE pembayaran SET status = '$status' WHERE id_pemesanan = '$id'");
header('location:Daftar_pesanan.php');
?>
\ No newline at end of file
<?php
include 'fungsi.php';
global $total;
$id_pemesanan = $_GET['id'];
$query = mysqli_query($conn, "SELECT * FROM pemesanan INNER JOIN kamar ON pemesanan.id_kamar = kamar.id WHERE pemesanan.id = '$id_pemesanan'" );
while($row = mysqli_fetch_array($query)){
$total = $total += ($row['jumlahpeserta'] * $row['harga']);
}
$bukti = $_FILES['gambar']['name'];
move_uploaded_file($_FILES['gambar']['tmp_name'], 'gambar/' .$bukti);
mysqli_query($conn, "INSERT INTO pembayaran VALUES('', '$id_pemesanan', '$total', '$bukti', '')");
header('Location: pembayaran.php?id='. $id_pemesanan);
?>
\ No newline at end of file
<?php
session_start();
include_once('fungsi.php');
if(!isset($_SESSION['user'])){
header("location: login.php");
}
$nama= $_SESSION['nama'];
$alamat= $_SESSION['alamat'];
$email= $_SESSION['email'];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BUKIT GIBEON</title>
<link rel="shortcut icon" href="images/inst.png">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/myStyle.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/stylee.css" />
</head>
<body background="images/eirene.jpg">
<?php
include_once('header.php');
?>
<h4 style="text-align:center; padding-top: 100px">Silahkan Kirimkan Pembayaran anda ke No Rek xxx-xxx-xxx atas nama Dodi Pakpahaan ke Bank Mandiri</h5>
<div id="wrapper">
<table class="table table-bordered">
<thead>
<th>Nama Lengkap</th>
<th>Alamat</th>
<th>Email</th>
<th>Tanggal Mulai</th>
<th>Tanggal Selesai</th>
<th>Jumlah Bayar</th>
</thead>
<?php
require_once(dirname(__FILE__ ).'/fungsi.php');
global $total;
$pemesanan = getPemesanan();
$query = mysqli_query($conn,"SELECT pemesanan.id AS id_pemesanan, pemesanan.namalengkap, pemesanan.alamat ,pemesanan.email, pemesanan.waktumulai, pemesanan.waktuselesai, pemesanan.jumlahpeserta
, kamar.harga FROM pemesanan inner join kamar on pemesanan.id_kamar = kamar.id WHERE pemesanan.namalengkap = '$nama'");
while ($data = mysqli_fetch_array($query)){
$total = $data['jumlahpeserta'] * $data['harga'];
?>
<tr>
<td><?php echo $data['namalengkap'] ?></td>
<td><?php echo $data['alamat'] ?></td>
<td><?php echo $data['email'] ?> </td>
<td><?php echo $data['waktumulai'] ?> </td>
<td><?php echo $data['waktuselesai'] ?> </td>
<td><?php echo $total ?> </td>
</tr>
<?php
$id_pemesanan = $data['id_pemesanan'];
}
?>
</table>
<button class="btn btn-default"><a href="pembayaran.php?id=<?= $id_pemesanan?>" > Pembayaran </a></button>
</div>
</body>
<footer class="footer">
<div class="icon">
<a href="https://facebook.com" target="_blank"><i class="fa fa-facebook" style="font-size: 20px;"></i></a>
<a href="https://instagram.com" target="_blank"><i class="fa fa-instagram" style="font-size: 20px;"></i></a>
<a href="https://twitter.com" target="_blank"><i class="fa fa-twitter" style="font-size: 20px;"></i></a>
<a href="https://gmail.com" target="_blank"><i class="fa fa-google-plus" style="font-size: 20px;"></i></a>
</div>
<p>BUKIT GIBEON</p>
<p>Sekolah Misi Interdenominasi Gereja</p>
<hr>
<p>Copyright &copy All Right Reserved - Kelompok PA1-1617-D3TI08 - 2016</p>
</footer>
</html>
\ No newline at end of file
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BUKIT GIBEON</title>
<link rel="shortcut icon" href="images/inst.png">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/myStyle.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<br><br><br><br><br><br><br><br>
<body background="images/eirene.jpg">
<?php
include 'fungsi.php';
include 'header.php';
$id = $_GET['id'];
$query = mysqli_query($conn,"SELECT * FROM pembayaran INNER JOIN pemesanan ON pembayaran.id_pemesanan = pemesanan.id where id_pemesanan = '$id'");
$row = mysqli_fetch_array($query);
if($row['bukti'] == NULL && $row['status'] == NULL){
echo '<form action="konfirmasi.php?id=<?= $id_pemesanan?>" method="POST" enctype="multipart/form-data" >
<input type="file" style="width:200px" name="gambar">
<input type="submit" name="submit" class="btn btn-info" value="Pesan Sekarang" >
</form>';
}
else if($row['bukti'] != NULL && $row['status'] == NULL){
echo '<center> <h1> Terimakasih telah membayar. </h1>';
echo '<center> <h2> Tunggu konfirmasi dari admin </h2>';
}else if($row['bukti'] != NULL && $row['status'] != NULL){
echo '<div style="margin-left: 100px;">
<h1> Pesanan anda telah di konfirmasi. </h1>
<h3> Anda berada di ruangan '. $row['namaruangan'] .'</h3>
</div>';
}
?>
</body>
<footer class="footer" style="margin-top:290px">
<div class="icon">
<a href="https://facebook.com" target="_blank"><i class="fa fa-facebook" style="font-size: 20px;"></i></a>
<a href="https://instagram.com" target="_blank"><i class="fa fa-instagram" style="font-size: 20px;"></i></a>
<a href="https://twitter.com" target="_blank"><i class="fa fa-twitter" style="font-size: 20px;"></i></a>
<a href="https://gmail.com" target="_blank"><i class="fa fa-google-plus" style="font-size: 20px;"></i></a>
</div>
<p>BUKIT GIBEON</p>
<p>Sekolah Misi Interdenominasi Gereja</p>
<hr>
<p>Copyright &copy All Right Reserved - Kelompok PA1-1617-D3TI08 - 2016</p>
</footer>
</html>
<?php
include 'fungsi.php';
$id = $_GET['id'];
$query = mysqli_query($conn, "SELECT * FROM pembayaran WHERE id_pemesanan = '$id'");
$row = mysqli_fetch_array($query);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BUKIT GIBEON</title>
<link rel="shortcut icon" href="images/inst.png">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/myStyle.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/stylee.css" />
</head>
<body background="images/eirene.jpg">
<?php
include_once('header.php');
?>
<div id="wrapper"><br><br><br><br><br>
<?php
if($row['bukti'] != NULL && $row['status'] == NULL){
echo '<h1 align="center"> Terimakasih telah membayar. </h1>';
echo '<h2 align="center">Tunggu konfirmasi dari admin</h2>';
}else if($row['bukti'] != NULL && $row['status'] != NULL){
echo 'Terimakasih telah memesan!';
echo '<a href="selesai_proses.php?id='. $row['id'] .'&id_pemesanan='. $id .'" class="btn btn-default"> Selesai </a>';
}
?>
</div>
</body>
<footer class="footer">
<div class="icon">
<a href="https://facebook.com" target="_blank"><i class="fa fa-facebook" style="font-size: 20px;"></i></a>
<a href="https://instagram.com" target="_blank"><i class="fa fa-instagram" style="font-size: 20px;"></i></a>
<a href="https://twitter.com" target="_blank"><i class="fa fa-twitter" style="font-size: 20px;"></i></a>
<a href="https://gmail.com" target="_blank"><i class="fa fa-google-plus" style="font-size: 20px;"></i></a>
</div>
<p>BUKIT GIBEON</p>
<p>Sekolah Misi Interdenominasi Gereja</p>
<hr>
<p>Copyright &copy All Right Reserved - Kelompok PA1-1617-D3TI08 - 2016</p>
</footer>
</html>
\ No newline at end of file
<?php
include 'fungsi.php';
$id = $_GET['id'];
$id_pemesanan = $_GET['id_pemesanan'];
mysqli_query($conn,"DELETE FROM pembayaran WHERE id = '$id'");
mysqli_query($conn, "DELETE FROM pemesanan WHERE id = $id_pemesanan");
header("Location: index.php");
?>
\ 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