<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Counter Refer Page <% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "provider=microsoft.jet.oledb.4.0;data Source=D:\web\localuser\uniartrelogios\www\db\hit_counter.mdb;" & "" Set RSrich = Server.CreateObject("ADODB.Recordset") Query = "SELECT * FROM Hits" RSrich.Open Query, conn, 3, 3 If Not RSrich.Eof and NOT RSrich.Bof Then alldata=RSrich.getrows numcols=ubound(alldata,1) numrows=ubound(alldata,2) hit_date=1 hit_time=2 hit_ip=3 hit_referer=4 hit_agent=5 ' if you want to show table change to true table nice for trouble shooting show_full = true if show_full = true then response.write "" & vbcrlf 'Put Headings On The Table of Field Names for each whatever in RSrich.fields response.write "" & vbcrlf next response.write "" & vbcrlf FOR rowcounter= 0 TO numrows if (Request.QueryString("site") = "Direct Refrence") and (alldata(hit_referer,rowcounter) = "") then response.write "" & vbcrlf FOR colcounter=0 to numcols thisfield=alldata(colcounter,rowcounter) if colcounter = hit_referer then response.write "" & vbcrlf else if isnull(thisfield) then thisfield=shownull end if if trim(thisfield)="" then thisfield=showblank end if response.write "" & vbcrlf end if NEXT response.write "" & vbcrlf end if if InStr(1,alldata(hit_referer,rowcounter),Request.QueryString("site")) > 0 then response.write "" & vbcrlf FOR colcounter=0 to numcols thisfield=alldata(colcounter,rowcounter) if colcounter = hit_referer then response.write "" & vbcrlf else if isnull(thisfield) then thisfield=shownull end if if trim(thisfield)="" then thisfield=showblank end if response.write "" & vbcrlf end if NEXT response.write "" & vbcrlf end if NEXT response.write "
" & whatever.name & "
" response.write thisfield response.write "" response.write thisfield response.write "
" response.write thisfield response.write "" response.write thisfield response.write "
" end if end if RSrich.Close %>