% ScriptPath=request.servervariables("PATH_TRANSLATED") fpos=instrrev(ScriptPath,"\") physicalpath=left(ScriptPath,fpos) Set conn=Server.CreateObject("ADODB.Connection") Conn.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & physicalpath & "data\visitor.mdb;" if not request.querystring("del")="" then Conn.execute "delete from visitor where id="&request.querystring("del") elseif request.ServerVariables("REQUEST_METHOD")="POST" then if request.form("submit")="Allow" then set rs=conn.execute("Select * from login") username=rs("username") password=rs("password") for each thing in request.form if request.form(thing)="yes" then conn.execute "Update visitor set new=false where id="&thing Set rs=Conn.execute("Select * from visitor where id="&thing) set Mail=server.CreateObject("Persits.MailSender") Mail.host="161.58.183.107" Mail.From = "inquries@heritagehotels.com" Mail.username="inquries@heritagehotels.com" Mail.password="inq" Mail.fromName = "Heritage Hotels" Mail.AddAddress rs("email") str="Dear Mr. "& rs("name") &","&vbcrlf&vbcrlf&"Thanks for visiting the Heritage Hotels of India website and filling the registration form."&vbcrlf&vbcrlf&"Please use the following user name and password to access the site-"&vbcrlf&vbcrlf&"Username: "&username&vbcrlf&"Password: "&password&vbcrlf&vbcrlf&"Thanking you,"&vbcrlf&vbcrlf&"Admin"&vbcrlf&"Heritage Hotels Division"&vbcrlf&"Planet India Website" Mail.body=str Mail.send set Mail=nothing end if next elseif request.form("submit")="Delete" then for each thing in request.form if request.form(thing)="yes" then conn.execute "Delete from visitor where id="&thing end if next end if end if if request.querystring("seeall")="" then Set rs=Conn.execute("Select * from visitor where new=true") else Set rs=Conn.execute("Select * from visitor where new=false") end if %>