<% Dim gruppe Dim n Dim gruppstring Dim artnum Dim technik artnum = Request.QueryString("artnum") gruppe = Request.QueryString("grp") preis_anzeige = 0 if len( gruppe ) = 0 then sql = "SELECT text4 FROM [Artikeldaten] WHERE exartnr=" & SQLString(trim(artnum)) Call WriteSqlLog(sql) rs_sql.Open sql, db_sql, 3 if NOT rs_sql.EOF then temp = rs_sql("text4") if len( temp ) > 0 then temparray = split(temp, vbCrLf) if len( temparray(0)) > 0 then gruppe = temparray(0) else gruppe = "" end if end if rs_sql.Close end if grupparray = split( gruppe,"," ) gruppstring = "" for n = 1 to ubound(grupparray) if n = 1 then sql = "SELECT Bezeichnung FROM [Artikelgruppen] WHERE [Stufe 2]=" & SQLAccessZahl(grupparray(1)) & " AND [Stufe 3] IS NULL AND [Stufe 4] IS NULL AND [Stufe 5] IS NULL" if n = 2 then sql = "SELECT Bezeichnung FROM [Artikelgruppen] WHERE [Stufe 2]=" & SQLAccessZahl(grupparray(1)) & " AND [Stufe 3]=" &SQLAccessZahl(grupparray(2)) & " AND [Stufe 4] IS NULL AND [Stufe 5] IS NULL" if n = 3 then sql = "SELECT Bezeichnung FROM [Artikelgruppen] WHERE [Stufe 2]=" & SQLAccessZahl(grupparray(1)) & " AND [Stufe 3]=" & SQLAccessZahl(grupparray(2)) & " AND [Stufe 4]=" & SQLAccessZahl(grupparray(3)) & " AND [Stufe 5] IS NULL" if n = 4 then sql = "SELECT Bezeichnung FROM [Artikelgruppen] WHERE [Stufe 5]=" & SQLAccessZahl(grupparray(n)) & " AND [Stufe 3] IS NULL AND [Stufe 4] IS NULL AND [Stufe 2] IS NULL" Call WriteSqlLog(sql) rs_sql.Open sql, db_sql, 3 if NOT rs_sql.EOF then gruppstring = gruppstring & rs_sql("Bezeichnung") & " - " end if rs_sql.Close next if len( gruppstring ) > 0 then gruppstring = left( gruppstring, len(gruppstring)-3 ) end if if len(Session("LOGIN") ) = 0 then sql = "SELECT textbez,brutto as preis,g01,text2,text3,klasse FROM Artikeldaten WHERE exartnr=" & SQLString(trim(artnum)) & " AND kundentyp like '%02%' AND kundentyp <> 'AAA02'" else if len(session("normalepreise")) > 0 then sql = "SELECT textbez,netto as preis,g01,text2,text3,klasse FROM Artikeldaten WHERE exartnr=" & SQLString(trim(artnum)) & " AND anzahl=1 AND kundentyp like '%AAA01%'" else sql = "SELECT textbez,netto as preis,g01,text2,text3,klasse FROM Artikeldaten WHERE exartnr=" & SQLString(trim(artnum)) & " AND anzahl=1 AND kundentyp like '%01%' AND Kundentyp NOT like '%AAA01%'" End if end if Call WriteSqlLog(sql) rs_sql.Open sql, db_sql, 3 if len(SESSION("normalepreise")) > 0 then Dim rs_sql2 Set rs_Sql2 = Server.CreateObject ("ADODB.REcordset") sql = "SELECT textbez,netto as preis,g01,text2,text3,klasse FROM Artikeldaten WHERE exartnr=" & SQLString(trim(artnum)) & " AND anzahl=1 AND kundentyp like '%AAA01%'" Call WriteSqlLog(sql) rs_sql2.Open sql,db_sql,3 if NOT rs_Sql2.EOF then rs_sql.close sql = "SELECT textbez,netto as preis,g01,text2,text3,klasse FROM Artikeldaten WHERE exartnr=" & SQLString(trim(artnum)) & " AND anzahl=1 AND kundentyp like '%AAA01%'" Call WriteSqlLog(sql) rs_Sql.open sql,db_Sql,3 End if rs_sql2.Close Set rs_sql2 = Nothing End if ampelfarbe = "rot.gif" if NOT rs_sql.EOF then textbez = strconvert(rs_sql("textbez")) preis = round(rs_sql("preis"),2) preisanzeige = FormatNumber(preis,2) & " EUR" massdaten = strconvert(rs_sql("g01")) zubehoer = rs_sql("text2") ersatz = rs_sql("text3") klasse = rs_sql("Klasse")&"" end if rs_sql.Close if len(Session("LOGIN") ) <> 0 AND len(session("normalepreise")) = 0 then sql = "SELECT netto as preis FROM Artikeldaten WHERE exartnr=" & SQLString(artnum) & " AND kundentyp like '%AAA01%'" Call WriteSqlLog(sql) rs_sql.open sql,db_sql,3 if NOT rs_sql.EOF then preis_anzeige = rs_sql("preis") rs_sql.close End if if len(textbez)=0 then sql = "SELECT textbez FROM Artikeldaten WHERE exartnr=" & SQLString(artnum) Call WriteSqlLog(sql) rs_sql.open sql,db_sql,3 if NOT rs_sql.EOF then textbez = rs_sql("textbez") rs_sql.close End if if len(klasse&"") = 0 OR klasse = "0" OR isnull(klasse) then klasse_bild = "" else For N = 1 to klasse klasse_bild = klasse_bild & "" Next if NOT klasse = 5 then For N = klasse + 1 To 5 klasse_bild = klasse_bild & "" Next End if End if sql = "SELECT mindest,verfuegbar FROM Bestaende WHERE exartnr=" & SQLString(trim(artnum)) mindest = 0 verfuegbar = 0 'if len(Session("LOGIN") ) <> 0 then Set db_sql_2 = Server.CreateObject("ADODB.Connection") db_sql_2.ConnectionTimeout = 20 'db_sql_2.Open "DRIVER={Microsoft Access Driver (*.mdb)};DSN='';PWD=;DBQ=" & Server.MapPath("../intern") & "/bestaende.mdb" db_sql_2.Open "DRIVER=SQL Server;Network=Dbmssocn;Adress=1433;Server=62.225.47.6;DATABASE=krick-modell;UID=krick;PWD=beDocIkO" Call WriteSqlLog(sql) rs_sql.Open sql, db_sql_2, 3 if NOT rs_sql.EOF then mindest = rs_sql("mindest") verfuegbar = rs_sql("verfuegbar") if IsNull(mindest) then mindest = 0 if IsNull(verfuegbar) then verfuegbar = 0 end if rs_sql.Close db_sql_2.Close set db_sql_2 = Nothing if verfuegbar < mindest AND verfuegbar > 0 then ampelfarbe = "gelb.gif" if verfuegbar >= mindest then ampelfarbe = "gruen.gif" 'Änderung if verfuegbar = 0 then ampelfarbe = "rot.gif" 'end if if len(Session("LOGIN") ) <> 0 then sql = "SELECT TOP 1 brutto as preis FROM Artikeldaten WHERE exartnr=" & SQLString(artnum) & " AND feld02='Dispo. N' AND kundentyp like '%02%' AND NOT kundentyp LIKE '%AAA02%'" Call WriteSqlLog(sql) rs_sql.Open sql, db_sql, 3 if NOT rs_sql.EOF then uvp = rs_sql("preis") end if rs_sql.Close end if 'Massdaten ermitteln massarray = split( massdaten, " " ) sondertext = "" massstab = "" laenge = "" breite = "" hoehe = "" bestellbuttontext = "bestellen" if len(Session("LOGIN")) = 0 then if preis < 15 then preisanzeige = "auf Anfrage" bestellbuttontext = "vormerken" end if beschreibung = gettext( artnum ) %> Produktdetail
 <%=gruppstring%>
 
