SearchDocuments.jsp
3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page isELIgnored="false"%>
<jsp:useBean id="demo" class="com.weaver.ecology.search.web.SearchDocumentsBean"/>
<jsp:setProperty name="demo" property="pageContext" value="<%=pageContext%>"/>
<jsp:setProperty name="demo" property="key" param="key"/>
<jsp:setProperty name="demo" property="page" param="page"/>
<jsp:setProperty name="demo" property="init" value="true"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>e-cology<%=SystemEnv.getHtmlLabelName(20454,user.getLanguage())%>_<c:out value="${key}"/></title>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Keywords" content="keyword1,keyword2,keyword3" />
<meta http-equiv="Description" content="This is my page" />
<!--
<link rel="stylesheet" type="text/css" href="styles_wev8.css">
-->
<style type="text/css">
body{}
.search{width:80%;margin:0px auto;}
.searchInfo{background-color:#DDDDDD;}
.result{font-size:10pt;}
.result div{text-indent:20px;}
.result b{color:#CC0000;}
</style>
<script language="javascript">
var p=<c:out value="${pageInfo}" escapeXml="false"/>;
var param='key=<c:out value="${key}"/>';
var page=<c:out value="${page}"/>;
var isLastPage=<c:out value="${isLastPage}"/>;
function getU(){
return "SearchDocuments.jsp";
}
function initPage(){
var s='';
var getUrl=function(page,text){
return "<a href='"+getU()+"?"+param+"&page="+page+"'>"+text+"</a>";
}
/*var pageInfo=document.getElementById("pageInfo");
for(var i=1;i<=p.pages;i++){
s+=(i==p.page)?"["+i+"]":getUrl(i);
}*/
var getPages=function(){
var t='',t1;
for(var i=1;i<=page;i++){
t1="["+i+"]";
if(i==page){t+=t1;continue;}
//var t1=(i==1)?'第一页':'['+i+']';
t+=getUrl(i,t1)+" ";
}
return t;
}
if(page==1)s+=getUrl(2,'下一页');
else s+=getPages()+" "+((isLastPage)?"":getUrl(page+1,'下一页'));
pageInfo.innerHTML=s;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>
<body onload="initPage()">
<br/>
<div class="search">
<div style="padding-left:80px;">文档 <a href="#">项目</a>
<a href="#">流程</a> <a href="#">客户</a></div>
<form action="" method="get" name="frm1" id="frm1">
关键词:
<input name="key" type="text" value="<c:out value="${key}"/>" size="40"/>
<input type="submit" name="btn1" value="搜索" />
</form>
<div class="searchInfo" align="right"><c:out value="${info}"/></div>
<div class="result">
<c:out value="${result}" escapeXml="false"/>
</div>
<p><span id="pageInfo"></span></p>
</div>
</body>
</html>