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

📄 addnewok.asp

📁 学生管理功能: 1.添加单个成绩 2.批量添加成绩 3.通过搜索并修改与删除
💻 ASP
字号:
<!--#include file="Function.asp"-->
<!--#include file="a25175_conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">	
	<%
	On Error Resume Next
	
	
	
	        typed=4
			strsql="select count(*) as total from content where typed="&typed
		    set rs=db.execute(strsql)
		    shuliang=RS("TOTAL")
			'----------------------------------------------------------------------
			for j=1 to shuliang
			tt=request.Form("chkSCORE"&j)
			if tt="" then
			tt="0"
			end if
			scorenew=scorenew&tt&"*"
			next	
			LEN1=LEN(scorenew)
			LEN1=LEN1-1
			scorenew=LEFT(scorenew,LEN1)
			
			'------------------------------------------------------------------
			'-----------------------返回加分的内容
			term=request.Form("term")
			course=request.Form("course")
			
			'''''''''''''----------------------------------------------------------------------------
			'----------------不选择学期和课程不能参加投票!!!!!!!!!!!!!!!
			depart=request.Form("depart")
			teach=request.Form("teacher")
			strsql="select * from term where id="&term
		    set rs=db.execute(strsql)
			term=cstr(rs("term"))
			strsql="select * from TEACHERCOURSE where id="&course
		    set rs=db.execute(strsql)
			course=cstr(rs("course"))
			'-------------------------------------------------------------------------------
			'----------------返回教师所在系别,课程,学期。
			
	        IP=REQUEST.ServerVariables("REMOTE_ADDR")
	        
			'------------------------------------------------------------------------
			'RESPONSE.Write scorenew&term&depart&teach&course
			'RESPONSE.End()
			
			'------------------------------------------------------------------------------------
			'------------------------------------------------------------------------------------
			
			strsql="select count(*) as total from  TEACHERNEW where term='"&term&"' and teacherid='"&teach&"' and course='"&course&"' and depart='"&depart&"'"
			set rs=db.execute(strsql)
			total1=cint(rs("total"))
			if  total1<>0 then
			response.write"<script>alert('"&teach&"老师的"&course&"\n您已经添加了创新分数,不能重复添加"&"');location='Addnew.asp'</script>"	
			response.End()
			end if
			
			'----------------------------查看是否添加过了?????
			'------------------------------------------------------------------------------------
			
			
			'---------------------------------------------------------------------------------------------------
           db.begintrans
		strsql="INSERT INTO TEACHERNEW(TEACHERID,SCORE,TERM,DEPART,COURSE,SUBMITDATE,IP)"
           strsql=strsql&"values('"&teach&"','"&scorenew&"','"&term&"','"&depart&"','"&course&"',"&DATE()&",'"&IP&"')"      
		   db.execute(strsql)
		   if db.errors.count=0 then
		   db.CommitTrans
		   response.write"<script>alert('"&depart&teach&"老师的创新分填写成功!');location='ADDnew.asp'</script>"	
		   else
		   db.RollbackTrans
		   response.write"<script>alert('"&depart&teach&"老师的创新分填写中出现错误,请重新填写!');location='ADDnew.asp'</script>"	
		   end if	
			'-------------------------------------------------------------------------------------------------------
			 %>
	

⌨️ 快捷键说明

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