% Server.ScriptTimeOut = 60 Session.Timeout=60 page_url = split(Request.ServerVariables("URL"),"/") page_url = page_url(1) Welmsg = "" if Session("puserlogin") = "Y" then pusername = Session("pusername") Welmsg = "Welcome " & pusername end if sname = Request.Form("sname") scity = Request.Form("scity") szip = Request.Form("szip") curpage = trim(Request.QueryString("curpage")) if curpage = "" then curpage = 1 end if pyes = 0 pagevar = "pages: " set MyConn = Server.CreateObject("ADODB.Connection") Set RSx = Server.CreateObject("ADODB.Recordset") MyConn.Open "Driver={MySQL};SERVER=localhost;DATABASE=colbus84;UID=colbus84;PASSWORD=coco3816" SQL_query = "select fileid,filetitle from SUMsitepages where filename = '" & page_url & "'" Set RS = MyConn.Execute(SQL_query) if not RS.EOF then pageid = RS("fileid") filetitle = RS("filetitle") RS.Close RSx.CursorType = adOpenStatic RSx.PageSize = 10 if sname = "" and scity = "" and szip = "" then RSx.Open "select * from cust_register where cocatid="&pageid&" and accstatus=1 order by regdate", MyConn else if sname <> "" then RSx.Open "select * from cust_register where cocatid="&pageid&" and coname ='"&sname&"' and accstatus=1 order by coname", MyConn else if scity <> "" then RSx.Open "select * from cust_register where cocatid="&pageid&" and cocity='"&scity&"' and accstatus=1 order by coname", MyConn else if szip <> "" then RSx.Open "select * from cust_register where cocatid="&pageid&" and cozip='"&szip&"' and accstatus=1 order by coname", MyConn end if end if end if end if RSx.AbsolutePage = cInt(curpage) for i = 1 to RSx.PageCount if cInt(curpage) = i then pagevar = pagevar & ""&i&" " else pagevar = pagevar & ""&i&" " end if pyes = 1 next if RSx.EOF then set RSx = Nothing RSx = "" end if end if if pyes = 0 then 'pagevar = pagevar & "'bizdirlists.asp?curpage=1'], selectedpage: 0 " else 'pagevar = pagevar & "], selectedpage: 0 " end if function sponsorlist(page_url) sponlist = "" SQL_query = "select yid,coname,sponsorpg, sponsortxt,cowebsite from cust_register where sponsorpg='"&page_url&"' and accstatus=1 order by regdate" Set RS = MyConn.Execute(SQL_query) Do while not RS.Eof custid = RS("yid") sponlist = sponlist & "
|
||||||||||
|
||||||||||
|
||||||||||
|
© 2009 The Colorado Business Directory.
All Rights Reserved |
||||||||||