📄 inc.asp
字号:
End If
end Function
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
Dim outcom
Sub sqllist(sql,colnum,strFileName,formaction)
PurviewChecked=False
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end If
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if rs.eof and rs.bof then
response.write "<tr><td width='100%' height='100' align='center' colspan='"&colnum&"' class=""main_info"">当前列表为空</td></tr></form></TABLE>"
Else
response.write "<form name=""del"" method=""Post"" action="""&formaction&""">"
pagedw="条记录"
totalPut=rs.recordcount
if currentpage<1 Then currentpage=1
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end If
if currentPage<>1 then
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
else
currentPage=1
end If
end If
outcom=True
end If
End Sub
Sub showdelpages()
response.write "<tr><td class=""art_info2"" align=""center"">"& vbcrlf & _
"<input name=""chkAll"" class=""chek"" type=""checkbox"" id=""chkAll"" " & _
"onclick=CheckAll(this.form) value=""checkbox"" style="" border: 0px;width:15px;"">"& vbcrlf & _
"</td>"& vbcrlf & _
"<td colspan="&colnum-1&"><label for=""chkAll"" style=""float:left;""><span>全选</span></label>"& vbcrlf & _
"<div class=""but_del""><a href=""#"" onclick=""ConfirmDel('del');"" class=""butt""><span>删除</span></a></div>"& vbcrlf & _
"</td></tr>"& vbcrlf & _
"<tr><td colspan="&colnum&" align=""center"">"& vbcrlf
showpage strFileName,totalput,MaxPerPage,true,false,pagedw
response.write "</td></tr>"& vbcrlf
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(gra_na) Then
ljs_names=lj_na(0,0)
Else
ljs_names="<span tit=""参数错误"">------</span>"
End If
End Function
'***********************************************
'函数名:ljs_select
'作 用:年届下拉
'参 数:ljs_nos ----年届默认ID
'***********************************************
Function ljs_select(ljs_nos)
ljs_select=""
Sql_Lists="id,lj"
Sql_tables="res_lj"
Sql_Conditions=""
sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
ljs_sel = connopen(sql)
If IsNull(ljs_nos) Or Not IsNumeric(ljs_nos) Then ljs_nos= 0
ljs_select=ljs_select&"<option value=""0"" "
If Int(ljs_nos)=0 Then ljs_select=ljs_select & " selected "
ljs_select=ljs_select&">请选择...</option>"
If isArray(ljs_sel) Then
For ljs_i=0 To UBound(ljs_sel,2)
ljs_select=ljs_select&"<option value="""&ljs_sel(0,ljs_i)&""" "
If Int(ljs_sel(0,ljs_i))=Int(ljs_nos) Then ljs_select=ljs_select & " selected "
ljs_select=ljs_select&">"&ljs_sel(1,ljs_i)&"</option>"
Next
Else
ljs_select=" "
End If
End Function
'***********************************************
'函数名:gras_select
'作 用:系所下拉
'参 数:gras_nos ----系所默认ID
'***********************************************
Function gras_select(gras_nos)
gras_select=""
Sql_Lists="id,gra"
Sql_tables="res_gra"
Sql_Conditions=""
sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
gras_sel = connopen(sql)
If IsNull(gras_nos) Or Not IsNumeric(gras_nos) Then gras_nos= 0
gras_select=gras_select&"<option value=""0"" "
If Int(gras_nos)=0 Then gras_select=gras_select & " selected "
gras_select=gras_select&">请选择...</option>"
If isArray(gras_sel) Then
For gras_i=0 To UBound(gras_sel,2)
gras_select=gras_select&"<option value="""&gras_sel(0,gras_i)&""" "
If Int(gras_sel(0,gras_i))=Int(gras_nos) Then gras_select=gras_select & " selected "
gras_select=gras_select&">"&CutStr(gras_sel(1,gras_i),16)&"</option>"
Next
Else
gras_select=" "
End If
End Function
Function gras_names(pros_nos)
Sql_Lists="gra"
Sql_tables="res_gra"
Sql_Conditions=" id="&pros_nos
sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
gra_na = connopen(sql)
If isArray(gra_na) Then
pros_names=gra_na(0,0)
Else
pros_names="<span tit=""参数错误"">------</span>"
End If
End Function
'***********************************************
'函数名:t_select
'作 用:返回选课系统的课程可否选择的状态下拉
'参 数:t_nos ----状态默认选择值
'***********************************************
Dim arr_Opens(2)
arr_Opens(1)="正常"
arr_Opens(2)="关闭"
Function t_select(t_nos)
t_select=t_select&"<option value=""0"" "
If Int(t_nos)=0 Then t_select=t_select & " selected "
t_select=t_select&">请选择...</option>"
For t_i=1 To UBound(arr_Opens)
t_select=t_select&"<option value="""&t_i&""" "
If Int(t_nos)=Int(t_i) Then t_select=t_select & " selected "
t_select=t_select&">"&arr_Opens(t_i)&"</option>"
Next
End Function
'***********************************************
'函数名:t_select2
'作 用:返回课程属性
'参 数:t_nos ----状态默认选择值
'***********************************************
Function t_select2(t_nos)
t_select2=t_select2&"<option value=""0"" "
If Int(t_nos)=0 Then t_select2=t_select2 & " selected "
t_select2=t_select2&">请选择...</option>"
For t_i=1 To UBound(arr_t_id)
t_select2=t_select2&"<option value="""&t_i&""" "
If Int(t_nos)=Int(t_i) Then t_select2=t_select2 & " selected "
t_select2=t_select2&">"&arr_t_id(t_i)&"</option>"
Next
End Function
Dim arr_couweeks(7) '课时安排
Dim weeksinfo(7)
weeksinfo(1)="一"
weeksinfo(2)="二"
weeksinfo(3)="三"
weeksinfo(4)="四"
weeksinfo(5)="五"
weeksinfo(6)="六"
weeksinfo(7)="日"
Function GetStrLen(str)
If IsNull(str) Or str = "" Then
getStrLen = 0
Else
Dim i, n, k, chrA
k = 0
n = Len(str)
For i = 1 To n
chrA = Mid(str, i, 1)
If Asc(chrA) >= 0 And Asc(chrA) <= 255 Then
k = k + 1
Else
k = k + 2
End If
Next
getStrLen = k
End If
End Function
'*************************************
'切割内容 - 按字符分割
'*************************************
Function CutStr2(byVal Str,byVal StrLen)
Dim l,t,c,i
If IsNull(Str) Then CutStr2="":Exit Function
l=Len(str)
StrLen=int(StrLen)
t=0
For i=1 To l
c=Asc(Mid(str,i,1))
If c<0 Or c>255 Then t=t+2 Else t=t+1
IF t>=StrLen Then
CutStr2=left(Str,i)&""
Exit For
Else
CutStr2=Str
End If
Next
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -