?? approve2.jsp
字號:
<html>
<head>
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page language="java" import="java.sql.*"%>
<jsp:useBean id="adminBean" scope="page" class="exam.exam"/>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
function detail(a,b)
{
c="sp.jsp?pnum="+a+"&sbnum="+b;
window.open(c,"body","toolbar=yes,status=yes,scrollbars=yes,menubar=yes,location=yes,top=30,resizable=yes,left=20")
}
function submit01()
{
self.location.replace("approve2.jsp")
}
</script>
<link href="_notes/ccc" rel="stylesheet" type="text/css">
</head>
<body background="images/bg.gif">
<TABLE WIDTH=751 height="168" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
<tr>
<td width="770" height="168" align="center" valign="top">
<table width="747" height="16" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="420"><img src="images/temp_01.jpg" width="420" height="15"></td>
<td width="327"><img src="images/temp_02.jpg" width="330" height="15"></td>
</tr>
</table>
<table width="722" height="127" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="68" height="127"> </td>
<td width="641" valign="middle">
<p> </p>
<%
String dep=request.getParameter("give");
if(dep==null){
dep=(String)session.getValue("dep");
}
session.putValue("dep",dep);
int pageLine=5;
int totalRec=0;
int intPage=1;
int i;
if (request.getParameter("page")!=null)
intPage=Integer.parseInt(request.getParameter("page"));
try{
ResultSet countrs=null;
countrs=adminBean.executeQuery("select count(*)as cnt from pap where dep='"+dep+"' and pstate is null ");
if(countrs.next())
totalRec=countrs.getInt("cnt");
countrs.close();
adminBean.closeStmt();
}
catch(Exception e){
e.printStackTrace();
}
int intPageCount=0;
intPageCount=(totalRec+pageLine-1)/pageLine;
ResultSet rs2=adminBean.executeQuery("select sbnum,pnum,phead from pap where dep='"+dep+"' and pstate is null order by pnum ");
int sbnum;
int pnum;
String phead;
if (intPageCount>0)
{
for(i=1;i<=(intPage-1)*pageLine;i++)
rs2.next();
for(i=1;i<=pageLine;i++){
if(rs2.next()){
sbnum=rs2.getInt("sbnum");
pnum=rs2.getInt("pnum");
phead=rs2.getString("phead");
%>
<p><a href="javascript:detail(<%=pnum%>,<%=sbnum%>);" class="ccc"><font size="3"><b><%=pnum%>.<%=phead%></b></font></a></p>
<p><font color="#2DFFFF" class="ccc">
<%}
}
rs2.close();
}
%>
<%
out.print("<table "+"width=600 "+" valign=bottom>");
out.print("<tr>");
if(intPageCount*pageLine<totalRec)
intPageCount++;
if(intPage>intPageCount)
intPage=intPageCount;
if(intPage<1)
intPage=1;
out.print("<form method='post' name=fPageNum action='approve2.jsp'>");
if(intPage<2)
out.print("首頁 上一頁 ");
else{
out.print("<a href='approve2.jsp?page=1' ><font color='#2DFFFF' size='2'>首頁 </font></a>");
out.print("<a href='approve2.jsp?page="+(intPage-1)+"' ><font color='#2DFFFF' size='2'>上一頁 </font></a>");
}
if(intPage-intPageCount>=0)
out.print("下一頁 尾頁");
else{
out.print("<a href='approve2.jsp?page="+(intPage+1)+"'><font color='#2DFFFF' size='2'>下一頁 </font></a><a href='approve2.jsp?page="+intPageCount+"'><font color='#2DFFFF' size='2'>尾頁</font></a>");
}
out.print(" 頁次:"+intPage+"/"+intPageCount+"頁 ");
out.print("共"+totalRec+"套問卷 <b>"+pageLine+"</b>條/頁");
out.print(" 轉到第<input type='text' name='page' size=2 maxlength=10 class=smallInput value="+intPage+">");
out.print("頁<input class=buttonface type='submit' value='GO' name='cndok'></span></p></form>");
out.print("</tr>");
out.print("</table>");
%>
</font></p></td>
</tr>
</table>
<form action="manage.jsp" method="post" name="form1" target="_parent">
<p>
<input name="Submit" type="submit" value="結束審批">
</p>
</form></tr>
</table>
<div align="center"></div>
<p> </p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -