Print Page | Close Window

PM all users?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10023
Printed Date: 08 April 2026 at 5:18am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: PM all users?
Posted By: Mikael
Subject: PM all users?
Date Posted: 16 April 2004 at 2:48pm
I found a mass e-mail function in the forum, but I want to mass-PM all my users. Is there a simple way to do this in?



Replies:
Posted By: dj air
Date Posted: 16 April 2004 at 2:51pm

re create the private message form .. but instead of just adding it for one user .. do a loop... so that it loops around untill the records are eof

for each loop do an add new for the user from your self



Posted By: Mikael
Date Posted: 16 April 2004 at 4:54pm

Ahh, good idea! Maybe this will be included in the admin-area in the next version...



Posted By: FreeMen
Date Posted: 19 April 2004 at 8:10am

I found this by Fernan some time ago. Check it out....

<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="common.asp" -->
<%
'*********************************************************** *****************************
'PM Groups Mod by Fernan http://uz.webhop.info - http://uz.webhop.info
'*********************************************************** *****************************

'Set the buffer to true
Response.Buffer = True

'Make sure this page is not cached
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "private"

'Declare variables
Dim strMode    'Holds the mode of the page
Dim strPostPage   'Holds the page the form is posted to
Dim lngMessageID  'Holds the pm id
Dim strTopicSubject  'Holds the subject
Dim strBuddyName  'Holds the to username
Dim dtmReplyPMDate  'Holds the reply pm date
Dim strMessage   'Holds the post message
Dim intForumID   'Holds the forum number
Dim SQL
Dim intRecordLoopScan


'Set the mode of the page
strMode = "PM"
lngMessageID = 0


'If the user is user is using a banned IP redirect to an error page
If bannedIP() Then
 'Clean up
 Set rsCommon = Nothing
 adoCon.Close
 Set adoCon = Nothing

 'Redirect
 Response.Redirect("insufficient_permission.asp?M=IP")

End If

 

'If Priavte messages are not on then send them away
If blnPrivateMessages = False Then
 'Clean up
 Set rsCommon = Nothing
 adoCon.Close
 Set adoCon = Nothing

 'Redirect
 Response.Redirect("default.asp")
End If


'If the user is not allowed then send them away
If Not blnAdmin Then
 'Clean up
 Set rsCommon = Nothing
 adoCon.Close
 Set adoCon = Nothing

 'Redirect
 Response.Redirect("insufficient_permission.asp")
End If


%>
<html>
<head>
<script  language="JavaScript">

function CheckForm () {

 var errorMsg = "";


 
 if (document.frmPMs.pmSubject.value==""){
  errorMsg += "\n\tYou must enter a subject.";
 }

 
 if (document.frmPMs.pmBody.value==""){
  errorMsg += "\n\tYou must enter a message body.";
 }


 
 if (errorMsg != ""){
  msg = "___________________________________________________________ ____\n\n";
  msg += "The form has not been submitted because there are problem(s) with the form.\n";
  msg += "Please correct the problem(s) and re-submit the form.\n";
  msg += "___________________________________________________________ ____\n\n";
  msg += "The following field(s) need to be corrected: -\n";

  errorMsg += alert(msg + errorMsg + "\n\n");
  return false;
 }

 return true;
}

</script>
</head>
<title>PM Groups Mod by Fernan</title>


<%

'*********************************************************** **********************************

%>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="50%" id="AutoNumber1" height="95" align = "center">
    <tr>
      <td width="100%" height="95" valign="top">
<form method="post" name="frmPMs" action="send_pms.asp" onSubmit="return CheckForm();">
  <br>
  <p style="margin-left: 10; margin-right: 10">
Group to PM:
      <select size="1" name="pmGID">
<%
SQL = "SELECT tblGroup.Group_ID, tblGroup.Name FROM tblGroup Where Not tblGroup.Name = 'Guest'"
rsCommon.CursorType = 1
rsCommon.Open SQL, adoCon

For intRecordLoopScan = 1 to rsCommon.RecordCount

If Not rsCommon.EOF Then
%>
<option value="<% = rsCommon("Group_ID") %>"><% = rsCommon("name") %></option>"
<%
End If
rsCommon.MoveNext
Next
%>
<option value="All">All</option>
      </select><br><br>
Subject: <input type="text" name="pmSubject" size="30" maxlength="41"><br>
<br>
<textarea rows="13" name="pmBody" cols="54"></textarea><br><br>
<center><input type="Submit" value="Send" name="Submit">&nbsp;&nbsp;<input type="reset" value="Reset" name="Reset"></center>
      </form>
      </p>
      </td>
    </tr>
  </table>


<%

'Reset server variables
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing

%><br />
<div align="center">

</div>
</html>

Save as something and just go to that page...

Good luck!



Posted By: MadDog
Date Posted: 19 April 2004 at 1:32pm
Perhaps this should be moved to the mods forum?

-------------
http://www.iportalx.net" rel="nofollow">


Posted By: FreeMen
Date Posted: 20 April 2004 at 1:46am
Good idea, since it was removed there...


Posted By: FreeMen
Date Posted: 20 April 2004 at 9:04am

No need to move:

http://forums.webwiz.net/forum_posts.asp?TID=2955 - http://forums.webwiz.net/forum_posts.asp?TID=29 55




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net