当前位置: 网学 > 编程文档 > ASP > 正文

newasp中main类

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/17
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
  • 上一篇资讯: newasp中下载类
  • 下一篇资讯: 文章列表类别
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号