📄 result.jsp
字号:
<html>
<head>
<%@ page contentType="text/html;charset=gb2312" %>
<title>查询结果</title>
<link rel=stylesheet href="../../style.css" type="text/css">
<script language="JavaScript">
function newwin(url) {
var newwin=window.open(url,"newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=550,height=350");
newwin.focus();
return false;
}
</script>
</head>
<body vlink="#1155AA" bgcolor="#FFFFFF">
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="bidBean" scope="page" class="firm.firm" />
<%
String keywords1= new String(request.getParameter("keywords").getBytes("8859_1"));
String searchfanwei= new String(request.getParameter("D1").getBytes("8859_1"));
String mysql;
String serial;
String title;
String amount;
String stime;
String sprice;
String type1;
String info;
String period;
String nprice;
int bid;
if (searchfanwei.compareTo("商品名称")==0)
searchfanwei="title";
else if (searchfanwei.compareTo("数量")==0)
searchfanwei="amount";
else if (searchfanwei.compareTo("拍卖期限")==0)
searchfanwei="period";
else if (searchfanwei.compareTo("起始价")==0)
searchfanwei="sprice";
else if (searchfanwei.compareTo("现价")==0)
searchfanwei="nprice";
else if (searchfanwei.compareTo("商品简介")==0)
searchfanwei="info";
String pid = (String) session.getValue("pid");
mysql="select * from product where type_id="+ pid +" and " + searchfanwei + " like '%" + keywords1 + "%' " ;
%>
<center>
<table border="1" cellspacing="0" width="520" bgcolor="#d7e3b9" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF">
<tr bgcolor="#c8cc98" align="middle" class="text">
<td width="60" >商品ID号</td>
<td width="140" >商品名称</td>
<td width="80" >起始价格</td>
<td width="60" >拍卖期限</td>
<td width="40" >竞标数</td>
</tr>
<%
ResultSet RS=bidBean.executeQuery( mysql );
while (RS.next()) {
serial=RS.getString("product_id");
title=RS.getString("title");
period=RS.getString("period");
sprice=RS.getString("sprice");
bid=RS.getInt("bids");
%>
<tr align="middle" class="text">
<td width='60' align='center'><%=serial%></td>
<td width='140'><a href="../view.jsp?mid=<%=serial%>"><%=title%></a></td>
<td width='80' align='center'><%=sprice%></td>
<td width='60'align='center'><%=period%></td>
<td width='40'align='center'><%=bid%></td>
</tr>
<%
}
RS.close();
bidBean.closeStmt();
%>
</table>
</center>
<p align="center"><a href="javascript:window.close();">[关闭]</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -