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

📄 pat_work.asp

📁 这是一个成绩查询系统. 是个很好的在线查分系统,具体使用方法内详
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="login_menu.asp" -->
<!--#include file="error.asp" -->
<html>
<head>
<title><%=site_name%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="25175com_221.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (25175_sub2.psd) -->
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="images/index_02.gif"><table width="898" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
<!--#include file="top.asp" -->
<table width="898" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="202" valign="top"><%call login()%></td>
    <td width="696" valign="top"><table width="695" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/index_15.gif" width="695" height="48" alt=""></td>
      </tr>
      <tr>
        <td><table width="695" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="32"><img src="images/index_17.gif" width="32" height="579" alt=""></td>
            <td valign="top" bgcolor="#FFFFFF"><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <tr>
                <td><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                  <tr>
                    <td width="340">&nbsp;</td>
                    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="4%"><div align="right"><img src="images/index_19.gif" width="6" height="20" alt=""></div></td>
                        <td width="93%" bgcolor="#E4E7DB">&nbsp;&nbsp;<a href="index.asp">首页</a> &gt; 平时成绩</td>
                        <td width="3%"><img src="images/index_21.gif" width="7" height="20" alt=""></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="76" valign="bottom"><table width="97%"  border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><img src="images/index_30.gif" width="6" height="70" alt=""></div></td>
                    <td width="600" background="images/index_31.gif">
<%
  if pat25175="" then
      errmsg="<li>你还没有登陆,请先登陆系统"
	  call errormsg()
  else
%>

<form name="form1" method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>
<%
      dim selectstr,rs1,rs2,sql1,sql2,i1,i2
      sql1="select tid,tname from term order by tid asc"
      set rs1 = conn.execute(sql1)
      if rs1.eof and rs1.bof then
          selectstr=selectstr & "没有数据@00|无相关数据@0"
      else
          i1=0
          do while not rs1.eof
              if i1 > 0 then
                  selectstr=selectstr & "*"
	          end if
	          selectstr=selectstr & rs1(1) & "@" & rs1(0) &"|"
	          sql2="select bw.bcid,bw.bwname from bw_class bw,department d,class c,student s,pat p where p.suser=s.suser and s.cla_id=c.cid and c.dep_id=d.did and bw.dep_id=d.did and bw.ter_id="&rs1("tid")&" and p.puser='"&pat25175&"' order by bw.bcid asc"
	          set rs2 = conn.execute(sql2)
		      if rs2.eof and rs2.bof then
		          selectstr=selectstr & "没有数据@0"
		      else
	              i2=0
	              do while not rs2.eof
	                  if i2>0 then
		                  selectstr=selectstr & "^"
		              end if
		              selectstr=selectstr & rs2(1) & "@" & rs2(0)
		              i2=i2+1
		              rs2.movenext
	              loop
		      end if
		      set rs2=nothing
	          i1=i1+1
	          rs1.movenext
          loop
      end if
      set rs1=nothing
%>
<script language="JavaScript">
<!--
//二级菜单
var hw_selecttext ="<%=selectstr%>"
//如果文本与值不同,请输入在文本后加上@值
var TheSplit1 = "*"		//一层关系分隔符
var TheSplit2 = "|"		//二层关系分隔符
var TheSplit3 = "^"		//三层关系分隔符
var TheSplit4 = "@"		//文本与值的分隔符,可以省略
var hwallselecttext = hw_selecttext
var hwdefault_value = "学期考试项目"
//默认值
document.write('<select name="ter_id" onChange = "hw_select()"></select> <select name="bwc_id" onChange = "hw_select()"></select><input class="input" size="15" type="hidden" value="'+hwdefault_value+'" name="hw">\n');
var hwallselecttextarr
hwallselecttextarr = hwallselecttext.split(TheSplit1)
hwArraylength = hwallselecttextarr.length
var hwwhere = new Array(hwArraylength);
hwwhere[0]= new hw_comefrom("请选择学期@0","请选择考试项目@0");

for (var hwl=0;hwl<hwArraylength;hwl++)
{
	eval(hwwhere[hwl+1] = new hw_comefrom(hwallselecttextarr[hwl].split(TheSplit2)[0],hwallselecttextarr[hwl].split(TheSplit2)[1]))
}
function hw_comefrom(hwSelect_s1,hwSelect_s2) { this.hwSelect_s1 = hwSelect_s1; this.hwSelect_s2 = hwSelect_s2; } 

