Forum AspNuke.it - Il tuo Portale OpenSource in ASP
AIUTO TOP MERCATINO
Autore
Messaggio
netgratis
Avanzato
104 Discussioni
19 luglio 2006 alle 11:57:04
Tutto a posto, ma se visualizzo gli annunci, sopra gli stessi mi appare questo messaggio: ErroreSQL -2147217904: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. SQL : UPDATE me_annuncio set cont = cont + 1 WHERE id=2 Che cosa vuol dire? dove ho sbagliato? la pag. è visionabile all'url http://www.cuoreimmacolato.it/mercatino.asp?do=item&id=2
---------------http://www.noichiesa.com
netgratis
Avanzato
104 Discussioni
19 luglio 2006 alle 12:07:32
Ho risolto il problema: nello zip scaricato c'è un errore. Ecco il mercatino-inc.asp corretto:<% ' ************************************************************************ ' * ASP-Nuke: Free web portal in ASP * ' ************************************************************************ ' * Copyright (c) 2002-2003 by Gaetan Bouveret (webmaster@asp-nuke.com) * ' * http://www.asp-nuke.com * ' * * ' * Redesign by Emanuele Libertini (c) 2004 - infoz@searchwarezz.net * ' * Re-design by Enrico Musante (c) 2004 (emu@libero.it) * ' * Re-design by Frank Zalabard (c) 2004 (fsarzana@hotmail.com) * ' * * ' * This program is free software. You can redistribute it and/or modify * ' * it under the terms of the GNU General Public License as published by * ' * the Free Software Foundation; either version 2 of the License, or * ' * (at your option) any later version. * ' * * ' ************************************************************************ %> <% ' Display the top message mercatino list (links to message) ' IN : iTop (int) : number of results wanted ' : iCategory (int) : message mercatino category (table me_annunci, field arCategory) ' OUT : - Sub DisplayTopMessageMercatinoLinks(iTop, iCategory) Dim oCn, oRs, oRs2, oRs3, rSQL Dim sCategory, sTitleCat, iLoop, iRead, iRead2 Set oCn = DBConnexion(DB_MERCATINO) If iCategory <> "" And iCategory <> 0 Then sCategory = "?cat=" & iCategory rSQL = "SELECT categoria FROM me_categoria WHERE id=" & iCategory Set oRs = DBRecordSet(oCn, rSQL) If Not oRs.EOF Then sTitleCat = " - " & Server.HTMLEncode(oRs(0)) End If oRs.Close Set oRs = Nothing End If rSQL = "SELECT * FROM me_annuncio WHERE valido = 1 " If sCategory <> "" Then rSQL = rSQL & " AND me_categoria=" & iCategory End If rSQL = rSQL & " ORDER BY datainserimento DESC" Set oRs = DBRecordSet(oCn, rSQL) CreateTopTable "TopMessageMercatinoLinks", GetTranslation("LANG_TOP") & " " & iTop & " - " & GetTranslation("LANG_MESSAGE_TOP") & sTitleCat If Not oRs.EOF Then iLoop = 0 While Not oRs.EOF And iLoop < iTop rSQL = "SELECT * FROM me_categoria WHERE id = " & oRS("catID") Set oRs3 = DBRecordSet(oCn, rSQL) If Not oRs3.EOF Then iRead2 = oRs3("categoria") End If iRead = 0 rSQL = "SELECT login, datainserimento, titolo FROM me_annuncio WHERE tipo=" & oRs("id") Set oRs2 = DBRecordSet(oCn, rSQL) Response.Write "- <a href=""" & GLOBAL_SITE_ANNUNCI_PAGE & "?do=item&id=" & oRs("id") & """>" & CodeMessage(oRs("titolo"), False) & "</a><br>" & vbCRLF Response.Write "<span class=""small"" style=""padding-left:7;"">" & GetTranslation("LANG_WHOIS_INSERT_ANNUNCIO") & " " & CodeMessage(oRs("login"), False) & " - " & GetDateDDMMYYYY(StringToDate(oRs("datainserimento"))) & "</span><br>" & vbCRLF oRs.MoveNext iLoop = iLoop + 1 Wend oRs2.Close Set oRs2 = Nothing oRs3.Close Set oRs3 = Nothing Else Response.Write GetTranslation("LANG_EMPTY_SECTION") End If CreateBottomTable "" oRs.Close Set oRs = Nothing oCn.Close Set oCn = Nothing End Sub Sub DisplayCategorieMercatino() Dim oCn, oRs, rSQL, oRs1, rSQL1, oRs2, rSQL2, iLine Dim LastDate Set oCn = DBConnexion(DB_MERCATINO) rSQL = "SELECT id, categoria FROM me_categoria" Set oRs = DBRecordSet(oCn, rSQL) If Not oRs.EOF Then CreateTopTable "ListaCategorie", GetTranslation("LANG_MARKET") Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tablelinemain"">" & vbCRLF Response.Write " <td align=""center"">" & GetTranslation("LANG_CAT_NAME") & "</td>" & vbCRLF Response.Write " <td align=""center"">" & GetTranslation("LANG_ANN_PRESENT") & "</td>" & vbCRLF Response.Write " <td align=""center"">" & GetTranslation("LANG_LAST_INS") & "</td>" & vbCRLF Response.Write " <td align=""center""> </td>" & vbCRLF Response.Write " </tr>" & vbCRLF iLine = 1 While Not oRs.EOF Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF Response.Write " <td align=""left"">" & UCase(oRs("categoria")) & " </td>" & vbCRLF rSQL1 = "SELECT COUNT(*) FROM me_annuncio WHERE catID=" & cStr(oRs("id")) & " AND valido=1" Set oRs1 = DBRecordSet (oCn, rSQL1) If oRs1(0).Value >= 1 Then ' inserire modifica per MySql rSQL2 = "SELECT datainserimento FROM me_annuncio WHERE catID=" & cStr(oRs("id")) & " AND valido=1 ORDER BY datainserimento DESC" Set oRs2 = DBRecordSet (oCn, rSQL2) LastDate = GetDateDDMMYYHHMMSS(StringToDate(oRs2("datainserimento"))) Response.Write "<td align=""center""><a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=view&catID=" & cStr(oRs("id")) & "&page=1"" title=""" & GetTranslation("LANG_ANN_PRESENT") & """>" & oRs1(0).Value & " " & GetTranslation("LANG_ANN_PRESENT") & "</a></td>" & vbCRLF oRs2.Close Set oRs2 = Nothing Else LastDate = "-" Response.Write "<td align=""center"">" & oRs1(0).Value & " " & GetTranslation("LANG_ANN_PRESENT") & "</td>" & vbCRLF End If oRs1.Close Set oRs1 = Nothing Response.Write " <td align=""center"">"&LastDate&"</td>" & vbCRLF Response.Write " <td align=""center""><input type=""button"" value=""" & GetTranslation("LANG_NEW_ANN") & """ onclick=""Java_Script:document.location='"&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp?do=new&catID=" & cStr(oRs("id")) & "';"" class=""cell"" size=""50""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF oRs.MoveNext iLine = ((iLine-1) Xor 1) + 1 Wend oRs.Close Set oRs = Nothing oCn.Close Set oCn = Nothing Response.Write " <tr class=""tablelinemain"">" & vbCRLF Response.Write " <td colspan=""4"" align=""center""> </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</table>" & vbCRLF CreateBottomTable "" Else CreateTable "NoCat", "", GetTranslation("LANG_NO_CATEGORIES"), "" End If End Sub Sub ViewAnnuncioMercatino(catID, page, where) Dim oCn, oRs, rSQL, oRs1, rSQL1, oRs2, rSQL2, oRs3, rSQL3, rSQL4, oRs4 ' Dim RecordsPerPagina Dim i, pag, NumeroPagine, iLine Dim isWhere, isType Dim numero, iPage Select Case where Case "vendo" isWhere = "tipo=0 AND" isType="&where=vendo" page="1" Case "cerco" isWhere = "tipo=1 AND" isType="&where=cerco" page="1" Case "tutti" isWhere = "" isType="&where=tutti" page="1" Case Else isWhere = "" isType="&where=tutti" page="1" End Select ' RecordsPerPagina=2 Set oCn = DBConnexion(DB_MERCATINO) rSQL = "SELECT * FROM me_annuncio WHERE " & isWhere & " catID=" & catID & " AND valido=1 ORDER BY datainserimento DESC" Set oRs = DBPageRecordSet(oCn, rSQL, RecordsPerPagina) 'oRs.CursorLocation = 3 'oRs.Open rSQL, oCn 'oRs.PageSize = RecordsPerPagina NumeroPagine = oRs.PageCount If page = "" Then page = 1 End If rSQL1 = "SELECT categoria FROM me_categoria WHERE id=" & catID & "" Set oRs1 = DBRecordSet(oCn, rSQL1) rSQL2 = "SELECT COUNT(id) FROM me_annuncio WHERE catID=" & catID & " AND valido=1 AND tipo=0" Set oRs2 = DBRecordSet(oCn, rSQL2) rSQL3 = "SELECT COUNT(id) FROM me_annuncio WHERE catID=" & catID & " AND valido=1 AND tipo=1" Set oRs3 = DBRecordSet(oCn, rSQL3) rSQL4 = "SELECT COUNT(id) FROM me_annuncio WHERE catID=" & catid & " AND valido=1" Set oRs4 = DBRecordset(oCn, rSQL4) CreateTopTable "Annunci", "" & GetTranslation("LANG_PRESENT_IN") & " """ & UCase(oRs1("categoria")) & """" Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td align=""left"">" & vbCRLF Response.Write "" & GetTranslation("LANG_PRESENT") & " " & oRs4(0) & " " & GetTranslation("LANG_THIS_CATEGORY") & "<br><br>" & vbCRLF Response.Write " <li>" & oRs2(0) & " " & "" & GetTranslation("LANG_TYPES") & " " & GetTranslation("LANG_TYPE_SELL") & " " & vbCRLF Response.Write " <li>" & oRs3(0) & " " & "" & GetTranslation("LANG_TYPES") & " " & GetTranslation("LANG_TYPE_BUY") & " " & vbCRLF If oRs.RecordCount>=1 Then Response.Write " <br><br>" & vbCRLF Response.Write " <a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=view&catID=" & catId & "&where=tutti&page=" & page & """>" & GetTranslation("LANG_VIEW_ALL") & "</a>" & vbCRLF End If If oRs2(0)>0 Then Response.Write " | <a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=view&catID=" & catId & "&where=vendo&page=" & page & """>" & GetTranslation("LANG_VIEW_TYPE1") & "</a>" & vbCRLF End If If oRs3(0)>0 Then Response.Write " | <a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=view&catID=" & catId & "&where=cerco&page=" & page & """>" & GetTranslation("LANG_VIEW_TYPE2") & "</a>" & vbCRLF End If Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</table>" & vbCRLF CreateBottomTable "" oRs1.Close Set oRs1 = Nothing oRs2.Close Set oRs2 = Nothing oRs3.Close Set oRs3 = Nothing iPage = page 'oRs.PageCount = page iLine = 1 For i=1 To RecordsPerPagina If Not oRs.EOF Then CreateTopTable "Mercatino Annunci", "" & IIf(oRs("tipo")=0,trim(uCase(GetTranslation("LANG_TYPE_SELL"))),trim(uCase(GetTranslation("LANG_TYPE_BUY")))) & " - " & oRs("titolo") & "" Response.Write "<_Script language=""Java_Script"">" & vbCRLF Response.Write "function openUp(name, url, w, h)" & vbCRLF Response.Write "{" & vbCRLF Response.Write " var w2 = 0, h2 = 0;" & vbCRLF Response.Write " w2 = w+0;" & vbCRLF Response.Write " h2 = h+0;" & vbCRLF Response.Write " if(w2>1000) w2 = 1000;" & vbCRLF Response.Write " if(h2>1000) h2 = 1000;" & vbCRLF Response.Write " newWindow = window.open(url, name, 'menubar=no, scrollbars=no, status=no, resizable=no, location=no, status=0, toolbar=no, directories=no, width='+w2+', height='+h2);" & vbCRLF Response.Write "}" & vbCRLF Response.Write "// -->" & vbCRLF Response.Write "</_Script>" & vbCRLF Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tablelinemain"">" & vbCRLF Response.Write " <td width=""120"" align=""center"">" & GetTranslation("LANG_DATA_INS") & "</td>" & vbCRLF Response.Write " <td width=""120"" align=""center"">" & GetTranslation("LANG_AUTHOR") & "</td>" & vbCRLF Response.Write " <td width=""50"" align=""center"">" & GetTranslation("LANG_ANN_PHOTO") & "</td>" & vbCRLF Response.Write " <td align=""left"">" & GetTranslation("LANG_DESCRIPTION") & "</td>" & vbCRLF Response.Write " <td width=""120"" align=""left"">" & GetTranslation("LANG_MORE_INFO") & "</td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF Response.Write " <td width=""120"" align=""center"" valign=""middle"">"&StringToDate(oRs("datainserimento"))&"</td>" & vbCRLF Response.Write " <td width=""120"" align=""center"" valign=""middle"">" & vbCRLF If oRs("isMessage") And sPseudo <> "" Then Response.Write " <a href=""Java_Script:openUp('PrivateMessage','" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "merc_message.asp?do=new&to=" & oRs("login") & "&title=" & IIf(oRs("tipo")=0,trim(uCase(GetTranslation("LANG_TYPE_SELL"))),trim(uCase(GetTranslation("LANG_TYPE_BUY")))) & " - " & oRs("titolo") & "', 420, 320);"" title=""" & GetTranslation("LANG_SEND_PRIVATE_MESSAGE") & """>" & oRs("login") & "</a></td>" & vbCRLF Else Response.Write " " & oRs("login") & "</td>" & vbCRLF End If Response.Write " <td width=""50"" align=""center"" valign=""middle"">" & IIf(oRs("immagine")<>"","SI ","NO ") & "</td>" & vbCRLF Response.Write " <td align=""left"" valign=""top"">" & CodeMessageEx(oRs("testo"),55,False,False) & "</td>" & vbCRLF Response.Write " <td width=""120"" align=""left"" valign=""top"" width=""200""><a href="""&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp?do=item&id=" & cStr(oRs("id")) & """ title=""" & GetTranslation("LANG_READ_ANN") & """>" & GetTranslation("LANG_READ_ANN") & "</a>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF iLine = ((iLine-1) Xor 1) + 1 Response.Write "</table>" & vbCRLF CreateBottomTable "" oRs.MoveNext End If Next oRs.Close Set oRs = Nothing oCn.Close Set oCn = Nothing CreateTopTable "AnnunciPage", GetTranslation("LANG_PAGES_ANN") Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td colspan=""5"" align=""left"">" & GetTranslation("LANG_PAGES") & "" & vbCRLF For page=1 To NumeroPagine If Trim(Replace(right(Request.ServerVariables("QUERY_STRING"),2),"=","")) = Trim(page) Then Response.Write "<a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=view&catID="&catId&""&isType&"&page=" & page & """>["& page &"]</a>" & vbCRLF Else Response.Write "<a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=view&catID="&catId&""&isType&"&page=" & page & """>"& page &"</a>" & vbCRLF End If Next Response.Write " </td>" & vbCRLF Response.Write " <td colspan=""2"" align=""right""><a href="""&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp"" title=""" & GetTranslation("LANG_BACK_CAT") & """>" & GetTranslation("LANG_BACK_CAT") & "</a></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</table>" & vbCRLF CreateBottomTable "" End Sub Sub DisplaySearchMercatino(parola, categoria, tipo) Dim oCn, oRs, rSQL Dim iLoop, pag, iLine, page Dim catID, parcor parcor = Replace(parola,"'","''") If categoria = "all" Then rSQL = "SELECT * FROM me_annuncio WHERE (titolo like '%"&parcor&"%' OR testo like '%"&parcor&"%' OR nota like '%"&parcor&"%') AND valido=1" If tipo<>2 Then rSQL = rSQL & " AND tipo="&tipo&"" End If Else rSQL = "SELECT * FROM me_annuncio WHERE (titolo like '%"&parcor&"%' OR testo like '%"&parcor&"%' OR nota like '%"&parcor&"%') AND catID="&categoria&" AND valido=1" If tipo<>2 Then rSQL = rSQL & " AND tipo="&tipo&"" End If End If Set oCn = DBConnexion(DB_MERCATINO) Set oRs = DBPageRecordSet(oCn, rSQL, RecordsPerPagina) If Not oRs.EOF Then If page = "" Then page = 1 End If catID = categoria iLine = 1 iLoop = 0 While Not (oRs.EOF Or iLoop = oRs.pagesize) CreateTopTable "AnnunciTop", "" & oRs("titolo") & "" Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tablelinemain"">" & vbCRLF Response.Write " <td width=""120"" align=""center"">" & GetTranslation("LANG_DATA_INS") & "</td>" & vbCRLF Response.Write " <td width=""120"" align=""center"">" & GetTranslation("LANG_AUTHOR") & "</td>" & vbCRLF Response.Write " <td width=""50"" align=""center"">" & GetTranslation("LANG_ANN_PHOTO") & "</td>" & vbCRLF Response.Write " <td align=""left"">" & GetTranslation("LANG_DESCRIPTION") & "</td>" & vbCRLF Response.Write " <td width=""120"" align=""left"">" & GetTranslation("LANG_MORE_INFO") & "</td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF Response.Write " <td width=""120"" align=""center"" valign=""middle"">" & StringToDate(oRs("datainserimento")) & "</td>" & vbCRLF Response.Write " <td width=""120"" align=""center"" valign=""middle"">" & oRs("login") & "</td>" & vbCRLF Response.Write " <td width=""50"" align=""center"" valign=""middle"">" & IIf(oRs("immagine")<>"","SI","NO") & "</td>" & vbCRLF Response.Write " <td align=""left"" valign=""top"">" & CodeMessageEx(oRs("testo"),55, False,False) & "</td>" & vbCRLF Response.Write " <td width=""120"" align=""left"" valign=""top"" width=""200""><a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=item&id=" & CStr(oRs("id")) & """ title=""" & GetTranslation("LANG_READ_ANN") & """>" & GetTranslation("LANG_READ_ANN") & "</a>" & vbCRLF If sPseudo = oRs("login") Or IsAuthorizedBin(ROLE_ADMINISTRATOR) Then Response.Write " - " & vbCRLF Response.Write " <a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?action=delete&id=" & CStr(oRs("id")) & """ onclick=""Java_Script:return confcanc()"" title=""" & GetTranslation("LANG_DELETE") & """>" & GetTranslation("LANG_DELETE") & "</a></_div>" & vbCRLF Else Response.Write " " & vbCRLF End If Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF iLine = ((iLine-1) Xor 1) + 1 Response.Write "</table>" & vbCRLF CreateBottomTable "" oRs.MoveNext iLoop = iLoop + 1 Wend CreateTopTable "AnnunciPagine", GetTranslation("LANG_PAGES_ANN") Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td colspan=""3"" align=""left"">Pagine:" & vbCRLF For pag=1 To iTotalPage If Trim(Replace(right(Request.ServerVariables("QUERY_STRING"),2),"=","")) = Trim(pag) Then Response.Write "<a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=search&parola=" & parola & "&categoria=" & catId & "&tipo=" & tipo & "&page=" & pag & """>["& pag &"]</a>" & vbCRLF Else Response.Write "<a href=""" & GLOBAL_SITE_URL & GLOBAL_SITE_PATH & "mercatino.asp?do=search&parola=" & parola & "&categoria=" & catId & "&tipo=" & tipo & "&page=" & pag & """>"& pag &"</a>" & vbCRLF End If Next Response.Write " </td>" & vbCRLF Response.Write " <td colspan=""2"" align=""right""><a href="""&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp"" title=""" & GetTranslation("LANG_BACK_CAT") & """>" & GetTranslation("LANG_BACK_CAT") & "</a></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</table>" & vbCRLF CreateBottomTable "" Else CreateTable "Niente", "", GetTranslation("LANG_NO_SEARCH"), "" DisplayCategorieMercatino End If oRs.Close Set oRs = Nothing oCn.Close Set oCn = Nothing End Sub Sub SearchMercatino() Dim oCn, oRs, rSQL Set oCn = DBConnexion(DB_MERCATINO) rSQL = "SELECT id,categoria FROM me_categoria" Set oRs = DBRecordSet(oCn, rSQL) Response.Write " <_Script language=""Java_Script"">" & vbCRLF Response.Write " function formSubmit()" & vbCRLF Response.Write " {" & vbCRLF Response.Write " var ok = true;" & vbCRLF Response.Write " var texte = '" & GetTranslation("LANG_MUST_FILL") & "';" & vbCRLF Response.Write " if (document.SearchMercatino.parola.value == '') " & vbCRLF Response.Write " {" & vbCRLF Response.Write " ok = false;" & vbCRLF Response.Write " texte = texte + ' - " & GetTranslation("LANG_SEARCH_WORDS") & "';" & vbCRLF Response.Write " }" & vbCRLF Response.Write " if (document.SearchMercatino.categoria.value == 0)" & vbCRLF Response.Write " {" & vbCRLF Response.Write " ok = false;" & vbCRLF Response.Write " texte = texte + ' - " & GetTranslation("LANG_SEARCH_CAT") & "';" & vbCRLF Response.Write " }" & vbCRLF Response.Write " if (ok)" & vbCRLF Response.Write " {" & vbCRLF Response.Write " document.SearchMercatino.submit();" & vbCRLF Response.Write " }" & vbCRLF Response.Write " else" & vbCRLF Response.Write " {" & vbCRLF Response.Write " ok = false;" & vbCRLF Response.Write " alert(texte);" & vbCRLF Response.Write " }" & vbCRLF Response.Write " }" & vbCRLF Response.Write " </_Script>" & vbCRLF CreateTopTable "SearchMarket", GetTranslation("LANG_SEARCH_MARKET") Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write "<_form name=""SearchMercatino"" method=""post"" action=""" & sUrlPage & """>" & vbCRLF Response.Write " <input type=""hidden"" name=""do"" value=""search"">" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td width=""50"" align=""center"">" & GetTranslation("LANG_SEARCH") & "</td>" & vbCRLF Response.Write " <td width=""150"" align=""center""><input name=""parola"" value="""" class=""cell"" size=""18"" maxlength=""30""></td>" & vbCRLF Response.Write " <td width=""50"" align=""center"">" & GetTranslation("LANG_SEARCH_IN") & "</td>" & vbCRLF Response.Write " <td width=""170"">" & vbCRLF Response.Write " <select name=""categoria"" class=""cell"">" & vbCRLF Response.Write " <option value=""0"">" & GetTranslation("LANG_SELECT_CATEGORY") & "</option>" & vbCRLF Response.Write " <option value=""0"">---------------------------------</option>" & vbCRLF Response.Write " <option value=""all"">" & GetTranslation("LANG_SELECT_ALL") & "</option>" & vbCRLF Response.Write " <option value=""0"">---------------------------------</option>" & vbCRLF While Not oRs.EOF Response.Write " <option value=""" & cStr(oRs("id")) & """>"&oRs("categoria")&"</option>" & vbCRLF oRs.MoveNext Wend Response.Write " </select>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " <td width=""70"" align=""center"">" & GetTranslation("LANG_TYPES") & "</td>" & vbCRLF Response.Write " <td width=""100"">" & vbCRLF Response.Write " <select name=""tipo"" class=""cell"">" & vbCRLF Response.Write " <option value=""2"" selected>" & GetTranslation("LANG_ALL") & "</option>" & vbCRLF Response.Write " <option value=""0"">" & GetTranslation("LANG_TYPE_SELL") & "</option>" & vbCRLF Response.Write " <option value=""1"">" & GetTranslation("LANG_TYPE_BUY") & "</option>" & vbCRLF Response.Write " </select>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " <td colspan=""2""><input name=""valider"" type=""button"" value=""" & GetTranslation("LANG_SUBMIT") & """ onClick=""Java_Script:formSubmit();"" class=""button""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</_form>" & vbCRLF Response.Write "</table>" & vbCRLF Createbottomtable "" oRs.Close Set oRs = Nothing oCn.Close Set oCn = Nothing End Sub Sub InsertAnnuncioMercatino(catID) Dim oCn, oRs, rSQL Set oCn = DBConnexion(DB_MERCATINO) rSQL = "SELECT categoria FROM me_categoria WHERE id=" & catID Set oRs = DBRecordSet(oCn, rSQL) Response.Write "<_Script language=""Java_Script"">" & vbCRLF Response.Write "function winOpen(url)" & vbCRLF Response.Write "{" & vbCRLF Response.Write " newWindow = window.open(url, '', 'menubar=no, scrollbars=no, status=no, resizable=no, location=no, status=0, toolbar=no, directories=no, width=420, height=320');" & vbCRLF Response.Write "}" & vbCRLF Response.Write "</_Script>" & vbCRLF Response.Write " <_Script language=""Java_Script"">" & vbCRLF Response.Write " function uploadPicture(elem)" & vbCRLF Response.Write " {" & vbCRLF Response.Write " if (elem != '')" Response.Write " {" & vbCRLF Response.Write " window.open('" & GLOBAL_SITE_PATH & "uploadimg.asp?item=' + elem, 'Picture', 'width=500,height=100,menubar=no,resizable=no');" & vbCRLF Response.Write " }" & vbCRLF Response.Write " }" & vbCRLF Response.Write " function openPicture()" & vbCRLF Response.Write " {" & vbCRLF Response.Write " var sMyPicture = document.Adder.immagine.value;" & vbCRLF Response.Write " if (sMyPicture != '')" Response.Write " {" & vbCRLF Response.Write " window.open('" & GLOBAL_SITE_PATH & GLOBAL_SITE_VIEW_IMAGE_PAGE & "?img=' + sMyPicture, 'Picture', 'width=500,height=100,menubar=no,resizable=yes');" & vbCRLF Response.Write " }" & vbCRLF Response.Write " }" & vbCRLF Response.Write " function ParolaSubmit()" & vbCRLF Response.Write " {" & vbCRLF Response.Write " var ok = true;" & vbCRLF Response.Write " var texte = '" & GetTranslation("LANG_MUST_FILL") & "';" & vbCRLF Response.Write " if (document.Adder.titolo.value == '')" & vbCRLF Response.Write " {" & vbCRLF Response.Write " ok = false;" & vbCRLF Response.Write " texte = texte + ' - " & GetTranslation("LANG_TITLE_ANN") & "';" & vbCRLF Response.Write " }" & vbCRLF Response.Write " if (document.Adder.testo.value == '')" & vbCRLF Response.Write " {" & vbCRLF Response.Write " ok = false;" & vbCRLF Response.Write " texte = texte + ' - " & GetTranslation("LANG_TEXT_ANN") & "';" & vbCRLF Response.Write " }" & vbCRLF Response.Write " if (document.Adder.nome.value == '')" & vbCRLF Response.Write " {" & vbCRLF Response.Write " ok = false;" & vbCRLF Response.Write " texte = texte + ' - " & GetTranslation("LANG_YOUR_NAME") & "';" & vbCRLF Response.Write " }" & vbCRLF Response.Write " if (ok)" & vbCRLF Response.Write " {" & vbCRLF Response.Write " document.Adder.submit();" & vbCRLF Response.Write " }" & vbCRLF Response.Write " else" & vbCRLF Response.Write " {" & vbCRLF Response.Write " alert(texte);" & vbCRLF Response.Write " }" & vbCRLF Response.Write " }" & vbCRLF Response.Write " </_Script>" & vbCRLF CreateTopTable "Warning", GetTranslation("LANG_WARNING") Response.Write "" & GetTranslation("LANG_WARNING_TEXT") & "" & vbCRLF CreateBottomTable "" CreateTopTable "SearchAnnunci", "" & GetTranslation("LANG_INSERT_ANN") & " """ & UCase(oRs("categoria").Value) & """" Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write "<_form name=""Adder"" method=""post"" action=""" & sUrlPage & """>" & vbCRLF Response.Write " <input type=""hidden"" name=""Action"" value=""add"">" & vbCRLF Response.Write " <input type=""hidden"" name=""catID"" value=""" & catID & """>" & vbCRLF Response.Write " <input type=""hidden"" name=""login"" value=""" & sPseudo & """>" & vbCRLF Response.Write " <tr class=""tablelinemain"">" & vbCRLF Response.Write " <td width=""28%"">" & GetTranslation("LANG_FIELD") & "</td>" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_VALUE") & "</td>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_DATA_INS") & ":</td>" & vbCRLF Response.Write " <td><input type=""hidden"" name=""datainserimento"" value="""&Now()&""">"&Now()&"</td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline2"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_TYPE_ANN") & "</td>" & vbCRLF Response.Write " <td>" & vbCRLF Response.Write " <select name=""tipo"" class=""cell"">" & vbCRLF Response.Write " <option value=""0"">" & GetTranslation("LANG_TYPE_SELL") & "</option>" & vbCRLF Response.Write " <option value=""1"">" & GetTranslation("LANG_TYPE_BUY") & "</option>" & vbCRLF Response.Write " </select>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_TITLE_ANN") & "</td>" & vbCRLF Response.Write " <td><input name=""titolo"" maxlength=""100"" size=""50"" class=""cell""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline2"">" & vbCRLF Response.Write " <td> </td>" & vbCRLF Response.Write " <td>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline2"">" & vbCRLF Response.Write " <td valign=""top"">" & GetTranslation("LANG_TEXT_ANN") & "</td>" & vbCRLF Response.Write " <td><textarea name=""testo"" cols=""50"" rows=""4"" class=""cell""></textarea></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td> </td>" & vbCRLF Response.Write " <td>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td valign=""top"">" & GetTranslation("LANG_NOTES") & "</td>" & vbCRLF Response.Write " <td><textarea name=""note"" cols=""50"" rows=""4"" class=""cell""></textarea></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline2"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_IMAGE_INS") & "</td>" & vbCRLF Response.Write " <td>" & vbCRLF Response.Write " <input name=""immagine"" class=""cell"" id=""immagine"" maxlength=""200"" size=""50"">" & vbCRLF Response.Write " <a href=""Java_Script:openPicture()"" title=""" & GetTranslation("LANG_PREVIEW") & " " & GetTranslation("LANG_IMAGE") & """><img src=""" & GLOBAL_SITE_URL & GLOBAL_SITE_IMAGES_PATH & "view.gif"" border=""0""></a>" & vbCRLF Response.Write " <a href=""Java_Script:uploadPicture('document.Adder.immagine')""><img src=""" & GLOBAL_SITE_IMAGES_PATH & "edit.gif"" border=""0""></a>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_YOUR_NAME") & "</td>" & vbCRLF Response.Write " <td><input name=""nome"" maxlength=""100"" size=""50"" class=""cell""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline2"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_YOUR_EMAIL") & "</td>" & vbCRLF Response.Write " <td><input name=""email"" maxlength=""100"" size=""50"" class=""cell""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_YOUR_PHONE") & "</td>" & vbCRLF Response.Write " <td><input name=""telefono"" maxlength=""100"" size=""50"" class=""cell""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline2"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_YOUR_CITY") & "</td>" & vbCRLF Response.Write " <td><input name=""citta"" maxlength=""100"" size=""50"" class=""cell""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_PMESSAGE") & "</td>" & vbCRLF Response.Write " <td><input type=""checkbox"" name=""isMessage""></td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tableline2"">" & vbCRLF Response.Write " <td>" & GetTranslation("LANG_YOUR_NICKNAME") & "</td>" & vbCRLF Response.Write " <td>" & sPseudo & "</td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write " <tr class=""tablelinemain"">" & vbCRLF Response.Write " <td valign=""top"" colspan=""2"" align=""right"">" & vbCRLF Response.Write " <input type=""button"" value=""" & GetTranslation("LANG_ADD") & " " & GetTranslation("LANG_ANNOUNCE") & """ onClick=""Java_Script:ParolaSubmit();"" class=""button"">" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</_form>" & vbCRLF Response.Write "</table>" & vbCRLF CreateBottomTable "" oRs.Close Set oRs = Nothing oCn.Close Set oCn = Nothing End Sub Sub DisplayInsArticolo() CreateTable "Insert","", GetTranslation("LANG_NOTES2"), "" DisplayCategorieMercatino End Sub Function GoInsertAnnuncioMercatino(catID, datainserimento, tipo, titolo, testo, nota, immagine, isMessage, nome, email, telefono, citta, login) Dim oCn, rSQL Set oCn = DBConnexion(DB_MERCATINO) rSQL = "INSERT INTO me_annuncio (catID, datainserimento, tipo, titolo, testo, nota, immagine, isMessage, nome, email, telefono, citta, login) values (" & NormNumber(catID) & ",'" & sqlencrypt(datainserimento) & "'," & NormNumber(tipo) & ",'" & sqlencrypt(titolo) & "','" & sqlencrypt(testo) & "','" & sqlencrypt(nota) & "','" & sqlencrypt(immagine) & "'," & isMessage & ",'" & sqlencrypt(nome) & "','" & sqlencrypt(email) & "','" & sqlencrypt(telefono) & "','" & sqlencrypt(citta) & "','" & sqlencrypt(login) & "')" DBExecute oCn, rSQL oCn.Close Set oCn = Nothing ReleaseObjects Response.redirect ("mercatino.asp?do=insart") End Function Function GoDeleteAnnuncioMercatino(id) Dim oCn, rSQL, image, oRs, NomeFileDel, oFS Set oCn = DBConnexion(DB_MERCATINO) rSQL = "SELECT immagine from me_annuncio WHERE id=" & id Set oRs = DBRecordSet(oCn, rSQL) If Not oRs.Eof Then image = "" & oRs(0) End If oRs.Close Set oRs = Nothing If image <> "" Then If left(image, len(GLOBAL_SITE_URL & GLOBAL_SITE_PATH)) = GLOBAL_SITE_URL & GLOBAL_SITE_PATH Then image = mid(image, len(GLOBAL_SITE_URL) + 1) NomeFileDel = server.mappath(image) Set oFS = CreateObject("Scripting.FileSystemObject") If oFS.fileexists(NomeFileDel) Then On Error Resume Next oFS.DeleteFile NomeFileDel On Error GoTo 0 End If Set oFS = Nothing End If End If rSQL = "DELETE from me_annuncio WHERE id=" & id DBExecute oCn, rSQL oCn.Close Set oCn = Nothing GoDeleteAnnuncioMercatino = True End Function Sub DoActionMercatino() Dim isMessage Dim catIDtemp, oCnadd, oFS, fileold, filenew, rSQLadd, oRsadd, numero, ext, NomeFile, NomeFileOld, NomeFileDef, OrigFile, formula, risultato If request("isMessage") = "" Then isMessage = "0" Else isMessage = "1" End If Select Case Request("Action") Case "add" catIDtemp = Request("catID") NomeFileDef = Request("immagine") GoInsertAnnuncioMercatino Request("catID"), DateTimeToString(Request("datainserimento")), Request("tipo"), Request("titolo"), Request("testo"), Request("note"), NomeFileDef, isMessage, Request("nome"), Request("email"), Request("telefono"), Request("citta"), Request("login") Case "delete" GoDeleteAnnuncioMercatino NormNumber(Request("id")) End Select End Sub Sub DisplayMercatino() Select Case Request("do") Case "insart" SearchMercatino DisplayInsArticolo Case "view" SearchMercatino ViewAnnuncioMercatino Request("catID"), Request("page"), Request("where") Case "new" If sPseudo <> "" Then InsertAnnuncioMercatino Request("catID") Else DisplayAlertNotRegistrato SearchMercatino DisplayCategorieMercatino End If Case "search" SearchMercatino DisplaySearchMercatino Request("parola"), Request("categoria"), Request("tipo") Case "item" SearchMercatino ZoomAnnuncioMercatino Request("id") Case Else SearchMercatino DisplayCategorieMercatino End Select End Sub %>
---------------http://www.noichiesa.com
Tony_B
Avanzato
166 Discussioni
11 febbraio 2007 alle 16:53:54
a me il problema rimane ! proprio come il tuo ! prima che risolvessi ! ho provato il tuo marcatino-inc.asp ma non risolvo il problema e ricevo questo errore: Microsoft VB Script compilation error '800a0409' Unterminated string constant /includes/mercatino-inc.asp, line 420 Response.Write " texte = texte + ' ----------------------------------^ HELP !!
---------------http://www.www.tonybellardi.com
djveleno
Amministratore
Esperto
1025 Discussioni
11 febbraio 2007 alle 19:12:05
Quello è un tuo errore di copia e incolla.
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!http://aspnuke208.somee.com/Default.asp
Sostieni AspNuke
Un piccolo gesto per aiutarci a mantenere AspNuke.it online
Promo
MusicWebItalia.it Video Testi Traduzioni Spot Colonne sonore Accordi e Spartiti gratis.
Visitatori
Visitatori Correnti : 70
Membri : 0
Anna
Iscritti
Utenti: 18940
Ultimo iscritto :
glauco
Lista iscritti
Messaggi privati: 3373
Immagini: 39
Downloads: 144
Articoli: 49
Pagine: 101
Siti web: 425
Notizie: 180
Sondaggi: 11
Preferiti: 217190
Post sui forum: 51195
Libro degli ospiti: 4
Eventi: 7