?? inc.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
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -