Want
Ads
Buy or sell in
the person to person and business want ads. Everything from building
materials, vehicles, overstock, clearances, to used tools.
General marketing ads are not allowed. Contact us to post a long
term ad.
Post an Ad its FREE!
Stand out from the
crowd.
The following
are items you selected. Post
an Ad. Its FREE!
Press the
button to see more details and Contact information.
You can update or
delete an existing listing by pressing the update link next to a listing.
You must be logged in to see details, see the update links or to make
an update.
|
Item Type |
Headline |
Description |
Price |
Item Location |
Post
Date |
|
<%
' connect to the database
dim conn ' hold the connect to the database
dim vSQL ' holds the sql statement to execute
dim vSQL1 ' not All in Query to execute
dim vSQL2 ' is All in Query to execute
dim vRec ' holds the record from query.
set conn = server.CreateObject("adodb.connection")
conn.Open Application("DBName"),Application("DBUser"),Application("DBPswd")
'conn.open "DSN=rexrock_DSN; UID=rexrock_bpcom; pwd=yakado"
' set field vars
dim vQryRec_id, vCategSel, vHeadline, vDescrip, vPrice, vContact
dim vPostTm, vToWeb, vToList, vToPriv, vName, vLocat, vCreateDt
dim vSuccess, vUpdateBut, vNoRecords, vGoBut
vLoginName = Session("login_name")
vLogin_id = Session("login_id")
dim vAdCat
vAdCat = Request.QueryString("qWntAds")
if isempty(Request.QueryString("qWntAds"))then
vNoRecords = "Please make an Item type selection"
else
' visit to page - get info from db
'next line is when an all query is not needed
vSQL1 = " select * from wantads where categ = '" & vAdCat & "' and verifyPost = 'checked' and to_web = 'checked' and ok_2Distrib = 'yes' and spam_chck = 'False' order by created desc"
vSQL2 = " select * from wantads where verifyPost = 'checked' and to_web = 'checked' and ok_2Distrib = 'yes' and spam_chck = 'False' order by created desc"
'next line is original that gets all records
'set vRec = conn.Execute (" select * from wantads where (verifyPost = 'checked') and (to_web = 'checked') and (ok_2Distrib = 'yes') order by created desc")
vSQL = vSQL1
if (vAdCat = "All")then
vSQL = vSQL2
end if
set vRec = conn.Execute ( vSQL)
if( vRec.EOF ) then
vNoRecords = "Sorry but there are no records of the type selected posted now. Check back again or try another Item type."
end if
dim vColors(2) ' the number of colors. must be even
vColors(0) = "#D7F1FF" ' color 1
vColors(1) = "" ' color 2
dim vLoopCounter, vColor
vLoopCounter = 0 ' count the loops
do while( Not vRec.Eof)
vQryRec_id = vRec("wantad_id")
vCategSel = vRec("categ")
vHeadline = left(vRec("headline"),30)
if(vHeadline = "")then
vHeadline = " "
end if
vDescrip = left(vRec("descrip"),30)
if(vDescrip = "")then
vDescrip = " "
end if
vPrice = left(vRec("price"),20)
if(vPrice = "")then
vPrice = " "
end if
vName = vRec("ad_name")
if(vName = "")then
vName = " "
end if
vContact = vRec("contact_inf")
vLocat = left(vRec("item_locatn"),20)
if(vLocat = "")then
vLocat = " "
end if
vCreateDt = left(vRec("created"),4)
vUpdateBut=" "
if (vLogin_id = vRec("login_id"))then
vUpdateBut = "(update)"
end if
vGoBut = ""
if(vLogin_id = 0)then
vGoBut =""
end if
vColor= vColors(vLoopCounter and 1)
%>
<%=vGoBut%> |
<%=vCategSel%> |
<%=vHeadline%> |
<%=vDescrip%> |
<%=vPrice%> |
<%=vLocat%> |
<%=vCreateDt%> |
<%=vUpdateBut%> |
<%
vLoopCounter = vLoopCounter + 1 ' keep count
vRec.movenext
loop
end if
%>
<%=vNoRecords%> |
|