<% 'This file is part of ProductCart, an ecommerce application developed and sold by Early Impact LLC. ProductCart, its source code, the ProductCart name and logo are property of Early Impact, LLC. Copyright 2001-2003. All rights reserved. You are not allowed to use, alter, distribute and/or resell any parts of ProductCart's source code without the written consent of Early Impact. To contact Early Impact, please visit www.earlyimpact.com. %> <% response.Buffer=true %> <% ' Check if the store is on. If store is turned off display store message If scStoreOff="1" then response.redirect "msg.asp?message=83" End If '<--RP--> If RewardsActive=True then If (Request("refby") <> "") And (RewardsReferral=True) Then Session("referral")=CLng(Request("refby")) End If End if '<--RP--> '---> start store session if not aleady initiated <---- if session("idcustomer")="" then session("idPCStore")= scID session("idCustomer")=CLng(0) session("idAffiliate")=CLng(1) session("language")=Cstr("english") session("pcCartIndex")=CLng(0) dim pcCartArray(100,35) session("pcCartSession")=pcCartArray end if if session("idPCStore")<>"" AND session("idPCStore")<>scID then session.Abandon() session("idPCStore")= scID session("idCustomer")=CLng(0) session("idAffiliate")=CLng(1) session("language")=Cstr("english") session("pcCartIndex")=CLng(0) redim pcCartArray(100,35) session("pcCartSession")=pcCartArray end if ' Check to see if the user is updating the product after adding it to the shopping cart tIndex=0 tUpdPrd=request.QueryString("imode") if tUpdPrd="updOrd" then tIndex=request.QueryString("index") end if ' Check to see if the user was referred by an Affiliate web site if request.querystring("idAffiliate")<>"" and isNumeric(request.querystring("idAffiliate"))then session("idAffiliate")= request.querystring("idAffiliate") end if dim query, conntemp, rs pIdProduct=request.QueryString("idProduct") if trim(pIdProduct)="" or IsNumeric(pIdProduct)=false then response.redirect "msg.asp?message=85" end if %> <% pcv_IDProduct=request("IDProduct") pcv_IDCategory=request("IDCategory") IF pcv_Active="1" THEN call opendb() query="SELECT pcRE_IDProduct FROM pcRevExc WHERE pcRE_IDProduct=" & pcv_IDProduct set rs=server.CreateObject("ADODB.RecordSet") set rs=connTemp.execute(query) if rs.eof then Prv_Accept=1 else Prv_Accept=0 set rs=nothing call closedb() response.redirect "viewPrd.asp?IDProduct=" & pcv_IDProduct & "&IDCategory=" & pcv_IDCategory end if call closedb() IF Prv_Accept=1 THEN Call CreateList() call opendb() query="SELECT description FROM products WHERE idproduct=" & pcv_IDProduct set rs=server.CreateObject("ADODB.RecordSet") set rs=connTemp.execute(query) pcv_PrdName=rs("description") set rs=nothing call closedb() %>

<%=dictLanguage.Item(Session("language")&"_prv_1")%>
<%=dictLanguage.Item(Session("language")&"_prv_10")%> <%=pcv_PrdName%> - <%=dictLanguage.Item(Session("language")&"_prv_4")%>


