forked from naveen-770/CelloSec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
126 lines (96 loc) · 3.05 KB
/
home.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
<?php
session_start();
include "db_conn.php";
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if (isset($_SESSION['id']) && isset($_SESSION['uname'])) {
?>
<!DOCTYPE html>
<html>
<head>
<title>Cello</title>
<link rel="icon" href="img/logo.jpg" />
<link rel = "stylesheet" type = "text/css" href="css/style.css" media="all">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<script src="php/jquery-1.7.2.min.js"></script>
<script src="php/carousel.js"></script>
</head>
<body>
<div id="header" style= "background-color: black; ">
<img src="img/logo.jpg">
<label>Cello</label>
<ul>
<li><a href="logout.php" class="">Logout</a></li>
<li><a href="home.php"><i class="icon-home"></i>Home</a></li>
<li><p class="display-4 ">Hello, <?=$_SESSION['uname']?></p></li>
</ul>
</div>
<div id="container">
<div class="nav">
<ul>
<li><a href="#"><i></i> </a></li>
</ul>
</div>
<div id="carousel">
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="active item" style="padding:0; border-bottom:0 solid #111;"><img src="img/banner1.jpg" class="carousel"></div>
<div class="item" style="padding:0; border-bottom:0 solid #111;"><img src="img/banner2.jpg" class="carousel"></div>
<div class="item" style="padding:0; border-bottom:0 solid #111;"><img src="img/banner3.jpg" class="carousel"></div>
</div>
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
<div id="video">
<video controls autoplay width="445px" height="300px">
<source src="video/clothing2.mp4" type="video/mp4">
</video>
</div>
<div id="content">
<div id="product" style="position:relative; margin-top:30%;">
<center><h2><legend>Feature Items</legend></h2></center>
<br />
<script>console.log('PHP: " . $query . "',$query);</script>
<?php
$sth = $conn->prepare("SELECT *FROM `product` WHERE category='feature' ORDER BY product_id DESC");
$sth->setFetchMode(PDO:: FETCH_OBJ);
$sth -> execute();
if (true)
{
// OUTPUT DATA OF EACH ROW
while($row = $sth->fetch())
{
echo "<div class='float'>";
echo "<center>";
echo "<a href='payment.php?id=".$row->product_id."'><img class='img-polaroid' src='img/".$row->product_image."' '></a>";
echo " ".$row->product_name."";
echo "<br />";
echo "$ ".$row->product_price."";
echo "<p><a href='payment.php?id=".$row->product_id."' class='button'>Buy Now</a></p>";
echo "<br />";
echo "</center>";
echo "</div>";
}
}
?>
</div>
</div>
<br />
</div>
<br />
<div id="footer" style="position:relative;">
<div class="foot">
<label style="font-size:17px;"> Copyright © </label>
<p style="font-size:25px;">Cello Inc.2022</p>
</div>
</div>
</body>
</html>
<?php
}else {
header("Location: index.php");
exit;
}
?>