关于教师评价系统的WEB程序(二)

类别:Asp 点击:0 评论:0 推荐:

界面二(pingce.asp):在界面二中需要有八个如图的页面供学生对老师的八个标准进行打分,在这里我建立了八个页面分别进行采集数据,每个页面从分值表和教师表中取出相应的标准和教师姓名显示并收集数据。
bl.inc文件代码:
<%
  dim num,i,classselect,classname,student
  student=request.form("textfield")
  classselect=request.form("selectclass")
   %> 
opendb.inc文件代码:
<%
dim strcn
on error resume next
   strcn="dbq="+server.mappath("jxpjdb.mdb")+";driver={microsoft access driver (*.mdb)}"
   set cn=server.createobject("adodb.connection")
   cn.connectiontimeout=0
      cn.open strcn
    %>
   opendb.inc文件作用在打开相对路径下建立的数据库。
页面原代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->   
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
 
<% dim txt,txtarea,addtrue,teachname
    addtrue=0
    on error resume next
   set rs=server.createobject("adodb.recordset")
   rs.pagesize=1
   rs.open "select * from 班级表 where 学号=" & student ,cn
   do until rs.eof
      if rs("年级")=classselect then
      addtrue=1
  end if
  rs.movenext
  loop
    if addtrue=0 then
       set cm=server.createobject("adodb.command")
       set cm.activeconnection=cn
       cm.commandtext="insert into  班级表 (年级,学号) values('" & classselect & "','" & student & "')"
     cm.execute
       else
        response.redirect("/error.asp")
    end if
   %>
<!—对上一个页面提交的学生学号进行判断,如果没有在班级表中有数据则写入一条记录,否则已经有同一个学号学生做了评价则不能再进行操作à
<form name="form1" method="post" action="/sk.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">外国语实验学校问卷调查</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(classselect)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(student)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
<!—通过变量传递值显示正在操作的学生和班级-->
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=1" ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
<!—通过数据库从分值表中获取评价的内容和分值à
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & classselect & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3" >
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
     session("stuclass")=student
     session("classsel")=classselect
     session("a")=i
   <!—使用SESSION来传递值方便后面页面引用à
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>
文件sk.asp的原代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
  <% dim txt,txtarea,k,tname,xh,bj,fz
       k=session("a")
    xh=session("stuclass")
    bj=session("classsel")
     fz=session("count")
      for i=1 to k
  txt=request.form(  "t" & i  )
  if  not isnumeric(txt) or cint(txt)>cint(fz)  or cint(txt)<0 then
      response.redirect("/errorcount.asp")
   end if
  next
   for i=1 to  k
   tname=request.form("teaname" & i)
  txt=request.form(  "t" & i  )
  txtarea=request.form("area" & i)
  
   set cm1=server.createobject("adodb.command")
      set cm1.activeconnection=cn
      cm1.commandtext="insert into  投票 (班级,学生,教师,简评,备课) values('" & bj & "','" & xh & "','"  & tname & "','"  & txtarea & "','" & txt & "')"
    cm1.execute
    next
 %> 
<!—对上一个页面提交的评价分值写入数据库的投票表à

<form name="form1" method="post" action="/hlbs.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">&nbsp;</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(bj)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(xh)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=2"  ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & bj & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3">
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
    
    
     session("a")=i
   
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>
以下页面操作类似,分别给出各页面原代码:
文件hlbs.asp原代码
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
  <% dim txt,txtarea,k,tname,xh,bj,fz
       k=session("a")
    xh=session("stuclass")
    bj=session("classsel")
     fz=session("count")
      for i=1 to k
  txt=request.form(  "t" & i  )
  if  not isnumeric(txt) or cint(txt)>cint(fz)  or cint(txt)<0 then
      response.redirect("/errorcount.asp")
   end if
  next
   for i=1 to  k
   tname=request.form("teaname" & i)
  txt=request.form(  "t" & i  )
  txtarea=request.form("area" & i)
  
   set cm1=server.createobject("adodb.command")
      set cm1.activeconnection=cn
   cm1.commandtext="update 投票 set 备课=2 where 班级=" & bj & "and 学生=" & xh
         cm1.parameters.append cm.createparameter("sk_type",200,,225)
   cm1("sk_type")=txt
    cm1.execute
    next
 %> 


<form name="form1" method="post" action="/jxzt.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">&nbsp;</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(bj)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(xh)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=3"  ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & bj & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3">
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
    
    
     session("a")=i
   
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>
文件jxzt.asp原代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
  <% dim txt,txtarea,k,tname,xh,bj,fz
       k=session("a")
    xh=session("stuclass")
    bj=session("classsel")
     fz=session("count")
      for i=1 to k
  txt=request.form(  "t" & i  )
  if  not isnumeric(txt) or cint(txt)>cint(fz)  or cint(txt)<0 then
      response.redirect("/errorcount.asp")
   end if
  next
   for i=1 to  k
   tname=request.form("teaname" & i)
  txt=request.form(  "t" & i  )
  txtarea=request.form("area" & i)
  
   set cm1=server.createobject("adodb.command")
      set cm1.activeconnection=cn
      cm1.commandtext="insert into  投票 (班级,学生,教师,简评,合理板书) values('" & bj & "','" & xh & "','"  & tname & "','"  & txtarea & "','" & txt & "')"
    cm1.execute
    next
 %> 


<form name="form1" method="post" action="/fd.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">&nbsp;</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(bj)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(xh)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=4"  ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & bj & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3">
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
    
    
     session("a")=i
   
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>
文件fd.asp的原代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
  <% dim txt,txtarea,k,tname,xh,bj,fz
       k=session("a")
    xh=session("stuclass")
    bj=session("classsel")
     fz=session("count")
      for i=1 to k
  txt=request.form(  "t" & i  )
  if  not isnumeric(txt) or cint(txt)>cint(fz)  or cint(txt)<0 then
      response.redirect("/errorcount.asp")
   end if
  next
   for i=1 to  k
   tname=request.form("teaname" & i)
  txt=request.form(  "t" & i  )
  txtarea=request.form("area" & i)
  
   set cm1=server.createobject("adodb.command")
      set cm1.activeconnection=cn
      cm1.commandtext="insert into  投票 (班级,学生,教师,简评,教学状态) values('" & bj & "','" & xh & "','"  & tname & "','"  & txtarea & "','" & txt & "')"
    cm1.execute
    next
 %> 


<form name="form1" method="post" action="/dy.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">&nbsp;</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(bj)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(xh)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=5"  ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & bj & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3">
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
    
    
     session("a")=i
   
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>
文件dy.asp的原代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
  <% dim txt,txtarea,k,tname,xh,bj,fz
       k=session("a")
    xh=session("stuclass")
    bj=session("classsel")
     fz=session("count")
      for i=1 to k
  txt=request.form(  "t" & i  )
  if  not isnumeric(txt) or cint(txt)>cint(fz)  or cint(txt)<0 then
      response.redirect("/errorcount.asp")
   end if
  next
   for i=1 to  k
   tname=request.form("teaname" & i)
  txt=request.form(  "t" & i  )
  txtarea=request.form("area" & i)
  
   set cm1=server.createobject("adodb.command")
      set cm1.activeconnection=cn
      cm1.commandtext="insert into  投票 (班级,学生,教师,简评,辅导) values('" & bj & "','" & xh & "','"  & tname & "','"  & txtarea & "','" & txt & "')"
    cm1.execute
    next
 %> 


<form name="form1" method="post" action="/kyfd.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">&nbsp;</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(bj)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(xh)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=6"  ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & bj & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3">
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
    
    
     session("a")=i
   
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>

文件kyfd.asp的原代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
  <% dim txt,txtarea,k,tname,xh,bj,fz
       k=session("a")
    xh=session("stuclass")
    bj=session("classsel")
     fz=session("count")
      for i=1 to k
  txt=request.form(  "t" & i  )
  if  not isnumeric(txt) or cint(txt)>cint(fz)  or cint(txt)<0 then
      response.redirect("/errorcount.asp")
   end if
  next
   for i=1 to  k
   tname=request.form("teaname" & i)
  txt=request.form(  "t" & i  )
  txtarea=request.form("area" & i)
  
   set cm1=server.createobject("adodb.command")
      set cm1.activeconnection=cn
      cm1.commandtext="insert into  投票 (班级,学生,教师,简评,德育) values('" & bj & "','" & xh & "','"  & tname & "','"  & txtarea & "','" & txt & "')"
    cm1.execute
    next
 %> 


