<%
'=========================================================
' Version:1.0
' Date: 2005-6-29
' Design by Ææ¹Ö~` 
' QQ:373218510  
'=========================================================
' Copyright (C) 2004-2008 www.Sogotour.com. All rights reserved.
' HomePage: http://www.Sogotour.com
' Email: sogotour@163.com
'=========================================================
Response.Buffer = True 'ÉèÖÃ»º³å
Response.ExpiresAbsolute = Now() - 1  
Response.Expires = 0 
Response.CacheControl = "no-cache" 

Sdataurl=Server.mappath("mylinks.mdb")
StrData = Sdataurl
StrConn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & StrData

Function htmls(shtml)
	Dim objRegExp, shtmls
	Set objRegExp = New Regexp
	objRegExp.IgnoreCase = True
	objRegExp.Global = True
	objRegExp.Pattern = "<.+?>"
	shtmls = objRegExp.Replace(shtml, "")
	htmls = shtmls
	Set objRegExp = Nothing
End Function

function encodestr(str)
	dim i
	str=Trim(str)
	str=Replace(str,"<","&lt;")
	str=Replace(str,">","&gt;")
	str=Replace(str,"'","""")
	str=Replace(str,vbCrLf&vbCrlf,"</p><p>")
	str=Replace(str,vbCrLf,"<br>")
	HTMLEncode = str
	encodestr=replace(str," ","")
	encodestr=replace(str,"&nbsp;","")
	if IsNumeric(encodestr) then
        str=encodestr
    else
        str=0
    end if
end function

if request("action")="login" then
if htmls(encodestr(request("adminpass")))="admin" then
session("admin")="sogotour.com"
response.Redirect("admin.asp")
else
response.Redirect("admin.asp")
end if
elseif request("action")="logout" then
session.Abandon()
response.Redirect("index.asp")
end if
%>