umpMenu = CacheJumpMenu & "<option value=""?ChannelID=" & Rs1("ChannelID") & "&sortid=" & Rs1("classid") & """ {ClassID=" & Rs1("classid") & "}"
End If
If Trim(Request("sortid")) <> "" Then
If CLng(Request("sortid")) = Rs1("classid") Then CacheJumpMenu = CacheJumpMenu & " selected"
End If
CacheJumpMenu = CacheJumpMenu & ">"
If Rs1("depth") = 1 Then CacheJumpMenu = CacheJumpMenu & " ├ "
If Rs1("depth") > 1 Then
For i = 2 To Rs1("depth")
CacheJumpMenu = CacheJumpMenu & " "
Next
CacheJumpMenu = CacheJumpMenu & " ├ "
End If
CacheJumpMenu = CacheJumpMenu & Rs1("ClassName") & "</option>" & vbCrLf
Rs1.MoveNext
Loop
Rs1.Close
Set Rs1 = Nothing
Value = CacheJumpMenu
End If
ClassJumpMenu = Value
End Function
''================================================
''函数名:GetRandomCode
''作 用:系统分配随机代码
''================================================
Public Function GetRandomCode()
Dim Ran, i, LengthNum
LengthNum = 16
GetRandomCode = ""
For i = 1 To LengthNum
Randomize
Ran = CInt(Rnd * 2)
Randomize
If Ran = 0 Then
Ran = CInt(Rnd * 25) + 97
GetRandomCode = GetRandomCode & UCase(Chr(Ran))
ElseIf Ran = 1 Then
Ran = CInt(Rnd * 9)
GetRandomCode = GetRandomCode & Ran
ElseIf Ran = 2 Then
Ran = CInt(Rnd * 25) + 97
GetRandomCode = GetRandomCode & Chr(Ran)
End If
Next
End Function
''================================================
'' 函数名:CodeIsTrue
'' 作 用:检查验证码是否正确
''================================================
Public Function CodeIsTrue()
Dim CodeStr
CodeStr = Trim(Request("CodeStr"))
On Error Resume Next
If CStr(Session("GetCode")) = CStr(CodeStr) And CodeStr <> "" Then
CodeIsTrue = True
Session("GetCode") = Empty
Else
CodeIsTrue = False
Session("GetCode") = Empty
End If
End Function
Public Function CheckAdmin(ByVal Flag)
Dim Rs, SQL
Dim i, TempAdmin, AdminFlag, AdminGrade
CheckAdmin = False
On Error Resume Next
SQL = "SELECT AdminGrade,Adminflag FROM NC_Admin WHERE username=''" & Replace(Session("AdminName"), "''", "''''") & "'' And password=''" & Replace(Session("AdminPass"), "''", "''''") & "'' And isLock=0 And id=" & CLng(Session("AdminID"))
Set Rs = Execute(SQL)
If Rs.BOF And Rs.EOF Then
CheckAdmin = False
Set Rs = Nothing
Exit Function