Upload New File

parent 80a0e18c
<?php
session_start();
include('../config.php');
include("template/header.php");
include("../common/function.php");
include("functions.php");
// include("../common/dbconfig.php");
open_page("Detail Tiket");
if(! isset($_SESSION['is_login']))
{
header('location:../index.php');
}
if (!isset($_SESSION["username"])){
// echo "<script>alert('Login terlebih dahulu');window.location='../index.php';</script>";
// exit;
echo "Anda harus login dulu <br><a href='../index.php'>Klik disini</a>";
exit;
}
$role = $_SESSION["role"];
if($role != "user"){
echo "<script>alert('Anda bukan user');window.location='../index.php';</script>";
exit;
}
$id_akun = $_SESSION["id_akun"];
$nama = $_SESSION["nama"];
$username = $_SESSION["username"];
$id = $_GET['id'];
$data = query("SELECT t_tiketsdia.id, t_tiketsdia.kode_tiket, destinasi.nama_destinasi, destinasi.deskripsi_destinasi, destinasi.gambar_destinasi, pt_trans.nama_transp, t_tiketsdia.harga, pt_kategori.nama_kategori
FROM pt_kategori INNER JOIN (pt_trans INNER JOIN (destinasi INNER JOIN t_tiketsdia ON destinasi.id_destinasi = t_tiketsdia.t_destinasi) ON pt_trans.id_transp = t_tiketsdia.t_kendaraan) ON pt_kategori.id_kategori = pt_trans.kategori_id
WHERE id = '$id'")[0];
?>
<!-- ======= Breadcrumbs ======= -->
<section id="breadcrumbs" class="breadcrumbs">
<div class="container">
<div class="d-flex justify-content-between align-items-center">
<h2>Detail Tiket</h2>
</div>
</section>
<!-- End Breadcrumbs -->
<!-- Start content -->
<div class="container mt-1">
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title">Nama Destinasi : <?= $data['nama_destinasi'];?></h5>
<h5 class="card-text">Harga: Rp.<?= $data['harga'];?></h5>
<h5 class="card-text">Kendaraan: <?= $data['nama_transp'];?></h5>
<!-- <p>Deskripsi Wisata</p> -->
<!-- <p><?= $data['deskripsi_destinasi'];?></p> -->
</div>
<!-- <img src="<?= BASEURL; ?>public/img/<?= $data['gambar_destinasi'] ?>" class="card-img-top" alt="..."> -->
<div class="card bg-dark text-white">
<img src="<?= BASEURL; ?>public/img/<?= $data['gambar_destinasi'] ?>" class="card-img" alt="...">
<div class="card-img-overlay">
<h5 class="card-text" align="center" style="color:black;"><?= $data['deskripsi_destinasi'];?></h5>
</div>
</div>
</div>
<a href="tiket_user.php" class="btn btn-md btn-outline-danger">Kembali</a>
</div>
<!-- End content -->
<?php
include("template/footer.php")
?>
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