PEMBAHASAN
dirender oleh mobile browser maka tampilan dari web yang kita
4.2. Testing
aktivitasnya.
versi 5.1.3.
Gambar 3.4 Tampilan awal dari Bootsrap
dapat terhubung:
<?php
include"db.php";
// untuk footer
admin_id = 1");
$a = mysqli_fetch_object($kontak);
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
initial-scale=1">
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/b
1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXS
U1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<title>Tani Sayoer</title>
href="css/style.css">
<!-- Link CSS AOS -->
<link rel="stylesheet"
href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="preconnect"
href="https://fonts.googleapis.com">
crossorigin>
<link href="https://fonts.googleapis.com/css2?
family=Montserrat&family=Pacifico&display=swap"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/fon
t/bootstrap-icons.css">
<body class="banner">
<div class="container">
Sayoer</a>
label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
id="navbarNav">
<li class="nav-item">
href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link"
href="picture.php">Gambar</a>
</li>
<li class="nav-item">
<a class="nav-link"
href="forsale.php">Tersedia</a>
</li>
<li class="nav-item">
sayur</a>
</li>
<?php
error_reporting(0);
session_start();
if (isset($_SESSION['email']) == true) {
?>
expanded="false">Transaksi</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="keranjang.php">Keranjang</a></li>
Pembayaran</a></li>
</ul>
</li>
me-1"></i>Logout</a>
</li>
<li class="nav-item">
<?php
$user=
?>
echo $user->nama?></a>
</li>
<?php
}else if (isset($_SESSION['email']) != true) {
if (isset($_SESSION['email'])) {
$id = $_SESSION['id'];
$name = mysqli_fetch_array($query);
}else {
?>
<li class="nav-item">
me-1"></i>Login</a>
</li>
<?php }} ?>
</ul>
</div>
</div>
</nav>
aos="fade-right" data-aos-duration="2000">
</div>
left" data-aos-duration="2000">
tercukupi.</p>
<a href="https://wa.me/6283850290384"
class="ikon text-success">
</a>
</a>
</a><br>
</div>
</div>
data-aos-duration="1500" style="padding-top:
5rem;">Gambar</h1>
data-aos="fade-down" data-aos-duration="2500"
border-radius: 11px;">
<?php
$produk = mysqli_query($conn, "SELECT *
product_id DESC");
if (mysqli_num_rows($produk) > 0) {
?>
height: 240px;">
<?php } ?>
</div>
</div>
</div>
<?php
error_reporting(0);
?>
Sayur</h1>
aos="fade-down" data-aos-duration="2000">
<form class="d-flex">
radius: 11px;">
radius: 11px;">
</form>
</div>
</div>
data-aos="fade-down" data-aos-duration="2500"
border-radius: 11px;">
<div class="col-sm-7 my-5 gap-3">
<?php
if (isset($_GET['search']) != '') {
include 'db.php';
$_GET['search']."%' ";
if (mysqli_num_rows($produk) > 0) {
12rem;">
$p['product_name'] ?>">
<div class="card-body">
number_format($p['product_price']) ?></h6>
</div>
</div>
<?php }}else { ?>
<?php } ?>
</div>
</div>
4.2.7. Beli
if ($_SESSION['email'] != true) {
echo '<script>window.location="login-
tanisayoer.php"</script>';
if ($_GET['id'] != true) {
echo '<script>window.location="allproduk.php"</script>';
$id_produk = $_GET['id'];
$p = mysqli_fetch_object($produk);
?>
5rem;">Pembelian</h1>
11px;">
>">
</div>
<div class="col-lg-5">
></h5>
?></h5>
enctype="multipart/form-data">
gradient text-light">
Kg/Ikat
</span>
</div>
<div class="mb-2">
<label class="form-label">Waktu
pengiriman:</label>
class="form-control" required>
</div>
</form>
<?php
session_start();
if (isset($_POST['keranjang'])) {
$banyakbeli = $_POST['banyakbeli'];
$waktukirim = $_POST['waktukirim'];
$totalbeli = number_format($p->product_price *
$banyakbeli);
if ($insertbeli == true) {
$b = mysqli_fetch_object($beli);
$_SESSION['beli'] = $b->id_pembelian;
keranjang pembelian")</script>';
echo
'<script>window.location="keranjang.php"</script>';
// echo var_dump($_SESSION['beli']);
}else {
?>
</div>
</div>
echo '<script>window.location="allproduk.php"</script>';
?>
Sayur</h1>
<?php
$p = mysqli_fetch_object($produk);
?>
<div class="container">
style="margin-top: 5rem;">
<div class="col-lg-4">
$p->product_image ?>">
</div>
?></h2>
>product_price) ?></h4>
<div class="mt-4">
Sayur</a>
</div>
</div>
</div>
if ($_SESSION['email'] != true) {
echo
'<script>window.location="index.php"</script>';
include 'db.php';
?>
<h1 class="text-center fw-bold" data-aos="fade-down"
data-aos-duration="1500" style="padding-top:
<div class="table-responsive">
success">
success">Bayar</a> </caption>
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Waktu Beli</th>
<th>Total</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
session_start();
$no = 1;
if (mysqli_num_rows($userpembeli) > 0) {
?>
<tr>
<td>
2">Detail</a>
2">Ubah</a>
pesanan ini?')">Batal</a>
</td>
</tr>
<?php
}}else {
?>
<tr>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
Detail :
if ($_SESSION['email'] != true) {
echo '<script>window.location="index.php"</script>';
?>
Pembelian Anda</h1>
<div class="container" data-aos="fade-down" data-aos-
<div class="table-responsive">
success">
<thead>
<tr>
<th>Gambar</th>
<th>Harga</th>
<th>Nama</th>
<th>Dikirim</th>
<th>QTY</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<?php
$debe = mysqli_fetch_object($detailbeli);
?>
<tr>
</td>
</td>
</tr>
</tbody>
</table>
</div>
halaman Ubah :
if ($_GET['id'] != true) {
echo '<script>window.location="keranjang.php"</script>';
$id_beli = $_GET['id'];
$p = mysqli_fetch_object($produk);
?>
Pembelian</h1>
11px;">
>product_name ?>">
</div>
<div class="col-lg-5">
>product_name ?></h5>
enctype="multipart/form-data">
<label class="form-label">Banyak
Sayur:</label>
bg-gradient text-light">
Kg/Ikat
</span>
</div>
<div class="mb-2">
<label class="form-label">Waktu
pengiriman:</label>
</div>
</form>
<?php
if (isset($_POST['edit'])) {
$banyakbeli = $_POST['banyakbeli'];
$waktukirim = $_POST['waktukirim'];
$totalbeli = number_format($p-
>product_price * $banyakbeli);
wakt
u_pembelian = null,
wakt
u_pengiriman = '".$waktukirim."',
bany
ak_product = '".$banyakbeli."',
total
= '".$totalbeli."' ");
if ($updatebeli == true) {
echo
'<script>window.location="keranjang.php"</script>';
}else {
pembelian!")</script>';
?>
</div>
</div>
4.2.12. Batal
<?php
error_reporting(0);
include 'db.php';
$hapus = $_GET['id'];
if (isset($hapus)) {
echo '<script>window.location="keranjang.php"</script>';
?>
4.2.13. Checkout
<?php
include 'layout/header.php';
include 'db.php';
if ($_SESSION['email'] != true) {
echo
'<script>window.location="login-tanisayoer.php"</script>';
if ($_GET['id'] != true) {
echo '<script>window.location="keranjang.php"</script>';
?>
Pembelian Anda</h1>
<div class="table-responsive">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Waktu Beli</th>
<th>QTY</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<?php
session_start();
$no = 1;
$totalAll = 0;
<tr>
</td>
</tr>
<?php
$totalAll+=$up['total'];
?>
<tr>
semua:</th>
number_format($totalAll,3); ?></th>
</tr>
</tbody>
</table>
</div>
<div class="col-lg-6">
enctype="multipart/form-data">
<?php
$c = mysqli_fetch_object($check);
$o = mysqli_fetch_object($out);
?>
</div>
<label class="form-label">Alamat:</label>
</div>
<label class="form-label">Waktu
pengiriman:</label>
</div>
<div class="form-outline mb-4">
<label class="form-label">Tujuan
pengiriman:</label>
detail..." required>
</div>
<label class="form-label">Bukti
pembayaran:</label>
name="bukti">
</div>
value="Konfirmasi">
</form>
<?php
if (isset($_POST['submit'])) {
// error_reporting(0);
// print_r($_FILES['gambar']);
$alamat = $_POST['alamat'];
$filename = $_FILES['bukti']['name'];
$tmp_name = $_FILES['bukti']['tmp_name'];
$type2 = $type1[1];
$newname = 'buktibayar'.time().'.'.$type2;
'mp4');
if (!in_array($type2, $tipe_diizinkan)) {
diizinkan!")</script>';
}else {
dalam $tipe_diizinkan:
move_uploaded_file($tmp_name,
'./admin/buktibayar/'.$newname);
checkout VALUES (
null,
'".
$_GET['id']."',
null,
'".number_format($totalAll,3)."',
'".
$alamat."',
'".
$newname."',
‘0’
) ");
if ($insert) {
sudah berhasil")</script>';
echo '<script>window.location="info-
pembayaran.php"</script>';
}else {
dilakukan")</script>;';
?>
</div>
</div>
</div>
<?php
include 'layout/header.php';
include 'db.php';
?>
Pembayaran Anda</h1>
<div class="table-responsive">
success">
<thead>
<tr>
<th>No</th>
<th>Waktu Checkout</th>
<th>Total Pembelian</th>
<th>Tujuan pengiriman</th>
<th>Bukti Pembayaran</th>
</tr>
</thead>
<tbody>
<?php
session_start();
$no = 1;
$totalAll = 0;
if (mysqli_num_rows($userct) > 0) {
while ($up = mysqli_fetch_array($userct)) {
?>
<tr>
</td>
</td>
</tr>
<?php
$ct = mysqli_fetch_object($chehckout);
if ($ct->confirm == 1) {
}elseif ($ct->confirm == 2) {
}else {
?>
btn-success">Lanjut belanja</a>
<?php
}else {
?>
<tr>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
4.2.15. Login
Login :
<?php
?>
data-aos-duration="2000" style="padding-top:
5rem;">Login</h1>
4rem;">
<div class="col-xl-10">
<div class="col-lg-6">
</div>
enctype="multipart/form-data">
akun anda.</p>
class="text-danger">*</span></label>
required>
</div>
class="text-danger">*</span></label>
4">
<input type="password"
<span class="input-group-text"
</span>
</div>
value="Login"></input>
</div>
justify-content-center pb-4">
disini</a>.</p>
</div>
</form>
<?php
error_reporting(0);
session_start();
if (isset($_POST['submit'])){
$email =
mysqli_real_escape_string($conn, $_POST['email']);
$password =
mysqli_real_escape_string($conn,
md5($_POST['password']));
$d = mysqli_fetch_object($sql);
$_SESSION['status_user_login'] =
true;
$_SESSION['id'] = $d->id_user;
echo '<script>
window.location="index.php"
</script>';
}else{
echo '<script>
daftar!")
</script>';
?>
</div>
</div>
p-md-5 mx-md-4">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
5rem;">Registrasi</h1>
<section class="h-100 gradient-form">
4rem;">
<div class="col-xl-10">
<div class="col-lg-6">
<div class="text-center">
1">REGISTER</h4>
</div>
<?php
error_reporting();
session_start();
if (isset($_POST['form-input'])) {
extract($_POST);
$password = md5($password);
into user
Values(NULL,'$nama','$email','$telephone','$alamat','$passw
ord','user')");
if ($sql) {
?>
success">regitrasi berhasil</div>
<?php echo
'<script>window.location="login-tanisayoer.php"</script>'; }el
se{ ?>
<div>terjadi kesalahan</div>
<?php } } ?>
enctype="multipart/form-data">
<label class="form-label"
for="form2Example11">Nama Lengkap <span class="text-
danger">*</span></label>
</div>
<label class="form-label"
danger">*</span></label>
</div>
<label class="form-label"
danger">*</span></label>
</div>
<label class="form-label"
</div>
<label class="form-label"
danger">*</span></label>
mb-4">
placeholder="Password" required>
<span class="input-group-text"
</span>
</div>
1">
</div>
</form>
</div>
</div>
#C2DED1">
4 p-md-5 mx-md-4">
Sayoer</h2>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
4.2.17. Logout
<?php
session_start();
session_destroy();
header("Location: index.php");
?>
12rem;">
<div class="card-body">
<div class="mt-4">
<h5>Alamat</h5>
<h5>Email</h5>
<h5>No.Handphone</h5>
</div>
<a href="https://wa.me/6283850290384"
class="ikon text-success">
</a>
</a>
</a>
</div>
gradient">
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/boo
tstrap.bundle.min.js" integrity="sha384-
ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENB
O0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script>
function change() {
// membuat variabel berisi tipe input dari id='pass',
var x = document.getElementById('pass').type;
if (x == 'password') {
document.getElementById('pass').type = 'text';
document.getElementById('mybutton').innerHTML =
else {
document.getElementById('pass').type = 'password';
document.getElementById('mybutton').innerHTML =
</script>
<script
src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init();
once: false;
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/animejs/2.0.2/ani
me.min.js"></script>
<script>
textWrapper.innerHTML =
textWrapper.textContent.replace(/\S/g, "<span
class='letter'>$&</span>");
anime.timeline({loop: true})
.add({
opacity: [0,1],
easing: "easeInOutQuad",
duration: 2250,
}).add({
targets: '.ml3',
opacity: 0,
duration: 1000,
easing: "easeOutExpo",
delay: 1000
});
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/animejs/2.0.2/ani
me.min.js"></script>
<script>
textWrapper.innerHTML =
textWrapper.textContent.replace(/\S/g, "<span
class='letter'>$&</span>");
anime.timeline({loop: true})
.add({
translateX: [40,0],
translateZ: 0,
opacity: [0,1],
easing: "easeOutExpo",
duration: 1200,
}).add({
translateX: [0,-30],
opacity: [1,0],
easing: "easeInExpo",
duration: 1100,
});
</script>
</body>
</html>
6.9 Script Main Footer