Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Commit

Permalink
Ngantuk
Browse files Browse the repository at this point in the history
  • Loading branch information
luvnyen committed Dec 14, 2020
1 parent b9df636 commit 70ef862
Show file tree
Hide file tree
Showing 13 changed files with 1,291 additions and 22 deletions.
5 changes: 2 additions & 3 deletions cekongkir.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
require 'phps/connect.php';
include 'header.php';
?>

Expand Down Expand Up @@ -38,14 +37,14 @@ function cekongkir() {
layanan: layanan
},
success: function(data) {
$.alert("<center>Biaya ongkos kirim untuk kota asal <b>" + asal + "</b> dan kota tujuan <b>" + tujuan + "</b> dengan kategori berat barang <b>" + kategori + " kg</b> untuk layanan <b>" + layanan + "</b> adalah sebesar<br><span style='font-weight: bold; font-size: 24pt;'>Rp" + data + "</span></center>");
$.alert("<center>Biaya ongkos kirim untuk kota asal <b>" + asal + "</b> dan kota tujuan <b>" + tujuan + "</b> dengan kategori berat barang <b>" + kategori + " kg</b> untuk jenis layanan <b>" + layanan + "</b> adalah sebesar<br><span style='font-weight: bold; font-size: 24pt;'>Rp" + data + "</span></center>");
},
error: function(data) {
alert('An error occurred.');
},
});
} else {
$.alert('<b style="color: red;">Tidak boleh ada yang kosong!</b>');
$.alert('<b style="color: red;">Silahkan mengisi semua kolom yang tersedia!</b>');
return false;
}
}
Expand Down
33 changes: 22 additions & 11 deletions cekresi.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
require 'phps/connect.php';
include 'header.php';
?>

Expand Down Expand Up @@ -32,7 +31,19 @@ function cekresi() {
resi: resi
},
success: function(data) {
$.alert(data);
if (data == 'true') {
<?php
$resi = $_SESSION['cekresi'];

$cekdeliverysql = "SELECT * FROM delivery WHERE resi = ?";
$cekdeliverystmt = $pdo->prepare($cekdeliverysql);
$cekdeliverystmt->execute([$resi]);
$cekdelivery = $cekdeliverystmt->fetch();
?>
$.alert("<center><table class='table table-bordered'><tr><td>Nomor Resi</td><td style='font-weight: bold;'>" + "<?php echo $cekdelivery['resi']; ?>" + "</td></tr><tr><td>Status</td><td style='font-weight: bold;'>" + "<?php echo $cekdelivery['delivery_status']; ?>" + "</td></tr><tr><td>Service</td><td style='font-weight: bold;'>" + "<?php echo $cekdelivery['delivery_type']; ?>" + "</td></tr><tr><td>Dikirim tanggal</td><td style='font-weight: bold;'>" + "<?php echo $cekdelivery['delivery_date']; ?>" + "</td></tr><tr><td>Dikirim oleh</td><td style='font-weight: bold;'>" + "<?php echo $cekdelivery['sender_name']; ?>" + ", " + "<?php echo $cekdelivery['sender_origin_city']; ?>" + "</td></tr><tr><td>Dikirim ke</td><td style='font-weight: bold;'>" + "<?php echo $cekdelivery['receiver_name']; ?>" + ", " + "<?php echo $cekdelivery['receiver_origin_city']; ?>" + "</td></tr><tr></table></center>");
} else {
$.alert('<b style="color: red;">Nomor resi tidak ada!</b>');
}
},
error: function(data) {
alert('An error occurred.');
Expand Down Expand Up @@ -61,13 +72,13 @@ function cekresi() {
}
</script>

<div class="banner">
<div class="container">
<h1>CEK RESI</h1>
<p>Express your online business!</p>
<button class="button button-primary" style="border: 0" onclick="cekresi()">Click Here</button>
</div>
</div>
</header>
<div class="banner">
<div class="container">
<h1>CEK RESI</h1>
<p>Express your online business!</p>
<button class="button button-primary" style="border: 0" onclick="cekresi()">Click Here</button>
</div>
</div>
</header>

<?php include 'footer.php' ?>
<?php include 'footer.php' ?>
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.title {
font-weight: bold;
font-size: 24pt;
color: blue;
color: #fc6203;
}

.subtitle {
Expand Down
Loading

0 comments on commit 70ef862

Please sign in to comment.