www.gusucode.com > 25175 学生同学录管理系统 2007 build 1231D源码程序 > admin/admin_res_check.asp

    <!--#include file="../conn.asp"-->
<!--#include file="../inc/inc.asp"-->
<!--#include file="inc/inc.asp"-->
<%
response.charset="gb2312"
Dim Col_id,lj_id,pro_id,sem_id
Dim arr_alls
Dim actions
Col_id=che(request("Col_id"))
lj_id=che(request("lj_id"))
pro_id=che(request("pro_id"))
actions=che(request("actions"))
sem_id=che(request("sem_id"))
If actions="" Then
	If Col_id<>"" And pro_id="" Then	'返回专业
		sql=Sqlinfo("id,pro","res_pro","Col_id in ("&Col_id&") ","id",2,"")
		rs = connopen(sql)
		If isArray(rs)=False Then
			res "0",0
		Else
			For i=0 To UBound(rs,2)
				arr_alls=arr_alls&rs(0,i)&"||"&CutStr(rs(1,i),16)&"%%"
			Next
			arr_alls=Left(arr_alls,Len(arr_alls)-2)
			res arr_alls,0
		End If
	ElseIf lj_id<>"" And pro_id="" Then		'返回选课项目
		sql=Sqlinfo("id,cho_name","res_cou_cho_type","Opens=1 and lj_id in ("&lj_id&") ","id",2,"")
		rs = connopen(sql)
		If isArray(rs)=False Then
			res "0",0
		Else
			For i=0 To UBound(rs,2)
				arr_alls=arr_alls&rs(0,i)&"||"&CutStr(rs(1,i),16)&"%%"
			Next
			arr_alls=Left(arr_alls,Len(arr_alls)-2)
			res arr_alls,0
		End If
	ElseIf lj_id<>"" And Col_id<>"" And pro_id<>"" Then		'返回班级
		sql=Sqlinfo("id,cla","res_cla"," lj_id in ("&lj_id&") and Col_id in ("&Col_id&") and pro_id in ("&pro_id&") ","id",2,"")
		rs = connopen(sql)
		If isArray(rs)=False Then
			res "0",0
		Else
			For i=0 To UBound(rs,2)
				arr_alls=arr_alls&rs(0,i)&"||"&CutStr(rs(1,i),16)&"%%"
			Next
			arr_alls=Left(arr_alls,Len(arr_alls)-2)
			res arr_alls,0
		End If
	ElseIf lj_id="" And Col_id<>"" And pro_id<>"" Then		'返回课程
		sql=Sqlinfo("id,cou","res_cou"," Col_id in ("&Col_id&") and pro_id in ("&pro_id&") ","id",2,"")
		rs = connopen(sql)
		If isArray(rs)=False Then
			res "0",0
		Else
			For i=0 To UBound(rs,2)
				arr_alls=arr_alls&rs(0,i)&"||"&CutStr(rs(1,i),16)&"%%"
			Next
			arr_alls=Left(arr_alls,Len(arr_alls)-2)
			res arr_alls,0
		End If
	Else
		res "0",0
	End If 
ElseIf actions="res_type" Then 
		sql=Sqlinfo("id,res_name","res_type"," lj_id in ("&lj_id&") ","id",2,"")
		rs = connopen(sql)
		If isArray(rs)=False Then
			res "0",0
		Else
			For i=0 To UBound(rs,2)
				arr_alls=arr_alls&rs(0,i)&"||"&CutStr(rs(1,i),16)&"%%"
			Next
			arr_alls=Left(arr_alls,Len(arr_alls)-2)
			res arr_alls,0
		End If
ElseIf actions="res_cou" Then 
		sql=Sqlinfo("id,cou","res_cou"," lj_id in ("&lj_id&") and  sem_ids like '%"&sem_id&"%' and Col_id in ("&Col_id&") and pro_id in ("&pro_id&") ","id",2,"")
		rs = connopen(sql)
		If isArray(rs)=False Then
			res "0",0
		Else
			For i=0 To UBound(rs,2)
				arr_alls=arr_alls&rs(0,i)&"||"&CutStr(rs(1,i),16)&"%%"
			Next
			arr_alls=Left(arr_alls,Len(arr_alls)-2)
			res arr_alls,0
		End If
Else
	res "0",0
End If 
response.End
%>