<%
Const IsSqlDataBase   = 0  			''''''''''''数据库类型,0为AC,1为SQL
Const DB_HOST         = "localhost" 		''''''''''''数据库服务器地址
Const DB_BASE         = "../database/YuNanShop@#.mdb" 		''''''''''''数据库名
Const DB_UID          = "" 			''''''''''''数据库登陆用户名
Const DB_PASS	      = "" 			''''''''''''数据库登陆密码
Dim oConn,oRs,sSql,oRs2
'数据库的链接形式
Set oRs=server.createobject("adodb.recordset")
Set oRs2=server.createobject("adodb.recordset")
Set oConn = Server.CreateObject("ADODB.CONNECTION")
'=======修改这里数字,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 zfb,zfburl
Set zfb = oConn.Execute("SELECT top 1 Id,partner,key,seller_email FROM [WebZFB] WHERE Id = 1")
Set zfburl = oConn.Execute("SELECT top 1 Id,WebUrl,WebTitle FROM [WebInfo] WHERE Id = 1")
Dim ssPartner,ssKey,ssEmail,ssWebUrl,ssWebTitle,ssmm
ssPartner = zfb("partner")
ssKey = zfb("key")
ssEmail = zfb("seller_email")
ssWebUrl = zfburl("WebUrl")
ssWebTitle = zfburl("WebTitle")
Dim QQSS,qqpid,qqkey,qqstate
Set QQSS = oConn.Execute("SELECT top 1 APPID,APPKEY,APPSTATE FROM [WebQQlogin] WHERE Id = 1")
qqpid = QQSS(0)
qqkey = QQSS(1)
qqstate = QQSS(2)
'-------------------------------------------------
'描述: 错误信息提示
'-------------------------------------------------
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
%>


