gnopaste

Sorry for this ugly message. We are searching for some translators.
Please take a look here
Thanks to all translators, you're doing a great job!

Name
reporter
Scriptlanguage
VB
Tabwidth
4
Date
08/03/2009 11:37:41 am
IP
62.154.152.196

A suggenstion for http://www.selfhtml.de/forum/zeigebeitrag_7_128802__0.php

  1. <%
  2.     On Error Resume Next
  3.     agruppe = request("agr")
  4.     Set DataConn = Server.CreateObject("ADODB.Connection")
  5.     'DataConn.Open Application("db_name")
  6.     DBPath = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("./Ordner/Datei.mdb")
  7.     DataConn.Open DBPath
  8.  
  9.     Set rsgruppe = DataConn.Execute("select Bezeichnung from Artikelgruppen where Artikelgruppe='" & agruppe & "'")
  10.     grbezeichnung = rsgruppe(0)
  11.     rsgruppe.close()
  12.     sqlCommand = "select * from artikel where Artikelgruppe='" & agruppe & "' order by Artikelnummer"
  13.     set rs = DataConn.Execute(sqlCommand)
  14.  
  15.     anzahlspalten = 4
  16. %>
  17.  
  18. <form name="itemsform">
  19.   <div align="center">
  20.     <center>
  21.   <table border="0" width="500">
  22.     <tr>
  23. <%
  24.     ProductNumber = 1
  25.     Do While Not rs.EOF
  26.         artikel = rs("artikelnummer")
  27.         stichwort = rs("stichwort")
  28.         stichwort = stichwort & ""
  29.         if stichwort = "" then
  30.         stichwort = " "
  31.     end if
  32.     bezeichnung = rs("bezeichnung")
  33.  
  34.     bez2 = stichwort
  35.     pos = InStr(bez2, chr(34))
  36.     while pos > 0
  37.         bez2 = mid(bez2, 1, pos - 1) & mid(bez2, pos + 1, len(bez2))
  38.         pos = InStr(bez2, chr(34))
  39.     wend
  40.     pos = InStr(bez2, "'")
  41.     while pos > 0
  42.         bez2 = mid(bez2, 1, pos - 1) & mid(bez2, pos + 1, len(bez2))
  43.         pos = InStr(bez2, "'")
  44.     wend
  45.     preis = rs("Preis")
  46.     pos = InStr(preis, ",")
  47.     if pos = 0 then
  48.         preis = preis & ",00"
  49.     else
  50.         if (len(preis) - pos) = 1 then
  51.             preis = preis & "0"
  52.         end if
  53.     end if
  54.     pos = InStr(preis, ",")
  55.     if pos > 0 then
  56.         p2 = Mid(preis, 1, pos - 1) & "." & Mid(preis, pos + 1)
  57.     else
  58.         p2 = preis
  59.     end if
  60.     if InStr(p2, ".") = 0 then
  61.         p2 = p2 & ".00"
  62.     end if
  63.  
  64.     ProductNumber = ProductNumber + 1
  65. %>
  66.     <td width="<%= anzahlspalten %>" height="180">
  67.     <% If len(rs("picture")) > 0 then %>
  68.         <a href="detail.asp?art=<%=artikel%>&pic=<%=rs("picture")%>" target="Oben"><img src="artimages/<%=rs("picture")%>t.jpg" alt="vergrößern" border="0"><img src="artimages/fuell.gif" width="1" height="50" border="0"><span class="es">Details</span></a>
  69.     <% else %>
  70.         <img src="artimages/fuell.gif" width="1" height="50" border="0">
  71.     <% End If%>
  72. <br>
  73.  
  74. <% If (ProductNumber MOD anzahlspalten) then %>
  75.     <tr>
  76.         <td colspan="<%= anzahlspalten %>"><hr></td>
  77.     </tr>
  78.     <tr>
  79. <% End If %>
  80.  
  81. <%
  82.     rs.movenext
  83.     loop
  84. %>
  85. <% if (rs.EOF and (ProductNumber MOD anzahlspalten)) then%>
  86.       <td width="<%= anzahlspalten %>"></td>
  87.       <td width="<%= anzahlspalten %>"></td>
  88.     </tr>
  89. <%else%>
  90.     <tr>
  91.       <td width="<%= anzahlspalten %>"></td>
  92.     </tr>
  93. <% End If%>
submitter » gnopaster | imprint « imprint     
» Terms of use «