<%if pcv_ShowRatSum="1" then pcv_SaveRating=CalRating() if pcv_RatingType="0" then call opendb() query="SELECT pcRev_MainRate FROM pcReviews WHERE pcRev_IDProduct=" & pcv_IDProduct & " and pcRev_Active=1 and pcRev_MainRate>0;" set rs=server.CreateObject("ADODB.RecordSet") set rs=connTemp.execute(query) pcv_tmpRating=0 if not rs.eof then pcArray=rs.getRows() intCount=ubound(pcArray,2) intCount1=0 For m=0 to intCount if pcArray(0,m)="2" then intCount1=intCount1+1 end if Next intCount=intCount+1 pcv_tmpRating=Round((intCount1/intCount)*100) end if set rs=nothing call closedb() %> <%=dictLanguage.Item(Session("language")&"_prv_2")%><%if pcv_tmpRating=0 then%><%=dictLanguage.Item(Session("language")&"_prv_15")%><%else%> <%=pcv_tmpRating%>% <%=pcv_MainRateTxt1%> (<%=intCount%> <%=dictLanguage.Item(Session("language")&"_prv_7")%>)<%end if%>
<%ELSE if pcv_CalMain="1" then call opendb() query="SELECT pcRev_MainDRate FROM pcReviews WHERE pcRev_IDProduct=" & pcv_IDProduct & " and pcRev_Active=1 and pcRev_MainDRate>0;" set rs=server.CreateObject("ADODB.RecordSet") set rs=connTemp.execute(query) pcv_tmpRating=0 if not rs.eof then pcArray=rs.getRows() intCount=ubound(pcArray,2) intCount1=0 For m=0 to intCount intCount1=intCount1+1 pcv_tmpRating=pcv_tmpRating+clng(pcArray(0,m)) Next if pcv_tmpRating>"0" then pcv_tmpRating=pcv_tmpRating/intCount1 else pcv_tmpRating=0 end if end if set rs=nothing call closedb() %> <%=dictLanguage.Item(Session("language")&"_prv_2")%> <%Call WriteStar(pcv_tmpRating,1) %> <%else pcv_tmpRating=pcv_SaveRating %> <%=dictLanguage.Item(Session("language")&"_prv_2")%> <%Call WriteStar(pcv_tmpRating,1)%> <% end if END IF 'Main Rating%> <% '******** Display Sub-Rating if FCount>"0" then%> <%For m=0 to FCount-1 if FType(m)>"2" then%> <%end if Next%>
<%=FName(m)%>: <%IF FType(m)="3" then if FRecord(m)>"0" then if FValue(m)="0" then pcv_Rpercent=0 else pcv_Rpercent=Round((FValue(m)/FRecord(m))*100) end if %> <%=pcv_SubRateTxt1%> <%=pcv_Rpercent%>% <%=pcv_SubRateTxt2%> <%=100-pcv_Rpercent%>% <%else%> <%=dictLanguage.Item(Session("language")&"_prv_15")%> <% end if ELSE if FRecord(m)>"0" then if FValue(m)="0" then Rev_Rating=0 else Rev_Rating=Fvalue(m)/FRecord(m) end if else Rev_Rating=0 end if Call WriteStar(Rev_Rating,0) END IF%>
<%end if END IF 'Show Rating Sumary%> <%if pcv_RatingType="0" then%> <%=dictLanguage.Item(Session("language")&"_prv_5")%> <%=pcv_MainRateTxt2%> <%=pcv_MainRateTxt3%> " onclick="javascript:openbrowser('prv_postreview.asp?IDPRoduct=<%=pcv_IDProduct%>&feel=' + document.rating.feel.value);">
<% else %> <%=dictLanguage.Item(Session("language")&"_prv_5")%> <%if pcv_CalMain="1" then%><%for k=1 to pcv_MaxRating%><%=k%> <%next%><%end if%> " onclick="javascript:openbrowser('prv_postreview.asp?IDPRoduct=<%=pcv_IDProduct%>&rate=' + document.rating.rate.value);">
<%end if%>
<%pcv_CShow=15 iPageCurrent=request("page") if (iPageCurrent="") then iPageCurrent=1 end if if not IsNumeric(iPageCurrent) then iPageCurrent=1 end if%> <% If iPageCount>1 then iPageCurrent=clng(iPageCurrent) %>
<% If iPageCurrent > 1 Then %> " border="0"> <% End If For I=1 To iPageCount If I=iPageCurrent Then %> <%= I %> <% Else %> <%=I%> <% End If Next If iPageCurrent < iPageCount Then %> " border="0"> <% End If %>
<% end if%>
<%if RCount>="5" then%>
<%=dictLanguage.Item(Session("language")&"_prv_4")%>
<%if pcv_RatingType="0" then%> <%=dictLanguage.Item(Session("language")&"_prv_5")%> <%=pcv_MainRateTxt2%> <%=pcv_MainRateTxt3%> " onclick="javascript:openbrowser('prv_postreview.asp?IDPRoduct=<%=pcv_IDProduct%>&feel=' + document.rating1.feel.value);">
<%else %> <%=dictLanguage.Item(Session("language")&"_prv_5")%> <%if pcv_CalMain="1" then%><%for k=1 to pcv_MaxRating%><%=k%> <%next%><%end if%> " onclick="javascript:openbrowser('prv_postreview.asp?IDPRoduct=<%=pcv_IDProduct%>&rate=' + document.rating1.rate.value);">
<%end if%>
<%end if%>

<% END IF END IF%>