<%if Exist(Server.Mappath("shopbilder_detailseite") & "/" & trim(artnum) & ".jpg") then%> <%end if%>  

<%=textbez%>

Bestell-Nr.:
<%=artnum%> <%=klasse_bild%>
<%if Exist(Server.Mappath("shopbilder_detailseite") & "/" & trim(artnum) & "_01.jpg") then%> <%else%> <%end if%> <%if len(beschreibung)>0 then%><%End if%>
Achtung: Aktuelle Artikelbeschreibung finden Sie unter www.krickshop.de
 

  zurück zur Übersicht
<%if len(beschreibung)>0 then%>
 
Beschreibung:
<%End if%> <%=beschreibung%>  
<%if len(technik)>0 OR len(massstab)>0 OR len(laenge)>0 OR len(hoehe)>0 OR len(breite)>0 OR len(sondertext)>0 then%>
Technische Daten:
 
<%if len(technik)>0 then Response.Write technik%> <%if len(massstab)>0 then%> <%end if if len(laenge)>0 then%> <%end if if len(hoehe)>0 then%> <%end if if len(breite)>0 then%> <%end if%>
Maßstab <%=massstab%>
Länge <%=laenge%>mm
Höhe <%=hoehe%>mm
Breite <%=breite%>mm
   
<%=sondertext%>  
 
