<%@LANGUAGE="VBSCRIPT"%> <!--#include file="Connections/torreggiani.asp" --> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Insert Record: set variables If (CStr(Request("MM_insert")) = "form1") Then MM_editConnection = MM_torreggiani_STRING MM_editTable = "poll" MM_editRedirectUrl = "default.asp" MM_fieldsStr = "poll|value" MM_columnsStr = "valori|',none,''" ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Insert Record: construct a sql insert statement and execute it Dim MM_tableValues Dim MM_dbValues If (CStr(Request("MM_insert")) <> "") Then ' create the sql insert statement MM_tableValues = "" MM_dbValues = "" For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),",") MM_delim = MM_typeArray(0) If (MM_delim = "none") Then MM_delim = "" MM_altVal = MM_typeArray(1) If (MM_altVal = "none") Then MM_altVal = "" MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = "none") Then MM_emptyVal = "" If (MM_formVal = "") Then MM_formVal = MM_emptyVal Else If (MM_altVal <> "") Then MM_formVal = MM_altVal ElseIf (MM_delim = "'") Then ' escape quotes MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'" Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_tableValues = MM_tableValues & "," MM_dbValues = MM_dbValues & "," End If MM_tableValues = MM_tableValues & MM_columns(MM_i) MM_dbValues = MM_dbValues & MM_formVal Next MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" If (Not MM_abortEdit) Then ' execute the insert Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim news__MMColParam news__MMColParam = "%" If (Request.QueryString("sezione") <> "") Then news__MMColParam = Request.QueryString("sezione") End If %> <% Dim news__MMColParam2 news__MMColParam2 = "%" If (Request.QueryString("id") <> "") Then news__MMColParam2 = Request.QueryString("id") End If %> <% Dim news__Vartitolo news__Vartitolo = "%" If (Request.QueryString("titolo") <> "") Then news__Vartitolo = Request.QueryString("titolo") End If %> <% Dim news Dim news_numRows Set news = Server.CreateObject("ADODB.Recordset") news.ActiveConnection = MM_torreggiani_STRING news.Source = "SELECT ID, titolo, messaggio, foto, css01, sezione, sottosezione, data FROM news WHERE sezione like '" + Replace(news__MMColParam, "'", "''") + "' and id like '" + Replace(news__MMColParam2, "'", "''") + "' and titolo like '%" + Replace(news__Vartitolo, "'", "''") + "%' ORDER BY ID DESC" news.CursorType = 0 news.CursorLocation = 2 news.LockType = 1 news.Open() news_numRows = 0 %> <% Dim intervista__MMColParam intervista__MMColParam = "l'intervista" If (Request("MM_EmptyValue") <> "") Then intervista__MMColParam = Request("MM_EmptyValue") End If %> <% Dim intervista__MMColParam5 intervista__MMColParam5 = "news" If (Request.QueryString("sezione") <> "") Then intervista__MMColParam5 = Request.QueryString("sezione") End If %> <% Dim intervista Dim intervista_numRows Set intervista = Server.CreateObject("ADODB.Recordset") intervista.ActiveConnection = MM_torreggiani_STRING intervista.Source = "SELECT ID, titolo, messaggio, css01, sezione, sottosezione FROM news WHERE sottosezione = '" + Replace(intervista__MMColParam, "'", "''") + "' and sezione = '" + Replace(intervista__MMColParam5, "'", "''") + "' ORDER BY ID DESC" intervista.CursorType = 0 intervista.CursorLocation = 2 intervista.LockType = 1 intervista.Open() intervista_numRows = 0 %> <% Dim archivio__MMColParam archivio__MMColParam = "news" If (Request.QueryString("sezione") <> "") Then archivio__MMColParam = Request.QueryString("sezione") End If %> <% Dim archivio__MMColParam2 archivio__MMColParam2 = "l'intervista" If (Request.QueryString("sottosezione") <> "") Then archivio__MMColParam2 = Request.QueryString("sottosezione") End If %> <% Dim archivio Dim archivio_numRows Set archivio = Server.CreateObject("ADODB.Recordset") archivio.ActiveConnection = MM_torreggiani_STRING archivio.Source = "SELECT ID, titolo, sezione, data FROM news WHERE sezione = '" + Replace(archivio__MMColParam, "'", "''") + "' and sottosezione <> '" + Replace(archivio__MMColParam2, "'", "''") + "' ORDER BY ID DESC" archivio.CursorType = 0 archivio.CursorLocation = 2 archivio.LockType = 1 archivio.Open() archivio_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 4 Repeat1__index = 0 news_numRows = news_numRows + Repeat1__numRows %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = 10 Repeat2__index = 0 archivio_numRows = archivio_numRows + Repeat2__numRows %> <html> <head> <title>:: Torreggiani.it :: Arte : Antiquariato : Artigianato : Arredo : Montefeltro ::<%= Request.QueryString("sezione") %> :: www.Torreggiani.it ::</title> <meta name="description" content="Author" "Rètina-om.com"> <meta name="description" content="WebDesign" "Rupoli Rodolfo"> <meta name="description" content="AsP" "Rupoli Rodolfo"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/g_torr.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //--> </script> <style type="text/css"> <!-- .txthomeMaiuscolo12 { font-family: Garamond, "Courier New", "Times New Roman", Tahoma; font-size: 12px; color: #000000; text-transform: uppercase; } --> </style> </head> <body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div align="center"> <!--#include file="testata.htm" --> <table width="760" height="3" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEEEDA"> <tr> <td class="spazi"> </td> </tr> </table> <table width="761" height="54" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="bottom"> <!--#include file="sotto_testata.htm" --> </td> </tr> </table> <table width="761" height="4" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEEEDA" class="spazi"> <tr> <td> </td> </tr> </table> <table width="761" height="7" border="0" cellpadding="0" cellspacing="0" class="spazi"> <tr> <td> </td> </tr> </table> <table width="760" border="0" cellpadding="0" cellspacing="0" class="txthome"> <tr> <td width="140" valign="top"> <!--#include file="menu_sx_up.htm" --> <table width="140" border="0" cellspacing="0" cellpadding="0"> <tr> <td><form action="http://www.google.com/search" method="get" name="google" target="_blank" id="google"> <table width="140" border="0" cellspacing="0" cellpadding="0"> <tr valign="middle"> <td height="20" colspan="2" class="txthome"> <input type=hidden name=hl value=it> Cerca con <strong><font color="#0041C6">G</font><font color="#D61C08">o</font><font color="#F7C710">o</font><font color="#0033CC">g</font><font color="#336600">l</font><font color="#D61C08">e</font></strong></td> </tr> <tr valign="middle"> <td width="106"> <div align="left"> <p align="left" class="txthome"> <input name="q" type="text" class="form01" id="q"> </p> </div></td> <td width="44"> <div align="center"> <input name="submit2" type="image" src="immagini/vai.gif" border="0"> </div></td> </tr> </table> </form></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="fregaturaFine"> </td> </tr> </table> <table width="140" border="0" cellspacing="0" cellpadding="0"> <tr> <td><form action="<%=MM_editAction%>" METHOD="POST" name="form1" onSubmit="MM_openBrWindow('risultati.asp','Risultati','width=300,height=200')"> <table width="140" border="0" cellpadding="0" cellspacing="0" bgcolor="f5f5f5"> <tr> <td height="18" colspan="2" class="txthomeMaiuscolo"><div align="center"><strong>sondaggio</strong></div></td> </tr> <tr> <td width="35"><div align="center"> <input name="poll" type="radio" value="01" checked> </div></td> <td width="115" class="txthome">Notizie</td> </tr> <tr> <td width="35"><div align="center"> <input type="radio" name="poll" value="02"> </div></td> <td width="115" class="txthome">Prodotti</td> </tr> <tr> <td width="35"><div align="center"> <input type="radio" name="poll" value="03"> </div></td> <td width="115" class="txthome">Curiosità</td> </tr> <tr> <td width="35"><div align="center"> <input type="radio" name="poll" value="04"> </div></td> <td width="115" class="txthome">Altro</td> </tr> <tr class="txthome"> <td height="22" colspan="2"> <div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="42%"><div align="center"> <input name="Submit" type="submit" class="form02" value="Vota"> </div></td> <td width="58%"><div align="center"><a href="#" class="txthome" onClick="MM_openBrWindow('risultati.asp','Risultati','width=300,height=200')">| Risultati |</a></div></td> </tr> </table> </div> <div align="center"></div></td> </tr> </table> <table width="140" height="5" border="0" cellpadding="0" cellspacing="0" class="fregaturaFine"> <tr> <td height="5" bgcolor="#f5f5f5"> </td> </tr> </table> <input type="hidden" name="MM_insert" value="form1"> </form></td> </tr> </table> <div align="left"> <!--#include file="colonna_sx.htm" --> </div></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td height="5"> <p> </p> <% While ((Repeat1__numRows <> 0) AND (NOT news.EOF)) %> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="3"> <tr> <td valign="top" class="txthomeTnews"> <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr> <td valign="top" class="txthomeMaiuscolo12"><strong>:: <%=(news.Fields.Item("data").Value)%>- <%=(news.Fields.Item("titolo").Value)%></strong></td> <td width="100" valign="top" class="txthomeMaiuscolo12"> <div align="right" class="txthomeMaiuscolo"><strong>[</strong><%=(news.Fields.Item("sezione").Value)%><strong>]</strong></div></td> </tr> <tr> <td height="3" colspan="2" class="<%=(news.Fields.Item("css01").Value)%>"> </td> </tr> </table> <div align="right"> </div></td> </tr> <tr> <td valign="top" class="txthome"><a href="immagine.asp?id=<%=(news.Fields.Item("ID").Value)%>" target="_blank"><<%=(news.Fields.Item("foto").Value)%>width=200 align=right border=0"></a><%=(news.Fields.Item("messaggio").Value)%> <div align="right"></div></td> </tr> <tr> <td valign="top" class="txthome"><div align="right"></div></td> </tr> </table> <br> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 news.MoveNext() Wend %><!--#include file="banner_info.htm" --> </td> </tr> </table> </td> <td width="220" valign="top"><!--#include file="sottosezioni.asp"--><table width="220" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#000000"> <td height="15" bgcolor="#FFFFFF" class="txthomeTitoli"> <div align="left" class="txthome"> <p class="txthomeMaiuscolo"><strong> <%if Request.QueryString("sezione") <> "" then%> <%= Request.QueryString("sezione") %> <%else%> news <%end if%> - L'INTERVISTA</strong></p> </div></td> </tr> <tr> <td class="txthome"> <table width="220" border="0" cellpadding="2" cellspacing="0"> <tr valign="top"> <td class="txthome"><div align="center"></div> <strong>"<%=(intervista.Fields.Item("titolo").Value)%>"</strong></td> </tr> </table> <table width="220" border="0" cellspacing="0" cellpadding="4"> <tr> <td height="5" class="txthome"><%=Left(intervista.Fields.Item("messaggio").Value,350)%> <a href="dettaglio_news.asp?id=<%=(intervista.Fields.Item("ID").Value)%>&sezione=<%if Request.QueryString("sezione") <> "" then%><%= Request.QueryString("sezione") %><%else%>News<%end if%>"><em>...continua</em></a></td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="fregaturaFine"> <tr> <%if Request.QueryString("sezione") = "" then%> <td bgcolor="#eeeeee"> </td> <%elseif Request.QueryString("sezione")= "Arte" then%> <td bgcolor="#aed2e8"> </td> <%elseif Request.QueryString("sezione")= "Cultura" then%> <td bgcolor="#bbcfa7"> </td> <%elseif Request.QueryString("sezione")= "Moda" then%> <td bgcolor="#cccc99"> </td> <%else%> <td bgcolor="#eeeeee"> </td> <%end if%> </tr> </table></td> </tr> </table> <table width="220" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#000000"> <td height="15" bgcolor="#FFFFFF" class="txthomeTitoli"> <div align="left" class="txthome"> <p class="txthomeMaiuscolo"><strong> <br> NEWS ARCHIVIO : <%if Request.QueryString("sezione") <> "" then%> <%= Request.QueryString("sezione") %> <%else%> news <%end if%></strong></p> </div></td> </tr> <tr> <td class="txthome"><% While ((Repeat2__numRows <> 0) AND (NOT archivio.EOF)) %> <table width="220" height="16" border="0" cellpadding="3" cellspacing="0"> <tr> <td width="10" valign="top" class="txthome"> <div align="center"><strong>::</strong></div></td> <td class="txthome"><span class="date"><%=(archivio.Fields.Item("data").Value)%></span> -<span class="txthomeMin"><a href="dettaglio_news.asp?id=<%=(archivio.Fields.Item("ID").Value)%>&sezione=<%if Request.QueryString("sezione") <> "" then%><%= Request.QueryString("sezione") %><%else%>News<%end if%>"><%=Left(archivio.Fields.Item("titolo").Value,20)%>...</a></span></td> </tr> </table> <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 archivio.MoveNext() Wend %> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="fregaturaFine"> <tr> <%if Request.QueryString("sezione") = "" then%> <td bgcolor="#eeeeee"> </td> <%elseif Request.QueryString("sezione")= "Arte" then%> <td bgcolor="#aed2e8"> </td> <%elseif Request.QueryString("sezione")= "Cultura" then%> <td bgcolor="#bbcfa7"> </td> <%elseif Request.QueryString("sezione")= "Moda" then%> <td bgcolor="#cccc99"> </td> <%else%> <td bgcolor="#eeeeee"> </td> <%end if%> </tr> </table> </td> </tr> </table> <!--#include file="menu_dx_down.htm" --> </td> </tr> </table> </div> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="txthome"><div align="left"> All rights Reserved Torreggiani.it @2003 </div></td> </tr> <tr> <td height="4" bgcolor="#eeeeda" class="fregaturaFine"> </td> </tr> </table> </body> </html> <% news.Close() Set news = Nothing %> <% intervista.Close() Set intervista = Nothing %> <% archivio.Close() Set archivio = Nothing %>