Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id$
| * $Id: massmail.php 5379 2011-02-21 11:06:42Z Tomm $
|
*/
|
*/
|
| // Disallow direct access to this file for security reasons if(!defined("IN_MYBB")) { die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined."); }
|
require_once MYBB_ROOT."/inc/functions_massmail.php"; require_once MYBB_ROOT."inc/datahandlers/pm.php";
| require_once MYBB_ROOT."/inc/functions_massmail.php"; require_once MYBB_ROOT."inc/datahandlers/pm.php";
|
Zeile 20 | Zeile 26 |
---|
while($mass_email = $db->fetch_array($query)) { if($mass_email['status'] == 1)
|
while($mass_email = $db->fetch_array($query)) { if($mass_email['status'] == 1)
|
{
| {
|
$db->update_query("massemails", array('status' => 2), "mid='{$mass_email['mid']}'", 1);
|
$db->update_query("massemails", array('status' => 2), "mid='{$mass_email['mid']}'", 1);
|
} $sentcount = 0;
| } $sentcount = 0;
|
if(!$mass_email['perpage']) {
| if(!$mass_email['perpage']) {
|
Zeile 41 | Zeile 47 |
---|
// Need to perform the search to fetch the number of users we're emailing $member_query = build_mass_mail_query(unserialize($mass_email['conditions']));
|
// Need to perform the search to fetch the number of users we're emailing $member_query = build_mass_mail_query(unserialize($mass_email['conditions']));
|
| $count_query = $db->simple_select("users u", "COUNT(uid) AS num", $member_query); $mass_email['totalcount'] = $db->fetch_field($count_query, "num");
|
$query2 = $db->simple_select("users u", "u.uid, u.language, u.pmnotify, u.lastactive, u.username, u.email", $member_query, array('limit_start' => $mass_email['sentcount'], 'limit' => $mass_email['perpage'], 'order_by' => 'u.uid', 'order_dir' => 'asc')); while($user = $db->fetch_array($query2))
| $query2 = $db->simple_select("users u", "u.uid, u.language, u.pmnotify, u.lastactive, u.username, u.email", $member_query, array('limit_start' => $mass_email['sentcount'], 'limit' => $mass_email['perpage'], 'order_by' => 'u.uid', 'order_dir' => 'asc')); while($user = $db->fetch_array($query2))
|
Zeile 119 | Zeile 128 |
---|
$update_array = array(); $update_array['sentcount'] = $mass_email['sentcount'] + $sentcount;
|
$update_array = array(); $update_array['sentcount'] = $mass_email['sentcount'] + $sentcount;
|
| $update_array['totalcount'] = $mass_email['totalcount'];
|
if($update_array['sentcount'] >= $mass_email['totalcount']) {
| if($update_array['sentcount'] >= $mass_email['totalcount']) {
|