Forum 

Forum AspNuke.it - Il tuo Portale OpenSource in ASP

email nel forum passaggio a cdosys

Autore Messaggio
beppetrj

Esperto
Esperto
270 Discussioni



Profilo - beppetrj
10 luglio 2004 alle 15:42:43 Profilo - beppetrjInvia un messaggio privato Invia Messaggio Yahoo Rispondi quotando
stesso problema dei primi due :
nel passaggio a 2003 il mod email nel forum non funzia perche settato a CDONTS
Il problema è nel post-inc:

<%
' ************************************************************************
' * ASP-Nuke: Free web portal in ASP *
' ************************************************************************
' * Copyright (c) 2002-2003 by Gaetan Bouveret (webmaster@asp-nuke.com) *
' * http://www.asp-nuke.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. *
' * *
' ************************************************************************
' --------- Modifiche ---------------------
' Mod: Email nel Forum
' Autore: Settimio TRINCHERA
' Email: webmaster@stzone.it
' Sito: http://www.stzone.it
' Data: 01/11/2003
' -------------------------------------------
%>
<%
Function PostMessage(forum, section, parent, feeling, title, message, valide, signature, smileys, persistant, sUserIP)
Dim Conn, Rs, rSQL, iLastPostsID, sCurrentDate

Set Conn = DBConnexion(DB_FORUM)
rSQL = "SELECT MAX(PostID) FROM Posts"
Set Rs = DBRecordSet(Conn, rSQL)
sCurrentDate = DateTimeToString(Now)

If Not Rs.EOF Then
iLastPostsID = Rs(0)
If isNull(iLastPostsID) Then
iLastPostsID = 1
Else
iLastPostsID = iLastPostsID + 1
End If

If parent = "" or parent = 0 Then
parent = iLastPostsID
Else
rSQL = "SELECT PostTitle FROM Posts WHERE PostID=" & parent
Set Rs = DBRecordSet(Conn, rSQL)
If Not Rs.EOF Then title = GetTranslation("LANG_ANSWER_POST") & " : " & Rs(0)
End If

If parent = "" or parent = 0 Then
rSQL = "INSERT INTO Posts (PostID, PostParent, PostSection, PostUser, PostDate, PostFeeling, PostTitle, PostMessage, PostHits, PostValid, PostSignature, PostSmileys, PostSticked, PostEditDate, PostUserIP, PostLastDate) VALUES "
rSQL = rSQL & "(" & iLastPostsID & ", " & parent & ", " & section & ", '" & SQLEncrypt(sPseudo) & "', '" & sCurrentDate & "' , '" & SQLEncrypt(feeling) & "', '" & SQLEncrypt(title) & "', '" & SQLEncrypt(message) & "', 0, " & valide & ", " & signature & ", " & smileys & ", " & persistant & ", '', '" & sUserIP & "', '')"
DBExecute Conn, rSQL
Else
rSQL = "INSERT INTO Posts (PostID, PostParent, PostSection, PostUser, PostDate, PostFeeling, PostTitle, PostMessage, PostHits, PostValid, PostSignature, PostSmileys, PostSticked, PostEditDate, PostUserIP, PostLastDate) VALUES "
rSQL = rSQL & "(" & iLastPostsID & ", " & parent & ", " & section & ", '" & SQLEncrypt(sPseudo) & "', '" & sCurrentDate & "' , '" & SQLEncrypt(feeling) & "', '" & SQLEncrypt(title) & "', '" & SQLEncrypt(message) & "', 0, " & valide & ", " & signature & ", " & smileys & ", " & persistant & ", '', '" & sUserIP & "', '" & sCurrentDate & "')"
DBExecute Conn, rSQL
rSQL = "UPDATE Posts SET PostLastDate = '" & sCurrentDate & "' WHERE PostID=" & parent
DBExecute Conn, rSQL
End If

rSQL = "UPDATE Users SET UserPosts=UserPosts+1 WHERE UserLogin LIKE '" & SQLEncrypt(sPseudo) & "'"
DBExecute Conn, rSQL

' ----------------------------------------------------------------------------------------
' Invia email al webmaster e ai partecipanti la specifica discussione

