📄 searchout.jsp
字号:
<%@ include file="conn.jsp"%>
<%!
String replacenull(String a){
if(a==null){
return " ";
}else{
return a;
}
}
%>
<%request.setCharacterEncoding("GB2312");
String c_age=request.getParameter("c_age");
String c_name=request.getParameter("c_name");
String c_sex=request.getParameter("c_sex");
String c_netname=request.getParameter("c_netname");
String c_home=request.getParameter("c_home");
String c_education=request.getParameter("c_education");
String c_job=request.getParameter("c_job");
String c_netcall=request.getParameter("c_netcall");
String c_tel=request.getParameter("c_tel");
String c_sport=request.getParameter("c_sport");
String c_book=request.getParameter("c_book");
String c_music=request.getParameter("c_music");
String c_interest =request.getParameter("c_interest ");
String c_character=request.getParameter("c_character");
String c_photo=request.getParameter("c_photo");
String age1=request.getParameter("age1");
String age2=request.getParameter("age2");
String name=request.getParameter("name");
String sex=request.getParameter("sex");
String netname=request.getParameter("netname");
String home=request.getParameter("home");
String education=request.getParameter("education");
String job=request.getParameter("job");
String netcall=request.getParameter("netcall");
String tel=request.getParameter("tel");
String sport=request.getParameter("sport");
String book=request.getParameter("book");
String music=request.getParameter("music");
String interest=request.getParameter("interest");
String character=request.getParameter("character");
String photo=request.getParameter("photo");
String sql="select * from scott.larchives where lar_id like '%'";
String hrefdate="";
String searchvalue="ON";
if(searchvalue.equals(c_name)){
sql=sql + " and name like '" + name + "'";
}
if(searchvalue.equals(c_netname)){
sql=sql + " and netname like '" + netname + "'";
hrefdate=hrefdate + "&c_netname=" + "ON" + "&netname=" + netname ;
}
if(searchvalue.equals(c_sex)){
sql=sql + " and sex like '" + sex + "'";
}
if(searchvalue.equals(c_home)){
sql=sql + " and home like '%" + home + "%'";
hrefdate=hrefdate + "&c_home=" + "ON" + "&home="+ home ;
}
if(searchvalue.equals(c_education)){
sql=sql + " and education like '" + education + "'";
hrefdate=hrefdate + "&c_education=" + "ON" + "&education=" + education;
}
if(searchvalue.equals(c_job)){
sql=sql + " and job like '" + job + "'";
hrefdate=hrefdate + "&c_job=" + "ON" + "&job=" + job ;
}
if(searchvalue.equals(c_netcall)){
sql=sql + " and netcalllike '%" + netcall+ "%'";
}
if(searchvalue.equals(c_tel)){
sql=sql + " and tel like '" + tel + "'";
hrefdate=hrefdate + "&c_tel=" + "ON" + "&tel=" + tel ;
}
if(searchvalue.equals(c_sport)){
sql=sql + " and sport like '%" + sport + "%'";
hrefdate=hrefdate + "&c_sport=" + "ON" + "&sport=" + sport ;
}
if(searchvalue.equals(c_book)){
sql=sql + " and book like '%" + book + "%'";
hrefdate=hrefdate + "&c_book=" + "ON" + "&book=" + book ;
}
if(searchvalue.equals(c_music)){
sql=sql + " and music like '%" + music + "%'";
hrefdate=hrefdate + "&c_music=" + "ON" + "&music=" + music ;
}
if(searchvalue.equals(c_interest)){
sql=sql + " and interest like '%" + interest + "%'";
hrefdate=hrefdate + "&c_interest=" + "ON" + "&interest=" + interest ;
}
if(searchvalue.equals(c_character)){
sql=sql + " and character like '%" + character + "%'";
hrefdate=hrefdate + "&c_character=" + "ON" + "&character=" + character ;
}
if(searchvalue.equals(c_photo)){
String photovalue="有";
if(photovalue.equals(photo)){
sql=sql + " and photo>0";
}else{
sql=sql + " and photo=0";
}
}
ResultSet rs_lar=stmt.executeQuery(sql);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Namo WebEditor v4.0(Trial)">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>搜索</title>
<style>
<!--
.x:link { color: white; text-decoration: none }
.x:visited { color: white; text-decoration: none }
.x:active { color: red; text-decoration: none }
.x:hover { color: red;text-decoration:nome}
tr { font-size: 10pt }
body { font-size: 10pt }
a:link { color: blue; text-decoration: none }
a:visited { color: blue; text-decoration: none }
a:active { color: red; text-decoration: none }
a:hover { color: red; text-decoration: none }
-->
</style>
</head>
<body leftmargin="5" topmargin="0">
<table width="772" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/top.gif" width="772" height="112" usemap="#Map" border="0"></td>
</tr>
</table>
<table border="0" width="776" cellpadding="2" cellspacing="1">
<tr>
<td align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<p align="left"> 以下是符合您搜索条件的网友 </p>
</td>
</tr>
<tr>
<td height="8"> </td>
</tr>
</table>
<table border="1" width="776" cellspacing="0" cellpadding="1" bordercolorlight="#CC0000" bordercolordark="#FFFFFF">
<tr bgcolor="#336600">
<td width="87" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">网名</font></td>
<td width="60" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">性别</font></td>
<td width="127" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">来自</font></td>
<td width="78" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">生日</font></td>
<td width="110" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">网络寻呼机</font></td>
<td width="90" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">登记IP</font></td>
<td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">登记时间</font></td>
<td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">人气</font></td>
<td width="69" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1"><font color="#FFFFFF">照片数</font></td>
</tr>
<% while(rs_lar.next()){%>
<tr bgcolor="#DDF9FF">
<td width="87" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><a href="read.jsp?user_id=<%=replacenull(rs_lar.getString("user_id"))%>" title="查看网友<%=replacenull(rs_lar.getString("netname"))%>的祥细资料"><%=rs_lar.getString("netname")%></a></td>
<td width="60" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("sex")%></td>
<td width="127" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("home")%></td>
<td width="78" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("britherday")%></td>
<td width="110" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("netcall")%></td>
<td width="90" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("ip")%></td>
<td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("date1")%></td>
<td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("renqi")%></td>
<td width="69" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1"><%=rs_lar.getString("photo")%></td>
</tr>
<%}
rs_lar.close();%>
</table>
<table width="776">
<tr>
<td> </td>
</tr>
</table>
<div align="left"></div>
<map name="Map">
<area shape="rect" coords="228,93,273,114" href="default.jsp">
<area shape="rect" coords="294,96,356,111" href="your.jsp">
<area shape="rect" coords="383,94,443,113" href="list.jsp">
<area shape="rect" coords="467,95,529,111" href="register.jsp">
<area shape="rect" coords="551,93,616,112" href="sendphoto.jsp">
<area shape="rect" coords="642,92,703,113" href="pics.jsp">
</map>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -