-
Notifications
You must be signed in to change notification settings - Fork 0
/
deco.php
131 lines (113 loc) · 3.39 KB
/
deco.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
session_start();
require_once('inc/config.php');
if(!(isset($_SESSION['usertype'])&&($_SESSION['usertype']=2))){
header("location: login.php");
}
// -----------------SELECT Quaries--------------------------------//
// Get Floral Deco Items
$fdecoitemquery="SELECT * FROM items WHERE itemType='floral-deco' LIMIT 3";
$fdecoitemcon=mysqli_query($connection, $fdecoitemquery);
// Get Stage Items
$stageitemquery="SELECT * FROM items WHERE itemType='stage-setup' LIMIT 3";
$stageitemcon=mysqli_query($connection, $stageitemquery);
// Get Tent Items
$tentitemquery="SELECT * FROM items WHERE itemType='tent' LIMIT 3";
$tentitemcon=mysqli_query($connection, $tentitemquery);
?>
<!DOCTYPE html>
<html>
<head>
<title>Decorations</title>
<link rel="stylesheet" type="text/css" href="./css/styles.css">
<link rel="stylesheet" type="text/css" href="./css/decorationsPage.css">
<script type="text/javascript" src="./javascript/jquery.min.js"></script>
</head>
<body>
<div class="page">
<!-- Title bar -->
<div class="header">
<div class="left">
<div class="dropdown">
<button class="dropbtn">Menu</button>
<div class="dropdown-content">
<a href="./index.php">Home</a>
<a href="./aboutus.php">About us</a>
<a href="./contactus.php">Contact us</a>
</div>
</div>
</div>
<div class="siteTitle">
EXTRAVAGANCE
<div class="siteTitle" style="font-size:30px;margin-top:20px ">
DECORATIONS
</div>
</div>
<div class="right">
<div class="loginSignUp">
<a href="./mycart.php"><button class="loginSignUpbtn"> My Cart</button></a>
</div>
</div>
</div>
<div class="frame" style="background-color:rgba(255,103,0,0.4);">
<div class="frame-header">Floral Decorations</div>
<div class="frame-content">
<?php
$block="";
if(mysqli_num_rows($fdecoitemcon)>0){
while($item=mysqli_fetch_assoc($fdecoitemcon)){
$block=$block."<div class='block' type='submit'>$item[itemName]<br>RS. $item[itemPrice]".
"<br><br><button onclick='addToCart($item[itemID])'> ADD TO CART </button>".
"</div>";
}
echo $block;
}
?>
</div>
<br>
</div>
<div class="frame" style="background-color:rgba(255,255,0,0.4)">
<div class="frame-header">Stage Setup</div>
<div class="frame-content">
<?php
$block="";
if(mysqli_num_rows($stageitemcon)>0){
while($item=mysqli_fetch_assoc($stageitemcon)){
$block=$block."<div class='block' type='submit'>$item[itemName]<br>RS. $item[itemPrice]".
"<br><br><button onclick='addToCart($item[itemID])'> ADD TO CART </button>".
"</div>";
}
echo $block;
}
?>
</div>
<br>
</div>
<div class="frame" style="background-color:rgba(255,103,0,0.4)">
<div class="frame-header">Tents</div>
<div class="frame-content">
<?php
$block="";
if(mysqli_num_rows($tentitemcon)>0){
while($item=mysqli_fetch_assoc($tentitemcon)){
$block=$block."<div class='block' type='submit'>$item[itemName]<br>RS. $item[itemPrice]".
"<br><br><button onclick='addToCart($item[itemID])'> ADD TO CART </button>".
"</div>";
}
echo $block;
}
?>
</div>
<br>
</div>
<!--Footer-->
<div>
<div class="footer" style="background-color:rgba(255,255,0,0.4)">
<a href="./aboutus.php">About Us</a>
<a href="./contactus.php">Contact Us</a>
</div>
</div>
</div>
<script type="text/javascript" src="./javaScript/mycart.js"></script>
</body>
</html>