[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.99.240: ~ $
<?php

verifyCsrfGetToken();
if (!empty($_SESSION['LoadDelay'])) {
    sleep($_SESSION['LoadDelay']);
}
// domain stats
$status = '';

// Fetch all subscribers' data
$totalreq = Sql_Fetch_Row_Query(sprintf(
    'select
    count(*)
from
    %s', $GLOBALS['tables']['user']));

$total = $totalreq[0];

// Check if download flag is set (for downloading CSV)
$download = !empty($_GET['dl']);

// if download requested
if ($download) {
    ob_end_clean();
    header('Content-type: text/csv');
    header('Content-disposition:  attachment; filename="phpList Domain statistics.csv"');
    ob_start();
}

// Count the number of confirmed/unconfirmed/blacklisted users per domain and return them in descending order
$req = Sql_Query(sprintf(
    'select
    lcase( substring_index( email,"@",-1 ) ) as domain,
    sum(if(confirmed = 1 && blacklisted = 0, 1, 0)) as domain_confirmed,
    sum(if(confirmed = 0 && blacklisted = 0, 1, 0)) as domain_unconfirmed,
    sum(if(blacklisted = 1, 1, 0)) AS domain_blacklisted,
    count(email) as domain_total
from
    %s
group by
    domain
having
    domain_total > 5
order by
    domain_total desc
limit
    50', $GLOBALS['tables']['user']));

$ls = new WebblerListing(s('Top 50 domains with more than 5 subscribers'));
$ls->setElementHeading('Domain');
$columnFormat = '<strong>%s</strong> (%s%%)';

if (Sql_Num_Rows($req) > 0) {
    while ($row = Sql_Fetch_Array($req)) {
        $ls->addElement($row['domain']);

        // Calculate the number of confirmed subs on this domain as a percentage of all subscribers
        $perc = round($row['domain_confirmed'] / $total * 100);
        $ls->addColumn(
            $row['domain'],
            s('confirmed'),
            sprintf($columnFormat, number_format($row['domain_confirmed']), $perc)
        );

        // Calculate the number of unconfirmed subs on this domain as a percentage of all subscribers
        $percentUnconfirmed = round($row['domain_unconfirmed'] / $total * 100);
        $ls->addColumn(
            $row['domain'],
            s('unconfirmed'),
            sprintf($columnFormat, number_format($row['domain_unconfirmed']), $percentUnconfirmed)
        );

        // Calculate the number of blacklisted subs on this domain as a percentage of all subscribers
        $percentBlacklisted = round($row['domain_blacklisted'] / $total * 100);
        $ls->addColumn(
            $row['domain'],
            s('blacklisted'),
            sprintf($columnFormat, number_format($row['domain_blacklisted']), $percentBlacklisted)
        );

        // Calculate the number subs on this domain as a percentage of all subscribers
        $percentTotal = round($row['domain_total'] / $total * 100);
        $ls->addColumn(
            $row['domain'],
            s('total'),
            sprintf($columnFormat, number_format($row['domain_total']), $percentTotal)
        );
    }

    // Print download button
    $status .= '<div class="actions pull-right">'.PageLinkButton('page=pageaction&action=domainstats&dl=true',
            s('Download as CSV file')).'</div><div class="clearfix"></div>';
} else {
    // Print missing data notice
    $status .= '<h3>'.s('Once you have some more subscribers, this page will list statistics on the domains of your subscribers. It will list domains that have 5 or more subscribers.').'</h3>';
}

// If download was requested, send CSV
if ($download) {
    ob_end_clean();
    echo $ls->tabDelimited();
    exit;
}

$status .= $ls->display();

$status .= '<br /><br />';

// Fetch top 25 domains ordered by total unconfirmed descending
$query = Sql_Query(sprintf(
    'select
    lcase(substring_index(email,"@",-1)) as domain
    , count(email) as domain_total
    , sum(if(confirmed = 1 && blacklisted = 0, 1, 0)) as domain_confirmed
    , sum(if(confirmed = 0 && blacklisted = 0, 1, 0)) as domain_unconfirmed
    , sum(if(blacklisted = 1, 1, 0)) AS domain_blacklisted
from
    %s
group by
    domain
having
    domain_unconfirmed > 0
order by
    domain_unconfirmed DESC
    , domain_total DESC
limit
    25', $GLOBALS['tables']['user']));

// Only print table if results are found
if (Sql_Num_Rows($query) > 0) {
    $ls = new WebblerListing(s('Domains with most unconfirmed subscribers'));
    $ls->setElementHeading('Domain');

    // Loop through each domain result
    while ($row = Sql_Fetch_Assoc($query)) {
        $ls->addElement($row['domain']);

        // Calculate the number of confirmed subs on this domain as a percentage of all subscribers
        $percentConfirmed = round($row['domain_confirmed'] / $total * 100);
        $ls->addColumn(
            $row['domain'],
            s('confirmed'),
            sprintf($columnFormat, number_format($row['domain_confirmed']), $percentConfirmed)
        );

        // Calculate the number of unconfirmed subs on this domain as a percentage of all subscribers
        $percentUnconfirmed = round($row['domain_unconfirmed'] / $total * 100);
        $ls->addColumn(
            $row['domain'],
            s('unconfirmed'),
            sprintf($columnFormat, number_format($row['domain_unconfirmed']), $percentUnconfirmed)
        );
        // Calculate the number of blacklisted subs on this domain as a percentage of all subscribers
        $percentBlacklisted = round($row['domain_blacklisted'] / $total * 100);
        $ls->addColumn(
            $row['domain'],
            s('blacklisted'),
            sprintf($columnFormat, number_format($row['domain_blacklisted']), $percentBlacklisted)
        );

        // Calculate the number subs on this domain as a percentage of all subscribers
        $percentTotal = round($row['domain_total'] / $total * 100);
        // Show the total subscribers using this domain
        $ls->addColumn(
            $row['domain'],
            s('total'),
            sprintf($columnFormat, number_format($row['domain_total']), $percentTotal)
        );
    }

    // Print table
    $status .= $ls->display();
    $status .= '<br /><br />';
}

$req = Sql_Query(sprintf(
    'select
    lcase(substring_index(email,"@",1)) as preat
    , count(email) as num
from
    %s
where
    confirmed
group by
    preat
order by
    num desc, preat asc
limit
    25', $GLOBALS['tables']['user']));

$ls = new WebblerListing(s('Top 25 local-parts of email addresses'));
$ls->setElementHeading('Local-part');

while ($row = Sql_Fetch_Array($req)) {
    if ($row['num'] > 0) {
        $ls->addElement($row['preat']);
        $percentTotal = round($row['num'] / $total * 100);
        $ls->addColumn(
            $row['preat'],
            s('total'),
            sprintf($columnFormat, number_format($row['num']), $percentTotal)
        );
    }
}
$status .= $ls->display();
$status .= '<br /><br />';

$ls = new WebblerListing(s('Top 25 domains with the highest number of bounces'));
$ls->setElementHeading('Domain');
$req = Sql_Query(sprintf('
SELECT COUNT(lcase(substring_index(u.email, "@", -1))) num,
       lcase(substring_index(u.email, "@", -1)) domain
FROM %s AS u
RIGHT JOIN %s AS b ON u.id = b.user
GROUP BY domain
ORDER BY num DESC
LIMIT 25;
', $GLOBALS['tables']['user'],
    $GLOBALS['tables']['user_message_bounce']));

while ($row = Sql_Fetch_Array($req)) {
    $ls->addElement($row['domain'],  PageURL2("domainbounces&amp;domain=".$row['domain'])."&amp;bounces=".$row['num']);
    $ls->addColumn(
        $row['domain'],
        s('Bounces'),
        sprintf( number_format($row['num']),'')
    );
}
$status .= $ls->display();

Filemanager

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