query.jsp
上传用户:toby834
上传日期:2013-10-21
资源大小:2613k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ include file="INC/const.jsp"%>
  3. <%@ page import = "java.util.Vector"%>
  4. <%
  5. stats=forumName+"论坛搜索";
  6. forumID=ParamUtil.getInt(request,"forumID",0);
  7. %>
  8. <%@ include file="INC/theme.jsp"%>
  9. <%
  10. out.println(headLine(1,forumName,forumLogo,"",1,stats));
  11. %>
  12.  <table cellpadding=0 cellspacing=0 border=0 width="<%=tableWidth%>" bgcolor="<%=tableBackColor%>" align=center>
  13.     <tr><td>
  14.     <table cellpadding=5 cellspacing=1 border=0 width=100%>
  15.     
  16. <tr>
  17. <td bgcolor="<%=tableTitleColor%>" valign=middle colspan=2 align="center">
  18. <p><form action="queryresult.jsp" method="post">
  19. <font color="<%=tableFontColor%>"><b>请输入要搜索的关键字</b></font></td></tr>
  20. <tr>
  21. <td bgcolor="<%=tableBodyColor%>" colspan=2 align="center" valign="middle"><font  color="<%=tableContentColor%>">
  22. (同时查询多个条件使用'<font  color="<%=alertFontColor%>">or</font>' 分隔关键字,查询同时满足某条件使用'<font  color="<%=alertFontColor%>">and</font>'分隔关键字)</font><br><br><input type=text size=40 name="keyword"></td></tr>
  23.                         <tr>
  24. <td bgcolor="<%=aTableBodyColor%>" valign=middle colspan=2 align=center><font  color="<%=tableContentColor%>"><b>搜索选项</b></font></td></tr>
  25.                         <tr>
  26. <td bgcolor="<%=tableBodyColor%>" align="right" valign="middle"><font color="<%=tableContentColor%>">
  27.                         <b>作者搜索</b></font>&nbsp;<input name="sType" type="radio" value="1">
  28.                         </td>
  29.                         <td bgcolor="<%=tableBodyColor%>" align="left" valign="middle">
  30.                         <select name="nSearch">
  31.                   <option value=1>搜索主题作者
  32.                   <option value=2>搜索回复作者
  33.                   <option value=3>两者都搜索
  34.                   </select>
  35.                   
  36.                         </td>
  37.                         </tr>
  38.                         <tr>
  39.                         <td bgcolor="<%=tableBodyColor%>" align="right" valign="middle"><font color="<%=tableContentColor%>">
  40.                         <b>关键字搜索</b></font>&nbsp;<input name="sType" type="radio" value="2" checked>
  41.                         </td>
  42.                         <td bgcolor="<%=tableBodyColor%>" align="left" valign="middle">
  43.                         <select name="pSearch">
  44.                   <option value=1>在主题中搜索关键字
  45.                   
  46.                   </select>
  47.                   
  48.                         </td>
  49.                         </tr>
  50.                         <tr>
  51.                         <td bgcolor="<%=tableBodyColor%>" align="right" valign="middle"><font color="<%=tableContentColor%>">
  52.                         <b>日期范围</b></font>
  53.                         </td>
  54.                         <td bgcolor="<%=tableBodyColor%>" align="left" valign="middle">
  55. <select name=SearchDate class=smallsel> <option value=ALL>所有日期<option value=1>昨天以来<option  selected value=5>5天以来<option value=10>10天以来<option value=30>30天以来</option></select> 
  56.                   
  57.                         </td>
  58.                         </tr>
  59.                         <tr>
  60. <td bgcolor="<%=aTableBodyColor%>" valign="middle" colspan=2 align=center><font color="<%=tableContentColor%>"><b>请选择要搜索的论坛 (不要选那些用 >> 和 << 括起来的,那只是类别名,不是论坛)</b></font></td></tr>
  61. <tr>
  62. <td bgcolor="<%=tableBodyColor%>" colspan="2" valign="middle" align="center"><font color="<%=tableContentColor%>">
  63.                         <b>搜索论坛: &nbsp; 
  64. <select name=forumID size=1>
  65. <option value=0 <%if(forumID==0){out.println("selected");}%>>所有论坛</option>
  66. <%
  67. try{
  68. Vector gateWayVector=GateWayFactory.getGateWays();
  69. for( i=0;i<gateWayVector.size();i++)
  70. {
  71.      GateWay gateWay=(GateWay)gateWayVector.get(i);
  72.      int gateWayID=gateWay.getGateWayID();
  73.      String gateWayName=gateWay.getGateWayName();
  74. out.println("<option style=BACKGROUND-COLOR:#99ccff>╋ "+gateWayName+"</option>");
  75. try{
  76. Vector forumVector=ForumFactory.getForums(gateWayID);
  77. for(int j=0;j<forumVector.size();j++){
  78. Forum theListForum=(Forum)forumVector.get(j);
  79. out.println("<option");
  80. if(forumID==theListForum.getForumID())
  81. out.println("selected");
  82. out.println("value=""+theListForum.getForumID()+""> ├"+theListForum.getForumType()+"</option>");
  83. }
  84. }
  85. catch(Exception e){
  86. e.printStackTrace();
  87. }
  88. }
  89. }
  90. catch(Exception e){
  91. e.printStackTrace();
  92. }
  93. %>
  94. </select>
  95. </b></td>
  96. </tr>
  97. <tr>
  98. <td bgcolor="<%=tableTitleColor%>" valign=middle colspan=2 align=center>
  99. <input type=submit value="开始搜索">
  100. </td></form></tr></table></td></tr></table>
  101. <%@include file="foot.jsp"%>