<%@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 DB_HOST         = "localhost" ''''''''''''数据库服务器地址
Const DB_BASE         = "../ClassData/YN@TOUR#2015.mdb" ''''''''''''数据库名
Const DB_UID          = "" ''''''''''''数据库登陆用户名
Const DB_PASS	      = "" ''''''''''''数据库登陆密码
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set oConn = Server.CreateObject("ADODB.CONNECTION") 
Set oRs =server.createobject("adodb.recordset")
'=======修改这里数字,1为SQL数据库，0为Access数据库============
Const IsSqlDataBase   = 0  ''''''''''''数据库类型,0为AC,1为SQL
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
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
<!--#include file="function.asp"-->
<!--#include file="md5.asp"-->
<%
'通用定义
Dim pxmm,pxrr,spjtong,spmdd,spday,spsye,skey
Dim pday,OrderFangId,vv
OrderFangId=o.t("OrderFangId")
pday=o.t("pday"):vv=o.t("vv")
pxmm=o.t("pxmm")
pxrr=o.t("pxrr")
spjtong=o.t("spjtong")
spmdd=o.t("spmdd")
spday=o.t("spday")
spsye=o.t("spsye")
skey=o.t("skey")
If pxmm="" Then pxmm=9
If pxrr="" Then pxrr=9
Dim PoRs,Ppagecount,Ppage,Ppagcount,Ptotal,Pmypage
Ppage=o.t("Ppage")
Dim pagecount,page,pagcount,total,mypage 	'定义变量
Dim oConn,oRs,sSql,keyword,nownum,lsturl,purls,purlshtml
Dim i, j, k, x, y, z,action,a,b,c,gaozhen,Id
Dim TT,SS,v,ota,urls
urls=o.t("urls")
nownum=o.t("nownum")
lsturl=o.t("lsturl")
TT=o.q("TT")
SS=o.q("SS")
Id=o.q("Id")
a=o.q("a")
keyword=o.q("keyword")
gaozhen=o.q("gaozhen"):action=o.q("action")
ota=o.q("ota")
Id=o.q("Id")
Dim TTSS,MYLX,OrderNum
OrderNum= request("OrderNum")

Dim sWeb,skey1,skey2,skey3,sKqq,sKqqnn,sMdd,sJtong,sSq,sJdarr
Dim sRd,sHt,sJd,sNw,sGl,sSafe
Set sWeb = oConn.Execute("SELECT top 1 * FROM [WebInfo] WHERE Id = 1")
'菜单分类地图
Dim Cmapall
Set oRs = oConn.Execute("SELECT Id,MenuTitle,MenuType,MenuUrl,MenuLook FROM [LstMenuBig] ORDER BY MenuIndex ASC")
If Not oRs.EOF Then Cmapall= oRs.GetRows
Set oRs = Nothing
'首页要显示的旅游版块
Dim Chome
Set oRs = oConn.Execute("SELECT Id,MenuTitle,MenuPic,MenuPicUrl FROM [LstMenuBig] where MenuHome=1 ORDER BY MenuIndex ASC,Id asc")
If Not oRs.EOF Then Chome= oRs.GetRows
Set oRs = Nothing

'发送短信
Dim sSms
Set sSms = oConn.Execute("SELECT top 1 * FROM [WebSMS] WHERE Id = 1")
Sub SendSMSsmscn(mobile,msg)
	dim userid,password,status
	dim xmlObj,httpsendurl
	userid = sSms("APPID")
	password = sSms("APPKEY")
	httpsendurl="http://api.cnsms.cn/?ac=send&encode=utf8&uid="&userid&"&pwd="&password&"&mobile="&mobile&"&content="&server.URLEncode(msg)
	Set xmlObj = server.CreateObject("Microsoft.XMLHTTP")
	xmlObj.Open "GET",httpsendurl,false
	xmlObj.send()
	'status = xmlObj.responseText
	Set xmlObj = nothing
End Sub

'如果用户登陆读取
Dim Uid
If session("userid")="" Then 
else
Set Uid = oConn.Execute("SELECT top 1 * FROM [LstUser] WHERE Id = "&session("userid")&"")
End If
'支付宝是否开通
Dim sRZfb,sSzfb
Set sRZfb = oConn.Execute("SELECT top 1 * FROM [WebZFB] WHERE Id = 1")
sSzfb=sRZfb("isoff")
%>