Gönderen: 13-Haziran-2011 Saat 15:01 | Kayıtlı IP
|
|
|
arkdaşlar alışveriş sitesi yapıyorumm bi yerde takıldım yardım edermisiniz... sitede ürün ekleme bölümü var orada ürünü eklerken hatayla karşılaşıyorum kodları aşagıda yayınlıycam ..
<!-- #include file="sifre.asp" --> <%
set db = Server.CreateObject("ADODB.Connection") connect="Driver={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath("/shop/habervt.mdb") db.Open connect
Function show_search(parent1, ebene) if parent1 <> vbNullString then if i mod 2 = 0 then bgcolor = "#EFEFDE" else bgcolor = "#E3E1E1" end if for t = 0 to arrayLaenge if rubriken(t,1) = parent1 then platzhalter="" for x= 1 to ebene platzhalter = platzhalter & " " next response.write("<option value='"&rubriken(t,2)&"'>"&platzhalter&r ubriken(t,0)&"</option>"&chr(13)) parent2 = rubriken(t,2) ebene1 = ebene +1 show_search parent2, ebene1 end if next end if end function
dim rubriken(100,4) sql = "select rubrik, id, parent, rank from rubriken order by rank" set rs = db.Execute(sql) while not rs.eof if i<100 then rubriken(i,0) = rs("rubrik") rubriken(i,1) = rs("parent") rubriken(i,2) = rs("id") rubriken(i,3) = rs("rank") end if i=i+1 rs.movenext wend arrayLaenge=i-1
' ***** DELETE RUBRIK ***** if request.querystring("delete") = "true" and len(request.querystring("id"))>0 then sql = "delete from produkte where id = " & request.querystring("id") db.execute(sql) end if
' ***** INSERT NEW PRODUKT ***** if request.querystring("new") = "true" then save = true rubrik = request.form("rubrik") preis = check1(request.form("preis")) produkt = check(request.form("produkt")) pic = request.form("pic") if len(pic)<1 then pic = " " nummer = check(request.form("nummer")) beschreibung = check(request.form("beschreibung")) if save = true then sql = "insert into produkte (bezeichnung, beschreibung, bild, artikelnr, preis, rubrik) " sql = sql & "values('"&produkt&"', '"&beschreibung&"', '"&pic&"', '"&nummer&"', "&preis&", "&rubrik&")" db.execute(sql) end if end if
%> <html> <head>
<style> .text { color: black; font-weight: 400; font-size: 11px; font-family: Arial, Helvetica, sans-serif; text-decoration: none; text-align:justify; } a.text:link {color: black; text-decoration: none; text-align:justify; } a.text:visited { color: black; text-decoration: none; text-align:justify; } a.text:hover { color: #848CB5; text-decoration: underline; text-align:justify; } </style> </head> <script> function update(id) { msg=window.open("produkte_edit.asp?id="+id,"","height=350,wi dth=400"); } </script> <body bgcolor="#ffffff">
<table border="0" cellpadding="0" cellspacing="0" width="100" bgcolor="#000000" align="center"> <tr> <td width="100%"> <table border="0" cellpadding="2" cellspacing="1" width="450" class="text" height="47"> <tr> <td width="444" bgcolor="#6699FF" align="center" colspan = "5" height="1"><b><br> <font color="#FFFFFF">Ürünler</font><br></b>& lt;/td> </tr> <tr> <td width="33" bgcolor="#848CB5" align="center" height="14"><b>Kodu</b></td> <td width="244" bgcolor="#848CB5" align="left" height="14"><b>Ürün ady</b></td> <td width="28" bgcolor="#848CB5" align="center" height="14"><b>Sil</b></td> <td width="46" bgcolor="#848CB5" align="center" height="14"><b>Düzenle</b></td> </tr> <% sql = "select a.bezeichnung, a.preis, a.artikelnr, b.rubrik as rubrik_name, a.id as p_id from produkte a, rubriken b where b.id = a.rubrik order by b.rubrik, a.artikelnr desc" set rs = db.Execute(sql) while not rs.eof count = count +1 if count mod 2 = 0 then bgcolor = "#EFEFDE" else bgcolor = "#E3E1E1" end if
if old_rubrik <> rs("rubrik_name") then old_rubrik = rs("rubrik_name") %> <td width="366" bgcolor="#848CB5" align="left" colspan="4" height="1"><b><%=rs("rubrik_name")%></b> ;</td>
<% end if %> <tr> <td width="33" bgcolor="#D3E4F5" align="right" height="14"><%=rs("artikelnr")%></td> <td width="244" bgcolor="#D3E4F5" align="left" height="14"><%=rs("bezeichnung")%> (<%=rs("preis")%>)</td> <td width="28" bgcolor="#D3E4F5" align="center" height="14"><a class="text" href="produkte.asp?id=<%=rs("p_id")%>&delete=true" > Sil</a></td> <td width="46" bgcolor="#D3E4F5" align="center" height="14"><a class="text" href="javascript:update('<%=rs("p_id")%>');"> Düzenle</a></td> &n bsp; </tr> <% rs.movenext wend rs.close db.close set rs = nothing set db = nothing %> </table> </td> </tr> </table>
<br> <form method="POST" action="produkte.asp?new=true"> <table border="0" cellpadding="0" cellspacing="0" width="100" bgcolor="#000000" align="center"> <tr> <td width="100%"> <table border="0" cellpadding="2" cellspacing="1" width="451" class="text"> <tr> <td width="602" bgcolor="#6699FF" align="center" colspan="2"> <font color="#FFFFFF"><b>Yeni Ürün Ekle</b></font></td> </tr> <tr> <td width="140" bgcolor="#D3E4F5" align="left">Synyf*</td> <td width="462" bgcolor="#D3E4F5" align="left"> <select size="1" name="rubrik"> <%show_search 0,0%> </select> </td> </tr> <tr> <td width="140" bgcolor="#D3E4F5" align="left">ÜrünAdy*</td> <td width="462" bgcolor="#D3E4F5" align="left"> <input type="text" name="produkt" size="21" maxlength="100"> </td> </tr> <tr> <td width="140" bgcolor="#D3E4F5" align="left">Kodu:*</td> <td width="462" bgcolor="#D3E4F5" align="left"> <input type="text" name="nummer" size="21" maxlength="100"> </td> </tr> <tr> <td width="140" bgcolor="#D3E4F5" align="left">Resim</td> <td width="462" bgcolor="#D3E4F5" align="left"> <input type="text" name="pic" size="21" maxlength="100"> <a target="_blank" href="../../rgf8er67ger89g.asp">resim yükle</a></td> </tr> <tr> <td width="140" bgcolor="#D3E4F5" align="left">Fiyat*</td> <td width="462" bgcolor="#D3E4F5" align="left"> <input type="text" name="preis" size="21" maxlength="100"> </td> </tr> <tr> <td width="140" bgcolor="#D3E4F5" align="left">Detaylar*</td> <td width="462" bgcolor="#D3E4F5" align="left"> <textarea rows="5" name="beschreibung" cols="33"></textarea> </td> </tr> <tr> <td width="602" bgcolor="#D3E4F5" colspan="2" align="center"> <input type="submit" value="Kaydet" name="B1"></td> </tr> </table> </td> </tr> </table> </form> <% Erase rubriken %> <p align = "center"><a class="text" href="produkte.asp">Yenile</a></p> </body>
ekrana cıkan hata
Microsoft VBScript çalýþma hatasý hata '800a000d'
Tür uyumsuz: 'check1'
/shop/admin/produkte.asp, satır 64
|