学生管理录 一个老师用的 好东西 里面有使用说明!!!~~~~~~

源代码在线查看: ks.asp

软件大小: 347 K
上传用户: tanhua1981
关键词: 使用说明
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				
				
				
								On Error Resume Next 
				Call CheckAdmin(",1,",","&Session("JB")&",")
				Dim action,id
				action = RQuery("action")
				id = RQuery("id")
				If action&"""" Then action = LCase(action)
				Select Case action
				Case "addsave"
					Call addsave()
				Case "editsave"
					Call editsave()
				Case "delsave"
					Call delsave()
				End select
				Call listface()
				If Err Then
					Call ShowErrs()
				End If 
				
				Sub addface()
				%>
				
				
				
					添加资料>>
				
				
					考试名称
					
				
				
					 
				
				
				
								End Sub
				
				Sub editface()
				Dim strSQL,objRs
				Dim KSMC
				strSQL = "Select 考试名称 from ksName where ksID="&id&""
				Set objrs = oconn.execute(strsql)
				If Not objrs.eof Then 
					KSMC = objRs(0)
				Else
					response.Write "参数错误!"
					Set objrs = nothing
					Call closeConn()
					response.End
				End If
				Set objRs = nothing
				%>
				
				
				
					编辑资料>>
				
				
					考试名称
					
				
				
					 
				
				
				
								End Sub
				
				Sub listface()
				Call PHead("考试项目管理")
				Call Waiting()
				%>
				考试项目管理
				
				
				
				
				
				
					ID
					考试名称
					功能
				
								Dim objRs,strSQL,MyPage,wName,i
				wName = RQuery("cName")
				strSQL = "Select ksID,考试名称 From ksName"
				strSQL = strSqL & " Order by ksID Desc"
				Set MyPage = New xdownpage
				MyPage.GetConn = oConn
				MyPage.GetSQL = strSQL
				MyPage.PageSize = 14
				Set objRs = MyPage.GetRs()
				If Not objRs.Eof Then
					For i = 1 To MyPage.PageSize
				%>
				
					
					
					编辑
					删除
				
										objRs.MoveNext
						If objRs.Eof Then Exit For
					Next
				Else
				%>
				暂无资料
								End If
				Set objRs = Nothing
				%>
				
				
				
				
								If action="edit" Then
					Call editface()
				Else 
					Call addface()
				End If 	
				%>
				
				
				
				
				function checkF()
				{
					if (document.forms[0].考试名称.value=="")
					{
						window.alert('考试名称不能为空!');
						document.forms[0].考试名称.focus();
						return false;
					}
				}
				
								Call HWaiting()
				Call PFoot()
				End Sub
				%>
				
								Sub addsave()
					On Error Resume Next 
					Dim strSQL
					Dim KSMC
					KSMC = FQuery("考试名称")
				
					strSQL = "insert into ksName (考试名称) values ('"&KSMC&"')"
				
					oConn.Execute(strSQL)
					If Err Then
						Call SaveLog(Session("XM"),"考试管理","添加考试项目失败")
						Call closeconn()
						Call JavaScript("alert('添加失败!');location.href='?';")
					Else
						Call SaveLog(Session("XM"),"考试管理","添加考试项目成功")
						Call JavaScript("alert('添加成功!');location.href='?';")
					End If 
				End Sub
				Sub editsave()
					On Error Resume Next 
					Dim strSQL
					Dim KSMC
					KSMC = FQuery("考试名称")
				
					strSQL = "update ksName set 考试名称='"&KSMC&"' where ksID="&id&""
				
					oConn.Execute(strSQL)
					If Err Then
						Call SaveLog(Session("XM"),"考试管理","更新考试项目失败")
						Call closeconn()
						Call JavaScript("alert('更新失败!');location.href='?';")
					Else
						Call SaveLog(Session("XM"),"考试管理","更新考试项目成功")
						Call JavaScript("alert('更新成功!');location.href='?';")
					End If 
				End Sub
				Sub delsave()
					On Error Resume Next 
					Dim strSQL
					'//删除考试项目
					strSQL = "delete from ksName where ksid="&id&""
					oConn.Execute(strSQL)
					'//删除考试项目成绩数据
					strSQL = "delete from cjTable where ksid="&id&""
					oConn.Execute(strSQL)
					'//删除考试项目成绩统计
					strSQL = "delete from sumCJ where ksid="&id&""
					oConn.Execute(strSQL)
					If Err Then
						Call SaveLog(Session("XM"),"科目管理","删除考试科目失败")
						Call closeconn()
						Call JavaScript("alert('删除失败!');location.href='?';")
					Else
						Call SaveLog(Session("XM"),"科目管理","删除考试科目成功")
						Call JavaScript("alert('删除成功!');location.href='?';")
					End If 
				End Sub
				%>			

相关资源