-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_All_Posts_Ranks.jsp
248 lines (227 loc) · 8.58 KB
/
admin_All_Posts_Ranks.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Added Posts</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/droid_sans_400-droid_sans_700.font.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/coin-slider.min.js"></script>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style21 {font-size: 16px}
.style22 {color: #FF6600}
.style23 {
color: #FF0000;
font-weight: bold;
}
.style24 {font-size: 16px; color: #FFFF00; }
-->
</style>
</head>
<body>
<div class="main">
<div class="header">
<div class="header_resize">
<div class="menu_nav">
<ul>
<li><a href="index.html"><span>Home </span></a></li>
<li class="active"><a href="admin_Login.jsp"><span>Admin</span></a></li>
<li><a href="user_Login.jsp"><span>User</span></a></li>
<li></li>
</ul>
</div>
<div class="logo">
<h2><span class="style1">Clustering Based Collaborative Filtering Using an Incentivized Penalized User Model<small></small></span></h2>
</div>
<div class="clr"></div>
<div class="slider">
<div id="coin-slider"> <a href="#"><img src="images/slide1.jpg" width="960" height="294" alt="" /> </a> <a href="#"><img src="images/slide2.jpg" width="960" height="294" alt="" /> </a> <a href="#"><img src="images/slide3.jpg" width="960" height="294" alt="" /> </a> </div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
</div>
<div class="content">
<div class="content_resize">
<div class="mainbar">
<div class="article">
<h2 class="style23">All Posts By Clustering-Based Collaborative Filtering..</h2>
<div class="clr"></div>
<p> </p>
<p>
<%@ include file="connect.jsp" %>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*" %>
<%@ page import="java.util.Date" %>
<%@ page import="com.oreilly.servlet.*"%>
<%@ page import ="java.text.SimpleDateFormat" %>
<%@ page import ="javax.crypto.Cipher" %>
<%@ page import ="org.bouncycastle.util.encoders.Base64" %>
<%@ page import ="javax.crypto.spec.SecretKeySpec" %>
<%@ page import ="java.security.KeyPairGenerator,java.security.KeyPair,java.security.Key" %>
<%@ page import ="java.security.MessageDigest,java.security.DigestInputStream" %>
<%@ page import ="java.math.BigInteger" %>
<%
String s1="",s2="",s3="",s4="",s5="",s6="",s7="",s9="",s8,s10,s11,s12,s13,community="";
int i=0,j=0;
try
{
String str1 = " Select * from communitys ";
Statement st1 = connection.createStatement();
ResultSet rs1 = st1.executeQuery(str1);
while(rs1.next())
{
community = rs1.getString(2);
int count =1;
String query="select * from posts where community='"+community+"' order by rank DESC";
Statement st=connection.createStatement();
ResultSet rs=st.executeQuery(query);
while ( rs.next() )
{
i=rs.getInt(1);
s2=rs.getString(2);
s3=rs.getString(3);
s4=rs.getString(4);
s5=rs.getString(5);
s6=rs.getString(6);
j=rs.getInt(8);
String keys1 = "ef50a0ef2c3e3a5f";
KeyPairGenerator kg1 = KeyPairGenerator.getInstance("RSA");
Cipher encoder1 = Cipher.getInstance("RSA");
KeyPair kp1 = kg1.generateKeyPair();
Key pubKey1 = kp1.getPublic();
byte[] pub1 = pubKey1.getEncoded();
String decrypted_Desc = new String(Base64.decode(s5.getBytes()));
String decrypted_Uses = new String(Base64.decode(s6.getBytes()));
%>
</p>
<table width="574" border="1" cellpadding="0" cellspacing="0" >
<tr>
<td width="246" rowspan="8" >
<div style="margin:10px 13px 10px 13px;" ><div align="center" class="style8">
<input name="image2" type="image" src="post_Pic.jsp?id=<%=i%>" style="width:200px; height:200px;" />
</div></div> </td>
</tr>
<tr>
<td width="134" height="30" valign="middle" bgcolor="#FF0000" style="color: #2c83b0;"><div align="left " class="style24" style="margin-left:20px;">User Domain</div></td>
<td><span class="style15 style21"> <span class="style22"> <%=s2%></span></span></td>
</tr>
<tr>
<td width="134" height="30" valign="middle" bgcolor="#FF0000" style="color: #2c83b0;"><div align="left" class="style24" style="margin-left:20px;">Post Name </div></td>
<td width="186"><span class="style15 style21"> <%=s3%></span></td>
</tr>
<tr>
<td width="134" height="30" valign="middle" bgcolor="#FF0000" style="color: #2c83b0;"><div align="left" class="style24" style="margin-left:20px;">Color </div></td>
<td><span class="style15 style21"> <%=s4%></span></td>
</tr>
<tr>
<td width="134" height="30" valign="middle" bgcolor="#FF0000" style="color: #2c83b0;"><div align="left" class="style24" style="margin-left:20px;">Discription</div></td>
<td><span class="style15 style21"> <%=decrypted_Desc%></span></td>
</tr>
<tr>
<td width="134" height="30" valign="middle" bgcolor="#FF0000" style="color: #2c83b0;"><div align="left" class="style24" style="margin-left:20px;">Uses</div></td>
<td><span class="style15 style21"> <%=decrypted_Uses%></span></td>
</tr>
<tr>
<td width="134" height="30" valign="middle" bgcolor="#FF0000" style="color: #2c83b0;"><div align="left " class="style24" style="margin-left:20px;">Rank</div></td>
<td><span class="style15 style21"> <%=j%></span></td>
</tr>
<tr>
<td width="134" height="62" align="left" valign="middle" bgcolor="#FF0000" style="color: #2c83b0;"><div align="left" class="style24" style="margin-left:20px;">Rating of Pro </div ></td>
<td><span class="style8 style21"> <%
if(j<=3)
{
%>
<input name="image" type="image" src="Gallery/1.png" width="140" height="30" >
<%
}
if(j>3 && j<=6)
{
%>
<input name="image" type="image" src="Gallery/2.png" width="80" height="30" >
<%
}
if(j>6 && j<=9)
{
%>
<input name="image" type="image" src="Gallery/3.png" width="100" height="30" >
<%
}
if(j>9 && j<=12)
{
%>
<input name="image" type="image" src="Gallery/4.png" width="120" height="30" >
<%
}
if(j>12 && j<=15)
{
%>
<input name="image" type="image" src="Gallery/5.png" width="140" height="30" >
<%
}
if(j>15 && j<=300)
{
%>
<input name="image" type="image" src="Gallery/6.png" width="170" height="30" >
<%
}
%>
</span></td>
</tr>
<%
if(count==1)
{
%>
<p class="style21"><span class="style22"><%=community%> </span>Domain</p>
<%
count=count+1;
}
out.println("");
}}
connection.close();
}
catch(Exception e)
{
out.println(e.getMessage());
}
%>
</table>
<p> </p>
<p align="right"><a href="admin_Main.jsp">Back</a></p>
<div class="clr"></div>
</div>
<div class="article">
<div class="clr"></div>
<div class="clr"></div>
</div>
</div>
<div class="sidebar">
<div class="searchform">
</div>
<div class="clr"></div>
<div class="gadget">
<h2 class="star"><span>Admin</span> Menu</h2>
<div class="clr"></div>
<ul class="sb_menu">
<li><a href="admin_Main.jsp"><span>Admin Main </span></a></li>
<li><a href="admin_Login.jsp"><span>Log Out</span></a></li>
</ul>
</div>
</div>
<div class="clr"></div>
</div>
</div>
<div class="fbg"></div>
<div class="footer">
<div class="footer_resize">
<div style="clear:both;"></div>
</div>
</div>
</div>
</body>
</html>