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

📄 monitor.jsp

📁 JSP信息系统设计与开发实例源代码,做毕设的好东西呀
💻 JSP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<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">
<!--
window.setInterval("submit01()",10000)
function submit01()
{
self.location.replace("monitor.jsp")
}
function zr(a)
{
	window.open("zr.jsp?1="+a,"body","toolbar=no,scrollbars=no,width=230,height=229,top=30,left=20,menubar=no,systemMenu=no,resizable=no");
}
function cr(b)
{
	window.open("cr.jsp?1="+b,"body","toolbar=no,scrollbars=no,width=230,height=229,top=30,left=20,menubar=no,systemMenu=no,resizable=no");
}
function kr(c)
{
	window.open("kr.jsp?1="+c,"body","toolbar=no,scrollbars=no,width=230,height=229,top=30,left=20,menubar=no,systemMenu=no,resizable=no");
}
function jr(d)
{
	window.open("jr.jsp?1="+d,"body","toolbar=no,scrollbars=no,width=230,height=229,top=30,left=20,menubar=no,systemMenu=no,resizable=no");
}
// -->
</SCRIPT>
<link href="_notes/aaa.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
@import url("_notes/ccc");
-->
</style>
</HEAD>
<BODY BGCOLOR=#0D85A6 BACKGROUND="images/bg.gif" >
<br>
<br>
<TABLE WIDTH=752 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR>
		<TD width="231">
			<IMG SRC="images/spacer.gif" WIDTH=231 HEIGHT=1></TD>
		<TD width="4">
			<IMG SRC="images/spacer.gif" WIDTH=4 HEIGHT=1></TD>
		<TD width="76">
			<IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1></TD>
		<TD width="111">
			<IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
		<TD width="110">
			<IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
		<TD width="110">
			<IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
		<TD width="105">
			<IMG SRC="images/spacer.gif" WIDTH=105 HEIGHT=1></TD>
		<TD width="5">
			<IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
	</TR>
	<TR>
		<TD COLSPAN=4>
			<IMG SRC="images/temp_01.jpg" WIDTH=420 HEIGHT=15></TD>
		<TD COLSPAN=4>
			<IMG SRC="images/temp_02.jpg" WIDTH=330 HEIGHT=15></TD>
	</TR>
	<TR>
		<TD COLSPAN=8>
			<IMG SRC="images/temp_03.jpg" WIDTH=750 HEIGHT=5></TD>
	</TR>
	<TR>
		
    <TD> 
      <table width="231" border="0" cellspacing="0" cellpadding="0" height="226" background="images/left_top.jpg">
        <tr>
          <td width="231" valign="bottom"> 
            <div align="center"> 
              <table width="180" height="103" border="1" cellpadding="1" cellspacing="1">
                <tr> 
                  <td height="24" colspan="2" class="ccc">指示灯说明:</td>
                </tr>
                <tr> 
                  <td width="127" height="24" class="ccc">考生没有登录系统</td>
                  <td width="40"><div align="center"><img src="images/red.gif" width="20" height="20"></div></td>
                </tr>
                <tr> 
                  <td class="ccc">考生登录或在考试</td>
                  <td><div align="center"><img src="images/green.gif" width="20" height="20"></div></td>
                </tr>
                <tr> 
                  <td class="ccc">考生交卷离开系统</td>
                  <td><div align="center"><img src="images/yellow.gif" width="20" height="20"></div></td>
                </tr>
              </table>
            </div>
          </td>
        </tr>
      </table>
    </TD>
		<TD ROWSPAN=2>
			<IMG SRC="images/temp_05.jpg" WIDTH=4 HEIGHT=455></TD>
		
    <TD COLSPAN=5 ROWSPAN=2> 
      <table width="510" border="0" cellspacing="0" cellpadding="0" height="455" background="images/main_bg.jpg">
        <tr>
          <td width="510">
            <table width="510" border="0" cellspacing="0" cellpadding="0" height="455">
              <tr> 
                <td height="78" colspan="2"> <div align="center"><img src="images/blank_banner.gif" width="468" height="60"></div></td>
              </tr>
              <tr> 
                <td width="32"> <div align="center"> </div></td>
                <td width="478" valign="top"><table width="422" height="40" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="115" height="40" class="ccc">准考证号</td>
                      <td width="156" class="ccc">姓名</td>
                      <td width="151" class="ccc">状态 </td>
                    </tr>
                  </table>
                  <hr size="2" noshade>
                  <%
int pageLine=10;
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 student where  power='"+1+"' ");
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 snum,sname,state from student where  power='"+1+"' order by snum  ");
int snum;
String sname;
int state;
if (intPageCount>0)
{
   for(i=1;i<=(intPage-1)*pageLine;i++)
    rs2.next();
    for(i=1;i<=pageLine;i++){
      if(rs2.next()){
snum=rs2.getInt(1);
sname=rs2.getString(2);
state=rs2.getInt(3);
%>
                  <table width="471" height="23" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="115"><font size="3" class="ccc"><%=snum%></font></td>
                      <td width="156"><font size="3" class="ccc"><%=sname%></font></td>
                      <td width="200"><font size="3"> 
                        <%switch (state) { case 1:%>
                        <img src="images/red.gif" width="20" height="20"> 
                        <%break; case 4:%>
                        <img src="images/yellow.gif" width="20" height="20"> 
                        <%break; default:%>
                        <img src="images/green.gif" width="20" height="20"> 
                        <%}%>
                        </font></td>
                    </tr>
                  </table> 
                  <font color="#2DFFFF" class="ccc">
<%
}
}
rs2.close();
}
out.print("<table "+"width=470 "+" 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='monitor.jsp'>");      
if(intPage<2)
     out.print("上一页 ");
else{
  out.print("<a href='monitor.jsp?page="+(intPage-1)+"' ><font color='#2DFFFF' size='2'>上一页 </font></a>");
    }
if(intPage-intPageCount>=0)
   out.print("下一页");
else{
  out.print("<a href='monitor.jsp?page="+(intPage+1)+"'><font color='#2DFFFF' size='2'>下一页 </font></a>");
    }
out.print(" 页次:"+intPage+"/"+intPageCount+"页 ");
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></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </TD>
		<TD ROWSPAN=2>
			<IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
	</TR>
	<TR>
		
    <TD> 
      <table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
        <tr>
          <td width="231">
            <div align="center">
              <p><a href="javascript:zr(1);" class="ccc">|参加考试的人数|</a></p>
              <p><a href="javascript:cr(1);" class="ccc">|缺席考试的人数|</a></p>
              <p><a href="javascript:kr(1);" class="ccc">|正在考试的人数|</a></p>
              <p><a href="javascript:jr(1);" class="ccc">|已经交卷的人数|</a></p>
              <p><a href="watch.htm" class="ccc">|返回|</a></p>
              </div>
          </td>
        </tr>
      </table>
    </TD>
	</TR>
	<TR>
		<TD COLSPAN=8>
			<IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
	</TR>
	<TR>
		<TD COLSPAN=8>
			<IMG SRC="images/temp_10.jpg" WIDTH=750 HEIGHT=20></TD>
		
    	</TR>
</TABLE>
</BODY>
</HTML>

⌨️ 快捷键说明

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