⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 site_search_result.jsp

📁 jsp CMS全站 无可奈何花落去 士大夫
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/cms4j" prefix="cms4j" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>CMS4J </title>
<link href="../skin/blue/css/oper_area_style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE2 {font-size: 14px}
.STYLE3 {font-size: 10}
-->
</style>
</head>
<script src="../../js/common.js"></script>
<script src="../../js/page_init.js"></script>
<script>
//页面初始化
function pageInit(){
	selectInit("DB_ID","${param.db_id}");
	selectInit("DB_ID2","${param.db_id}");
}


function beginSearch(type){

	if(type == 1){
		location.href='?key_word=' + document.cms4jForm.KEY_WORD.value + '&db_id=' + document.cms4jForm.DB_ID.value;
	}else if(type == 2){
		location.href='?key_word=' + document.cms4jForm.KEY_WORD2.value + '&db_id=' + document.cms4jForm.DB_ID2.value;
	}

}
</script>


<body  onLoad="pageInit()">

<cms4j:site_search key_word="${param.key_word}" db_id="${param.db_id}">

<form action="#" method="post" name="cms4jForm" id="cms4jForm">
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr height="12"> 
    <td width="3%"><img src="../../images/admin/oper_table_up_left.gif" width="26" height="12"></td>
    <td width="92%" background="../../images/admin/oper_table_up_bg.gif" height="12"></td>
    <td width="5%"><img src="../../images/admin/oper_table_up_right.gif" width="26" height="12"></td>
  </tr>
  <tr> 
    <td colspan="3"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="5" background="../../images/admin/oper_table_left_bg.gif"><img src="../../images/admin/oper_table_left_bg.gif" width="5" height="2"></td>
          <td background="../../images/admin/oper_table_bg.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="30%" class="title_bar"><p>资源搜索结果</p>                  </td>
                <td width="70%" align="right" class="title_bar">共搜索到 <span class="test_must" id="result_count">${search_result_count}</span> 个结果  用时 <span class="test_must" id="result_count">${search_time}</span> 秒 </td>
              </tr>
              <tr height="4">
                <td height="4" colspan="2"></td>
              </tr>
            </table>
			
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="table_border_bg">

			  <tr class="table_border_cell_bg">
			    <td width="15%" height="22" class="list_left_title">关键字:</td>
                <td width="28%"><input name="KEY_WORD" type="text" id="KEY_WORD" value="<%=request.getParameter("key_word")%>" onKeyPress="if(event.keyCode == 13){beginSearch(1)}"></td>
                <td width="22%" align="right"><span class="list_left_title">资源库:</span></td>
                <td width="23%">
                  <select name="DB_ID" id="DB_ID">
                    <cms4j:search_index_db>
                      <option value="<%=index_db_info.getDB_ID()%>"><%=index_db_info.getNAME()%></option>
                    </cms4j:search_index_db>
                  </select>                </td>
			    <td width="12%" align="right"><span class="table_oper_tr">
			      <input name="Submit2" type="button" class="form_button" value="重新搜索" onClick="beginSearch(1)">
			    </span></td>
			  </tr>
            </table>
            
			<cms4j:site_search_result>
			
            <table width="90%" border="0" align="center" cellpadding="6" cellspacing="0">
              <tr>
                <td height="24" class="text_button"><span class="font_big STYLE2"><strong>


				
				<a href="<%=site_search_result_vo.getId()%>" target="_blank">
				<%=site_search_result_vo.getTitle()%>				</a>

				
				</strong></span></td>
              </tr>
              <tr>
                <td class="font_big STYLE2"><%=site_search_result_vo.getContent()%></td>
              </tr>
              <tr>
                <td class="text_remark">[<%=site_search_result_vo.getClassPath()%>]</td>
              </tr>
              <tr>
                <td class="text_remark"><%=site_search_result_vo.getIndexTime()%></td>
                </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>


			</cms4j:site_search_result>
			
			
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="table_border_bg">
              <tr >
                <td height="22" align="center" class="page_ctrl">
				
					<%
						int searchResultCount = cn.com.dekn.cms.util.StrUtil.getNotNullIntValue((String) request.getAttribute("search_result_count"),0);
					
						int pn = cn.com.dekn.cms.util.StrUtil.getNotNullIntValue(request.getParameter("pn"),1);
						//if(pn == 1){
							int k = 0;
							int i = 1;
							if(pn >= 20){
								i = pn - 10;
							}
							int pageCount = (searchResultCount + (10 - 1)) / 10;
					%>
						<% if(pn > 1){ %>
							<a href="?pn=<%=pn-1%>&key_word=${param.key_word}&db_id=${param.db_id}">上一页</a>
						<% } %>
					<%
						for(;i<=pageCount && k < 20 ;i++,k++){
					%>
							<% if(i == pn) { %>
								<b>[<%=i%>]</b>
							<% }else{ %>
								<a href="?pn=<%=i%>&key_word=${param.key_word}&db_id=${param.db_id}">[<%=i%>]</a>
							<% } %>
					<%
							}
					%>
						<% if(pn < pageCount){ %>
							<a href="?pn=<%=pn+1%>&key_word=${param.key_word}&db_id=${param.db_id}">下一页</a>
						<% } %>
				
				
				</td>
              </tr>
              <tr class="table_border_cell_bg">
                <td height="6" class="list_left_title"></td>
              </tr>
            </table>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="table_border_bg">
              <tr class="table_border_cell_bg">
                <td width="15%" height="22" class="list_left_title">关键字:</td>
                <td width="28%"><input name="KEY_WORD2" type="text" id="KEY_WORD2" value="${param.key_word}" onKeyPress="if(event.keyCode == 13){beginSearch(2)}"></td>
                <td width="22%" align="right"><span class="list_left_title">资源库:</span></td>
                <td width="23%"><select name="DB_ID2" id="DB_ID2" onChange="dataFilter('filter')">
                    <cms4j:search_index_db>
                      <option value="<%=index_db_info.getDB_ID()%>"><%=index_db_info.getNAME()%></option>
                    </cms4j:search_index_db>
                  </select>
                </td>
                <td width="12%" align="right"><span class="table_oper_tr">
                  <input name="Submit22" type="button" class="form_button" value="重新搜索" onClick="beginSearch(2)">
                </span></td>
              </tr>
            </table></td>
          <td width="5" background="../../images/admin/oper_table_right_bg.gif"><img src="../../images/admin/oper_table_right_bg.gif" width="5" height="2"></td>
        </tr>
      </table></td>
  </tr>
  <tr height="13"> 
    <td><img src="../../images/admin/oper_table_down_left.gif" width="26" height="13"></td>
    <td width="100%" height="13" background="../../images/admin/oper_table_down_bg.gif"></td>
    <td align="right"><img src="../../images/admin/oper_table_down_right.gif" width="26" height="13"></td>
  </tr>
</table>
</form>
</cms4j:site_search>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -