📄 searchs.jsp
字号:
<% String toptitle="搜索频道"; %>
<%@ include file="rscoon.jsp"%>
<%@ include file="mztop.jsp"%>
<%request.setCharacterEncoding("GB2312");
int channel=Integer.parseInt(request.getParameter("channel"));
String keywords=request.getParameter("keyword");
String hrefs;
String sql;
switch(channel){
case 1:
sql = "select id,title from scott.allarti where title like '%"+keywords+"%'";
hrefs="listarti.jsp";
ResultSet rs=stmt.executeQuery(sql);
%>
<TABLE width=766 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor=#FFFFFF><TBODY>
<% while(rs.next()) { %>
<TR><TD height=20 width='6%'> <DIV align=center><IMG height=10 src='images/rj-tp3.gif' width=6></DIV></TD><TD class=wz9 height=20 width='94%'><a href=<%=hrefs%>?id=<%=rs.getString(1)%>><%=rs.getString(2)%></a></TD></TR>
<% }
break;
case 2:
sql = "select id,pytitle from scott.policy where pytitle like '%"+keywords+"%'";
hrefs="listpy.jsp";
rs=stmt.executeQuery(sql);
%>
<TABLE width=766 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor=#FFFFFF><TBODY>
<% while(rs.next()) { %>
<TR><TD height=20 width='6%'> <DIV align=center><IMG height=10 src='images/rj-tp3.gif' width=6></DIV></TD><TD class=wz9 height=20 width='94%'><a href=<%=hrefs%>?id=<%=rs.getString(1)%>><%=rs.getString(2)%></a></TD></TR>
<% }
break;
case 3:
sql = "select id,nstitle from scott.news where nstitle like '%"+keywords+"%'";
hrefs="listnews.jsp";
rs=stmt.executeQuery(sql);
%>
<TABLE width=766 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor=#FFFFFF><TBODY>
<% while(rs.next()) { %>
<TR><TD height=20 width='6%'> <DIV align=center><IMG height=10 src='images/rj-tp3.gif' width=6></DIV></TD><TD class=wz9 height=20 width='94%'><a href=<%=hrefs%>?id=<%=rs.getString(1)%>><%=rs.getString(2)%></a></TD></TR>
<% }
break;
case 4:
sql = "select id, vdtitle from scott.video where vdtitle like '%"+keywords+"%'";
hrefs="movie.jsp";
rs=stmt.executeQuery(sql);
%>
<TABLE width=766 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor=#FFFFFF><TBODY>
<% while(rs.next()) { %>
<TR><TD height=20 width='6%'> <DIV align=center><IMG height=10 src='images/rj-tp3.gif' width=6></DIV></TD><TD class=wz9 height=20 width='94%'><a href=<%=hrefs%>?id=<%=rs.getString(1)%>><%=rs.getString(2)%></a></TD></TR>
<% }
break;
case 5:
sql = "select tjid,tjtitle from scott.mztj where tjtitle like '%"+keywords+"%'";
hrefs="dismztj.jsp";
rs=stmt.executeQuery(sql);
%>
<TABLE width=766 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor=#FFFFFF><TBODY>
<% while(rs.next()) { %>
<TR><TD height=20 width='6%'> <DIV align=center><IMG height=10 src='images/rj-tp3.gif' width=6></DIV></TD><TD class=wz9 height=20 width='94%'><a href=<%=hrefs%>?id=<%=rs.getString(1)%>><%=rs.getString(2)%></a></TD></TR>
<% }
break;
case 6:
sql = "select id,nettitle from scott.worknet where nettitle like '%"+keywords+"%'";
hrefs="worknet.jsp";
rs=stmt.executeQuery(sql);
%>
<TABLE width=766 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor=#FFFFFF><TBODY>
<% while(rs.next()) { %>
<TR><TD height=20 width='6%'> <DIV align=center><IMG height=10 src='images/rj-tp3.gif' width=6></DIV></TD><TD class=wz9 height=20 width='94%'><a href=<%=hrefs%>?id=<%=rs.getString(1)%>><%=rs.getString(2)%></a></TD></TR>
<% }
break;
}
%>
<%@ include file="foot.jsp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -