教师评价系统WEB开发(三)

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

adddata.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
 cn.close%> 
 
<table width="75%" border="0" align="center">
  <tr>
    <td><img src="/image/dfles.jpg" width="299" height="60"></td>
  </tr>
  <tr>
    <td><p align="center"><font color="#FF0000" size="5" face="华文隶书">感谢你的参与!</font></p>
      <p align="center"><font color="#FF0000" size="5" face="华文隶书">希望同学们假期愉快!学习更上一层楼!</font></p></td>
  </tr>
  <tr>
    <td><div align="center"><font face="Geneva, Arial, Helvetica, sans-serif">copyright&copy;sean</font></div></td>
  </tr>
  <tr>
    <td><div align="right"><font size="2" face="仿宋_GB2312"><a href="index.asp">下一位开始</a></font></div></td>
  </tr>
</table>
</body>
</html>
errorcount.asp代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>错误</title>
</head>

<body><%  
     response.write "   <br><br><br>"
     response.write "    <table align='center' width='300' border='1' cellpadding='0' cellspacing='0' bordercolor='#999999'>"
     response.write "      <tr bgcolor='#999999'> "
     response.write "        <td colspan='2' height='15'> "
     response.write "          <div align='center'><font color='#FFFFFF'>操作: 错误投票!</font></div>"
     response.write "        </td>"
     response.write "      </tr>"
     response.write "      <tr> "
     response.write "        <td colspan='2' height='23'> "
     response.write "          <div align='center'><br><br>"
     response.write "      分值不能超过范围或不是数字格式输入!<br>"
     response.write "        <a href='javascript:onclick=history.go(-1)'>返回</a>"       
     response.write "        <br><br></div></td>"
     response.write "      </tr>   </table>"
 %>

</body>
</html>

findresult.asp文件代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>问卷调查结果显示</title>
</head>

<body>
<table width="100%" border="0" align="center" >
  <tr>
    <td width="100%"><img src="/image/dfles.jpg" width="299" height="60"></td>
  </tr>


  <tr>
    <td> <div align="center">
        <form name="form1" method="post" action="/result.asp">
          <font color="#FF0000" size="2" face="仿宋_GB2312">查询所在班级</font>
          <select name="selectclass1" size="1">
            <option value="G0501">高05届1班</option>
            <option value="G0502">高05届2班</option>
            <option value="G0503">高05届3班</option>
            <option value="G0504">高05届4班</option>
            <option value="G0505">高05届5班</option>
            <option value="G0506">高05届6班</option>
            <option value="G0601">高06届1班</option>
            <option value="G0602">高06届2班</option>
            <option value="G0603">高06届3班</option>
            <option value="G0604">高06届4班</option>
            <option value="G0605">高06届5班</option>
            <option value="G0606">高06届6班</option>
            <option value="G0701">高07届1班</option>
            <option value="G0702">高07届2班</option>
            <option value="G0703">高07届3班</option>
            <option value="G0704">高07届4班</option>
            <option value="G0705">高07届5班</option>
            <option value="G0706">高07届6班</option>
            <option value="G0707">高07届7班</option>
            <option value="G0708">高07届8班</option>
            <option value="c0501">初05届1班</option>
            <option value="c0502">初05届2班</option>
            <option value="c0503">初05届3班</option>
            <option value="c0504">初05届4班</option>
            <option value="c0505">初05届5班</option>
            <option value="c0506">初05届6班</option>
            <option value="c0507">初05届7班</option>
            <option value="c0508">初05届8班</option>
            <option value="c0509">初05届9班</option>
            <option value="c0510">初05届10班</option>
            <option value="c0511">初05届11班</option>
            <option value="c0512">初05届12班</option>
            <option value="c0513">初05届13班</option>
            <option value="c0601">初06届1班</option>
            <option value="c0602">初06届2班</option>
            <option value="c0603">初06届3班</option>
            <option value="c0604">初06届4班</option>
            <option value="c0605">初06届5班</option>
            <option value="c0606">初06届6班</option>
            <option value="c0607">初06届7班</option>
            <option value="c0608">初06届8班</option>
            <option value="c0609">初06届9班</option>
            <option value="c0610">初06届10班</option>
            <option value="c0611">初06届11班</option>
            <option value="c06012">初06届12班</option>
            <option value="c0701">初07届1班</option>
            <option value="c0702">初07届2班</option>
            <option value="c0703">初07届3班</option>
            <option value="c0704">初07届4班</option>
            <option value="c0705">初07届5班</option>
            <option value="c0706">初07届6班</option>
            <option value="c0707">初07届7班</option>
            <option value="c0708">初07届8班</option>
            <option value="c0709">初07届9班</option>
            <option value="c0710">初07届10班</option>
            <option value="c0711">初07届11班</option>
            <option value="c0712">初07届12班</option>
          </select>
          &nbsp;
          <input type="submit" name="Submit" value="提交">
        </form>
      </div></td>
  </tr>
