Setup.asp
资源名称:haohj.rar [点击查看]
上传用户:angela
上传日期:2022-05-11
资源大小:853k
文件大小:12k
源码类别:
外挂编程
开发平台:
ASP/ASPX
- <!--#include file="../Inc/Cls_Conn.asp"-->
- <!--#include file="../Inc/Cls_Config.asp"-->
- <%
- '=====================================================================
- ' 作者声明:转载请保留版权信息,鄙视不要脸的人
- '=====================================================================
- ' 程序名称:蓝宇网络发布系统
- ' 程序作者:蓝宇 QQ:18159079 ╲、随心゛ QQ:6821845
- ' 文件名称:Setup.asp
- ' 更新日期:2007-6-5
- '=====================================================================
- ' 联系方式:Tel:13203117383,QQ:18159079,hi.baidu.com/hezeyu
- ' 程序开发:蓝宇,╲、随心゛
- ' 官方网站:蓝宇网络(http://hi.baidu.com/hezeyu)
- '=====================================================================
- ' Copyright 2004-2007 蓝宇 - All Rights Reserved.
- '=====================================================================
- Const IsAdminValidate = False
- Const AdminValidateCode = "admin123456"
- Const UseAdminCookies = True
- Const Admin_Cookies_Name = "admin_tee5"
- Dim titlename, LeftClass, RightClass, CenterClass, AdminPage
- LeftClass = "class=""TableRow1"" align=""left"""
- RightClass = "class=""TableRow1"" align=""right"""
- CenterClass = "class=""TableRow2"" align=""center"""
- AdminPage = Clng(tee5.AdminPage)
- Sub Admin_header()
- Response.Write "<html>" & vbCrLf
- Response.Write "<head>" & vbCrLf
- Response.Write "<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">" & vbCrLf
- Response.Write "<title>" & titlename & " - 管理页面</title>" & vbCrLf
- Response.Write "<meta name=keywords content=""天易,蓝宇网络络,蓝宇网络,tee5.com,tee5.net"">" & vbCrLf
- Response.Write "<meta name=""description"" content=""Design By http://hi.baidu.com/hezeyu"">" & vbCrLf
- Response.Write "<LINK href=""Images/Style.css"" type=text/css rel=stylesheet>" & vbCrLf
- Response.Write "<script src=""inc/admin.js"" type=""text/javascript""></script>" & vbCrLf
- Response.Write "<script language=javascript>" & vbCrLf
- Response.Write "<!--" & vbCrLf
- Response.Write "var startime,endTime;" & vbCrLf
- Response.Write "var d=new Date();" & vbCrLf
- Response.Write "startime=d.getTime();" & vbCrLf
- Response.Write "//-->" & vbCrLf
- Response.Write "</script>" & vbCrLf
- Response.Write "</head>" & vbCrLf
- Response.Write "<body leftmargin=0 bottommargin=0 rightmargin=0 topmargin=0>" & vbCrLf
- Response.Write "<BR style=""OVERFLOW: hidden; LINE-HEIGHT: 3px"">" & vbCrLf
- End Sub
- Sub Admin_footer()
- Response.Write "<br /><table align=center>" & vbCrLf
- Response.Write "<tr align=center>" & vbCrLf
- Response.Write "<td width=""100%"" style=""LINE-HEIGHT: 150%"" class=copyright>"
- Response.Write " Powered by:<a href=http://hi.baidu.com/hezeyu target=_blank>863 WebSite GameCMS " & Version & "</a> (ACCESS 版)" & vbCrLf
- Response.Write "<br>"
- Response.Write RunTime
- Response.Write "</td>" & vbCrLf
- Response.Write "</tr>" & vbCrLf
- Response.Write "</table>" & vbCrLf
- Response.Write "</body>" & vbCrLf
- Response.Write "</html>"
- End Sub
- Public Sub ReturnError(ErrMsg)
- Response.Write "<p> </p>" & vbCrLf
- Response.Write "<meta http-equiv=refresh content=3;url=javascript:history.go(-1)>"
- Response.Write "<table cellpadding=5 cellspacing=0 border=0 align=center class=tableBorder1>" & vbCrLf
- Response.Write " <tr><th colspan=2 align=""left""><img src=""images/welcome.gif"" width=""16"" height=""17"" align=""absMiddle""> 错误提示信息!</th></tr>" & vbCrLf
- Response.Write " <tr><td align=center width=""20%"" class=TableRow1><img src=""images/err.gif"" width=95 height=97 border=0></td><td width=""80%"" class=TableRow1><b style=color:blue><span id=jump>3</span> 秒钟后系统将自动返回</b><br><b>产生错误的可能原因:</b><BR>" & ErrMsg & "</td></tr>" & vbCrLf
- Response.Write " <tr><td colspan=2 align=center height=25 class=TableRow2><a href=javascript:history.go(-1)>返回上一页</a></td></tr>" & vbCrLf
- Response.Write "</table><p> </p>" & vbCrLf
- Response.Write "<script>function countDown(secs){jump.innerText=secs;if(--secs>0)setTimeout(""countDown(""+secs+"")"",1000);}countDown(3);</script>"
- End Sub
- Public Sub Succeed(SucMsg)
- Response.Write "<p> </p>" & vbCrLf
- Response.Write "<meta http-equiv=refresh content=3;url=" & Request.ServerVariables("HTTP_REFERER") & ">"
- Response.Write "<table align=""center"" border=""0"" cellpadding=""5"" cellspacing=""0"" class=""tableBorder1"">" & vbCrLf
- Response.Write " <tr> " & vbCrLf
- Response.Write " <th colspan=2 align=""left""><img src=""images/welcome.gif"" width=""16"" height=""17"" align=""absMiddle""> 成功提示信息!</th>" & vbCrLf
- Response.Write " </tr>" & vbCrLf
- Response.Write " <tr><td align=center width=""20%"" class=TableRow1><img src=""images/succ.gif"" width=95 height=97 border=0></td><td width=""80%"" class=TableRow1>"
- Response.Write " <b style=color:blue><span id=jump>3</span> 秒钟后系统将自动返回</b><br>"
- Response.Write SucMsg & "</td></tr>" & vbCrLf
- Response.Write " <tr><td colspan=2 align=center height=25 class=TableRow2><a href='" & Request.ServerVariables("HTTP_REFERER") & "'>返回上一页</a></td></tr>" & vbCrLf
- Response.Write " </table><p> </p>" & vbCrLf
- Response.Write "<script>function countDown(secs){jump.innerText=secs;if(--secs>0)setTimeout(""countDown(""+secs+"")"",1000);}countDown(3);</script>"
- End Sub
- '================================================
- '作 用:权限检测
- '================================================
- Public Function CheckAdmin(ByVal Flag)
- Dim Rs, SQL
- Dim i, TempAdmin, AdminFlag, AdminGrade
- CheckAdmin = False
- On Error Resume Next
- SQL = "SELECT id,AdminGrade,Authority FROM [Gq_Admin] WHERE AdminName='" & Replace(Session("LoginName"), "'", "''") &"' And password='"& Replace(Session("AdminPass"), "'", "''") &"' And isLock=0 And id="& CLng(Session("AdminID"))
- Set Rs = tee5.Execute(SQL)
- If Rs.BOF And Rs.EOF Then
- CheckAdmin = False
- Set Rs = Nothing
- Exit Function
- Else
- AdminFlag = Rs("Authority")
- AdminGrade = Rs("AdminGrade")
- End If
- Rs.Close: Set Rs = Nothing
- If CInt(AdminGrade) = 999 Then
- CheckAdmin = True
- Exit Function
- Else
- If Trim(flag) = "" Then Exit Function
- If AdminFlag = "" Then
- CheckAdmin = False
- Exit Function
- Else
- tempAdmin = Split(AdminFlag, ",")
- For i = 0 To UBound(TempAdmin)
- If Trim(LCase(TempAdmin(i))) = Trim(LCase(Flag)) Then
- CheckAdmin = True
- Exit For
- End If
- Next
- End If
- End If
- End Function
- '================================================
- '作 用:判断字符串中是否含有非法字符
- '================================================
- Public Function IsValidStr(ByVal str)
- IsValidStr = False
- On Error Resume Next
- If IsNull(str) Then Exit Function
- If Trim(str) = Empty Then Exit Function
- Dim ForbidStr, i
- ForbidStr = "and|chr|:|=|%|&|$|#|@|+|-|*|/||<|>|;|,|^|" & Chr(32) & "|" & Chr(34) & "|" & Chr(39) & "|" & Chr(9)
- ForbidStr = Split(ForbidStr, "|")
- For i = 0 To UBound(ForbidStr)
- If InStr(1,str, ForbidStr(i),1) > 0 Then
- IsValidStr = False
- Exit Function
- End If
- Next
- IsValidStr = True
- End Function
- '================================================
- '作 用:判断密码中是否含有非法字符
- '================================================
- Public Function IsValidPassword(ByVal str)
- IsValidPassword = False
- On Error Resume Next
- If IsNull(str) Then Exit Function
- If Trim(str) = Empty Then Exit Function
- Dim ForbidStr, i
- ForbidStr = "*|^|%|;|,|" & Chr(32) & "|" & Chr(34) & "|" & Chr(39) & "|" & Chr(9)
- ForbidStr = Split(ForbidStr, "|")
- For i = 0 To UBound(ForbidStr)
- If InStr(1, str, ForbidStr(i), 1) > 0 Then
- IsValidPassword = False
- Exit Function
- End If
- Next
- IsValidPassword = True
- End Function
- '===========================================
- '函数作用:页面执行时间
- '===========================================
- Public Function RunTime()
- Dim StrTemp,Endtime
- Endtime=timer()
- strTemp= strTemp & "页面执行时间:" & FormatNumber(Endtime - startime,3, -1) & "毫秒 "
- strTemp= strTemp & "页面装载时间:<script language=javascript>d=new Date();endTime=d.getTime();document.write((endTime-startime)/1000);</script> 秒"
- response.write strTemp
- End Function
- '===========================================
- '函数作用:检查组件是否已经安装
- '===========================================
- Function IsObjInstalled(ByVal strClassString)
- Dim xTestObj,ClsString
- On Error Resume Next
- IsObjInstalled = False
- ClsString = strClassString
- Err = 0
- Set xTestObj = Server.CreateObject(ClsString)
- If Err = 0 Then IsObjInstalled = True
- If Err = -2147352567 Then IsObjInstalled = True
- Set xTestObj = Nothing
- Err = 0
- Exit Function
- End Function
- '================================================
- '作 用:HTML生成
- '================================================
- Public Function ShowGuage(Url)
- Response.Write "<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>"
- Response.Write "<tr>"
- Response.Write "<th colspan=2><span id=txt2 name=txt2></span></th>"
- Response.Write "</tr>"
- Response.Write "<tr><td " & CenterClass & ">"
- Response.Write "<br><table width='500' align=center border=0 cellspacing=1 cellpadding=1>" & vbCrLf
- Response.Write "<tr>" & vbCrLf
- Response.Write "<td align=center>"
- Response.Write "<span id=txt3 name=txt3 style=""font-size:9pt""></span>"
- Response.Write "</td>" & vbCrLf
- Response.Write "</tr>" & vbCrLf
- Response.Write "<tr> " & vbCrLf
- Response.Write "<td style=""border: 1px #384780 solid ;background-color: #FFFFFF;"">" & vbCrLf
- Response.Write "<table width=0 id=table2 name=table2 border=0 cellspacing=0 cellpadding=0>" & vbCrLf
- Response.Write "<tr height=12><td bgcolor=#0066FF>" & vbCrLf
- Response.Write "</td></tr></table></td></tr>"
- Response.Write "<tr>" & vbCrLf
- Response.Write "<td height='30'>"
- Response.Write "<span id=txt1 name=txt1 style=""font-size:9pt"">0</span>"
- Response.Write "<span style=""font-size:9pt"">%</span>"
- Response.Write "</td>" & vbCrLf
- Response.Write "</tr>" & vbCrLf
- Response.Write "<tr>" & vbCrLf
- Response.Write "<td height='30' align='center'>"
- Response.Write "<input type='button' name='stop' value=' 停止生成HTML ' onclick=""window.location.href='" & Url & "';"" class=button>"
- Response.Write "</td>" & vbCrLf
- Response.Write "</tr>" & vbCrLf
- Response.Write "</table><br>" & vbCrLf
- Response.Write "</td></tr></table>" & vbCrLf
- End Function
- Public Function ShowInnerHTML(totalnumber,totalCount,sql,n)
- Response.Write "<script>table2.style.width=" & Fix((n / totalnumber) * 500) & ";"
- Response.Write "txt1.innerHTML=""完成:" & FormatNumber(n / totalnumber * 100, 2, -1) & """;"
- Response.Write "txt2.innerHTML=""总共需要生成 <font color='#FFFF00'>" & totalCount & "</font> 个页面 请稍后……"";"
- Response.Write "txt3.innerHTML=""正在生成私服ID为 <font color='blue'>" & sql & "</font> 的HTML页面……"";" & vbCrLf
- Response.Write "table2.title=""(" & n & ")"";</script>" & vbNewLine
- End Function
- '===========================================
- '函数作用:保存远程文件
- '===========================================
- Function GetRemoteFiels(RemotePath, LocalPath, FileName)
- Dim strBody
- Dim FilePath
- On Error Resume Next
- strBody = GetBodyUrl(RemotePath)
- FilePath = Server.MapPath(LocalPath & GetFileName(RemotePath, FileName))
- '保存文件
- if SaveToFile(strBody, FilePath) = true and err.Number = 0 then
- GetRemoteFiles = true
- else
- GetRemoteFiles = false
- end if
- End Function
- Function GetBodyUrl(url)
- Dim Retrieval
- Set Retrieval = CreateObject(ServerObject(4))
- With Retrieval
- .Open "Get", url, False, "", ""
- .Send
- GetBodyUrl = .ResponseBody
- End With
- Set Retrieval = Nothing
- End Function
- Function GetFileName(RemotePath, FileName)
- Dim arrTmp
- Dim strFileExt
- arrTmp = Split(RemotePath, ".")
- 'strFileExt = arrTmp(UBound(arrTmp))
- GetFileName = FileName & ".html"
- End Function
- Function SaveToFile(Stream, FilePath)
- Dim objStream
- On Error Resume Next
- Set objStream = Server.CreateObject(ServerObject(2))
- objStream.Type = 1
- objStream.Open
- objstream.write Stream
- objstream.SaveToFile FilePath, 2
- objstream.Close()
- Set objstream = Nothing
- if err.Number <> 0 then
- SaveToFile = false
- else
- SaveToFile = true
- end if
- End Function
- %>