%Option Explicit%> <% '****************************************************************** ' Version 6.50 June 29, 2005 ' This routine Lists review for a product ' if xreviewauthorize is yes, then check listing for authorized ' Dec 31, 2005 Fix paging next and previous '****************************************************************** Dim dbc, url Dim PRODUCTNAME, CATALOGID SetSess "CurrentUrl","shopreviewlist.asp" ShopOpenDatabase dbc mypage=request.querystring("page") If not isnumeric(mypage) then shoperror "Page size must be numeric" end if mypagesize=Getconfig("xeditdisplaymaxrecords") ' If there is no page, then we must generate sql otherwise sqlis in Session(sqlQuery) if mypage= "" then mypage=1 ' first time through ProcessFirst ' get input variables CreateSql ' generate sql else sql=GetSess("reviewsql") ' on recursive calls we stored sql in sessikon variable catalogid=GetSess("reviewid") ' on recursive calls we stored sql in sessikon variable end if ShopPageHeader ' normal page header GetProductDetails if getconfig("xbreadcrumbs") = "Yes" then if ucase(getconfig("xCrossLinkurl"))="SHOPEXD.ASP" then 'VP-ASP 6.50.4 - added getconfig call around xmysite url= getconfig("xMYSITE") & "shopexd.asp?id=" & catalogid else 'VP-ASP 6.50.4 - added getconfig call around xmysite url= getconfig("xMYSITE") & "shopquery.asp?catalogid=" & catalogid end if response.write "
" end if Response.Write "" & getconfig("xfont") & getlang("LangCommonPage") & mypage & getlang("LangCommonOf") & maxpages & ""
Response.write reporttabledef
While Not objRS.EOF and recordcount < maxrecs
ReviewFormatRow ' actual row is formatted
objRS.MoveNext
recordcount=recordcount+1
Wend
response.write reporttableend
dim savesql
savesql=getsess("sqlquery")
' Dec 31 mod
if getconfig("xproductpagingnextprevious")="Yes" then
Call PageNavBarNext (SQL)
else
Call PageNavBar (SQL)
end if
' end mod
setsess "sqlquery",savesql
closerecordset objrs
end sub
Sub ReviewFormatRow
dim comment, title,location,name,reviewdate,stars
dim rating, starimage
comment=objrs("comment")
title=objrs("title")
name=objrs("name")
location=objrs("location")
reviewdate=objrs("reviewdate")
rating=objrs("rating")
GetStars rating, starimage
Response.write tablerow
Response.write tablecolumn
Response.write title & " "
If starimage<>"" then
response.write "
"
end if
Response.write name & " " & location & " " & reviewDate
Response.write reportdetailcolumnend & tablerowend
Response.write reportdetailrow
Response.write reportdetailcolumn
Response.write "
" & Comment & "
" Response.write reportdetailcolumnend & tablerowend Response.write "