-
Notifications
You must be signed in to change notification settings - Fork 0
/
Products.jsp
187 lines (175 loc) · 6.12 KB
/
Products.jsp
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!--
author: W3layouts
author URL: http://w3layouts.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<%@page import="databaseconnection.DatabaseConnection"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.io.PrintWriter"%>
<!DOCTYPE html>
<html>
<head>
<title>Super Market an E-commerce Online Shopping and Market Forecasting and Fake product review system</title>
<!-- for-mobile-apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Super Market Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //for-mobile-apps -->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- font-awesome icons -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<!-- js -->
<script src="js/jquery-1.11.1.min.js"></script>
<!-- //js -->
<link href='//fonts.googleapis.com/css?family=Raleway:400,100,100italic,200,200italic,300,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<!-- start-smoth-scrolling -->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
</script>
<!-- start-smoth-scrolling -->
</head>
<body>
<!-- header -->
<jsp:include page="Aheader.jsp"/>
<!-- //header -->
<!-- navigation -->
<!-- //navigation -->
<!-- breadcrumbs -->
<div class="breadcrumbs">
<div class="container">
<ol class="breadcrumb breadcrumb1 animated wow slideInLeft" data-wow-delay=".5s">
<li><a href="index1.jsp"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>Home</a></li>
<li class="active">Products</li>
</ol>
</div>
</div>
<!-- //breadcrumbs -->
<!--- groceries --->
<div class="products">
<%
String cat=request.getParameter("cat");
String subcat=request.getParameter("subcat");
if(cat==null)
{
cat = (String) session.getAttribute("cat");
subcat = (String) session.getAttribute("subcat");
if(cat==null)
{
cat="1";
subcat="1";
}
}
%>
<div class="container">
<div class="agile_top_brands_grids">
<%
DatabaseConnection db = new DatabaseConnection();
db.dbconnection();
ResultSet rs = null;
int i=0;
String sql="Select * from products Where pcate='"+cat+"' and pscate='"+subcat+"'";
rs=db.getResultSet(sql);
while(rs.next())
{
String id = rs.getString("id");
String pname = rs.getString("pname");
String str = pname.substring(0, 10)+"...";
String image1 = rs.getString("image1");
String pprice = rs.getString("pprice");
String pstock = rs.getString("pstock");
//String discrioption = rs.getString("description");
//String str1 = discrioption.substring(0, 20)+"...";
int stock = Integer.parseInt(pstock);
%>
<div class="col-md-4 top_brand_left">
<div class="hover14 column">
<div class="agile_top_brand_left_grid">
<div class="agile_top_brand_left_grid1">
<figure>
<div class="snipcart-item block">
<div class="snipcart-thumb">
<a href="ProductReview.jsp?productid=<%=id%>"><img title="" alt="" src="Admin/Product/<%=image1%>"></a>
<p><%=str%></p>
<h4>$<%=pprice%></h4>
</div>
<div class="snipcart-details top_brand_home_details">
<p></p>
</div>
</div>
</figure>
</div>
</div>
</div>
<div class="clearfix"> </div>
</div>
<%
}
%>
<div class="clearfix"> </div>
</div>
<div class="clearfix"> </div>
</div>
<div class="clearfix"> </div>
<!--- groceries --->
<!-- //footer -->
<br></br>
<br></br>
<br></br>
<jsp:include page="footer.jsp"/>
<!-- //footer -->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- top-header and slider -->
<!-- here stars scrolling icon -->
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({ easingType: 'easeOutQuart' });
});
</script>
<!-- //here ends scrolling icon -->
<script src="js/minicart.min.js"></script>
<script>
// Mini Cart
paypal.minicart.render({
action: '#'
});
if (~window.location.search.indexOf('reset=true')) {
paypal.minicart.reset();
}
</script>
<!-- main slider-banner -->
<script src="js/skdslider.min.js"></script>
<link href="css/skdslider.css" rel="stylesheet">
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#demo1').skdslider({'delay':5000, 'animationSpeed': 2000,'showNextPrev':true,'showPlayButton':true,'autoSlide':true,'animationType':'fading'});
jQuery('#responsive').change(function(){
$('#responsive_wrapper').width(jQuery(this).val());
});
});
</script>
<!-- //main slider-banner -->
</body>
</html>