-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewallcategory.php
More file actions
91 lines (80 loc) · 1.91 KB
/
viewallcategory.php
File metadata and controls
91 lines (80 loc) · 1.91 KB
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
<?php
session_start();
include "dbconfigure.php";
if(verifyuser())
{
$u = $_SESSION['semail'];
$query = "select * from siteuser where emailid='$u'";
$rs = my_select($query);
if($row=mysqli_fetch_array($rs))
{
$username = $row[0];
$city = $row[2];
$address = $row[3];
$contact = $row[5];
}
}
else
{
header("location:login.php");
}
?>
<html>
<head>
<?php include "header.php"; ?>
</head>
<body>
<?php include "nav2.php";
echo "<br>Welcome <b style = 'text-transform : capitalize ; color : blue'>$username</b>";
?>
<div class="container" style = "margin-top:20px">
<h2 class="text-center" style = "font-family : Monotype Corsiva ; color : red">All Product Categories</h2>
<br>
<center><img src="myimages/line1.jpg" style ="height:20px ; width : 500px" ></center>
<br>
<?php
$query = "select * from category";
$rs = my_select($query);
?>
<div class = "row">
<?php
while($row=mysqli_fetch_array($rs))
{
?>
<div class="col-sm-4 mydivstyleone text-center">
<h4 class = "text-center headingfour" style = "font-family : Monotype Corsiva ; color : red"><?= $row[1]?></h4>
<a href = "giftbycategory1.php?categoryid=<?=$row[0]?>&categoryname=<?=$row[1]?>"><img src="admin/<?=$row[2]?>" class="img-thumbnail" style = "width:304px; height : 236px"> </a>
</div>
<?php
}
?>
</div>
</div>
<br><br><br><br>
<!--scrolltop start-->
<div class="scrolltop float-right">
<i class="fa fa-arrow-up" onclick="topFunction()" id="scrollbtn"></i>
</div>
<script>
scrollbutton = document.getElementById("scrollbtn");
window.onscroll = function(){scrollFunction()};
function scrollFunction()
{
if(document.body.scrollTop>20 || document.documentElement.scrollTop>20)
{
scrollbutton.style.display="block";
}
else
{
scrollbutton.style.display="none";
}
}
function topFunction()
{
document.body.scrollTop = 0;//safari
document.documentElement.scrollTop = 0;//for chrome
}
</script>
<!--scrolltop end-->
</body>
</html>