(segue da mio messaggio precedente)

===========================
serate_aggiungi_foto.asp
===========================

codice:




<%
If Request.QueryString("chiudi") = "si" then
%>
<SCRIPT Language="JavaScript">
 window.opener.document.location.reload(); 
 parent.close();
</SCRIPT>
<%
End if
%>

<%
If session("IDserata") <> "" then

Dim RSidserata__MMColParam
RSidserata__MMColParam = "1"
If (Session("IDserata") <> "") Then 
  RSidserata__MMColParam = Session("IDserata")
End If

Dim RSidserata
Dim RSidserata_numRows

Set RSidserata = Server.CreateObject("ADODB.Recordset")
RSidserata.ActiveConnection = MM_MM_sito_conn_STRING_STRING
RSidserata.Source = "SELECT titoloevento FROM serate WHERE IDserata = " + Replace(RSidserata__MMColParam, "'", "''") + ""
RSidserata.CursorType = 0
RSidserata.CursorLocation = 2
RSidserata.LockType = 1
RSidserata.Open()

RSidserata_numRows = 0

End if

%>

<%'=(RSidserata.Fields.Item("rif").Value)%>

<%

ssIDserata = session("IDserata")

Dim RSpreview__MMColParam
RSpreview__MMColParam = "1"
If ssIDserata <> "" then

variabilona = RSidserata.Fields.Item("titoloevento").Value

Else

variabilona = Request.Form("titoloevento")

End if

  RSpreview__MMColParam = variabilona

%>

<%
Dim RSpreview
Dim RSpreview_numRows

Set RSpreview = Server.CreateObject("ADODB.Recordset")
RSpreview.ActiveConnection = MM_MM_sito_conn_STRING_STRING
RSpreview.Source = "SELECT * FROM serate WHERE titoloevento = '" + Replace(RSpreview__MMColParam, "'", "''") + "'"
RSpreview.CursorType = 0
RSpreview.CursorLocation = 2
RSpreview.LockType = 1
RSpreview.Open()

RSpreview_numRows = 0
%>

<%
Dim RSfoto__MMColParam
RSfoto__MMColParam = "1"
If (RSpreview.Fields.Item("IDserata").Value <> "") Then 
  RSfoto__MMColParam = RSpreview.Fields.Item("IDserata").Value
End If
%>

<%
Dim RSfoto
Dim RSfoto_numRows

Set RSfoto = Server.CreateObject("ADODB.Recordset")
RSfoto.ActiveConnection = MM_MM_sito_conn_STRING_STRING
RSfoto.Source = "SELECT * FROM foto WHERE IDserata = '" + Replace(RSfoto__MMColParam, "'", "''") + "'"
RSfoto.CursorType = 0
RSfoto.CursorLocation = 2
RSfoto.LockType = 1
RSfoto.Open()

RSfoto_numRows = 0
%>

<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
RSpreview_numRows = RSpreview_numRows + Repeat1__numRows
%>

<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = -1
Repeat2__index = 0
RSfoto_numRows = RSfoto_numRows + Repeat2__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>DETTAGLI SERATA INSERITA</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<SCRIPT Language="JavaScript">
function visualizzafoto(file2)
{
//window.location.reload();
searchWin2 = window.open(file2,'mostra_comunicazioni','scrollbars=yes,resizable=no,width=500,height=200,top=5,left=0,status=yes,location=no,toolbar=no');
}
</SCRIPT>

<SCRIPT Language="JavaScript">
function visualizzaallegato(file)
{
//window.location.reload();
searchWin = window.open(file,'mostra_comunicazioni','scrollbars=yes,resizable=no,width=500,height=200,top=5,left=0,status=yes,location=no,toolbar=no');
}
</SCRIPT>

<SCRIPT Language="JavaScript">
function chiudiaggiorna
{
 window.opener.document.location.reload(); 
 parent.close();
}
</SCRIPT>

<link href="sito.css" rel="stylesheet" type="text/css">

</head>

<body>

<% If Request.QueryString("finestra") = "risultati" Then %>

<% Else %>

<div align="right">Torna al menu principale</div>

<% End if %>

<% 'Response.write(RSidserata.Fields.Item("rif").Value)%>

<font class="testo1grassetto">DETTAGLI SERATA INSERITA</font>



<table border="0" cellpadding="0" cellspacing="0" class="testo1">
  <tr>	
    <td valign="top" width="120"><font class="testo1grassetto">Titolo evento</font></td>
	<td valign="top"><%=(RSpreview.Fields.Item("titoloevento").Value)%></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#B6DBEE">[img]images/spacer.gif[/img]</td>
  </tr>
  <tr>
    <td valign="top"><font class="testo1grassetto">Data serata</font></td>
	<td valign="top"><%=(RSpreview.Fields.Item("dataserata").Value)%></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#B6DBEE">[img]images/spacer.gif[/img]</td>
  </tr>
  <tr>
    <td valign="top"><font class="testo1grassetto">Ora serata</font></td>
	<td valign="top"><%=(RSpreview.Fields.Item("oraserata").Value)%></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#B6DBEE">[img]images/spacer.gif[/img]</td>
  </tr>
  <tr>
    <td valign="top"><font class="testo1grassetto">Luogo</font></td>
	<td valign="top"><%=(RSpreview.Fields.Item("luogo").Value)%></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#B6DBEE">[img]images/spacer.gif[/img]</td>
  </tr>
  <tr>
    <td valign="top"><font class="testo1grassetto">Resoconto</font></td>
	<td valign="top"><%=(RSpreview.Fields.Item("resoconto").Value)%></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#B6DBEE">[img]images/spacer.gif[/img]</td>
  </tr>
</table>




" target="_blank">Aggiorna i dati sopra riportati





<table border="1" cellspacing="0" cellpadding="5" width="500">
  <tr>
    <td>

Inserisci fotografia



	<table border="0" cellspacing="0" class="testo1">
	
	<% If RSfoto.EOF = 0 then %>
	
	  <tr>
	    <td colspan="5">
		<font class="testo1grassetto">Fotografie già inserite</font>


		</td>
	  </tr>
	  
	<% end if %>
	  
	<% While ((Repeat1__numRows <> 0) AND (NOT RSfoto.EOF)) %>
	
	  <tr valign="middle">
	    <td>
		" target="_blank">[img]/public/sito/foto/<%=(RSfoto.Fields.Item([/img]" border="0" width="80" alt="<%=(RSfoto.Fields.Item("filename_p").Value)%>">
	    </td>
		<td width=4></td>
	    <td>
		<%=(RSfoto.Fields.Item("filename_p").Value)%>
	    </td>
		<td width=4></td>
		<td>
		&IDfoto=<%=(RSfoto.Fields.Item("IDfoto").Value)%>">Cancella
		</td>
	  </tr>
	
	<% 
    Repeat2__index=Repeat2__index+1
    Repeat2__numRows=Repeat2__numRows-1
    RSfoto.MoveNext()
    Wend
    %>

	</table>
	
	</td>
  </tr>	
</table>




<% If Request.QueryString("finestra") = "risultati" Then %>

Termina aggiornamento offerta 

<% Else %>

Termina inserimento offerta 

<% End If %>

</body>
</html>



<%
RSpreview.Close()
Set RSpreview = Nothing
%>
<%
RSfoto.Close()
Set RSfoto = Nothing
%>
<%
If session("IDserata") <> "" then
RSidserata.Close()
End if
Set RSidserata = Nothing
%>

<%
session.Contents.Remove("IDserata")
%>
Grazie molte per l'aiuto!!! []

tizz