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

📄 approve2.jsp

📁 Java网上考试系统
💻 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">&nbsp;</td>
          <td width="641" valign="middle"> 
		  <p>&nbsp;</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>&nbsp;</p>

</body>
</html>

⌨️ 快捷键说明

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