fhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhd dfhdfhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhdfh
| DIR:/home/u1105814/public_html/mountanasikunir.com/admin/modul/mod_order/ |
| Current File : /home/u1105814/public_html/mountanasikunir.com/admin/modul/mod_order/edit.php |
<?php
include "config/koneksi.php";
$id=$_GET['id'];
$tampil=mysqli_query($connect,"SELECT * FROM booking a left join produk b on a.id_villa=b.id_produk where id_booking='$id'
");
$r=mysqli_fetch_array($tampil);
$id_booking =$r['id_booking'];
$id_villa=$r['nama'];
$fullname=$r['fullname'];
$email=$r['email'];
$phonenumber=$r['phonenumber'];
$checkindate=$r['checkindate'];
$checkoutdate=$r['checkoutdate'];
$paymentmethod=$r['paymentmethod'];
$duration=$r['duration'];
$harga=$r['harga'];
$total=$r['total'];
$status=$r['status'];
?>
<section class="content">
<div class="container-fluid">
<div class="row justify-content-center"><!-- supaya tengah -->
<div class="col-md-6">
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">Form Edit</h3>
</div>
<form action="modul/mod_order/aksi_order.php?module=order&act=edit" method="post" onsubmit="return validateModul()" enctype="multipart/form-data">
<div class="card-body">
<!-- Tampilkan disabled input untuk UI -->
<div class="form-group">
<label for="idBooking">ID Booking</label>
<input type="text" id="idBooking" class="form-control" value="<?php echo htmlspecialchars($id_booking); ?>" disabled>
<!-- Hidden agar value terkirim saat submit -->
<input type="hidden" name="id" value="<?php echo htmlspecialchars($id_booking); ?>">
</div>
<div class="form-group">
<label for="idVilla">Nama Villa</label>
<input type="text" id="idVilla" class="form-control" value="<?php echo htmlspecialchars($id_villa); ?>" disabled>
<input type="hidden" name="id_villa" value="<?php echo htmlspecialchars($id_villa); ?>">
</div>
<div class="form-group">
<label for="fullname">Full Name</label>
<input type="text" id="fullname" class="form-control" value="<?php echo htmlspecialchars($fullname); ?>" disabled>
<input type="hidden" name="fullname" value="<?php echo htmlspecialchars($fullname); ?>">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" class="form-control" value="<?php echo htmlspecialchars($email); ?>" disabled>
<input type="hidden" name="email" value="<?php echo htmlspecialchars($email); ?>">
</div>
<div class="form-group">
<label for="phoneNumber">Phone Number</label>
<input type="text" id="phoneNumber" class="form-control" value="<?php echo htmlspecialchars($phonenumber); ?>" disabled>
<input type="hidden" name="phonenumber" value="<?php echo htmlspecialchars($phonenumber); ?>">
</div>
<div class="form-group">
<label for="checkinDate">Check-in Date</label>
<input type="date" id="checkinDate" class="form-control" value="<?php echo htmlspecialchars($checkindate); ?>" disabled>
<input type="hidden" name="checkindate" value="<?php echo htmlspecialchars($checkindate); ?>">
</div>
<div class="form-group">
<label for="checkoutDate">Check-out Date</label>
<input type="date" id="checkoutDate" class="form-control" value="<?php echo htmlspecialchars($checkoutdate); ?>" disabled>
<input type="hidden" name="checkoutdate" value="<?php echo htmlspecialchars($checkoutdate); ?>">
</div>
<div class="form-group">
<label for="paymentMethod">Payment Method</label>
<input type="text" id="paymentMethod" class="form-control" value="<?php echo htmlspecialchars($paymentmethod); ?>" disabled>
<input type="hidden" name="paymentmethod" value="<?php echo htmlspecialchars($paymentmethod); ?>">
</div>
<div class="form-group">
<label for="duration">Duration (days)</label>
<input type="number" id="duration" class="form-control" value="<?php echo htmlspecialchars($duration); ?>" disabled>
<input type="hidden" name="duration" value="<?php echo htmlspecialchars($duration); ?>">
</div>
<div class="form-group">
<label for="harga">Harga</label>
<input type="text" id="harga" class="form-control" value="<?php echo htmlspecialchars($harga); ?>" disabled>
<input type="hidden" name="harga" value="<?php echo htmlspecialchars($harga); ?>">
</div>
<div class="form-group">
<label for="total">Total</label>
<input type="text" id="total" class="form-control" value="<?php echo htmlspecialchars($total); ?>" disabled>
<input type="hidden" name="total" value="<?php echo htmlspecialchars($total); ?>">
</div>
<div class="form-group">
<label for="Status">Status Pembayaran</label>
<select name="status" id="status" class="form-control">
<option value="">-- Pilih Status Pembayaran --</option>
<?php
$tampil=mysqli_query($connect,"SELECT * FROM status_pembayaran ");
while ($r=mysqli_fetch_array($tampil)){
$id_status=$r['id_status'];
$teks=$r['teks'];
$selected = ($status == $teks) ? 'selected' : '';
echo "<option value=\"$teks\" $selected>$teks</option>";
}?>
</select>
</div>
</div>
<div class="card-footer d-flex justify-content-between">
<button type="button" onclick="history.back()" class="btn btn-danger">Cancel</button>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
|