<%@ Language=VBScript %> <%Option Explicit%> <% if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if dim CategID, SubCategID, MainCategs, MainCategDescr, SubCategs, SubCategDescr, a, i dim oRs, oConn, SQL, DataExist, ProdID, RelProdExist dim tmplang, PageNo, totalRows, Data, RelData, RelRec, RelRecExist dim starting, ending, Discount, ProdCategID,ProdPhoto, ProdPhArray set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.Recordset") MainCategs = Application("ProdCategs"&lang) SubCategs = Application("ProdSubCategs"&lang) CategID = Request.Form("CategID") SubCategID = Request.Form("SubCategID") ProdID = Request.Form("ProdID") ProdCategID = Request.Form("ProdCategID") ProdPhoto = Request.Form("ProdPhoto") if ProdID = "" then Response.Redirect("error.asp") end if '---- Get User Discount in Category ------------------------ if session("UserID") & "" <> "" then If not ProdCategID="" then SQL = "Select Discount from UserDiscount where UserID=" & session("UserID") & " AND ProdCategID=" & ProdCategID If not CategID="" then SQL = "Select Discount from UserDiscount where UserID=" & session("UserID") & " AND ProdCategID=" & CategID oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then Discount = oRs("Discount") else Discount = 0 end if oRs.close else Discount = 0 end if '---- Get User Discount in Category ------------------------ SQL = "ShowProduct " & ProdID & ", '"& lang & "'" oRs.open SQL, oConn, 0,1,1 if oRs.EOF = false then DataExist = 1 Data = oRs.GetRows() oRs.close CategID = Data(16,0) SubCategID = Data(17,0) '==== Relative Products ======== if lang ="GR" then lang="" SQL = "Select TOP 3 ProdProd.ProdRelID, ProdDescr.ProdDescr"&lang&", IsNull(Product.ProdThumbs,'default.jpg') as ProdThumbs from ProdProd "&_ "LEFT OUTER JOIN Product on Product.ProdID = ProdProd.ProdRelID "&_ "LEFT OUTER JOIN ProdDescr on ProdDescr.ProdDescrID = Product.ProdDescrID "&_ "where ProdProd.ProdID = " & Data(0,0) oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then RelProdExist = 1 RelData = oRs.GetRows() end if oRs.close '==== Relative Recipes ======== SQL = "Select ProdRec.RecipeID, Recipe.RecipeName, Recipe.RecipeThumbs from ProdRec "&_ " LEFT OUTER JOIN Recipe on Recipe.RecipeID = ProdRec.RecipeID "&_ " where ProdID="& Data(0,0) oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then RelRecExist = 1 RelRec = oRs.GetRows() dim RecPhotos, tempid, SplitRecPhotos, Splittempid for i=0 to ubound(RelRec,2) if RelRec(2,i) & "" <> "" then RecPhotos = RecPhotos & RelRec(2,i) & "," tempid = tempid & RelRec(0,i) & "," end if next if RecPhotos & "" <> "" then SplitRecPhotos = split(RecPhotos,",") Splittempid = split(tempid,",") a = ubound(SplitRecPhotos) randomize a=Int((a * Rnd)+1) RecPhotos = SplitRecPhotos(a-1) tempid = Splittempid(a-1) else RecPhotos = "default.jpg" end if end if oRs.close else oRs.close end if GoToPage = "product.asp?ProdID="&ProdID menu = "1" if SubCategID = null or SubCategID & "" = "" then SubCategID = 0 end if %> <%=PageTitle%>
     <%for i=0 to ubound(MainCategs,2)%>    <%if Cint(MainCategs(0,i)) = Cint(CategID) then MainCategDescr = MainCategs(1,i)%> <%=MainCategs(1,i)%> <%else%> <%=MainCategs(1,i)%> <%end if%>    <%next%>
<%for i=0 to ubound(SubCategs,2) if SubCategs(2,i) = Cint(CategID) then%>   <%if SubCategs(0,i) = Cint(SubCategID) then SubCategDescr = SubCategs(1,i)%> <%=SubCategs(1,i)%> <%else%> <%=SubCategs(1,i)%> <%end if%>
<% end if next%>

<%if RelRecExist = 1 then%>
" width="78" height="78" alt="" border="0">

<%for i=0 to ubound(RelRec,2)%> <%next%>
ΣΧΕΤΙΚΕΣ ΣΥΝΤΑΓΕΣ
<%=RelRec(1,i)%>
<%end if%>
SHOP > <%=MainCategDescr%> > <%=SubCategDescr%>

<%if DataExist = 1 then%> <%=Data(1,0)%>
<%if Data(18,0) & "" <> "" then%><%=Pack(lg)%>: <%=Data(18,0)%>
<%end if%> <%if Data(2,0) & "" <> "" then%><%=House(lg)%>: <%=Data(2,0)%>    <%end if%> <%if Data(3,0) & "" <> "" then%><%=Country(lg)%>: <%=Data(3,0)%><%end if%> <%if Data(4,0) & "" <> "" then%>

<%=Descr(lg)%>
<%=Replace(Data(4,0),chr(13),"
")%>

<%end if%> <%if Data(5,0) & "" <> "" then%>

<%=Source(lg)%>
<%=Replace(Data(5,0),chr(13),"
")%>

<%end if%> <%if Data(6,0) & "" <> "" then%>

<%=Tradition(lg)%>
<%=Replace(Data(6,0),chr(13),"
")%>

<%end if%> <%end if%>
<% dim Relpath,fso Relpath = Server.mappath("../ProdBigPhotos") Set fso=Server.CreateObject("Scripting.FileSystemObject") if fso.FileExists(RelPath &"/"&b) then %> <%end if%>
<%if DataExist = 1 then%> <%if instr(Data(12,0),",") then dim c, b c = split(Data(12,0),",") b = ubound(c)+1 randomize b=Int((b * Rnd)+1) b = c(b-1) else b = Data(12,0) end if %><% end if%>
Μεγέθυνση  <%=Zoom(lg)%>

<%if DataExist = 1 then%>
<%if DataExist = 1 then%>           <%if Discount <> 0 then%> <%=round(cdbl(Data(10,0))-cdbl((cdbl(Discount)*cdbl(Data(10,0)))/100),2)%> <%else%> <%=Data(11,0)%> <%end if%> €          <%=Data(10,0)%> € <%end if%> Προσθήκη στο καλάθι        Αποστολή με mail        Εκτύπωση       

<%end if%> <%if RelProdExist = 1 then%> <%end if%>
<%=PTitle1(lg)%>
<% ProdPhArray = Split(RelData(2,0),",") randomize ProdPhoto = ProdPhArray(Int(((ubound(ProdPhArray)+1) * Rnd) + 1)-1)%>
<%=RelData(1,0)%>
<%if ubound(RelData,2)>=2 then%> <%end if%>
<% ProdPhArray = Split(RelData(2,1),",") randomize ProdPhoto = ProdPhArray(Int(((ubound(ProdPhArray)+1) * Rnd) + 1)-1)%>
<%=RelData(1,1)%>
<%if ubound(RelData,2)>=2 then%> <%end if%>
<% ProdPhArray = Split(RelData(2,2),",") randomize ProdPhoto = ProdPhArray(Int(((ubound(ProdPhArray)+1) * Rnd) + 1)-1)%>
<%=RelData(1,2)%>
 
        <%=price1(lg)%>        <%=price2(lg)%>

<% set oRs = nothing oConn.close : set oConn = nothing %>