学生评教系统,可以实现学生评教,教师查分功能.

源代码在线查看: vote.asp

软件大小: 294 K
上传用户: hqq
关键词: 评教系统
下载地址: 免注册下载 普通下载 VIP

相关代码

				  
				
				
				
				
				
				
								dim i,j,teachername,coursename
				dim a(17)
				 for i=1 to 17
				     dim myvote
				         myvote="vote"
				         myvote=mid(myvote,1,4)
				         myvote=myvote&cstr(I) '转成string 
				     a(I)=clng(request.form(myvote))
				  next
				    teachername=request.form("teachername")
				    coursename=request.form("coursename")
				    username=request.form("stuid")
				    feature=request.form("feature")
				    suggest=request.form("suggest")
				    sequence=request.form("sequence")
				            dim ors
				            set ors=server.createobject("adodb.recordset")
				            ors.open "select * from student where stuid='"&username&"' ",conn
				          dim m
				            dim b(16)
				            for m=1 to 16
				                b(m-1)=mid(ors("courseinfo"),m,1)
				            next
				  
				  if b(sequence-1)="t" then
				     response.redirect "check3.asp"
				     response.end
				  else
				         dim k
					 dim l(16)
					 for k=1 to 16
				    	      l(k-1)=mid(ors("courseinfo"),k,1)
				         next
					 l(sequence-1)="t"
					 dim n
					 for n=1 to 16
					   course=course&l(n-1)
				         next
				     conn.execute("update student set courseinfo='"&course&"' where stuid='"&username&"' ")    
				  
				    '更新投柰分数
				           set orv=server.createobject("adodb.recordset")
				           strsql="select * from vote where  teachername='"&teachername&"'  and coursename='"&coursename&"'"
				       orv.open strsql,conn
				       a(1)=a(1)+orv("vote1")
				       a(2)=a(2)+orv("vote2")
				       a(3)=a(3)+orv("vote3")
				        a(4)=a(4)+orv("vote4")
				       a(5)=a(5)+orv("vote5")
				      a(6)=a(6)+orv("vote6")
				      a(7)=a(7)+orv("vote7")
				      a(8)=a(8)+orv("vote8")
				      a(9)=a(9)+orv("vote9")
				      a(10)=a(10)+orv("vote10")
				      a(11)=a(11)+orv("vote11")
				     a(12)=a(12)+orv("vote12")
				     a(13)=a(13)+orv("vote13")
				     a(14)=a(14)+orv("vote14")
				     a(15)=a(15)+orv("vote15")
				      a(16)=a(16)+orv("vote16")
				      a(17)=a(17)+orv("vote17")
				  votenum=orv("votenum")+1
				  mysql="update vote set vote1="&a(1)&",vote2="&a(2)&",vote3="&a(3)&",vote4="&a(4)&","
				  mysql=mysql&"vote5="&a(5)&",vote6="&a(6)&",vote7="&a(7)&",vote8="&a(8)&",vote9="&(9)&","
				  mysql=mysql&"vote10="&a(10)&",vote11="&a(11)&",vote12="&a(12)&",vote13="&a(13)&",vote14="&a(14)&","
				  mysql=mysql&"vote15="&a(15)&",vote16="&a(16)&",vote17="&a(17)&",votenum="&votenum&" "   
				  mysql=mysql&" where  teachername='"&teachername&"'  and coursename='"&coursename&"' "    
				   conn.Execute mysql,number
				   
				    orv.close
				    set orv=nothing
				'插入建议和教学特色。 
				IF feature"" or suggest""  then
				   response.write username
				      set orn=server.createobject("adodb.recordset")
				     orn.open "note1",conn
				          str="insert into note1(stuid,feature,suggest,coursename)values('"&username&"','"&feature&"','"&suggest&"','"&coursename&"')"
				   conn.execute str
				    orn.close
				    set orn=nothing
				ENd IF
				 
				end if
				    set orv=server.createobject("adodb.recordset")
				    sqlsum="update vote set sum=vote1+vote2+vote3+vote4+vote5+vote6+vote7+vote8+vote9+vote10+vote11+vote12+vote13+vote14+vote15+vote16+vote17,average=sum\votenum"
				    conn.execute sqlsum 
				
				%>
				
				
				
				
				
				
				    
				    
				        
				            
				                
				     
				      提示信息
				    
				     
				      
				
				        
				          请评选下一门你所学课程.
				      
				    
				     
				      
				 				      
				      
				       
				    			

相关资源