function hw_select()
{
	with(document.all.ter_id)
	{
		var hwSelect_s12 = options[selectedIndex].value;
	}
	for(hwi = 0;hwi < hwwhere.length;hwi ++)
	{
		if (hwwhere[hwi].hwSelect_s1.indexOf(TheSplit4)!=-1)
		{
			var hwThisV = hwwhere[hwi].hwSelect_s1.split(TheSplit4)[1]
		}
		else
		{
			var hwThisV = hwwhere[hwi].hwSelect_s1
		}
		if (hwThisV == hwSelect_s12)
		{
			hwSelect_s13 = (hwwhere[hwi].hwSelect_s2).split(TheSplit3);
			for(hwj = 0;hwj < hwSelect_s13.length;hwj++)
			{
				with(document.all.bwc_id)
				{
					length = hwSelect_s13.length;
					if (hwSelect_s13[hwj].indexOf(TheSplit4)!=-1)
					{
						options[hwj].text = hwSelect_s13[hwj].split(TheSplit4)[0]
						options[hwj].value = hwSelect_s13[hwj].split(TheSplit4)[1]
					}
					else
					{
						options[hwj].text = hwSelect_s13[hwj];
						options[hwj].value = hwSelect_s13[hwj];
					}
					var hwSelect_s14=options[selectedIndex].value;
				}
			}
		break;
		}
	}
	document.all.hw.value=hwSelect_s12+""+hwSelect_s14;
}
function hw_init()
{
	with(document.all.ter_id)
	{
		length = hwwhere.length;
		var hwm = 0
		for(hwk=0;hwk<hwwhere.length;hwk++)
		{
			if (hwwhere[hwk].hwSelect_s1.indexOf(TheSplit4)!=-1)
			{
				options[hwk].text = hwwhere[hwk].hwSelect_s1.split(TheSplit4)[0];
				options[hwk].value = hwwhere[hwk].hwSelect_s1.split(TheSplit4)[1];
				if (hwdefault_value.indexOf(hwwhere[hwk].hwSelect_s1.split(TheSplit4)[1])!=-1){hwm = hwk}
			}
			else
			{
				options[hwk].text = hwwhere[hwk].hwSelect_s1;
				options[hwk].value = hwwhere[hwk].hwSelect_s1;
				if (hwdefault_value.indexOf(hwwhere[hwk].hwSelect_s1)!=-1){hwm = hwk}
			}
		}
		selectedIndex = hwm
	}
	with(document.all.bwc_id)
	{
		var hwn = 0
		hwSelect_s13 = (hwwhere[hwm].hwSelect_s2).split(TheSplit3);
		length = hwSelect_s13.length;
		for(hwl=0;hwl<length;hwl++)
		{
			if (hwSelect_s13[hwl].indexOf(TheSplit4)!=-1)
			{
				options[hwl].text = hwSelect_s13[hwl].split(TheSplit4)[0];
				options[hwl].value = hwSelect_s13[hwl].split(TheSplit4)[1];
				if (hwdefault_value.indexOf(hwSelect_s13[hwl].split(TheSplit4)[1])!=-1){hwn = hwl}
			}
			else
			{
				options[hwl].text = hwSelect_s13[hwl];
				options[hwl].value = hwSelect_s13[hwl];
				if (hwdefault_value.indexOf(hwSelect_s13[hwl])!=-1){hwn = hwl}
			}
		}
		selectedIndex = hwn
	}
}
hw_init();
//-->
</script>
<select name="sub_id" id="sub_id">
  <option value="0">请选择课程</option>
<%
	  set rs=conn.execute("select sid,sname from subject order by sid asc")
      if rs.eof and rs.bof then
	      response.write"<option value='0'>-没有任课-</option>"
	  else
		  do while not rs.eof
		      response.write"<option value='"&rs("sid")&"'>"&rs("sname")&"</option>"
              rs.movenext
          loop
	  end if
	  set rs=nothing 
%>
  </select>
	  
	  </td>
      <td><input type="submit" name="Submit4" value="显示平时成绩"></td>
    </tr>
  </table>
</form>

<%
  end if
%>
</td>
                    <td><div align="center"><img src="images/index_34.gif" height="70" alt=""></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="419" valign="top">
<%
  if pat25175<>"" then
%>
					<table width="100%" align="center" cellpadding="2" cellspacing="0" <%=table_com%>>
                      <tr>
                        <td height="25"><div align="center"><strong>学 期</strong></div></td>
                        <td height="25"><div align="center"><strong>考试项目</strong></div></td>
                        <td height="25"><div align="center"><strong>课 程</strong></div></td>
                        <td height="25"><div align="center"><strong>成 绩</strong></div></td>
                      </tr>
<%
  dim ter_id,bwc_id,sub_id,sql_ids
  ter_id=request.form("ter_id")
  bwc_id=request.form("bwc_id")
  sub_id=request.form("sub_id")
  if ter_id="" then
      sql_ids=" and t.tid=0 "
  else
      sql_ids=" and t.tid="&ter_id&" "
  end if
  if bwc_id="" then
      sql_ids=sql_ids & " and bw.bcid=0 "
  else
      sql_ids=sql_ids & " and bw.bcid="&bwc_id&" "
  end if
  if sub_id="" then
      sql_ids=sql_ids & " and s.sid=0 "
  else
      sql_ids=sql_ids & " and s.sid="&sub_id&" "
  end if
  
  'set rs= Server.CreateObject("ADODB.Recordset")
  set rs=conn.execute("select t.tname,bw.bwname,s.sname,b.bresult from term t,bw_class bw,subject s,busywork b,student st,pat p where b.sub_id=s.sid and b.bwc_id=bw.bcid and bw.ter_id=t.tid and b.suser=st.suser and p.suser=st.suser and p.puser='"&pat25175&"' "&sql_ids&"")
  if rs.eof and rs.bof then
      response.write"<tr><td width='100%' height='100' align='center' colspan='4'>没有当前条件下子女的平时成绩</td></tr>"
  else
      do while not rs.eof and i<rs.pagesize
	      i=i+1
%>
                      <tr>
                        <td height="25"><div align="center"><%=rs("tname")%></div></td>
                        <td height="25"><div align="center"><%=rs("bwname")%></div></td>
                        <td height="25"><div align="center"><%=rs("sname")%></div></td>
                        <td height="25"><div align="center"><%=rs("bresult")%></div></td>
                      </tr>
<%
          rs.movenext
      loop
  end if
  set rs=nothing
%>
                    </table>
<%
  end if
%>
					</td>
                  </tr>
                  <tr>
                    <td height="20"><div align="center"></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><img src="images/index_78.gif" alt="" width="620" height="24"></td>
              </tr>
            </table></td>
            <td width="43"><img src="images/index_22.gif" width="43" height="579" alt=""></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table></td>
      </tr>
      <tr>
        <td><!--#include file="bottom.asp" -->
</td>
      </tr>
    </table></td>
  </tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>

⌨️ 快捷键说明

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