<%
'################################################################################# 
' # # copyright (c) 2000-2001 Snitz Forums 
' # # 
' # # questo programma è un software libero; potete ridistribuirlo e/o 
' # # modificarlo sotto i termini dell' autorizzazione del grande pubblico di GNU 
' # # come pubblicati dal fondamento libero del software; **time-out** o versione 2 
' # # autorizzazione, o qualsiasi successivo versione.
' # # 
' # # Questo programma è distibuito nella speranza che possa essere utile, 
' # # ma senza qualsiasi GARANZIA; senza persino la garanzia implicita di 
' # # MERCHANTABILITY o IDONEITÀ PER SCOPI PRECISI. Per maggiori ragguagli consultare
' # # la licenza internazionale GNU e GPL. Troverete una copia della licenza all'interno
' # # del forum Snitz (http://forum.snitz.com)
' # #
' # # INFORMAZIONI PER GLI UTENTI ITALIANI
' # # 
' # # Questo forum realizzato all'origine da Snitz Forums (http://forum.snitz.com) 
' # # è stato modificato e trasformato completamente in Italiano da:
' # # Santarsiero Angelo, Lorusso Salvatore e Narciso Rocco 
' # # Webmaster & Collaboratori di www.valvitalba.it
' # # 
' # # I test, le correzioni del maggior numero di Bug ed errori\imprecisioni
' # # nonchè la compatibilità del forum con il maggior numero di piattaforme
' # # sono stati effettuati da Lorenzo Pascucci webmaster di www.WebMasterPoint.org
' # # 
' # # DISTRIBUZIONE DELLA VERSIONE ITALIANA
' # # La versione italiana del forum viene diffusa da WebMasterPoint.org:
' # # il punto di riferimento dei webmaster italiani. All'interno troverete
' # # una sezione dedicata allo Snitz Forums con il suddetto forum e molti
' # # Mods corretti e tradotti in italiano. http://www.webmasterpoint.org
' # # 
' # # 
' # # CONTATTI
' # # Per consigli, errori, modifiche e altro contattateci a questi indirizzi
' # # 
' # # Staff di Valvitalba
' # # ----------------------------
' # # Angelo   angelo@valvitalba.it (Problemi grafici)
' # # Rocco    rocco@valvitalba.it  (Problemi logistici)
' # # Toto     toto@valvitalba.it   (Problemi linguaggio Asp)
' # # Sito:    http://www.valvitalba.it
' # # 
' # # Staff di WebMasterPoint
' # # ----------------------------
' # # Lorenzo  lorenzo.pascucci@webmasterpoint.org (Distribuzione, bug)
' # # Sito:    http://www.webmasterpoint.org
' # # 
'################################################################################# 
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top_short.asp" -->
<% 
set rs = Server.CreateObject("ADODB.RecordSet")

'## Forum_SQL
strSql = "SELECT * FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID = " & Request.QueryString("ID")

rs = my_Conn.Execute (strSql)
%>
<p><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Manda un Email</font></p>
<%
if lcase(strEmail) = "1" then
	Err_Msg = ""
	if Request.Form("YName") = "" then 
		Err_Msg = Err_Msg & "<li>Devi inserire il tuo Username!</li>"
	end if
	if Request.Form("YEmail") = "" then 
		Err_Msg = Err_Msg & "<li>Devi inserire il tuo indirizzo Email!</li>"
	else
		if EmailField(Request.Form("YEmail")) = 0 then 
			Err_Msg = Err_Msg & "<li>Devi inserire una indirizzo Email valido!</li>"
		end if
	end if
	if Request.Form("Name") = "" then 
		Err_Msg = Err_Msg & "<li>Devi inserire il tuo nome!</li>"
	end if
	if Request.Form("Email") = "" then 
		Err_Msg = Err_Msg & "<li>Inserisci il messaggio per il destinatario!</li>"
	else
		if EmailField(Request.Form("Email")) = 0 then 
			Err_Msg = Err_Msg & "<li>Devi inserire un indirizzo Email valido per il destinatario!</li>"
		end if
	end if
	if Request.Form("Msg") = "" then 
		Err_Msg = Err_Msg & "<li>Devi inserire il Messaggio!</li>"
	end if
	'##  Emails Message to the Author of this Reply.  
	'##  This needs to be Edited to use your own email component
	'##  if you don't have one, try the w3Jmail component from www.dimac.net it's free!
	if Request.QueryString("mode") = "DoIt" then
		if (Err_Msg = "") then
			strRecipientsName = Request.Form("Name")
			strRecipients = Request.Form("Email")
			strFrom = Request.Form("YEmail")
			strFromName = Request.Form("YName")
			strSubject = "Messaggio dal " & strForumTitle & " inviato da " & Request.Form("YName")
			strMessage = "Ciao " & Request.Form("Name") & vbCrLf & vbCrLf
			strMessage = strMessage & "Hai ricevuto questo messaggio da : " & Request.Form("YName") & " (" & Request.Form("YEmail") & ") " & vbCrLf & vbCrLf 
			strMessage = strMessage & "Tramite questo Forum: " & strForumURL & vbCrLf & vbCrLf
			strMessage = strMessage & Request.Form("Msg") & vbCrLf & vbCrLf
			strMessage = strMessage & ""
			strMessage = strMessage & "Il forum di Valvitalba non ha alcun tipo di responsabilità per il contenuto di questo messaggio."
			strMessage = strMessage & "Grazie per aver usato i servizi gratuiti di Valvitalba"
			

			if strFrom <> "" then 
				strSender = strFrom
			end if
%>
<!--#INCLUDE FILE="inc_mail.asp" -->

<p><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">L'Email
e stata spedita</font></p>
				
<%
		else
%>
	      <p><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Si 
            &egrave; verificato un problema alla tua Email</font></p>

	<table>
	  <tr>
	    <td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
		<ul>
		<% =Err_Msg %>
		</ul></font>
	    </td>
	  </tr>
	</table>

	      <p><font size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Torna 
            ad inserire i dati</a></font></p>

<p><font size="<% =strDefaultFontSize %>"><a href="JavaScript:onClick= window.close()">Chiudi
Finestra</A></font></p>
<%
			Response.End 
		end if
	else 
		Err_Msg = ""
'CHECK EMAIL
	IF rs("M_HIDE_EMAIL") = 0 THEN
		if rs("M_EMAIL") <> " " then
				strSql =  "SELECT M_NAME, M_USERNAME, M_EMAIL "
				strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
				strSql = strSql & " WHERE "&Strdbntsqlname&" = '" & STRdbntUserName & "'"

			set rs2 = my_conn.Execute (strSql)
			YName = ""
			YEmail = ""

			if (rs2.EOF or rs2.BOF)  then
				if strLogonForMail <> "0" then 
		
					Err_Msg = Err_Msg & "<li>Per inviare un messaggio dovete essere nel Forum</li>"
%>
					<table>
					 <tr>
					  <td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
					  <ul>
						<% =Err_Msg %>
					  </ul></font>
					  </td>
					 </tr>
					</table>
<%					If InStr(Request.ServerVariables("HTTP_REFERER"), "pop_profile.asp") <> 0 then %>
<p><font size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Ritorna
al Profilo</a></font></p>
<%					end if %>

<p><font size="<% =strDefaultFontSize %>"><a href="JavaScript:onClick= window.close()">Chiudi
Finestra</A></font></p>
<%
					Response.End
				end if
			else
				YName = Trim("" & rs2("M_NAME"))
				YEmail = Trim("" & rs2("M_EMAIL"))
			end if
			rs2.close
			set rs2 = nothing
%>

<form action="pop_mail.asp?mode=DoIt&id=<% =Request.QueryString("ID") %>" method=Post id=Form1 name=Form1>
<input type=hidden name="Page" value="<% =Request.QueryString("page") %>">

<table border="0" width="90%" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="<% =strPopUpBorderColor %>">
    <table border="0" width="100%" cellspacing="1" cellpadding="1">
      <tr>
                      <td bgColor=<% =strPopUpTableColor %> align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Invia 
                        a :</FONT></b></td>
        <td bgColor=<% =strPopUpTableColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =rs("M_NAME") %><input type=hidden name="Name" value="<% =rs("M_NAME") %>"></font></td>
      </tr>
      <tr>
                      <td bgColor=<% =strPopUpTableColor %> align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Indirizzo 
                        Emaill:</FONT></b></td>
        <td bgColor=<% =strPopUpTableColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =rs("M_EMAIL") %><input type=hidden name="Email" value="<% =rs("M_EMAIL") %>"></font></td>
      </tr>                
      <tr>
                      <td bgColor=<% =strPopUpTableColor %> align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>>Tuo 
                        nome :</font></b></td>
        <td bgColor=<% =strPopUpTableColor %>><input name=YName type=<% if YName <> "" then Response.Write("hidden") else Response.Write("text") end if %> value="<% = YName %>" size=25><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>> <% if YName <> "" then Response.Write(YName) end if %></font></td>
      </tr>
     <tr>
                      <td bgColor=<% =strPopUpTableColor %> align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>>Tua 
                        Email :</font></b></td>
        <td bgColor=<% =strPopUpTableColor %>><input name=YEmail type=<% if YEmail <> "" then Response.Write("hidden") else Response.Write("text") end if %> value="<% = YEmail %>" size=25><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>> <% if YEmail <> "" then Response.Write(YEmail) end if %></font></td>
      </tr> 
      <tr>
        <td bgColor=<% =strPopUpTableColor %> colspan=2><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Messaggio:</FONT></b></td>
      </tr>
      <tr>
        <td bgColor=<% =strPopUpTableColor %> colspan=2><textarea name="Msg" cols=40 rows=5></textarea></td>
      </tr>                    
      <tr>
        <td bgColor=<% =strPopUpTableColor %> colspan=2 align=center>
                        <Input type=Submit value="Invia" id=Submit1 name=Submit1>
                      </TD>
      </tr>
    </table>
    </td>
  </tr>
</table>
</form>
<%		else %>
<p>Nessun indirizzo Email e disponibile per questo utente.</p>
<%		end if %>
<%	'CHECK MAIL
	ELSE
	response.write "<center>Ci dispiace ma il membro non ha reso pubblica la sua Email</center>"
end if %>
<%	end if %>
<% else %>
<% IF rs("M_HIDE_EMAIL") <> 1 THEN %>
<p>Premi qui per inviare l'Email</p>
<% ELSE 
	response.write "L'indirizzo Email di questo membro non è stata resa pubblica"
END IF %>

<% end if %>
<% If InStr(Request.ServerVariables("HTTP_REFERER"), "pop_profile.asp") <> 0 then %>
<p><font size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Ritorna
al Profilo</a></font></p>
<% end if %>
<% set rs = nothing %>
<!--#INCLUDE FILE="inc_footer_short.asp" -->
