echo "<tr><td colspan=2><b>Private message to users where:</b></td></tr>\n";
makeinputcode("User Name contains","ausername");
if ($pwdincp!=0) {
makeinputcode("and password contains","apassword");
}
makechoosercode("and usergroup is","usergroupid","usergroup",-1,"Any");
makeinputcode("and email contains","aemail");
makeinputcode("and parent's email contains","parentemail");
makeinputcode("and is coppa user (yes, no, blank for don't mind)","coppauser");
makeinputcode("and homepage contains","homepage");
makeinputcode("and ICQ Number contains","icq");
makeinputcode("and AIM Handle contains","aim");
makeinputcode("and Yahoo Messenger Handle contains","yahoo");
makeinputcode("and Biography contains","biography");
makeinputcode("and Signature contains","signature");
makeinputcode("and User Title contains","usertitle");
makeinputcode("and Join Date is after<br>(Format yyyy-mm-dd, leave blank for today)","joindateafter");
makeinputcode("and Join Date is before<br>(Format yyyy-mm-dd, leave blank for today)","joindatebefore");
makeinputcode("and Last Visit is after<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastvisitafter");
makeinputcode("and Last Visit is before<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastvisitbefore");
makeinputcode("and Last Post is after<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastpostafter");
makeinputcode("and Last Post is before<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastpostbefore");
makeinputcode("and Number of Posts is greater than","postslower");
makeinputcode("and Number of Posts is less than","postsupper");
doformfooter();
}
if ($action=="masspm") {
if ($condition=="") {
$condition="1=1";
if ($ausername!="") {
$condition.=" AND INSTR(username,'".addslashes(htmlspecialchars($ausername))."')>0";
}
if ($apassword!="") {
$condition.=" AND INSTR(password,'".addslashes($apassword)."')>0";
}
if ($usergroupid!=-1 and $usergroupid!="") {
$condition.=" AND usergroupid=$usergroupid";
}
if ($aemail!="") {
$condition.=" AND INSTR(email,'".addslashes(htmlspecialchars($aemail))."')>0";
}
if ($parentemail!="") {
$condition.=" AND INSTR(parentemail,'".addslashes(htmlspecialchars($parentemail))."')>0";
}
$coppauser=strtolower($coppauser);
if ($coppauser=="yes") {
$condition.=" AND coppauser=1";
}
if ($coppauser=="no") {
$condition.=" AND coppauser=0";
}
if ($homepage!="") {
$condition.=" AND INSTR(homepage,'".addslashes(htmlspecialchars($homepage))."')>0";
}
if ($icq!="") {
$condition.=" AND INSTR(icq,'".addslashes(htmlspecialchars($icq))."')>0";
}
if ($aim!="") {
$condition.=" AND INSTR(aim,'".addslashes(htmlspecialchars($aim))."')>0";
}
if ($yahoo!="") {
$condition.=" AND INSTR(yahoo,'".addslashes(htmlspecialchars($yahoo))."')>0";
}
if ($biography!="") {
$condition.=" AND INSTR(biography,'".addslashes(htmlspecialchars($biography))."')>0";
}
if ($signature!="") {
$condition.=" AND INSTR(signature,'".addslashes($signature)."')>0";
}
if ($usertitle!="") {
$condition.=" AND INSTR(usertitle,'".addslashes($usertitle)."')>0";
}
if ($joindateafter!="") {
$condition.=" AND joindate>UNIX_TIMESTAMP('".addslashes($joindateafter)."')";
}
if ($joindatebefore!="") {
$condition.=" AND joindate<UNIX_TIMESTAMP('".addslashes($joindatebefore)."')";
}
if ($lastvisitafter!="") {
$condition.=" AND lastvisit>UNIX_TIMESTAMP('".addslashes($lastvisitafter)."')";
}
if ($lastvisitbefore!="") {
$condition.=" AND lastvisit<UNIX_TIMESTAMP('".addslashes($lastvisitbefore)."')";
}
if ($lastpostafter!="") {
$condition.=" AND lastpost>UNIX_TIMESTAMP('".addslashes($lastpostafter)."')";
}
if ($lastpostbefore!="") {
$condition.=" AND lastpost<UNIX_TIMESTAMP('".addslashes($lastpostbefore)."')";
}
if ($postslower!="") {
$condition.=" AND posts>'$postslower'";
}
if ($postsupper!="") {
$condition.=" AND posts<'$postsupper'";
}
}
$users=$DB_site->query("SELECT userid,username,password,email FROM user WHERE $condition");
Is there anyway you can limit who it gets sent to?
(using the last visited, or join date fields)
Our board is over a year old and I just sent all these old users a test message which is a waste since they are long gone. Since my board is event based, if they are gone for more than a few months they probablyaren't coming back (which is fine!)
me2be, it is just a matter of ammending the SELECT user line and adding an extra condition after WHERE. I will try and get the exact command i don't know how to do it with dates at the moment but someone might.
What does this mean? It still shows the forum underneath the errors:
Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 68
Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 69
Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 70
Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 71
Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/***/admin/masspm.php:2) in /usr/local/etc/httpd/***/admin/global.php on line 128