Dim msg, myMail, sUser, sMailList, Conn1, Rs1, rSQL1

msg = msg & "<html><head><title>Message</title><style type=""text/css"">body { margin: 0px; padding: 0px; background-color: #eee; }body,td { font-family: Arial, sans-serif; font-size: 13px; }tr,td { padding: 3px; background-color: #eee; }a { text-decoration: none; font-weight: bold; }a:link { color: #888; } a:visited { color: #888; } a:hover { color: #666; }a:active { color: #666; } img { border: 0px; }h6 { font-size: 11px; margin: 10px; font-weight: bold; text-align: right; }#contenuto { margin: 10px 0px 10px 0px; padding: 10px; border: 0px; border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #ccc; background-color: #fff; color: #333; }.des { text-align: right; background-color: #aaa; color: #eee; }</style></head>"
msg = msg & "<body><h6>" & GetTranslation("LANG_POST_NEW") & "</h6>"
msg = msg & "<div id=""contenuto""><table>"
msg = msg & "<tr><td class=""des"">" & GetTranslation("LANG_AUTHOR") & "<br /></td>"
msg = msg & "<td>" & sPseudo & "</td></tr>"
msg = msg & "<tr><td class=""des"">" & GetTranslation("LANG_TITLE") & "<br /></td>"
msg = msg & "<td><a class=""menu"" href=""" & GLOBAL_SITE_URL & "/clubtenere/forum.asp?forum=" & forum & "&section=" & section & "&post=" & parent & "&page=last#" & iLastPostsID & """>" & title & "</a></td></tr>"
msg = msg & "<tr><td valign=""top"" class=""des"">" & GetTranslation("LANG_DATE") & "<br /></td>"
msg = msg & "<td>"& GetDateLitteralDDMMYYYYHHMMSS(Now()) &"</td></tr>"
msg = msg & "</table></div>"
msg = msg & "</body></html>"

Set Conn = DBConnexion(DB_FORUM)
rSQL = "SELECT DISTINCT PostUser FROM Posts WHERE PostParent=" & parent
Set Rs = DBRecordSet(Conn, rSQL)
If Not Rs.EOF Then
While Not Rs.EOF
sUser = Rs("PostUser")
Set Conn1 = DBConnexion(DB_MAIN)
rSQL1 = "SELECT uEMail FROM Users WHERE uLogin='" & sUser & "'"
Set Rs1 = DBRecordSet(Conn1, rSQL1)
If Not Rs1.EOF Then
While Not Rs1.EOF
sMailList = sMailList & Rs1("uEMail") & ";"
Rs1.MoveNext
WEnd
End IF
Rs.MoveNext
WEnd
End IF

Set myMail = CreateObject("CDONTS.NewMail")
myMail.From = "" & GLOBAL_SITE_EMAIL & ""
myMail.To = "" & GLOBAL_SITE_EMAIL & ""
If bAcceptEMailForum Then myMail.BCc = "" & sMailList & ""
myMail.Subject = GetTranslation("LANG_POST_NEW") & " di " & GLOBAL_SITE_NAME
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = msg
myMail.Send
msg=""
Set myMail = Nothing

Conn1.Close
Set Conn1 = Nothing
Set Rs1 = Nothing
' ----------------------------------------------------------------------------------------

PostMessage = True
Else
PostMessage = False
End If

Conn.Close
Set Conn = Nothing
Set Rs = Nothing
End Function

Sub DisplayPostMessage(forum, section, parent)
Dim oCn, oRs, rSQL, X, sTitle, sPostTitle, iLine, tSmileys, sSticked

Set oCn = DBConnexion(DB_FORUM)

Response.Write "<script language=""Java_Script"" type=""text/Java_Script"">" & vbCRLF
Response.Write " function smiley(val) {" & vbCRLF
Response.Write " document.postmessage.message.value += val;" & vbCRLF
Response.Write " }" & vbCRLF
Response.Write " function formValidPost(action) {" & vbCRLF
Response.Write " var ok = true;" & vbCRLF
Response.Write " var msg = '" & GetTranslation("LANG_MUST_FILL") & "';" & vbCRLF
If parent = "" Then Response.Write " if (document.postmessage.titre.value == '') { ok = false; msg += '
- " & GetTranslation("LANG_TITLE") & "'; }" & vbCRLF
Response.Write " if (document.postmessage.message.value == '') { ok = false; msg += '
- " & GetTranslation("LANG_MESSAGE") & "'; }" & vbCRLF
Response.Write " if (ok) {" & vbCRLF
Response.Write " document.postmessage.myAction.value = action;" & vbCRLF
Response.Write " document.postmessage.submit();" & vbCRLF
Response.Write " }" & vbCRLF
Response.Write " else alert(msg);" & vbCRLF
Response.Write " }" & vbCRLF
Response.Write "</script>" & vbCRLF

sSticked = ""
If Parent <> "" and Parent <> 0 Then
rSQL = "SELECT PostTitle, PostSticked FROM Posts WHERE PostID=PostParent AND PostID=" & Parent
Set oRs = DBRecordSet(oCn, rSQL)
sTitle = GetTranslation("LANG_ANSWER_POST") & " : " & CodeMessage(oRs("PostTitle"), True)
If oRs("PostSticked").Value Then sSticked = "1"
Set oRs = Nothing
Else
sTitle = GetTranslation("LANG_NEW_SUBJECT")
End If

CreateTopTable "PostMessage", sTitle
Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF
Response.Write "<form name=""postmessage"" method=""post"" action=""Post.asp"">" & vbCRLF
Response.Write "<input name=""forum"" type=""hidden"" value=""" & forum & """>" & vbCRLF
Response.Write "<input name=""section"" type=""hidden"" value=""" & section & """>" & vbCRLF
Response.Write "<input name=""post"" type=""hidden"" value=""" & parent & """>" & vbCRLF
Response.Write "<input name=""myAction"" type=""hidden"" value=""post"">" & vbCRLF

iLine = 1
If Parent = "" or Parent = 0 Then
Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td width=""100"">" & GetTranslation("LANG_TITLE") & "</td>" & vbCRLF
Response.Write " <td><input name=""titre"" size=""50"" class=""cell""></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF

iLine = 2
Else
Response.Write "<input name=""titre"" type=""hidden"" value="""">" & vbCRLF
End If

