|
<%
'*******************************************************************************
' Get Ads HTML from Recipe2 database
' To get the ad you need to provide the Page name where the ad will be placed
' and also the ad location number. Now in this particular location you can
' have multiple banner ads. It will display one ad banner at a time.
' So first insert the banner ad information in the database, then place the HTML code
' in the proper place and specify the page name and location id (which you had entered
' in the database.
'*******************************************************************************
Function AdRotator(PageFileName, adLocation)
Dim rs, sql, count, i, AdHTML, MyRandNo, cnnString
cnnString = Application("Angithi_ConnectionString")
sql = "SELECT * FROM Ad WHERE Status='ON'" & _
" AND PageFileName = '" & PageFileName & "'" & _
" AND adLocation = '" & adLocation & "'"
set rs = server.CreateObject("ADODB.recordset")
rs.Open sql, cnnString, 3
count = rs.Recordcount
'Response.write sql
'Response.write count
'response.end
Randomize
MyRandNo = Int((count * Rnd) + 1)
'Response.write MyRandNo
i = 0
Do while i <> MyRandNo and not rs.eof
AdHTML = rs("AdHTML")
i = i + 1
rs.movenext
Loop
rs.close
Set rs = Nothing
AdRotator = AdHTML
End Function
%>
|
||||||||||||||||||||||||||||||||||
DisclaimerThe information about the
products/services on this site are provided by Angithi and by the product
manufacturers and are on an “as is where is” basis. Except as specifically stated on this site, neither www.angithi.com nor any of its owners, employees or other representatives will be liable for damages arising out of or in connection with the use of this site. This includes but is not limited to compensatory, direct, indirect or consequential damage, loss of data, income or profit, loss of damage to property and claim of third parties. TERMS AND CONDITIONS The information contained on this Site is an “invitation to offer”. Your order for purchase of goods constitutes your “offer” which is subject to the conditions listed below. On receipt of your “offer” Angithi will have the discretion to accept or reject your “offer”. Once your “offer” is accepted, the acceptance will constitute a binding contract between yourself and Angithi. SUBSCRIPTION AND REGISTRATION In a few areas on our web site,
we ask you to provide information that will enable us to enhance your site visit
or follow-up with you after your visit. It is completely optional for you to
participate. We request information from you when you:
In each of the instances above, we ask for your name, email address and other appropriate personal information that would be needed to register for or subscribe to these services or offer. In case of newsletters or mailing lists, you will be able to “unsubscribe” to these mailings at any time. The information you provide will be kept confidential and will be used only to support your customer relationship with www.angithi.com. Information regarding you or your order and the products you purchase will not be disclosed or sold to any outsider organization. Copyright © www.angithi.com is a service mark licensed from Angithi. All rights reserved. All other trademarks, images, product names, and company names and logos appearing on www.angithi.com are the property of their respective owners.
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||