<%@language="vbscript" codepage="65001"%>
<%
Option Explicit
Session.CodePage = 65001
Response.Charset = "utf-8"
Session.Timeout  = 100
Server.ScriptTimeout = 90
''''''sql数据库请设置IP/用户名/密码;AC数据库只需要设置DB_BASE项'''''''''''''''''
Const IsSqlDataBase   = 0  ''''''''''''数据库类型,0为AC,1为SQL
Const DB_HOST         = "localhost" ''''''''''''数据库服务器地址
Const DB_BASE         = "../ClassData/YN@TOUR#2015.mdb" ''''''''''''数据库名
Const DB_UID          = "" ''''''''''''数据库登陆用户名
Const DB_PASS	      = "" ''''''''''''数据库登陆密码
%>
<!--#include file="md5.asp"-->
<%
Dim pagecount,page,pagcount,total,mypage 	'定义变量
Dim oConn,oRs,sSql,sKey,sID,Id
Dim a,b,c,d,e,f
Dim a1,a2,a3,a4,a5
Dim b1,b2,b3,b4,b5
Dim c1,c2,c3,c4,c5
Dim d1,d2,d3,d4,d5
Dim i, j, k, x, y, z,gaozhen,ReUrl,action
Dim TT,SS,v,OrderNum
TT= request("TT")
SS= request("SS")
ReUrl= request("ReUrl")
gaozhen = request("gaozhen")
action = request("action")
Dim IsError,Err
IsError = False
Err = False
sKey = Request.QueryString("keyword")
sID = Request.QueryString("id")
Id = Request.QueryString("Id")
Set oConn = Server.CreateObject("ADODB.CONNECTION") 
Set oRs =server.createobject("adodb.recordset")

'=======修改这里数字,1为SQL数据库，0为Access数据库============
If IsSqlDataBase = 1 Then
oConn.Open "Driver={SQL Server}; Server=" & DB_HOST & "; UID=" & DB_UID & "; Pwd=" & DB_PASS &";database=" & DB_BASE & ";"
Else
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath(""&DB_BASE&"")
End If
'读取网站的基本信息
Dim sSafe,sWeb
Set sWeb = oConn.Execute("SELECT top 1 WebSafe FROM [WebInfo] WHERE Id = 1")
sSafe = sWeb("WebSafe")
'-------------------------------------------------
'描述: 错误信息提示
'-------------------------------------------------
Function Alert(message,gourl) 
    message = replace(message,"'","\'")
    If gourl="-1" then
        Response.Write ("<script language=javascript>alert('" & message & "');history.go(-1)</script>")
    ElseIf gourl="-2" then
        Response.Write ("<script language=javascript>alert('" & message & "');history.go(-2)</script>")
    ElseIf gourl="-3" then
        Response.Write ("<script language=javascript>alert('" & message & "');window.close();</script>")
    Else
        Response.Write ("<script language=javascript>alert('" & message & "');location='" & gourl &"'</script>")
    End If
    Response.End()
End Function
'-------------------------------------------------
Function backurl(goourl) 
    If goourl="-1" then
        Response.Write ("<script language=javascript>history.go(-1)</script>")
    ElseIf goourl="-2" then
        Response.Write ("<script language=javascript>history.go(-2)</script>")
    Else
        Response.Write ("<script language=javascript>location='" & goourl &"'</script>")
    End If
    Response.End()
End Function
'定义一个类应用
Dim w, o
'输出信息
Class clsResponse
	Sub w(s)'输入文字
		Response.Write s
	End Sub
	Sub b(s)'弹出提示
		Response.Write "<script language=javascript>alert('" & s & "');</script>"
	End Sub
	Sub a(s)'弹出提示
		Response.Write "<script language=javascript>alert('" & s & "');history.go(-1)</script>"
	End Sub
	Sub wc(w,c)'弹出提示 fanhui
		Response.Write "<script language=javascript>alert('" & w & "');location='" & c &"'</script>"
	End Sub
	Sub r(s)'转向某页
		Response.Redirect s
	End Sub
	Sub e'结束输入
		Response.End
	End Sub
End Class
'参数信息
Class clsRequest
	Function f(s)
		f = Request.Form(s)
	End Function
	Function q(s)
		q = Request.QueryString(s)
	End Function
	Function s(a)
		s = Request.ServerVariables(a)
	End Function
	Function t(s)
		t = Trim(Request(s))
	End Function
End Class
'创建新类
Set w = New clsResponse
Set o = New clsRequest
%>
<%If sSafe=1 Then%> 
<!--#include file="safe.asp"-->
<%End If%>