rSQL = "SELECT * FROM Feelings ORDER BY FeelingID"
Set oRs = DBRecordSet(oCn, rSQL)
If Not oRs.EOF Then
Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td width=""100"">" & GetTranslation("LANG_HUMOR") & "</td>" & vbCRLF
Response.Write " <td>" & vbCRLF

X = 0
iLine = 1 + ((iLine-1) XOr 1)

While Not oRs.EOF
Response.Write " <input name=""humeur"" type=""radio"" value=""" & oRs("FeelingID") & """"
If X = 0 Then Response.Write " checked"
Response.Write "><img src=""" & FeelingsPath & oRs("FeelingPath") & """ border=""0""> " & vbCRLF
X = X + 1
If X mod 8 = 0 Then Response.Write "<br>" & vbCRLF
oRs.MoveNext
WEnd

Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
End If
Set oRs = Nothing

Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td width=""100"" valign=""top"">" & GetTranslation("LANG_EDIT_MENU") & "</td>" & vbCRLF
Response.Write " <td>" & vbCRLF
DisplayEditBar "document.postmessage.message", 0
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
iLine = 1 + ((iLine-1) XOr 1)

Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td valign=""top"">" & GetTranslation("LANG_MESSAGE") & "</td>" & vbCRLF
Response.Write " <td><textarea name=""message"" rows=""6"" cols=""60"" class=""cell""></textarea></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
iLine = 1 + ((iLine-1) XOr 1)

Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td width=""100"">" & GetTranslation("LANG_SMILEYS") & "</td>" & vbCRLF
Response.Write " <td>" & vbCRLF
iLine = 1 + ((iLine-1) XOr 1)

tSmileys = GetSmileysTable()
For X = 0 To UBound(tSmileys)
Response.Write " <img src="""
If Left(tSmileys(X, 1), 7) <> "http://" Then Response.Write GLOBAL_SITE_IMAGES_SMILEYS_PATH
Response.Write Server.HTMLEncode(tSmileys(X, 1)) & """ border=""0"" OnClick=""Java_Script:smiley(' " & Server.HTMLEncode(tSmileys(X, 0)) & "');""> " & vbCRLF
Next

Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td width=""100"">" & GetTranslation("LANG_SIGNATURE") & "</td>" & vbCRLF
Response.Write " <td><input name=""signature"" type=""checkbox"" value=""ok"" checked></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
iLine = 1 + ((iLine-1) XOr 1)

Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td width=""100"">" & GetTranslation("LANG_SMILEYS") & "</td>" & vbCRLF
Response.Write " <td><input name=""smileys"" type=""checkbox"" value=""ok"" checked></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
iLine = 1 + ((iLine-1) XOr 1)

If IsOwner <> "" and (Parent = "" or Parent = 0) Then
Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF
Response.Write " <td width=""100"">" & GetTranslation("LANG_POST_STICKED") & "</td>" & vbCRLF
Response.Write " <td><input name=""sticked"" type=""checkbox"""
If sSticked <> "" Then Response.Write " checked"
Response.Write "></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Else
Response.Write "<input name=""sticked"" type=""hidden"" value=""" & sSticked & """>" & vbCRLF
End If

Response.Write " <tr class=""tablelinemain"">" & vbCRLF
Response.Write " <td colspan=""2"">" & vbCRLF
Response.Write " <input name=""poster"" type=""button"" value=""" & GetTranslation("LANG_DO_POST") & """ class=""button"" onClick=""formValidPost('post');""> " & vbCRLF
Response.Write " <input name=""preview"" type=""button"" value=""" & GetTranslation("LANG_PREVIEW") & """ class=""button"" onClick=""formValidPost('preview');""> " & vbCRLF
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write "</form>" & vbCRLF
Response.Write "</table>" & vbCRLF
CreateBottomTable ""

If Parent <> "" and Parent <> 0 Then
rSQL = "SELECT TOP 1 PostTitle, PostUser, PostMessage FROM Posts WHERE PostParent=" & Parent & " AND PostValid=1 ORDER BY PostDate DESC"
Set oRs = DBRecordSet(oCn, rSQL)
If Not oRs.EOF Then
CreateTopTable "PreviewOldMessage", GetTranslation("LANG_POST") & " - " & GetTranslation("LANG_PREVIEW")
Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF
Response.Write " <tr class=""tableline1"">" & vbCRLF
Response.Write " <td width=""120"">" & GetTranslation("LANG_TITLE") & "</td>" & vbCRLF
Response.Write " <td>" & CodeMessage(oRs("PostTitle"), True) & "<td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write " <tr class=""tableline2"">" & vbCRLF
Response.Write " <td>" & GetTranslation("LANG_AUTHOR") & "</td>" & vbCRLF
Response.Write " <td>" & Server.HTMLEncode(oRs("PostUser")) & "<td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write " <tr class=""tableline1"">" & vbCRLF
Response.Write " <td valign=""top"">" & GetTranslation("LANG_MESSAGE") & "</td>" & vbCRLF
Response.Write " <td>" & CodeMessage(oRs("PostMessage"), True) & "<td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write "</table>" & vbCRLF
CreateBottomTable ""
End If
Set oRs = Nothing
End If

oCn.Close
Set oCn = Nothing
Set oRs = Nothing
End Sub

Sub DisplayPreviewMessage(forum, section, parent)
Dim oCn, oCn2, oRs, rSQL, bDisplaySmileys, bDisplaySignature

If Request.Form("smileys") <> "" Then
bDisplaySmileys = True
Else
bDisplaySmileys = False
End If
If Request.Form("signature") <> "" Then
bDisplaySignature = True
Else
bDisplaySignature = False
End If

Set oCn = DBConnexion(DB_FORUM)

Response.Write "<script language=""Java_Script"" type=""text/Java_Script"">" & vbCRLF
Response.Write " function smiley(val) {" & vbCRLF
Response.Write " document.post.message.value += val;" & vbCRLF
Response.Write " }" & vbCRLF
Response.Write " function formValidPost(action) {" & vbCRLF
Response.Write " document.postmessage.myAction.value = action;" & vbCRLF
Response.Write " document.postmessage.submit();" & vbCRLF
Response.Write " }" & vbCRLF
Response.Write "</script>" & vbCRLF

CreateTopTable "Preview", GetTranslation("LANG_PREVIEW") & " - " & CodeMessage(Request.Form("titre"), True)

Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF
Response.Write "<form name=""postmessage"" method=""post"" action=""" & sURLPage & """>" & vbCRLF
Response.Write "<input name=""myAction"" type=""hidden"" value=""post"">" & vbCRLF
Response.Write "<input name=""postpreview"" type=""hidden"" value=""1"">" & vbCRLF
Response.Write "<input name=""forum"" type=""hidden"" value=""" & forum & """>" & vbCRLF
Response.Write "<input name=""section"" type=""hidden"" value=""" & section & """>" & vbCRLF
Response.Write "<input name=""post"" type=""hidden"" value=""" & parent & """>" & vbCRLF
Response.Write "<input name=""sticked"" type=""hidden"" value=""" & Request.Form("sticked") & """>" & vbCRLF
Response.Write "<input name=""signature"" type=""hidden"" value=""" & Server.HTMLEncode(Request.Form("signature")) & """>" & vbCRLF
Response.Write "<input name=""smileys"" type=""hidden"" value=""" & Server.HTMLEncode(Request.Form("smileys")) & """>" & vbCRLF
Response.Write "<input name=""titre"" type=""hidden"" value=""" & Server.HTMLEncode(Request.Form("titre")) & """>" & vbCRLF
Response.Write "<input name=""message"" type=""hidden"" value=""" & Server.HTMLEncode(Request.Form("message")) & """>" & vbCRLF
Response.Write "<input name=""humeur"" type=""hidden"" value=""" & Server.HTMLEncode(Request.Form("humeur")) & """>" & vbCRLF
Response.Write " <tr class=""tablelinemain"">" & vbCRLF
Response.Write " <td width=""30"" align=""center"">" & GetTranslation("LANG_HUMOR") & "</td>" & vbCRLF
Response.Write " <td width=""120"" align=""center"">" & GetTranslation("LANG_AUTHOR") & "</td>" & vbCRLF
Response.Write " <td>" & GetTranslation("LANG_MESSAGE") & "</td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write " <tr class=""tableline1"">" & vbCRLF
Response.Write " <td align=""center"">"
rSQL = "SELECT * FROM Feelings WHERE FeelingID = " & Request.Form("humeur")
Set oRs = DBRecordSet(oCn, rSQL)
If Not oRs.EOF Then
Response.Write "<img src=""" & FeelingsPath & oRs("FeelingPath") & """ border=""0"">"
Else
Response.Write " "
End If
Response.Write "</td>" & vbCRLF
Response.Write " <td align=""center"">" & Server.HTMLEncode(sPseudo) & "</td>" & vbCRLF
Response.Write " <td>" & vbCRLF
Response.Write " <span class=""small"">" & Replace(GetTranslation("LANG_POST_DATE"), "%1%", Now()) & "</span><br>" & vbCRLF
Response.Write " " & CodeMessageEx(Request.Form("message"), 0, True, bDisplaySmileys) & vbCRLF
If bDisplaySignature Then
Set oCn2 = DBConnexion(DB_MAIN)
rSQL = "SELECT uSignature FROM users WHERE uLogin='" & SQLEncrypt(sPseudo) & "'"
Set oRs = DBRecordSet(oCn2, rSQL)
If Not oRs.EOF Then Response.Write "<font size=""1"">" & FORUM_SIGNATURE_DELIMITER & CodeMessage(oRs(0) & "", True) & "</font>" & vbCRLF
oCn2.Close
Set oCn2 = Nothing
End If
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write " <tr class=""tablelinemain"">" & vbCRLF
Response.Write " <td colspan=""3"">" & vbCRLF
Response.Write " <input name=""back"" type=""button"" value=""" & GetTranslation("LANG_BACK") & """ class=""button"" onClick=""history.back();""> " & vbCRLF
Response.Write " <input name=""submit"" type=""submit"" value=""" & GetTranslation("LANG_SUBMIT") & """ class=""button"">" & vbCRLF
Response.Write " </td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write "</form>" & vbCRLF
Response.Write "</table>" & vbCRLF
CreateBottomTable ""

oCn.close
Set oCn = Nothing
Set oRs = Nothing
End Sub

Sub DoPost()
Dim iHumor, sTitle, sMessage, sSignature, bValid, bSignature, bSmileys, bSticked, iNbPages, iNbPosts
Dim Conn, Rs, rSQL

iHumor = Request.Form("humeur")
sTitle =Request.Form("titre")
sMessage = Request.Form("message")
If Request.Form("signature") <> "" Then
bSignature = "1"
Else
bSignature = "0"
End If
If Request.Form("smileys") <> "" Then
bSmileys = "1"
Else
bSmileys = "0"
End If
If Request.Form("sticked") <> "" Then
bSticked = "1"
Else
bSticked = "0"
End If

Set Conn = DBConnexion(DB_FORUM)
rSQL = "SELECT SectionModerated FROM Sections WHERE SectionID=" & mySection
Set Rs = DBRecordSet(Conn, rSQL)
If Not Rs.EOF Then
If Rs(0) Then
bValid = "0"
Else
bValid = "1"
End If
End If

If myPost = 0 or myPost = "" Then
If PostMessage(myForum, mySection, myPost, iHumor, sTitle, sMessage, bValid, bSignature, bSmileys, bSticked, sIP) Then
CreateTopTable "Post", GetTranslation("LANG_POST") & " - " & GetTranslation("LANG_ADD_SUCCESS")
Response.Write "<a href=""Forum.asp?forum=" & myForum & "&section=" & mySection & """>" & GetTranslation("LANG_BACK") & " - " & GetTranslation("LANG_SECTION") & "</a>"
rSQL = "SELECT TOP 1 PostID FROM Posts WHERE PostSection=" & mySection & " AND PostUser='" & SQLEncrypt(sPseudo) & "' AND PostParent=PostID ORDER BY PostDate DESC"
Set Rs = DBRecordSet(Conn, rSQL)
If Not Rs.EOF Then Response.Write "<br><a href=""Forum.asp?forum=" & myForum & "&section=" & mySection & "&post=" & Rs(0) & """>" & GetTranslation("LANG_BACK") & " - " & GetTranslation("LANG_POST") & "</a>" & vbCRLF
CreateBottomTable ""
Else
CreateTable "Post", GetTranslation("LANG_POST") & " - " & GetTranslation("LANG_ADD_ERROR"), "<a href=""Forum.asp?forum=" & myForum & "&section=" & mySection & "&post=" & myPost & """>" & GetTranslation("LANG_BACK") & "</a>", ""
End If
Else
If PostMessage(myForum, mySection, myPost, iHumor, sTitle, sMessage, bValid, bSignature, bSmileys, bSticked, sIP) Then
CreateTopTable "Post", GetTranslation("LANG_POST") & " - " & GetTranslation("LANG_ADD_SUCCESS")
Response.Write "<a href=""Forum.asp?forum=" & myForum & "&section=" & mySection & """>" & GetTranslation("LANG_BACK") & " - " & GetTranslation("LANG_SECTION") & "</a>" & vbCRLF
rSQL = "SELECT Count(PostID) FROM Posts WHERE PostSection=" & mySection & " AND PostParent=" & myPost
Set Rs = DBRecordSet(Conn, rSQL)
iNbPosts = Rs(0)
If iNbPosts > FORUM_MAX_THREADS Then
iNbPages = iNbPostsFORUM_MAX_THREADS
If (iNbPosts+1) mod FORUM_MAX_THREADS <> 0 Then iNbPages = iNbPages + 1
Response.Write "<br><a href=""Forum.asp?forum=" & myForum & "&section=" & mySection & "&post=" & myPost & "&page=" & iNbPages & """>" & GetTranslation("LANG_BACK") & " - " & GetTranslation("LANG_POST") & "</a>" & vbCRLF
Else
Response.Write "<br><a href=""Forum.asp?forum=" & myForum & "&section=" & mySection & "&post=" & myPost & """>" & GetTranslation("LANG_BACK") & " - " & GetTranslation("LANG_POST") & "</a>" & vbCRLF
End If
CreateBottomTable ""
Else
CreateTable "Post", GetTranslation("LANG_POST") & " - " & GetTranslation("LANG_ADD_ERROR"), "<a href=""Forum.asp?forum=" & myForum & "&section=" & mySection & "&post=" & myPost & """>" & GetTranslation("LANG_BACK") & "</a>", ""
End If
End If

