<% VaruNR=Request.QueryString("prid") Set rsproducts = Server.CreateObject("ADODB.Recordset") '(ItemID = " & Request.Form("txtItemID") & ")" sSQL = "SELECT * FROM Products WHERE ItemProductNumber='" & VaruNR & "'" rsproducts.Open sSQL, dbMain, adOpenStatic, adLockPessimistic 'Response.Write VaruNR dim pic(5), cap(5), text(5), endpic(5) dim Nr dim bredd, hojd bredd=200 hojd=200 Nr="" for i = 0 to 4 pic(i) = rsproducts("ItemBigPicture" & Nr) cap(i) = rsproducts("ItemBigPicCaption" & Nr) text(i) = rsproducts("ItemBigPicText" & Nr) endpic(i) = Right(pic(i),3) if i=0 then Nr = 1 end if Nr = Nr + 1 next %> <%=cap(0)%>
<% Response.Write "
" %> <%if rsproducts("category")="" then%> <%else%> <%end if%>
" border=0>
 
<% btest=false for i=0 to 4 if pic(i)<>"" then%>   <% btest=true end if next if btest=true then%> " height="60" border=0 onclick="javascript:document.bigimage.src=src;" style="cursor: hand;">  <%end if%>
Produktnamn:<%=rsproducts("itemname")%>
Produktnr:<%=rsproducts("itemproductnumber")%>
Kategori:<%=rsproducts("MainCategory")%>
Kategori:<%=rsproducts("MainCategory") & " / " & rsproducts("Category")%>
Beskrivning:<%=rsproducts("itemdescription")%>
<% set rsStock=Server.CreateObject("ADODB.Recordset") sreload=false rsStock.Open "select * from Stocks where ItemProductNumber='" & rsproducts("itemproductnumber") & "' and ItemString<>''", dbMain, adOpenStatic, adLockPessimistic, adCmdText if not(rsStock.bof and rsStock.eof) then sreload=true end if rsStock.close rsStock.Open "select * from Stocks where ItemProductNumber='" & rsproducts("itemproductnumber") & "' and ItemString=''", dbMain, adOpenStatic, adLockPessimistic, adCmdText itsthere=false if not(rsStock.eof and rsStock.bof) then if rsStock("StockNo")<>"" then if cint(rsStock("StockNo"))>0 then itsthere=true end if end if else itsthere=true end if if itsthere=false then if rsStock("IsLocked")=true then IsLoc="yes" else IsLoc="" end if tmpSText=rsStock("FinishedText") end if rsStock.close dim rabatt, sprabatt, staffrabatt if (session("cust")="") or (rsproducts("ProductDiscountAccess")=false) then rabatt=1 sprabatt=1 staffrabatt=1 else set rscust=Server.CreateObject("ADODB.Recordset") rscust.Open "SELECT * FROM Customers WHERE CustomerID=" & session("cust"), dbMain, adOpenStatic, adLockPessimistic, adCmdText if rscust("DiscountPercent")>0 then Set rsaf = Server.CreateObject("ADODB.Recordset") rsaf.Open "SELECT af" & cstr(rscust("DiscountPercent")) & " FROM RetailPrices WHERE ItemProductNumber='" & rsproducts("itemproductnumber") & "'", dbMain, adOpenStatic, adLockPessimistic, adCmdText If Not (rsaf.BOF And rsaf.EOF) Then rabatt = (100 - rsaf("af" & CStr(rscust("DiscountPercent")))) / 100 Else rabatt = 1 End If rsaf.Close Set rsaf = Nothing Else rabatt = 1 End If if rscust("SpecialPriceAccess")=true then sprabatt=rabatt else sprabatt=1 end if if rscust("StafflingAccess")=true then staffrabatt=rabatt else staffrabatt=1 end if rscust.close set rscust=nothing end if ptmp=0 if rsproducts("ispackage")=true then set prs = Server.CreateObject("ADODB.Recordset") prs.Open "SELECT * FROM Packages WHERE ProductNumber='" & rsproducts("itemproductnumber") & "'", dbMain, adOpenStatic, adLockOptimistic if not(prs.bof and prs.eof) then prs.movefirst for pind=1 to prs.recordcount if prs("isdefault")=true then ptmp=ptmp+prs("Price") end if prs.movenext next end if prs.close set prs=nothing end if sTemp="" if rsproducts("StfCheck")=true then set rsstaff=Server.CreateObject("ADODB.Recordset") rsstaff.Open "SELECT * FROM StafflingTable WHERE ItemProductNumber='" & rsproducts("ItemProductNumber") & "'", dbMain, adOpenStatic, adLockPessimistic, adCmdText if not(rsstaff.eof and rsstaff.bof) then if rsproducts("StartKostnad")=true then If (rsproducts("itemsaleprice") > 0) and (rsproducts("beginspecial") <= Date AND rsproducts("endspecial") >= Date) then sTemp = "" Else sTemp = "" if ((session("cust")<>"") and rabatt<>1) and rabatt<>1 then sTemp=sTemp & "" end if End If else If (rsproducts("itemsaleprice") > 0) and (rsproducts("beginspecial") <= Date AND rsproducts("endspecial") >= Date) Then sTemp = "" Else sTemp = "" if ((session("cust")<>"") and rabatt<>1) and rabatt<>1 then sTemp=sTemp & "" end if End If end if sTemp = sTemp & "" end if rsstaff.close set rsstaff=nothing end if if sTemp="" then If (rsproducts("itemsaleprice") > 0) and (rsproducts("beginspecial") <= Date AND rsproducts("endspecial") >= Date) Then sTemp = "" Else sTemp = "" if ((session("cust")<>"") and rabatt<>1) and rabatt<>1 then sTemp=sTemp & "" end if End If End If response.Write "" if rsproducts("ispackage")=true then response.write "
" response.Write "" response.Write "
Nätpris startavgift SEK " & Formatnumber(cdbl(rsproducts("itemsaleprice")+ptmp)*sprabatt) & "
(Ordinarie start avgift SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)) & ")
Startavgift SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)*rabatt) & "
(Ordinarie start avgift SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)) & "" & ")
Nätpris: SEK " & FormatNumber(cdbl(rsproducts("itemsaleprice"))*sprabatt) & "
(Ordinarie pris: SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)) & ")
Pris: SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)*rabatt) & "
(Ordinarie pris: SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)) & ")
" for i=1 to 12 if rsstaff("StartNumber" & i)<>"" then if cint(rsstaff("StartNumber" & i))<=cint(rsstaff("StopNumber" & i)) then sTemp=sTemp & "" else sTemp=sTemp & "" end if end if next stemp=stemp & "
AntalPris per st.
" & rsstaff("StartNumber" & i) & "till" sTemp=sTemp & "" & rsstaff("StopNumber" & i) & " : SEK " & FormatNumber((cdbl(rsstaff("StaffPrice" & i)+ptmp)*staffrabatt)) & "
" & rsstaff("StartNumber" & i) & " eller fler : SEK " & FormatNumber((cdbl(rsstaff("StaffPrice" & i)+ptmp)*staffrabatt)) & "
Nätpris: SEK " & FormatNumber(cdbl(rsproducts("itemsaleprice")+ptmp)*sprabatt) & "
(Ordinarie pris: SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)) & ")
Pris: SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)*rabatt) & "
(Ordinarie pris: SEK " & FormatNumber(cdbl(rsproducts("itemregularprice")+ptmp)) & ")
" & sTemp & "
" if IsLoc<>"yes" then ' Input - Antal response.Write "
" response.write "
" Dim p, e, tmpchr, tmpstrangen If rsproducts("Choice1") <> "" Then ReDim tmpchoice(1) p = 1 e = 0 tmpstrangen = rsproducts("Choice1") If Mid(tmpstrangen, 1, 1) = Chr(59) Then tmpstrangen = Mid(tmpstrangen, 2, (Len(tmpstrangen) - 1)) End If If Mid(tmpstrangen, (Len(tmpstrangen)), 1) = Chr(59) Then tmpstrangen = Mid(tmpstrangen, 1, (Len(tmpstrangen) - 1)) End If tmpchar = Mid(tmpstrangen, p, 1) Do While tmpchar <> "" Do While (tmpchar <> Chr(59)) and (tmpchar<>"") tmpchoice(e) = tmpchoice(e) & tmpchar p = p + 1 tmpchar = Mid(tmpstrangen, p, 1) Loop p = p + 1 e = e + 1 ReDim Preserve tmpchoice(e) 'Combo1.AddItem Trim(tmpchoice), e tmpchar = Mid(tmpstrangen, p, 1) Loop response.Write "" & rsproducts("Choice1Text") & "" if howmanyrecs=0 then response.Write "" end if lagercheck="" For i = 0 To CInt(e) - 1 if request(rsproducts("itemproductnumber") & "c1")=tmpchoice(CInt(i)) then response.Write "" ' Input - Package if rsproducts("ispackage")=true then response.write "" end if else response.write "" end if response.write "
" 'Input - Lägg i varukorgen ' response.Write " "" then Response.write " onclick=" & chr(34) & "javascript:loadprodlink('" & rsproducts("itemproductnumber") & "');" & chr(34) end if response.write ">
" & "
" & tmpSText & "
" set rsStock=nothing response.Write "
" %>
<% for i = 0 to 4 Response.Write "" if text(i)<>"" then if len(text(i))<80 then Response.Write "" end if next 'Response.Write "
" if cap(i)<>"" then Response.Write "
" & cap(i) & "
" end if Response.Write "
" else Response.Write "
" end if Response.Write "
" & text(i) & "
" 'Response.Write "
" rsproducts.Close set rsproducts=nothing %> <% dbMain.close set dbMain=nothing %>