docCheckList.jsp
5 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="Util" class="weaver.general.Util" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<%
boolean canedit=false;
if(HrmUserVarify.checkUserRight("SendDoc:Manage",user)) {
canedit=true;
}
if (!canedit) response.sendRedirect("/notice/noright.jsp");
%>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="../../js/weaver_wev8.js"></script>
</HEAD>
<%
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(16991,user.getLanguage());
String needfav ="1";
String needhelp ="";
int pagenum=Util.getIntValue(request.getParameter("pagenum"),1);
int perpage=Util.getPerpageLog();
if(perpage<=1 ) perpage=15;
String sqlstr ="";
String sqltemp="";
String temptable = "docCheckTempTable"+ Util.getNumberRandom() ;
if(RecordSet.getDBType().equals("oracle")){
sqlstr= "create table "+temptable+" as select * from (select id,subject,docKind,docInstancyLevel,docSecretLevel,sendDate from DocSendDocDetail where status='0' order by id desc ) where rownum<"+ (pagenum*perpage+2);
}else{
sqlstr= "select top "+(pagenum*perpage+1)+" id,subject,docKind,docInstancyLevel,docSecretLevel,sendDate into "+temptable+" from DocSendDocDetail where status='0' order by id desc ";
}
RecordSet.executeSql(sqlstr);
RecordSet.executeSql("Select count(id) RecordSetCounts from "+temptable);
boolean hasNextPage=false;
int RecordSetCounts = 0;
if(RecordSet.next()){
RecordSetCounts = RecordSet.getInt("RecordSetCounts");
}
if(RecordSetCounts>pagenum*perpage){
hasNextPage=true;
}
if(RecordSet.getDBType().equals("oracle")){
sqltemp="select * from (select * from "+temptable+" order by id asc ) where rownum< "+(RecordSetCounts-(pagenum-1)*perpage-1) ;
}else{
sqltemp="select top "+(RecordSetCounts-(pagenum-1)*perpage)+" * from "+temptable+" order by id asc";
}
RecordSet.executeSql(sqltemp);
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%if(pagenum>1){
RCMenu += "{"+SystemEnv.getHtmlLabelName(1258,user.getLanguage())+",javascript:OnSubmit("+(pagenum-1)+"),_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
if(hasNextPage){
RCMenu += "{"+SystemEnv.getHtmlLabelName(1259,user.getLanguage())+",javascript:OnSubmit("+(pagenum+1)+"),_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<table width=100% height=100% border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td ></td>
<td valign="top">
<TABLE class=Shadow>
<tr>
<td valign="top">
<TABLE class=ListStyle cellspacing=1 >
<TBODY>
<colgroup>
<col width="2%">
<col width="26%">
<col width="19%">
<col width="19%">
<col width="19%">
<col width="15%">
<TR class=Header>
<th width=10> </th>
<th><%=SystemEnv.getHtmlLabelName(344,user.getLanguage())%></th>
<th><%=SystemEnv.getHtmlLabelName(16973,user.getLanguage())%></th>
<th><%=SystemEnv.getHtmlLabelName(15534,user.getLanguage())%></th>
<th><%=SystemEnv.getHtmlLabelName(16972,user.getLanguage())%></th>
<th><%=SystemEnv.getHtmlLabelName(16984,user.getLanguage())%></th>
</TR>
<TR class=Line><TD colspan="6" ></TD></TR>
<%
boolean isLight = false;
int totalline=1;
if(RecordSet.last()){
do{
String id=RecordSet.getString("id");
String subject= RecordSet.getString("subject");
String docKind= RecordSet.getString("docKind");
String docInstancyLevel= RecordSet.getString("docInstancyLevel");
String docSecretLevel= RecordSet.getString("docSecretLevel");
String sendDate= RecordSet.getString("sendDate");
if(isLight)
{%>
<TR CLASS=DataDark>
<% }else{%>
<TR CLASS=DataLight>
<% }%>
<th width=10><!--input class=inputstyle type=checkbox name=IDs value="<%=id%>"--></th>
<td><a href="docCheckDetail.jsp?sendDocId=<%=id%>"><%=subject%></a></td>
<td><%=docKind%></td>
<td><%=docInstancyLevel%></td>
<td><%=docSecretLevel%></td>
<td><%=sendDate%></td>
</tr>
<%
isLight = !isLight;
if(hasNextPage){
totalline+=1;
if(totalline>perpage) break;
}
} while(RecordSet.previous());
}
RecordSet.executeSql("drop table "+temptable);
%>
</TBODY>
</TABLE>
<form id=frmmain name=frmmain method=post action="docCheckList.jsp">
<input type=hidden id=pagenum name=pagenum value="<%=pagenum%>">
</FORM>
</td>
</tr>
</TABLE>
</td>
<td></td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
</table>
</body>
</html>
<script language=javascript>
function OnSubmit(pagenum){
document.frmmain.pagenum.value = pagenum;
document.frmmain.submit();
}
</script>