Conn.Close
Set Conn = Nothing
Set Rs = Nothing
End Sub
%>

come si setta??
---------------
http://www.xtzclub.it
http://www.beppetrj.it
eguseo

Eliminato
Eliminato
0 Discussione



Profilo - eguseo
08 agosto 2004 alle 20:27:41 Profilo - eguseoInvia un messaggio privato Invia Messaggio Yahoo Rispondi quotando
io ho modificato così, funziona tutto tranne che mi arriva in formato txt per vedere il formato html devo inserirlo in un editor, eppure ricevo tranquillamente email in html da altri siti, di sicuro ho sbagliato qualcosa, vi mando il file modificato che comunque funziona.

Set myMail = CreateObject("CDO.Message")
myMail.From = "" & GLOBAL_SITE_EMAIL & ""
myMail.To = "" & GLOBAL_SITE_EMAIL & ""
If bAcceptEMailForum Then myMail.BCc = "" & sMailList & ""
myMail.Subject = GetTranslation("LANG_POST_NEW") & " di " & GLOBAL_SITE_NAME
myMail.TextBody = msg
myMail.Fields("urn:schemas:httpmail:importance").Value = 2
myMail.Fields.Update()
myMail.Send
msg=""
Set myMail = Nothing

Conn1.Close
Set Conn1 = Nothing
Set Rs1 = Nothing
' ----------------------------------------------------------------------------------------

