Beispiel #1
0
<?php

require_once dirname(__FILE__) . '/accesscheck.php';
$result = '';
if (isset($_REQUEST['delete']) && $_REQUEST['delete']) {
    $result .= s('deleting bounce %d', $_REQUEST['delete']) . "..\n";
    if ($GLOBALS['require_login'] && !isSuperUser()) {
    } else {
        deleteBounce($_REQUEST['delete']);
    }
    $result .= $GLOBALS['I18N']->get('done');
    print ActionResult($result);
}
$tabs = new WebblerTabs();
$tabs->addTab(s('processed'), PageUrl2('bounces&tab=processed'), 'processed');
$tabs->addTab(s('unidentified'), PageUrl2('bounces&tab=unidentified'), 'unidentified');
if (!isset($_GET['tab'])) {
    $_GET['tab'] = 'processed';
}
$currentTab = 'processed';
switch ($_GET['tab']) {
    case 'unidentified':
        $status_compare = '=';
        $status = 'unidentified';
        $currentTab = 'unidentified';
        break;
    case 'processed':
    default:
        $status_compare = '!=';
        $status = 'processed';
        break;
Beispiel #2
0
 }
 if (!empty($userid) && $unconfirm) {
     Sql_Query(sprintf('update %s set confirmed = 0 where id = %d', $tables["user"], $userid));
     $actionresult .= sprintf($GLOBALS['I18N']->get('Made subscriber %s unconfirmed') . "<br />", $userid);
 }
 if (!empty($userid) && $maketext) {
     Sql_Query(sprintf('update %s set htmlemail = 0 where id = %d', $tables["user"], $userid));
     $actionresult .= sprintf($GLOBALS['I18N']->get('Made subscriber %d to receive text') . "<br />", $userid);
 }
 if (!empty($userid) && $deleteuser) {
     deleteUser($userid);
     $actionresult .= sprintf($GLOBALS['I18N']->get('Deleted subscriber %d') . "<br />", $userid);
 }
 if (ALLOW_DELETEBOUNCE && $deletebounce) {
     $actionresult .= sprintf($GLOBALS['I18N']->get('Deleting bounce %d .. ') . "\n", $id);
     deleteBounce($id);
     $actionresult .= $GLOBALS['I18N']->get('..Done, loading next bounce..') . "<br /><hr/><br />\n";
     $actionresult .= PageLink2("bounces", $GLOBALS['I18N']->get('Back to the list of bounces'));
     switch ($type) {
         case 'unidentified':
             $next = Sql_Fetch_Row_query(sprintf('select id from %s where id > %d and status = "unidentified bounce"', $tables["bounce"], $id));
             $id = $next[0];
             if (!$id) {
                 $next = Sql_Fetch_Row_query(sprintf('select id from %s where status = "unidentified bounce" order by id desc limit 0,5', $tables["bounce"], $id));
             }
             break;
         case 'processed':
             $next = Sql_Fetch_Row_query(sprintf('select id from %s where id > %d and status != "unidentified bounce"', $tables["bounce"], $id));
             $id = $next[0];
             if (!$id) {
                 $next = Sql_Fetch_Row_query(sprintf('select id from %s where status != "unidentified bounce" order by id desc limit 0,5', $tables["bounce"], $id));
Beispiel #3
0
                        $advanced_report .= 'Rule: ' . $report_linkroot . '/?page=bouncerule&amp;id=' . $rule['id'] . "\n";
                        addUserHistory($userdata['email'], $GLOBALS['I18N']->get("Auto Unsubscribed"), $GLOBALS['I18N']->get("email auto unsubscribed for") . " " . $GLOBALS['I18N']->get("bounce rule") . ' ' . $rule['id']);
                        addSubscriberStatistics('auto blacklist', 1);
                        break;
                    case 'blacklistemailanddeletebounce':
                        logEvent('email ' . $userdata['email'] . ' blacklisted by bounce rule ' . PageLink2('bouncerule&amp;id=' . $rule['id'], $rule['id']));
                        addEmailToBlackList($userdata['email'], s('Email address auto blacklisted by bounce rule %d', $rule['id']));
                        $advanced_report .= 'email ' . $userdata['email'] . ' blacklisted by bounce rule ' . $rule['id'] . "\n";
                        $advanced_report .= 'User: '******'/?page=user&amp;id=' . $userdata['id'] . "\n";
                        $advanced_report .= 'Rule: ' . $report_linkroot . '/?page=bouncerule&amp;id=' . $rule['id'] . "\n";
                        addUserHistory($userdata['email'], $GLOBALS['I18N']->get("Auto Unsubscribed"), $GLOBALS['I18N']->get("User auto unsubscribed for") . " " . $GLOBALS['I18N']->get("bounce rule") . ' ' . $rule['id']);
                        addSubscriberStatistics('auto blacklist', 1);
                        deleteBounce($row['bounce']);
                        break;
                    case 'deletebounce':
                        deleteBounce($row['bounce']);
                        break;
                }
                $matched++;
            } else {
                $notmatched++;
            }
        }
    }
    outputProcessBounce($matched . ' ' . $GLOBALS['I18N']->get('bounces processed by advanced processing'));
    outputProcessBounce($notmatched . ' ' . $GLOBALS['I18N']->get('bounces were not matched by advanced processing rules'));
}
# have a look who should be flagged as unconfirmed
outputProcessBounce($GLOBALS['I18N']->get("Identifying consecutive bounces"));
# we only need users who are confirmed at the moment
$userid_req = Sql_query(sprintf('select distinct %s.user from %s,%s
Beispiel #4
0
<?php

require_once dirname(__FILE__) . '/accesscheck.php';
print '<script language="javascript" type="text/javascript" src="js/jslib.js"></script>';
if (isset($_POST['delete']) && $_POST['delete']) {
    # delete the index in delete
    print $GLOBALS['I18N']->get('deleting') . ' ' . $_POST['delete'] . "..\n";
    if ($GLOBALS["require_login"] && !isSuperUser()) {
    } else {
        deleteBounce($_POST['delete']);
    }
    print $GLOBALS['I18N']->get('done') . "<br /><hr><br />\n";
}
if (isset($_GET['action']) && $_GET['action']) {
    switch ($_GET['action']) {
        case "deleteunidentified":
            Sql_Query(sprintf('delete from %s where comment = "unidentified bounce" and date_add(date,interval 2 month) < now()', $tables["bounce"]));
            break;
        case "deleteprocessed":
            Sql_Query(sprintf('delete from %s where comment != "not processed" and date_add(date,interval 2 month) < now()', $tables["bounce"]));
            break;
        case "deleteall":
            Sql_Query(sprintf('delete from %s', $tables["bounce"]));
            break;
        case "reset":
            Sql_Query(sprintf('update %s set bouncecount = 0', $tables["user"]));
            Sql_Query(sprintf('update %s set bouncecount = 0', $tables["message"]));
            Sql_Query(sprintf('delete from %s', $tables["bounce"]));
            Sql_Query(sprintf('delete from %s', $tables["user_message_bounce"]));
    }
}