fe_qrcodegenerator/view/index.php

201 lines
9.6 KiB
PHP

<?php
if(!(isset($_GET['aset']))) {
header("Location: http://localhost/qr-aset/");
} else {
$aset = base64_decode($_GET['aset']);
}
include '../dbconn.php';
$sql = "SELECT * FROM aset WHERE `id`='$aset' LIMIT 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$kode = $row["kode"];
$nama = $row["nama"];
$reg = $row["reg"];
$merk = $row["merk"];
$ukuran = $row["ukuran"];
$bahan = $row["bahan"];
$warna = $row["warna"];
$tahun = $row["tahun"];
$pabrik = $row["pabrik"];
$rangka = $row["rangka"];
$mesin = $row["mesin"];
$polisi = $row["polisi"];
$bpkb = $row["bpkb"];
$asal = $row["asal"];
$harga =$row["harga"];
$keterangan = $row["keterangan"];
}
} else {
header("Location: http://localhost/qr-aset/");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QRCode Generator Asset Diskominsta</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"
/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.6.4/flowbite.min.css" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;500;600;700&display=swap" rel="stylesheet">
<!-- Google Font -->
<link
href="https://fonts.googleapis.com/css2?family=Poppins&display=swap"
rel="stylesheet"
/>
</head>
<body>
<div class="flex flex-col justify-center items-center w-full h-full px-1">
<div class="flex flex-col justify-center items-center mt-10">
<div class="w-14 md:w-20 mb-5">
<img src="../image/magelang.svg" class="w-full h-full">
</div>
<div class="text-sm md:text-xl lg:text-2xl flex flex-col items-center font-medium">
<span class="py-2">
Dinas Komunikasi Informatika dan Statistik
</span>
<span>
Kota Magelang
</span>
</div>
</div>
<div class="text-xl font-semibold mt-10">DETAIL BARANG</div>
<div class="w-full p-4 bg-white border border-gray-200 rounded-lg shadow sm:p-6 dark:bg-gray-800 dark:border-gray-700 my-6 max-w-xl">
<ul class="my-4 space-y-3">
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Kode Barang : </span>
<span class="flex-2 ml-1"><?= $kode ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Jenis / Nama Barang : </span>
<span class="flex-2 ml-3"><?= $nama ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Reg : </span>
<span class="flex-2 ml-3"><?= $reg ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Merk Type : </span>
<span class="flex-2 ml-3"><?= $merk ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Ukuran : </span>
<span class="flex-2 ml-3"><?= $ukuran ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Bahan : </span>
<span class="flex-2 ml-3"><?= $bahan ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Warna : </span>
<span class="flex-2 ml-3"><?= $warna ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Tahun Pembelian : </span>
<span class="flex-2 ml-3"><?= $tahun ?>
</span>
</div>
</li>
<li>
<div hunf="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Pabrik : </span>
<span class="flex-2 ml-3"><?= $pabrik ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Rangka : </span>
<span class="flex-2 ml-3"><?= $rangka ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Mesin : </span>
<span class="flex-2 ml-3"><?= $mesin ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Polisi : </span>
<span class="flex-2 ml-3"><?= $polisi ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">BPKB : </span>
<span class="flex-2 ml-3"><?= $bpkb ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Asal Usul : </span>
<span class="flex-2 ml-3"><?= $asal ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Harga : </span>
<span class="flex-2 ml-3"> <?= "Rp. ".$harga ?>
</span>
</div>
</li>
<li>
<div href="#" class="flex items-center p-3 text-sm font-bold text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 group hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white">
<span class="flex-2 ml-3">Keterangan : </span>
<span class="flex-2 ml-3"><?= $keterangan ?>
</span>
</div>
</li>
</ul>
</div>
</div>
</body>
</html>