se qualche guru puo dirmi se c'è un errore lo ringrazio anticipatamente.
ciao a tutti.
emu

Moderatore

Esperto
Esperto
1714 Discussioni



Profilo - emu
08 agosto 2004 alle 20:56:24 Profilo - emuInvia un messaggio privato Rispondi quotando
Per inviare mail in formato html devi riempire il campo myMail.HTMLBody al posto di myMail.TextBody.
Ciao

---------------
development@aspnuke.it
eguseo

Eliminato
Eliminato
0 Discussione



Profilo - eguseo
08 agosto 2004 alle 21:09:14 Profilo - eguseoInvia un messaggio privato Rispondi quotando
Fatto adesso funziona bene tutto, se era attiva questa funzione nel forum avrei letto la tua risposta e forse avrei fatto prima Emu grazie della risposta comunque.
ecco il codice per chi ne ha bisogno.

If bAcceptEMailForum Then
Set myMail = CreateObject("CDO.Message")
myMail.From = "" & GLOBAL_SITE_EMAIL & ""
myMail.To = "" & GLOBAL_SITE_EMAIL & ""
myMail.BCc = "" & sMailList & ""
myMail.Subject = GetTranslation("LANG_POST_NEW") & " di " & GLOBAL_SITE_NAME
myMail.HtmlBody = msg
'myMail.MailFormat = 0
'myMail.Body = msg
myMail.Fields("urn:schemas:httpmail:importance").Value = 2
myMail.Fields.Update()
myMail.Send
msg=""
Set myMail = Nothing
End If

ciao

Log in

Login
Password
Memorizza i tuoi dati:

Cerca

 

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 : 212
Membri : 0 offline Anna

Iscritti

 Utenti: 18940
Ultimo iscritto : glauco
Lista iscritti
Messaggi privati: 3373 Commenti: 2210 Immagini: 39 Downloads: 144 Articoli: 49 Pagine: 101 Siti web: 558 Notizie: 180 Sondaggi: 11 Preferiti: 5688358 Post sui forum: 51195 Libro degli ospiti: 4 Eventi: 7

Versioni

Temi