-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_Request_Response.jsp
282 lines (230 loc) · 9.46 KB
/
user_Request_Response.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!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>User Request_Response</title>
<%@ include file="connect.jsp" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.sql.*"%>
<%@page import ="java.util.*,java.text.SimpleDateFormat,java.util.Date,java.io.FileInputStream,java.io.FileOutputStream,java.io.PrintStream"%>
<%@ page import="com.oreilly.servlet.*,java.lang.*,java.text.SimpleDateFormat,java.io.*,javax.servlet.*, javax.servlet.http.*" %>
<%@page import ="java.util.*,java.security.Key,java.util.Random,javax.crypto.Cipher,javax.crypto.spec.SecretKeySpec"%>
<%@ page import="org.bouncycastle.util.encoders.Base64"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<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}
.style3 {font-size: 16px}
.style5 {
font-size: 20px;
color: #FF6600;
}
.style6 {
color: #FFFF00;
font-weight: bold;
}
.style7 {color: #FFFF00}
.style9 {font-weight: bold}
.style10 {color: #FF0000}
.style11 {color: #FF0000; font-weight: bold; }
-->
</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><a href="admin_Login.jsp"><span>Admin</span></a></li>
<li class="active"><a href="user_Login.jsp"><span>User</span></a></li>
<li><a href="about_Project.html"><span>About Project </span></a></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="style11"> Search User Based on User Domain Sign.... </h2>
<div class="clr"></div>
<p></p>
<p>
<FORM ACTION="user_Request_Response.jsp" METHOD="post">
<DIV STYLE="width:600px;">
<TABLE ALIGN="center" STYLE="margin:0 0 0 30px;">
<TR>
<%
try
{
ArrayList a1=new ArrayList();
String str = " select * from Communitys ";
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery(str);
while(rs.next())
{
a1.add(rs.getString(2));
}
%>
<TD width="129" bgcolor="#FF0000"><P><span class="style6">Select User Domain </span> </P></TD>
<TD width="144"> <select id="s1" name="community" class="text">
<option>--Select--</option>
<% for(int i=0;i<a1.size();i++)
{
%>
<option><%= a1.get(i)%></option>
<%}%>
</select></TD>
<%
}
catch(Exception e)
{
out.print(e);
}
%>
</TR>
<tr>
<td></td>
<TD width="129"><div align="justify"><INPUT name="submit" TYPE="submit" STYLE="width:100px; height:25px;" VALUE="Search"/></div></TD>
</tr>
<TR>
</TR>
</TABLE>
</DIV>
</FORM>
<p> </p>
<p>
<%
try{
String Community="",hash_Sign="",name="",id="";
String user=(String)application.getAttribute("user");
String community= request.getParameter("community");
SimpleDateFormat sdfDate = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");
Date now = new Date();
String strDate = sdfDate.format(now);
String strTime = sdfTime.format(now);
String dt = strDate + " " + strTime;
/*if(!fname.equalsIgnoreCase(""))
{
Statement st3 = connection.createStatement();
String query3 ="insert into searchfriends(username,friendsearched,dt) values('"+user+"','"+fname+"','"+dt+"')";
st3.executeUpdate (query3);
}*/
%>
</p>
<%
Statement stmt=connection.createStatement();
String strQuery = "select * from user where community='"+community+"' ";
ResultSet rs = stmt.executeQuery(strQuery);
int count=1;
while(rs.next())
{
id=rs.getString(1);
name=rs.getString(2);
if(name.equalsIgnoreCase(user))
{}
else
{
if(count==1)
{
count=count+1;
%>
<table width="388" border="1" align="center" cellpadding="0" cellspacing="0" font-size:14px;">
<tr>
<td height="40"></td>
<td align="center" class="style5">All <%=Community%> </td>
<td></td>
</tr>
<tr>
<td width="69" height="28" valign="baseline" bgcolor="#FF0000" style="color: #2c83b0;"><div align="center" class="style7 style3 style9 style15"><strong> ID </strong></div></td>
<td width="245" height="28" valign="baseline" bgcolor="#FF0000" style="color: #2c83b0;"><div align="center" class="style7 style3 style15"><strong>Friend Name </strong></div></td>
<td width="66" height="28" valign="baseline" bgcolor="#FF0000" style="color: #2c83b0;"><div align="center" class="style7 style3 style15"><strong>Details</strong></div></td>
<%
}
%>
<tr>
<td valign="baseline" height="0"><span class="style10 style3">
</span>
<div align="center" class="style10 style3">
<%out.println(id);%>
</div></td>
<td valign="baseline" height="0"><span class="style10 style3">
</span>
<div align="center" class="style16 style10 style3">
<%out.println(name);%>
</div></td>
<td > <p align="center" class="style3"><a href="user_Friend_Profile.jsp?name=<%=name%>">View</a></p></td>
</tr>
<%
}
}
connection.close();
}
catch(Exception e)
{
out.println(e.getMessage());
}
%>
<tr>
<td valign="baseline" height="0"> </td>
<td valign="baseline" height="0"> </td>
<td valign="baseline" height="0"> </td>
</tr>
</table>
</p>
<p> </p>
<p align="right"><a href="user_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>User </span> Menu</h2>
<div class="clr"></div>
<ul class="sb_menu">
<li><a href="user_All_My_Friends.jsp"><span>View All Friends</span></a></li>
<li><a href="user_All_Recieved_Request.jsp"><span>View Recieved Requests</span></a></li>
<li><a href="user_All_Sent_Request.jsp"><span>View Sent Requests</span></a></li>
<li><a href="user_Main.jsp"><span>User Main</span></a></li>
<li><a href="user_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>