inc.asp
上传用户:szhf331
上传日期:2022-06-22
资源大小:1032k
文件大小:6k
- <!--#include file="cls_Cache.asp"-->
- <!--#include file="md5.asp"-->
- <!--#include file="LANGUAGE.ASP"-->
- <!--#include file="common.asp"-->
- <!--#include file="function.asp"-->
- <%
- '***********************************************
- '函数名:reg_showUserId
- '作 用:返回用户帐号
- '参 数:str ----用户ID
- '***********************************************
- function reg_showUserId(str_user_id)
- Sql_Lists="UserId"
- Sql_tables="Reg_Userinfo"
- Sql_Conditions=" id="&str_user_id
- sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
- rs_reg_showUserId = connopen(sql)
- If isArray(rs_reg_showUserId) Then
- reg_showUserId="<A HREF=""admin_Members.asp?action=edit&id="&str_user_id&""">"&rs_reg_showUserId(0,0)&"</A>"
- Else
- reg_showUserId="<span tit=""参数错误"">------</span>"
- End If
- end Function
- '***********************************************
- '函数名:reg_showUserName
- '作 用:返回用户名称
- '参 数:str ----用户ID
- '***********************************************
- function reg_showUserName(str_user_id)
- Sql_Lists="UserName,IdentityNO"
- Sql_tables="Reg_Userinfo"
- Sql_Conditions=" id="&str_user_id
- sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
- rs_reg_showUserName = connopen(sql)
- If isArray(rs_reg_showUserName) Then
- reg_showUserName="<A HREF=""admin_Members.asp?action=edit&id="&str_user_id&""">"&rs_reg_showUserName(0,0)&"</A>"
- Else
- reg_showUserName="<span tit=""参数错误"">------</span>"
- End If
- end Function
- '***********************************************
- '函数名:reg_showuser_id
- '作 用:返回用户ID
- '参 数:str ----用户userid
- '**********************************************
- function reg_showuser_id(str_UserId)
- If str="" Then
- reg_showuser_id=0
- Exit Function
- End If
- Sql_Lists="id"
- Sql_tables="Reg_Userinfo"
- Sql_Conditions=" userid='"&str_UserId&"'"
- sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
- rs_showuser_id = connopen(sql)
- If isArray(rs_showuser_id) Then
- reg_showuser_id=rs_showuser_id(0,0)
- Else
- reg_showuser_id=0
- End If
- end Function
- Sub res(str,types)
- If types=1 Then str=str&vbcrlf
- response.write str
- End Sub
- Function ljs_names(ljs_nos)
- Sql_Lists="lj"
- Sql_tables="res_lj"
- Sql_Conditions=" id="&ljs_nos
- sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
- lj_na = connopen(sql)
- If isArray(Col_na) Then
- ljs_names=lj_na(0,0)
- Else
- ljs_names="<span tit=""参数错误"">------</span>"
- End If
- End Function
- '***********************************************
- '函数名:my_sqlsel
- '作 用:SQL动态下拉
- '参 数:
- ' nos ---- 默认ID
- ' seltypes ---- 下拉类别
- '***********************************************
- Function my_sqlsel(nos,seltypes)
- Sql_tables=""
- my_sqlsel=""
- Select Case seltypes
- Case "Col"
- Sql_tables="res_Col"
- Case "lj"
- Sql_tables="res_lj"
- Case "tea_name"
- Sql_tables="admin_tea"
- Case "addr"
- Sql_tables="couarr_addr"
- Case "cert_name"
- Sql_tables="Cert_type"
- Case Else
- Exit Function
- End select
- If Sql_tables="" Then Exit Function
- If IsNull(nos) Or Not IsNumeric(nos) Then nos = 0
- my_sqlsel= op(0,"请选择...",nos)
- sql=Sqlinfo("id,"&seltypes,Sql_tables,"","","","")
- fun_cel = connopen(sql)
- If isArray(fun_cel) Then
- For nos_i=0 To UBound(fun_cel,2)
- my_sqlsel=my_sqlsel & op(fun_cel(0,nos_i),CutStr(fun_cel(1,nos_i),16),nos)
- Next
- End If
- End Function
- '***********************************************
- '函数名:Cols_names
- '作 用:返回系所名称
- '参 数:nos ----系所ID
- '***********************************************
- Function Cols_names(nos)
- sql=Sqlinfo("Col","res_Col"," id="&nos,"","","")
- fun_cel = connopen(sql)
- If isArray(fun_cel) Then
- Cols_names=fun_cel(0,0)
- Else
- Cols_names="<span tit=""参数错误"">------</span>"
- End If
- End Function
- '***********************************************
- '函数名:out_sem
- '作 用:返回学期
- '参 数:nos ----学期ID
- '***********************************************
- Function out_sem(nos)
- If IsNull(nos) Then Exit Function
- If Not IsNumeric(nos) Then Exit Function
- If Int(nos)>Int(UBound(arr_Sem)) Or Int(nos)<0 Then Exit Function
- dimarr "sem"
- out_sem=arr_Sem(nos)
- End Function
- '***********************************************
- '函数名:sem_select
- '作 用:返回学期下拉
- '参 数:nos ----状态默认选择值
- '***********************************************
- Function sem_select(nos)
- sem_select=""
- If Not IsNumeric(nos) Then Exit Function
- dimarr "Sem"
- sem_select= op(0,"请选择...",nos)
- For nos_i=1 To UBound(arr_Sem)
- sem_select=sem_select & op(nos_i,arr_Sem(nos_i),nos)
- Next
- End Function
- '***********************************************
- '函数名:t_select
- '作 用:返回选课系统的课程可否选择的状态下拉
- '参 数:nos ----状态默认选择值
- '***********************************************
- Function t_select(nos)
- t_select=""
- If Not IsNumeric(nos) Then Exit Function
- dimarr "Opens"
- t_select= op(0,"请选择...",nos)
- For nos_i=1 To UBound(arr_Opens)
- t_select=t_select & op(nos_i,arr_Opens(nos_i),nos)
- Next
- End Function
- '***********************************************
- '函数名:t_select2
- '作 用:返回课程属性
- '参 数:nos ----状态默认选择值
- '***********************************************
- Function t_select2(nos)
- t_select2=""
- If Not IsNumeric(nos) Then Exit Function
- t_select2= op(0,"请选择...",nos)
- For nos_i=1 To UBound(arr_t_id)
- t_select2=t_select2 & op(nos_i,arr_t_id(nos_i),nos)
- Next
- End Function
- '***********************************************
- '函数名:Recheck
- '作 用:判断重复
- '参 数:strtable ----操作的表
- ' strid ----ID
- ' str1 ----所需要判断字段的字段名
- ' str2 ----所需要判断字段的值
- ' str3 ----错误提示名称
- '***********************************************
- Sub Recheck(strtable,strid,str1,str2,str3)
- Dim class_check
- Sql_Conditions=""
- If strid<>"" And strid<>"0" Then Sql_Conditions=" and id<>"&strid
- sql=Sqlinfo("id",strtable,str1&" = '"&str2&"'" & Sql_Conditions,"","","")
- class_check = connopen(sql)
- If isArray(class_check) Then errormsg str3&"重复!"
- End Sub
- %>