<%End if%> <% if len(getpdf(artnum)) > 0 then %>
Weitere Informationen:
 
<%=getpdf(artnum)%> <%for i = 1 to 9 Response.Write getpdf(artnum & "_0" & i) NExt%>
<%=getavi(artnum)%> <%for i = 1 to 9 Response.Write getavi(artnum & "_0" & i) NExt%>
<%=getwmv(artnum)%> <%for i = 1 to 9 Response.Write getwmv(artnum & "_0" & i) NExt%>
<%=getswf(artnum)%> <%for i = 1 to 9 Response.Write getswf(artnum & "_0" & i) NExt%>
 
<% End if %> <%if len(zubehoer)>0 AND NOT IsNull(zubehoer) or len(ersatz)>0 then if len(zubehoer)>0 AND NOT IsNull(zubehoer) then %>
Wichtiges Zubehör
<% azubehoer = split( zubehoer, vbCrLf ) for n = 0 to ubound( azubehoer )'-1 if len(azubehoer(n))>0 then abez = split( azubehoer(n), ";" ) text = getarttext( abez(0) ) if len(text)>0 then if ubound(abez) > 0 then ztext = abez(1) end if %> <% end if end if next %>
 
<%=text%> <%=ztext%>  <%=bestellbuttontext%> Menge

<% end if zubehoer = ersatz %> <%if len(zubehoer)>0 AND not isNull(zubehoer) then%>
Ersatzteile
<% 'if len(zubehoer)>0 AND NOT IsNull(zubehoer) then azubehoer = split( zubehoer, vbCrLf ) for n = 0 to ubound( azubehoer )'-1 if len(azubehoer(n))>0 then abez = split( azubehoer(n), ";" ) text = getarttext( abez(0) ) if len(text)>0 then if ubound(abez) > 0 then ztext = abez(1) end if %> <% end if end if next end if%>
 
<%=text%> <%=ztext%>  <%=bestellbuttontext%> Menge

 

<%end if%>

  zurück zur Übersicht

