%option explicit%>
<%
dim my_to, my_toaddress,my_system,my_from,my_fromaddress,my_subject,mailtype
dim mailer, my_attachment
dim customeradmin
'**********************************************************
' adds Review to Ratings table
' Version 6.50 Add review authorize
' March 26, 2004
'*********************************************************
Dim sAction, dbtable,catalogid, dbc
Dim Ratingstars, ratingtitle, ratingcomment, ratinglocation, ratingname, ratingemail
dim ratings(10),ratingvalues(10),ratingcount
dim body
Dim productname
sAction=Request("Action")
if sAction="" then
sAction=Request("Action.x")
end if
If getconfig("xallowRatingProducts")<>"Yes" then
shoperror getlang("LangCustNotAllowed")
end if
dbtable="reviews"
Serror=""
catalogid=request("id")
If catalogid="" then
shoperror getlang("LangNoCatalogId")
end if
If not isnumeric(catalogid) then
shoperror getlang("LangNoCatalogId")
end if
If sAction = "" Then
ShopPageHeader
DisplayForm
ShopPageTrailer
Else
ValidateData()
if sError = "" Then
UpdateRating
WriteInfo
else
ShopPageHeader
DisplayForm
ShopPageTrailer
end if
end if
ShopClosedatabase dbc
Sub DisplayForm()
GetProductDetails
Dim url
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 "