</table>

</body>
</html>

文件result.asp原代码:(显示评价结果,此页面根据判断标准不一样,可以自定义设置最后评价分值)
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="opendb.inc"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>问卷调查结果显示</title>
</head>

<body>
<table width="100%" border="0" align="center" >
  <tr>
    <td colspan="9"><img src="/image/dfles.jpg" width="299" height="60"></td>
  </tr>
  <% dim xstpcount,classselect1
     classselect1=request.form("selectclass1")
   set rs=server.createobject("adodb.recordset")
  rs.open "SELECT count(*) as tpnum FROM 班级表  where 年级='" & classselect1 & "'" ,cn
   xstpcount=1
   response.write"<br>"
   response.write("参与学生人数:" & rs("tpnum") & "&nbsp;&nbsp;")
   response.write("所选班级是:" & classselect1)
%>

  <tr>
    <td width="5%"><div align="center"><font color="#FF0000" size="2">姓名 </font></div></td>
    <td width="10%"><div align="center"><font color="#FF0000" size="2">备课项</font></div></td>
    <td width="10%"><div align="center"><font color="#FF0000" size="2">上课项</font></div></td>
    <td width="12%"><div align="center"><font color="#FF0000" size="2">合理板书项</font></div></td>
    <td width="14%"><div align="center"><font color="#FF0000" size="2">教学状态项</font></div></td>
    <td width="10%"><div align="center"><font color="#FF0000" size="2">辅导项</font></div></td>
    <td width="13%"><div align="center"><font color="#FF0000" size="2">教书育人项</font></div></td>
    <td width="13%"><div align="center"><font color="#FF0000" size="2">课业负担项</font></div></td>
    <td width="13%"><div align="center"><font color="#FF0000" size="2">单元检测项</font></div></td>
  </tr>
  <tr>
    <td colspan="9"> 
 <%
      set rs1=server.createobject("adodb.recordset")
   rs1.open "SELECT 教师, 备课 AS 备课分, 上课 AS 上课分, 合理板书 AS 板书, 教学状态 AS 教学状态分,辅导 AS 辅导分, 德育 AS 德育分, 课业负担 AS 负担, 单元检测 AS 检测 FROM 投票 where 班级='" & classselect1 & "'" & "GROUP BY 教师",cn
     do until rs1.eof
      response.write"<br>"%><%
   response.write"   <table width='100%' border='1'  align='center' bordercolor='#0099FF'>"
   response.write(rs1("教师"))
   response.write "&nbsp;&nbsp;"
   response.write(round(rs1("备课分")/xstpcount,2))
   response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
   response.write "<font color='#FF0000' size='3'>"
   response.write(round(rs1("上课分")/xstpcount,2))
   response.write"</font>"
   response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
   response.write(round(rs1("板书")/xstpcount,2))
   response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
   response.write "<font color='#FF0000' size='3'>"
   response.write(round(rs1("教学状态分")/xstpcount,2))
   response.write"</font>"
   response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
   response.write(round(rs1("辅导分")/xstpcount,2))
   response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
   response.write "<font color='#FF0000' size='3'>"
   response.write(round(rs1("德育分")/xstpcount,2))
   response.write"</font>"
   response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
   response.write(round(rs1("负担")/xstpcount,2))
   response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
   response.write "<font color='#FF0000' size='3'>"
     response.write(round(rs1("检测")/xstpcount,2))
  response.write"</font>"
  rs1.movenext
  loop
  response.write"</table>"
%> </td>
  </tr>
  <tr>
    <td colspan="9"> <div align="center">
    
       
      </div></td>
  </tr>
</table>

</body>
</html>
这个用ASP写的教师评价系统到此就介绍完了,由于本人的水平有限,故大量是复制了编写时的原代码.在写这个系统的过程中,我也在不断的思考,由于工作上等等各种原因,整个程序并不是很完善,贴出来也请各位大虾指正,指教.个人认为在对各项标准的打分几个页面(如pingce.asp,fd.asp等)还可以再简化,最好能实现为一个页面的代码.
总之,时间匆忙,写这篇文章也很匆忙,希望能为大家有一点帮助.
学海无涯,向各位学习!

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