| 搜索结果: |
共找到 <%= srh.get("result_count") %> 条记录,
用时 <%= timeExec %> 秒
|
<%
List lsKey = srh.listKey(srh.get("q"));
ListIterator li = lsResult.listIterator();
ListIterator liTmp;
HashMap hm;
String content, key;
while(li.hasNext()) {
hm = (HashMap)li.next();
content = hm.get("news_content").toString();
content = content.replaceAll("<[^>]+>", "");
liTmp = lsKey.listIterator();
key = liTmp.next().toString();
int index = content.indexOf(key);
if(index > content_other && (index + content_other / 2) < content.length()) {
content = "... " + content.substring(index - content_other / 2, index + content_other / 2) + " ...";
} else if(index > content_other) {
content = "... " + content.substring(index - content_other);
} else if(content.length() >= content_other) {
content = content.substring(0, content_other) + " ...";
}
liTmp = lsKey.listIterator();
while(liTmp.hasNext()) {
key = liTmp.next().toString();
content = content.replaceAll(key, "" + key + "");
}
String title_list = hm.get("title_list").toString();
liTmp = lsKey.listIterator();
while(liTmp.hasNext()) {
key = liTmp.next().toString();
title_list = title_list.replaceAll(key, "" + key + "");
}
%>
|
"><%= title_list %>
|
| <%= content %> |
|
<%= hm.get("publish_url") %>
<%= Functions.DateFormat("yyyy-MM-dd HH:mm", Functions.toInt((String)hm.get("news_time"))) %>
<%= hm.get("news_author") %>(<%= hm.get("news_from") %>)
|
<%
}
%>
| |
<%= srh.navigatePage(srh.getInt("page_size"), srh.getInt("result_count"), srh.getInt("pg")
, Functions.getHref(request, "", "", "q, c, img, author, from, starty, startm, endy, endm, encode, pg, submit", "q=" + Functions.encodeUrl(srh.get("q")) + "&c=" + srh.get("c") + "&img=" + srh.get("img") + "&author=" + Functions.encodeUrl(srh.get("author")) + "&from=" + Functions.encodeUrl(srh.get("from")) + "&starty=" + srh.get("starty") + "&startm=" + srh.get("startm") + "&endy=" + srh.get("endy") + "&endm=" + srh.get("endm") + "&pg=#"), "", conf) %>
|
|