Initial commit
This commit is contained in:
68
cart.php
Normal file
68
cart.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Cart</title>
|
||||
<link rel="shortcut icon" href="./icon/favicon/favicon.ico" type="image/x-icon" />
|
||||
<link rel="icon" href="./icon/favicon/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="./index.css" type="text/css" />
|
||||
<script src="./home.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="dynamic-background"></div>
|
||||
<!--banner-->
|
||||
<table id="banner">
|
||||
<tr>
|
||||
<td width="3%"></td>
|
||||
<td style="text-align: right" width="6%">
|
||||
<img class="banner_img" width="64%" height="64%" src="./icon/icon.svg" onmousedown="changetohome()">
|
||||
</td>
|
||||
<td width="70%">
|
||||
<p onmousedown="changetohome()">Online Fruit Store</p>
|
||||
</td>
|
||||
<td width="6%">
|
||||
<img title="Search" id="search_icon" class="banner_img" src="./icon/search.svg" alt="Search"
|
||||
onclick="search()">
|
||||
</td>
|
||||
<td width="6%">
|
||||
<img title="Cart" class="banner_img" id="cart" src="./icon/home.svg" alt="Cart"
|
||||
onmousedown="changetohome()">
|
||||
</td>
|
||||
<td width="6%">
|
||||
<img title="Login" class="banner_img" src="./icon/user.svg" alt="User"
|
||||
onmousedown="makeIFrame('./login/login.php', 'login', 'overlay')">
|
||||
</td>
|
||||
<td width="3%"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
include "./indexes/ConnectDB.php";
|
||||
// Start the session
|
||||
session_start();
|
||||
//determine whether logged in
|
||||
if (!isset($_SESSION['loggedin']) || !$_SESSION['loggedin'] === true) {
|
||||
echo "<script type='text/javascript'>
|
||||
window.top.location.href = './index.html';
|
||||
</script>";
|
||||
}
|
||||
?>
|
||||
|
||||
<!--open cart index-->
|
||||
<script>
|
||||
var existence = document.getElementById("customerpage");
|
||||
if (!existence) {
|
||||
// Create the iframe and add it to the overlay div
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.setAttribute("src", "./indexes/process/cart_index.php");
|
||||
iframe.id = "customerpage";
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
function changetohome(){
|
||||
window.top.location.href = './home.php';
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user