<% function getarttext( artikel ) getarttext = "" sql = "SELECT textbez FROM Artikeldaten WHERE exartnr=" & SQLString(artikel) Call WriteSqlLog(sql) rs_sql.Open sql, db_sql, 3 if NOT rs_sql.EOF then getarttext = rs_sql("textbez") if isnull(getarttext) then getarttext = "" end if rs_sql.Close end function function gettext( artikel ) gettext = "" technik = "" Dim fso, f Dim table Dim n Dim merktext merktext = "" Set fso = CreateObject("Scripting.FileSystemObject") if NOT fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".txt") then Set fso = Nothing exit function end if Set f = fso.OpenTextFile(Server.Mappath("texte") & "/" & trim(artikel) & ".txt", 1, False) table = 0 Do until f.AtEndOfStream Textzeile=f.readline & "
" if instr(Textzeile, "Technische Daten")<>0 then merktext = gettext & " " gettext = "" Textzeile = "" end if if instr(Textzeile, "|") <> 0 then azeile = split( Textzeile, "|" ) textzeile = "" for n = 1 to ubound( azeile )+1 if n mod 2 = 0 then textzeile = textzeile & "" & azeile(n-1) & "" else textzeile = textzeile & azeile(n-1) end if next end if if table = 0 then if instr( Textzeile, vbTab ) > 0 then gettext = gettext & "" table = 1 end if end if if table = 0 then if len(textzeile)>0 then gettext = gettext & Textzeile' & "

" else tablestring = split( Textzeile, vbTab ) gettext = gettext & "" for n = 0 to ubound( tablestring ) gettext = gettext & "" next gettext = gettext & "" end if if table = 1 then if instr( Textzeile, vbTab ) = 0 then gettext = gettext & "
" & tablestring(n) & "
" table = 0 end if end if Loop f.Close if table=1 then gettext = gettext & "" if len(merktext) > 0 then technik = trim(gettext) gettext = trim(merktext) end if end function function getpdf( artikel ) Dim fso Dim f Dim textzeile Set fso = CreateObject("Scripting.FileSystemObject") if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".pdf.txt") then Set f = fso.OpenTextFile(Server.Mappath("texte") & "/" & trim(artikel) & ".pdf.txt", 1, False) 'table = 0 Do until f.AtEndOfStream Textzeile=f.readline Loop f.Close if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".pdf") then getpdf = getpdf & "

 " & Textzeile & "" End if end if Set fso = Nothing Set f = Nothing Set textzeile = Nothing End function function getavi( artikel ) Dim fso Dim f Dim textzeile Set fso = CreateObject("Scripting.FileSystemObject") if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".avi.txt") then Set f = fso.OpenTextFile(Server.Mappath("texte") & "/" & trim(artikel) & ".avi.txt", 1, False) 'table = 0 Do until f.AtEndOfStream Textzeile=f.readline Loop f.Close if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".avi") then getavi = getavi & "

 " & Textzeile & "" End if end if Set fso = Nothing Set f = Nothing Set textzeile = Nothing End function function getwmv( artikel ) Dim fso Dim f Dim textzeile Set fso = CreateObject("Scripting.FileSystemObject") if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".wmv.txt") then Set f = fso.OpenTextFile(Server.Mappath("texte") & "/" & trim(artikel) & ".wmv.txt", 1, False) 'table = 0 Do until f.AtEndOfStream Textzeile=f.readline Loop f.Close if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".wmv") then getwmv = getwmv & "

 " & Textzeile & "" End if end if Set fso = Nothing Set f = Nothing Set textzeile = Nothing End function function getswf( artikel ) Dim fso Dim f Dim textzeile Set fso = CreateObject("Scripting.FileSystemObject") if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".swf.txt") then Set f = fso.OpenTextFile(Server.Mappath("texte") & "/" & trim(artikel) & ".swf.txt", 1, False) 'table = 0 Do until f.AtEndOfStream Textzeile=f.readline Loop f.Close if fso.FileExists(Server.Mappath("texte") & "/" & trim(artikel) & ".swf") then getswf = getswf & "

 " & Textzeile & "" End if end if Set fso = Nothing Set f = Nothing Set textzeile = Nothing End function %>