<% type1 = Request.QueryString("type") apg=Request.QueryString("apg") if apg="" then apg=1 end if apg=cint(apg) ordertxt = Request.QueryString("order") varpartner = session("partner") catid = Request.QueryString("catid") Set Conn = Server.CreateObject("ADODB.Connection") Conn.open "filedsn=c:\inetpub\orangepie\dsn\sqldb.dsn","orangepie","orangepie" Set rs = Server.CreateObject("ADODB.recordset") sql2 = "select top 50 cardnum,frequency from vewPopularCrads order by frequency desc" 'sql2 = sql2 & " SELECT cardnum,category, Count(cardnum) AS frequency FROM sendcard where cardnum not in ('s1') and senddate > dateadd(day,-15,getdate()) GROUP BY category, cardnum ORDER BY Count(cardnum) DESC" 'Response.Write sql2 rs.Open sql2,conn,1,3 str="(" rs.MoveFirst while not rs.EOF str=str & "'"&rs("cardnum")&"'," rs.MoveNext wend str=str & "'ksks')" if ordertxt = "" then sec1 = second(now) ordertxt = sec1 mod 10 select case ordertxt case 1 ordertxt = "shorttext ASC" case 2 ordertxt = "colmn1 ASC" case 3 ordertxt = "colmn2 ASC" case 4 ordertxt = "shorttext DESC" case 5 ordertxt = "colmn2 DESC" case else ordertxt = "colmn1 DESC" end select end if ' catid not in('AN1','AN195','FL3','AN51','AN53','AN261','AN50','AN247','AN27','AN28','AN34','AN49','AN37','AN42','AN57','AN59','AN260','AN262','AN60','AN61','AN63','AN172','AN47','AN241','AN75','AN81','AN82','AN48','AN89','AN46','AN92','FL21','AN160','AN106','AN108','FL57','FL20','AN249','AN263','AN110','AN45','An112','AN44','AN119','AN43','AN161','AN158','AN131','AN134','FL32','AN142','AN52','AN157','AN156','AN168','AN8','AN46','FL59','" &nocatid1&"') and ' catid not in('AN1','AN195','FL3','AN51','AN53','AN261','AN50','AN247','AN27','AN28','AN34','AN49','AN37','AN42','AN57','AN59','AN260','AN262','AN60','AN61','AN63','AN172','AN47','AN241','AN75','AN81','AN82','AN48','AN89','AN46','AN92','FL21','AN160','AN106','AN108','FL57','FL20','AN249','AN263','AN110','AN45','An112','AN44','AN119','AN43','AN161','AN158','AN131','AN134','FL32','AN142','AN52','AN157','AN156','AN168','FL42','AN46','FL59','" &nocatid1&"') and SQL="select cardnum,catid,shorttext,'generate.asp?cno='+cardnum as genp,type,thumbimg+''' border=0 ' as thumbimg, txt1 as colmn1,shorttext as colmn2 from carddetail where " sql=sql&"cardnum in " & str & " union " SQL=SQL & "select cardnum,catid,shorttext,'flashsite/flashcard.asp?cardnum='+cardnum as genp,'Movie' as type,thumbimg+''' border=1 ' as thumbimg ,shorttext as colmn1,pagecolor as colmn2 from flashcarddetail where " sql=sql & "cardnum in " & str & " order by " & ordertxt 'Response.Write sql set cardgalary=Server.CreateObject("adodb.recordset") cardgalary.Open sql,conn,1,3 cardgalary.PageSize = 9 tresults=cardgalary.RecordCount 'Response.Write "tresults:" & tresults if tresults<>0 then cardgalary.AbsolutePage=apg end if %> Orangepie Free Fun E-Cards

Most Popular Cards
<% gnumber = 1 cardcnt=1 tresults=cardgalary.RecordCount While Not cardgalary.EOF and cardcnt < 10 cardcnt=cardcnt+1 Cnumber = Cnumber + 1 thumb=cardgalary("thumbimg") nextlink=cardgalary("genp") short=cardgalary("shorttext") type1=cardgalary("type") cardnum = cardgalary("cardnum") '///For Dynamic flash card If Ucase(cardnum) = "FLB31" Then nextlink = "flashsite/Dyflashcard.asp?cardnum=" & Server.HtmlEncode(cardnum) '/ to send cardnum as querystring End if if type1="Movie" then type1=""&type1 elseif type1="Static" then type1=""&type1 else type1=""&type1 end if if not Isnull(short) then short=Replace(short,": )",":-)") short=Replace(short,". )",":-)") short=Replace(short,". (",": (") end if %>
<%=type1%>
>
<% ' new code if tresults > 9 then str="
" if apg > 1 then str=str&"Prev  " end if npages=cardgalary.PageCount if apg < npages then estr=estr&"Next " end if for i=1 to npages if i=apg then str=str&"" & i &"  " else str=str&"" & i &"  " end if next str=str&estr&"

" else str="" end if rs.Close set rs=nothing cardgalary.close set cardgalary = Nothing conn.Close Set conn = Nothing ' write the link bar string Response.Write str %>

Also take a look at related cards...
Movie of the Day  |  Card of the Day


E-Cards from Orangepie
A free service from 
ASTROSOFT

Copyright © 1999 by Orangepie. All Rights Reserved.
Website created & designed by Astrosoft.
Privacy Policy | User Agreement