<%@ language = vbscript codepage=65001%>
<%
'option explicit
response.buffer = true
response.charset="utf-8"
session.codepage=65001
%>
<!--#include file="../../../include/lebi_data.asp"-->
<%
on error resume next
dim sqlnowstring
dim conn,db
if issqldatabase = 1 then
sqlnowstring = "getdate()"
else
db = "database/"&dbname&""
sqlnowstring = "now()"
end if

sub connopen
	dim connstr
	if issqldatabase = 1 then
		connstr = "provider = sqloledb; user id = " & sqlusername & "; password = " & sqlpassword & "; initial catalog = " & sqldatabasename & "; data source = " & sqllocalname & ";"
	else
		connstr = "provider = microsoft.jet.oledb.4.0;jet oledb:database password="&pass&";data source = " & server.mappath(mydbpath & db)
	end if
	set conn = server.createobject("adodb.connection")
	conn.open connstr
end sub

sub connclose
    conn.close
	set conn=nothing
end sub
if not isobject(conn) then
      connopen()
else
      connclose()
end if
%>