'WELCOME PM MOD BY GÖLGE////////////////////////////////////////// 'THE MOD STARTS FROM HERE/////////////////////////////////////////
If strMode = "new" Then Dim blnMessageSent Dim stryonetici Dim intyonetici blnMessageSent = False 'SQL to get the new Author_ID from the database strSQL = "SELECT " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.username " & _ "FROM " & strDbTable & "Author" & strDBNoLock & " " & _ "ORDER BY " & strDbTable & "Author.Author_ID DESC" & strDBLimit1 & ";"
'Query database rsCommon.Open strSQL, adoCon
'Read back in the user ID for the activation email lngUserProfileID = CLng(rsCommon("Author_ID")) rscommon.movelast stryonetici = rscommon("username") intyonetici= CLng(rsCommon("Author_ID"))
'Close rs rsCommon.Close
'if you dont like it write your own welcome message strEmailBody = strTxtHi & " " & decodeString(strUsername) & _ vbCrLf & vbCrLf & "<br><br>Welcome to "& strMainForumName & _ vbCrLf & vbCrLf & "<br>"& strTxtEmailThankYouForRegistering & " " & strMainForumName & "." & _ vbCrLf & vbCrLf & "<br>You can send your questions, offers and wishes about our site with private message..."& _ vbCrLf & vbCrLf & "<br><br>Forum Administrator"& _ vbCrLf & vbCrLf & "<br><a href=""member_profile.asp?PF="&intyonetici&"""><b>"&stryonetici&"</b><a/>" 'Initalise the SQL string (ADO is used for more security) strSQL = "SELECT" & strDBTop1 & " " & strDbTable & "PMMessage.* " & _ "FROM " & strDbTable & "PMMessage" & strRowLock & " " & _ "WHERE " & strDbTable & "PMMessage.Author_ID = " & lngUserProfileID & " " & _ "ORDER BY " & strDbTable & "PMMessage.PM_Message_date DESC" & strDBLimit1 & ";"
With rsCommon
'Set the Lock Type for the records so that the record set is only locked when it is updated .LockType = 3
'Open the recordset .Open strSQL, adoCon
'Check to make sure the message is not already sent to the user If NOT .EOF Then If strEmailBody = rsCommon("PM_Message") Then blnMessageSent = True End IF
'Save the pm If blnMessageSent = False Then
'Add new record to recordset .AddNew .Fields("Author_ID") = lngUserProfileID .Fields("From_ID") = intyonetici .Fields("PM_Tittle") = "Welcome" .Fields("PM_Message") = strEmailBody .Fields("PM_Message_date") = internationalDateTime(Now()) .Update 'Update booleon that message is sent blnMessageSent = true End If
'Clean up .Close End With 'Update the number of unread PM's for the recepient Call updateUnreadPM(lngUserProfileID) End If 'WELCOME PM MOD BY GÖLGE/////////////////////////////////////// 'THE MOD ENDS AT HERE/////////////////////////////////////////
|