<form name="form1" method="post" action="/dyjc.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">&nbsp;</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(bj)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(xh)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=7"  ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & bj & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3">
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
    
    
     session("a")=i
   
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>
文件dyjc.asp原代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
 <!--#include file="opendb.inc"-->
<!--#include file="bl.inc"-->
<html>
<head>
<title>学生评价中</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
  <% dim txt,txtarea,k,tname,xh,bj,fz
       k=session("a")
    xh=session("stuclass")
    bj=session("classsel")
     fz=session("count")
      for i=1 to k
  txt=request.form(  "t" & i  )
  if  not isnumeric(txt) or cint(txt)>cint(fz)  or cint(txt)<0 then
      response.redirect("/errorcount.asp")
   end if
  next
   for i=1 to  k
   tname=request.form("teaname" & i)
  txt=request.form(  "t" & i  )
  txtarea=request.form("area" & i)
  
   set cm1=server.createobject("adodb.command")
      set cm1.activeconnection=cn
      cm1.commandtext="insert into  投票 (班级,学生,教师,简评,课业负担) values('" & bj & "','" & xh & "','"  & tname & "','"  & txtarea & "','" & txt & "')"
    cm1.execute
    next
 %> 


<form name="form1" method="post" action="/adddata.asp">
  <table width="100%" border="0" align="center">
    <tr>
      <td colspan="4"><img src="/image/dfles.jpg" width="299" height="60"></td>
    </tr>
    <tr>
      <td colspan="4"><h1 align="center">&nbsp;</h1></td>
    </tr>
    <tr>
      <td height="50" colspan="4"> <table width="100%" border="0">
          <tr>
            <td height="21"><font color="#0000CC" size="2">所在班级:</font></td>
            <td width="19%">
              <% response.write "<font color='red' size='2' >"
       response.write(bj)
    response.write"</font>" %>
              &nbsp;</td>
            <td width="29%"><div align="right"><font color="#0000CC" size="2">正在操作的学生:</font></div></td>
            <td width="39%">
              <% response.write "<font color='red' size='2' >"
       response.Write(xh)
    response.write"</font>号"
    %>
              &nbsp;</td>
          </tr>
          <tr>
            <td width="13%" height="21"><font color="#0000CC" size="2">评价标准:</font>
            </td>
            <td colspan="2">
              <%
       set rsbz=server.createobject("adodb.recordset")
       rsbz.open "select * from 分值表 where 编号=8"  ,cn
    response.write "<font size=2 face='楷体_GB2312'>"
    response.write rsbz("题目")
    response.write "<br>"
    response.write rsbz("内容")
    response.write "</font>"
    %>
              &nbsp;</td>
            <td> <font color="#0000CC" size="2">分值: </font>
              <% response.write "<font color='red' size='2' >"
response.write rsbz("分值")
response.write "</font>分"%>
            </td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="13%"><font size="2">学科</font></td>
      <td width="25%"><div align="left"><font size="2">教师姓名</font></div></td>
      <td width="26%"><font color="#FF0000" size="2">得分</font></td>
      <td width="36%"><font size="2">简评</font></td>
    </tr>
    <tr>
      <td colspan="4">
        <%            
 response.write "<table width='100%' border='1'>"
      on error resume next
   set rsteach=server.createobject("adodb.recordset")
    rsteach.open "select * from 教师表 where 班级='" & bj & "'",cn
     response.write "<font size=2,face='楷体_GB2312'>"
      i=1
 
   do until rsteach.eof
    response.write rsteach("学科")
    response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       response.write rsteach("姓名")
    teachname=rsteach("姓名")
    %>
    <input name="teaname<%=i%>" type="hidden" value="<% =teachname %>">
    <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
       %>
    <input name="t<% =i%>"   type="text" size="3">
          <% response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    %>
    <textarea name="area<% =i%>" cols="30" rows="3"></textarea>
       <% response.write (i  & "<br>")
       rsteach.movenext
    i=i+1
 
  loop
        response.write "</table></font>"
     i=i-1
        session("count")=rsbz("分值")
    
    
     session("a")=i
   
%>
     &nbsp;</td>
    </tr>
    <tr>
      <td height="21" colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="提交"  ></td>
    </tr>
  </table>
</form>

 <% 
     cn.close%>
</body>
</html>

本文地址:http://com.8s8s.com/it/it7007.htm