<?php verifyCsrfGetToken(); if ($_GET['option'] == 'deleteinvalidemail') { $status = s('Deleting subscribers with an invalid email').'<br/ >'; flush(); $req = Sql_Query("select id,email from {$tables['user']}"); $c = 0; while ($row = Sql_Fetch_Array($req)) { set_time_limit(60); if (!is_email($row['email'])) { ++$c; deleteUser($row['id']); } } $status .= $c.' '.s('subscribers deleted')."<br/>\n"; } elseif ($_GET['option'] == 'deleteblacklisted') { // Delete subscribers who are blacklisted (for any reason) $status = s('Deleting blacklisted subscribers').'<br/ >'; flush(); $req = Sql_Query(' SELECT id FROM '.$tables['user'].' WHERE blacklisted = 1' ); $c = 0; while ($row = Sql_Fetch_Array($req)) { set_time_limit(60); ++$c; deleteUserIncludeBlacklist($row['id']); } $status .= $c.' '.s('subscribers deleted')."<br/>\n"; } elseif ($_GET['option'] == 'deleteblacklistedunsubscribed') { // Delete subscribers who are blacklisted because they unsubscribed $status = s('Deleting blacklisted subscribers').'<br/ >'; flush(); $req = Sql_Query(' SELECT * FROM '.$tables['user'].' AS u LEFT JOIN '.$tables['user_blacklist'].' AS bl ON bl.email = u.email LEFT JOIN '.$tables['user_blacklist_data'].' AS bld ON bld.email = u.email WHERE blacklisted = 1 AND bld.name = "reason" AND bld.data = \''.s('"Jump off" set, reason not requested').'\'' ); $c = 0; while ($row = Sql_Fetch_Array($req)) { set_time_limit(60); ++$c; deleteUserIncludeBlacklist($row['id']); } $status .= $c.' '.s('subscribers deleted')."<br/>\n"; } elseif ($_GET['option'] == 'relinksystembounces') { $status = s('Relinking transactional messages that bounced to the related subscriber profile').'<br/ >'; $req = Sql_Query(sprintf('select count(id) from %s b where b.status = "bounced system message" and b.comment like "%% marked unconfirmed" and id not in (select distinct bounce from %s)',$tables['bounce'],$tables['user_message_bounce'])); $totalRow = Sql_Fetch_Row($req); $total = $totalRow[0]; $status .= s('%d to process',$total).'<br/>'; flush(); $cnt = 0; $done = 0; $req = Sql_Query(sprintf('select id,comment,date from %s where status = "bounced system message" and comment like "%% marked unconfirmed" and id not in (select distinct bounce from %s)',$tables['bounce'],$tables['user_message_bounce'])); while ($row = Sql_Fetch_Assoc($req)) { ++$cnt; set_time_limit(60); if (preg_match('/([\d]+) marked unconfirmed/',$row['comment'],$regs)) { $exists = Sql_Fetch_Row_Query(sprintf('select count(*) from %s where user = %d and message = -1 and bounce = %d',$tables['user_message_bounce'],$regs[1],$row['id'])); if (empty($exists[0])) { Sql_Query(sprintf('insert into %s (user,message,bounce,time) values(%d,-1,%d,"%s")',$tables['user_message_bounce'],$regs[1],$row['id'],$row['date'])); ++$done; } } } $status .= s('%d bounces have been associated with a subscriber profile',$done); }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.htaccess | File | 231 B | 0644 |
|
addemail.php | File | 1.08 KB | 0644 |
|
addlist.php | File | 69 B | 0644 |
|
bounce.php | File | 166 B | 0644 |
|
bounces.php | File | 1.43 KB | 0644 |
|
campaigns.php | File | 3.03 KB | 0644 |
|
checkurl.php | File | 753 B | 0644 |
|
configure.php | File | 4.03 KB | 0644 |
|
domainbounces.php | File | 1.66 KB | 0644 |
|
domainstats.php | File | 7.29 KB | 0644 |
|
export.php | File | 8.73 KB | 0644 |
|
generatetext.php | File | 1.04 KB | 0644 |
|
generatetextpreview.php | File | 1.42 KB | 0644 |
|
getservertime.php | File | 129 B | 0644 |
|
hidenote.php | File | 258 B | 0644 |
|
import.php | File | 187 B | 0644 |
|
import1.php | File | 10.42 KB | 0644 |
|
import2.php | File | 27.49 KB | 0644 |
|
importsimple.php | File | 187 B | 0644 |
|
initlanguage.php | File | 245 B | 0644 |
|
keepalive.php | File | 108 B | 0644 |
|
listbounces.php | File | 2.3 KB | 0644 |
|
listmembercount.php | File | 2.1 KB | 0644 |
|
markread.php | File | 344 B | 0644 |
|
mclicks.php | File | 4.97 KB | 0644 |
|
mergeduplicatelists.php | File | 1.41 KB | 0644 |
|
msgbounces.php | File | 2.35 KB | 0644 |
|
msgsent.php | File | 886 B | 0644 |
|
msgstatus.php | File | 5.82 KB | 0644 |
|
mviews.php | File | 4.72 KB | 0644 |
|
plugins.php | File | 1.75 KB | 0644 |
|
processqueue.php | File | 60.86 KB | 0644 |
|
reconcileusers.php | File | 3.32 KB | 0644 |
|
removeemptylists.php | File | 379 B | 0644 |
|
searchemail.php | File | 839 B | 0644 |
|
shownotes.php | File | 75 B | 0644 |
|
statsoverview.php | File | 6.53 KB | 0644 |
|
storemessage.php | File | 1.81 KB | 0644 |
|
subscription.php | File | 3.91 KB | 0644 |
|
test.php | File | 12 B | 0644 |
|
updatetranslation.php | File | 835 B | 0644 |
|
upgrade.php | File | 307 B | 0644 |
|
user.php | File | 756 B | 0644 |
|
viewtemplate.php | File | 1.1 KB | 0644 |
|