Initial commit
This commit is contained in:
76
indexes/process/interfaces/show_receipt.php
Normal file
76
indexes/process/interfaces/show_receipt.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Success</title>
|
||||
<style>
|
||||
td{
|
||||
font-size: small;
|
||||
}
|
||||
th{
|
||||
font-size: small;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../cart.css" type="text/css" />
|
||||
<link rel="stylesheet" href="./instruct.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="area">
|
||||
<img style="margin:0%;" onclick="gotohome()" src="../../../icon/check.svg">
|
||||
<h1>Success</h1>
|
||||
<h3 onclick="gotohome()" style="cursor: hand; color: green;">return home</h3>
|
||||
|
||||
<?php
|
||||
if(isset($_GET["details"], $_GET["total"], $_GET["date"])) {
|
||||
|
||||
echo '<div id="grid">';
|
||||
|
||||
echo '<table id="items">';
|
||||
//display for each fruit
|
||||
echo '<tr>';
|
||||
echo '<th width="20%">Fruit</th>';
|
||||
echo '<th width="20%">Quantity (kg)</th>';
|
||||
echo '<th width="20%">Unit price (¥/kg)</th>';
|
||||
echo '<th width="20%">Retail price (¥)</th>';
|
||||
echo '</tr>';
|
||||
|
||||
//explode details messages to display
|
||||
$list = explode("|", $_GET["details"]);
|
||||
for($index = 0; $index < count($list); $index++){
|
||||
if($index % 4 == 0){
|
||||
echo "<tr>";
|
||||
echo "<td>".$list[$index]."</td>";
|
||||
}
|
||||
else echo "<td>".$list[$index]."</td>";
|
||||
}
|
||||
|
||||
//display for total price and date
|
||||
echo '<tr style="color: blue;">';
|
||||
echo '<th></th>';
|
||||
echo '<th></th>';
|
||||
echo '<th>Date</th>';
|
||||
echo '<th>Total price</th>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr style="color: blue;">';
|
||||
echo '<th></th>';
|
||||
echo '<th></th>';
|
||||
echo "<td>".$_GET["date"]."</td>";
|
||||
echo "<td>¥".$_GET["total"]."</td>";
|
||||
echo '</tr>';
|
||||
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function gotohome(){
|
||||
window.top.location.href = '../../../home.php';
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user