Exemple #1
0
            $deleted++;
        } elseif (!empty($campaignCount[0])) {
            $notDeleted++;
        } else {
            $notfound++;
        }
        if ($total > 100) {
            if ($count % 100 == 0) {
                printf('%d/%d<br/>', $count, $total);
                flushBrowser();
            }
        }
    }
    print s('All done, %d emails processed<br/>%d emails blacklisted<br/>%d emails deleted<br/>%d emails not found', $count, $blacklisted, $deleted, $notfound);
    print '<br/>' . s('%d subscribers could not be deleted, because they have already received campaigns', $notDeleted);
    print '<br/>' . PageLinkButton('massremove', s('Remove more'));
    return;
}
?>

<form method=post action="">
<h3><?php 
echo $GLOBALS['I18N']->get('Mass remove email addresses');
?>
</h3>

<?php 
echo $GLOBALS['I18N']->get('Check to also add the emails to the blacklist');
?>
  <input type="checkbox" name="blacklist" value="1"><br/>
<p class="information"><?php 
Exemple #2
0
    $unblacklist = sprintf('%d', $_GET["unblacklist"]);
    unBlackList($unblacklist);
    Redirect("userhistory&id=" . $unblacklist);
}
$result = Sql_query("SELECT * FROM {$tables["user"]} where id = {$id}");
if (!Sql_Affected_Rows()) {
    Fatal_Error($GLOBALS['I18N']->get('no such User'));
    return;
}
$user = sql_fetch_array($result);
print '<h3>' . $GLOBALS['I18N']->get('user') . ' ' . PageLink2("user&id=" . $user["id"], $user["email"]) . '</h3>';
print '<div class="actions">';
//printf('<a href="%s" class="button">%s</a>',getConfig("preferencesurl").
//'&amp;uid='.$user["uniqid"],$GLOBALS['I18N']->get('update page'));
//printf('<a href="%s" class="button">%s</a>',getConfig("unsubscribeurl").'&amp;uid='.$user["uniqid"],$GLOBALS['I18N']->get('unsubscribe page'));
print PageLinkButton("user&amp;id={$id}", $GLOBALS['I18N']->get('Details'));
if ($access != "view") {
    printf("<a class=\"delete button\" href=\"javascript:deleteRec('%s');\">" . $GLOBALS['I18N']->get('delete') . "</a>", PageURL2("user", "", "delete={$id}"));
}
print '</div>';
$bouncels = new WebblerListing($GLOBALS['I18N']->get('Bounces'));
$bouncelist = "";
$bounces = array();
# check for bounces
$req = Sql_Query(sprintf('select *,date_format(time,"%%e %%b %%Y %%T") as ftime from %s where user = %d', $tables["user_message_bounce"], $user["id"]));
if (Sql_Affected_Rows()) {
    while ($row = Sql_Fetch_Array($req)) {
        $bouncels->addElement($row["bounce"], PageURL2("bounce", $GLOBALS['I18N']->get('view'), "id=" . $row["bounce"]));
        $bouncels->addColumn($row["bounce"], $GLOBALS['I18N']->get('msg'), $row["message"]);
        $bouncels->addColumn($row["bounce"], $GLOBALS['I18N']->get('time'), $row["ftime"]);
        $bounces[$row["message"]] = $row["ftime"];
Exemple #3
0
">
            <?php 
echo $GLOBALS['I18N']->get('Find an admin');
?>
: <input type=text name="find"
                                                                         value="<?php 
echo htmlspecialchars($find);
?>
"
                                                                         size="40"><input type="submit"
                                                                                          value="<?php 
echo $GLOBALS['I18N']->get('Go');
?>
">
            </form></td>
    </tr>
</table>
<?php 
$ls = new WebblerListing($GLOBALS['I18N']->get('Administrators'));
$ls->usePanel($paging);
while ($admin = Sql_fetch_array($result)) {
    $delete_url = sprintf("<a href=\"javascript:deleteRec('%s');\">" . $GLOBALS['I18N']->get('del') . '</a>', PageURL2('admins', 'Delete', "start={$start}&amp;delete=" . $admin['id']));
    $ls->addElement($admin['loginname'], PageUrl2('admin', $GLOBALS['I18N']->get('Show'), "start={$start}&amp;id=" . $admin['id'] . $remember_find));
    if (!$external && $admin['id'] != $_SESSION['logindetails']['id']) {
        $ls->addColumn($admin['loginname'], $GLOBALS['I18N']->get('Del'), $delete_url);
    }
}
print $ls->display();
print '<br/><hr/>';
print PageLinkButton('admin', $GLOBALS['I18N']->get('Add a new administrator'), "start={$start}" . $remember_find);
print '<p class="button">' . PageLink2('importadmin', $GLOBALS['I18N']->get('Import list of admins')) . '</p>';
    $emails = explode("\n", $_POST['unsubscribe']);
    $count = 0;
    $unsubbed = $blacklisted = 0;
    foreach ($emails as $email) {
        $email = trim($email);
        ++$count;
        set_time_limit(30);
        Sql_Query(sprintf('update %s set confirmed = 0 where email = "%s"', $GLOBALS['tables']['user'], $email));
        $unsubbed += Sql_Affected_Rows();
        if (!empty($_POST['blacklist'])) {
            ++$blacklisted;
            addUserToBlackList($email, $GLOBALS['I18N']->get('Blacklisted by') . ' ' . $_SESSION['logindetails']['adminname']);
        }
    }
    printf($GLOBALS['I18N']->get('All done, %d emails processed, %d emails marked unconfirmed, %d emails blacklisted<br/>'), $count, $unsubbed, $blacklisted);
    print PageLinkButton('suppressionlist', s('Add more'));
    return;
}
?>

<form method="post" action="">
<h3><?php 
echo $GLOBALS['I18N']->get('Manage suppression list');
?>
</h3>
<?php 
echo $GLOBALS['I18N']->get('Make suppression permanent');
?>
  <input type="checkbox" name="blacklist" value="1" checked="checked" /></br />
<p class="information"><?php 
echo $GLOBALS['I18N']->get('Paste the emails to mark unconfirmed in this box, and click continue');
Exemple #5
0
    #  print $query;
    $result = Sql_Query($query);
    if (!$id) {
        $id = sql_insert_id();
        $_SESSION['action_result'] = s('New list added') . ": {$id}";
        $_SESSION['newlistid'] = $id;
    } else {
        $_SESSION['action_result'] = s('Changes saved');
    }
    ## allow plugins to save their fields
    foreach ($GLOBALS['plugins'] as $plugin) {
        $result = $result && $plugin->processEditList($id);
    }
    print '<div class="actionresult">' . $_SESSION['action_result'] . '</div>';
    if ($_GET['page'] == 'editlist') {
        print '<div class="actions">' . PageLinkButton('importsimple&amp;list=' . $id, s('Add some subscribers')) . ' ' . PageLinkButton('editlist', s('Add another list')) . '</div>';
    }
    unset($_SESSION['action_result']);
    return;
    ## doing this, the action result disappears, which we don't want
    Redirect('list');
}
if (!empty($id)) {
    $result = Sql_Query("SELECT * FROM " . $GLOBALS['tables']['list'] . " where id = {$id}");
    $list = Sql_Fetch_Array($result);
} else {
    $list = array('name' => '', 'active' => 0, 'listorder' => 0, 'description' => '');
}
if (empty($list['category'])) {
    $list['category'] = '';
}
Exemple #6
0
}
// end while
# lets be gramatically correct :-)
$displists = $num_lists == 1 ? $GLOBALS['I18N']->get('list') : $GLOBALS['I18N']->get('lists');
$dispemail = $count_email_add == 1 ? $GLOBALS['I18N']->get('new email was') : $GLOBALS['I18N']->get('new emails were');
$dispemail2 = $additional_emails == 1 ? $GLOBALS['I18N']->get('email was') : $GLOBALS['I18N']->get('emails were');
if ($count_email_exist) {
    $report .= '<br/> ' . s('%d emails already existed in the database', $count_email_exist);
}
if (!$some && !$additional_emails) {
    $report .= '<br/>' . s('All the emails already exist in the database.');
} else {
    $report .= "<br/>{$count_email_add} {$dispemail} " . s('succesfully imported to the database and added to') . " {$num_lists} {$displists}.<br/>{$additional_emails} {$dispemail2} " . $GLOBALS['I18N']->get('subscribed to the') . " {$displists}";
}
if ($foundBlacklisted) {
    $report .= '<br/>' . s('%d emails were found on the do-not-send-list and have not been added to the lists', $foundBlacklisted);
}
$htmlupdate = $report . '<br/>' . PageLinkButton('import1', s('Import some more emails'));
$htmlupdate = str_replace("'", "\\'", $htmlupdate);
$status = '<script type="text/javascript">
      var parentJQuery = window.parent.jQuery;
      parentJQuery("#progressbar").progressbar("destroy");
      parentJQuery("#busyimage").hide();
      parentJQuery("#progresscount").html(\'' . $htmlupdate . '\');
      </script>';
@unlink($GLOBALS['tmpdir'] . '/' . $file);
@unlink($GLOBALS['tmpdir'] . '/' . $file . '.data');
#  print ActionResult($report);
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
    $plugin->importReport($report);
}
Exemple #7
0
    foreach ($_POST['category'] as $key => $val) {
        Sql_Query(sprintf('update %s set category = "%s" %s and id = %d ', $tables['list'], sql_escape($val), $subselect, $key));
    }
    if (isset($_GET['show']) && $_GET['show'] == 'all') {
        $_SESSION['action_result'] = s('Category assignments saved');
        Redirect('list');
    } else {
        Info(s('Categories saved'), true);
    }
}
$req = Sql_Query(sprintf('select * from %s %s', $tables['list'], $subselect));
if (!Sql_Affected_Rows()) {
    Info(s('All lists have already been assigned a category') . '<br/>' . PageLinkButton('list', s('Back')), true);
}
print '<div class="fright">' . PageLinkButton('catlists&show=all', s('Re-edit all lists')) . '</div>';
print '<div class="fright">' . PageLinkButton('configure&id=list_categories&ret=catlists', $I18N->get('Configure Categories')) . '</div>';
$ls = new WebblerListing(s('Categorise lists'));
$aListCategories = listCategories();
if (count($aListCategories)) {
    while ($row = Sql_Fetch_Assoc($req)) {
        $ls->addELement($row['id']);
        $ls->addColumn($row['id'], $GLOBALS['I18N']->get('Name'), stripslashes($row['name']));
        $catselect = '<select name="category[' . $row['id'] . ']">';
        $catselect .= '<option value="">-- ' . s('choose category') . '</option>';
        $catselect .= '<option value="">-- ' . s('none') . '</option>';
        foreach ($aListCategories as $category) {
            $category = trim($category);
            $catselect .= sprintf('<option value="%s" %s>%s</option>', $category, $category == $row['category'] ? 'selected="selected"' : '', $category);
        }
        $catselect .= '</select>';
        $ls->addColumn($row['id'], s('Category'), $catselect);
Exemple #8
0
             }
         } else {
             ## email doesn't validate
             $id = 0;
         }
     } else {
         $id = 0;
     }
 } else {
     $id = sprintf('%d', $_POST["id"]);
     ##17388 - disallow changing an admin email to an already existing one
     if (!empty($_POST['email'])) {
         $exists = Sql_Fetch_Row_Query(sprintf('select id from %s where email = "%s"', $tables['admin'], sql_escape($_POST['email'])));
         if (!empty($exists[0]) && $exists[0] != $id) {
             Error(s('Cannot save admin, that email address already exists for another admin'));
             print PageLinkButton('admin&id=' . $id, s('Back to edit admin'));
             return;
         }
     }
 }
 if ($id) {
     print '<div class="actionresult">';
     reset($struct);
     while (list($key, $val) = each($struct)) {
         $a = $b = '';
         if (strstr($val[1], ':')) {
             list($a, $b) = explode(":", $val[1]);
         }
         if ($a != "sys" && isset($_POST[$key])) {
             Sql_Query("update {$tables["admin"]} set {$key} = \"" . addslashes($_POST[$key]) . "\" where id = {$id}");
         }
Exemple #9
0
        $viewed = Sql_Fetch_Array_Query(sprintf('select count(viewed) as viewed from %s um where um.status = "sent"', $GLOBALS['tables']['usermessage']));
        $overall = $GLOBALS['I18N']->get('Comparison to other admins');
        $ls->addElement($overall);
        $ls->addColumn($overall, $GLOBALS['I18N']->get('views'), $viewed['viewed']);
        $perc = sprintf('%0.2f', $viewed['viewed'] / $total['total'] * 100);
        $ls->addColumn($overall, $GLOBALS['I18N']->get('rate'), $perc . ' %');
    }
    if ($download) {
        ob_end_clean();
        print $ls->tabDelimited();
    }
    print $ls->display();
    return;
}
#print '<h3>'.$GLOBALS['I18N']->get('Campaign statistics').'</h3>';
print PageLinkButton('statsoverview', s('View all campaigns'));
$messagedata = loadMessageData($id);
//var_dump($messagedata);
print '<h3>' . $messagedata['subject'] . '</h3>';
$ls = new WebblerListing('');
$element = ucfirst(s('Subject'));
$ls->addElement($element);
$ls->addColumn($element, '&nbsp;', shortenTextDisplay($messagedata['subject'], 30));
$element = ucfirst(s('Date entered'));
$ls->addElement($element);
$ls->addColumn($element, '&nbsp;', $messagedata['entered']);
$element = ucfirst(s('Date sent'));
$ls->addElement($element);
$ls->addColumn($element, '&nbsp;', $messagedata['sent']);
$element = ucfirst(s('Sent as HTML'));
$ls->addElement($element);
Exemple #10
0
    # mark the database to be our current version
    if ($success) {
        SaveConfig('version', VERSION, 0);
        # mark now to be the last time we checked for an update
        SaveConfig('updatelastcheck', date('Y-m-d H:i:s', time()), 0, true);
        ## also clear any possible value for "updateavailable"
        Sql_Query(sprintf('delete from %s where item = "updateavailable"', $tables['config']));
        Info(s('Success'), 1);
        upgradePlugins(array_keys($GLOBALS['plugins']));
        print subscribeToAnnouncementsForm();
        ##  check for old click track data
        $num = Sql_Fetch_Row_Query(sprintf('select count(*) from %s', $GLOBALS['tables']['linktrack']));
        if ($num[0] > 0) {
            print '<p class="information">' . $GLOBALS['I18N']->get('The clicktracking system has changed') . '</p>';
            printf($GLOBALS['I18N']->get('You have %s entries in the old statistics table'), $num[0]) . ' ';
            print ' ' . PageLinkButton('convertstats', $GLOBALS['I18N']->get('Convert Old data to new'));
        }
        if ($GLOBALS['commandline']) {
            output($GLOBALS['I18N']->get('Upgrade successful'));
        }
    } else {
        Error('An error occurred while upgrading your database');
        if ($GLOBALS['commandline']) {
            output($GLOBALS['I18N']->get('Upgrade failed'));
        }
    }
} else {
    print '<p>' . s('Your database requires upgrading, please make sure to create a backup of your database first.') . '</p>';
    print '<p>' . s('If you have a large database, make sure you have sufficient diskspace available for upgrade.') . '</p>';
    print '<p>' . s('When you are ready click %s Depending on the size of your database, this may take quite a while. Please make sure not to interrupt the process, once it started.', PageLinkButton('upgrade&doit=yes', s('Upgrade'))) . '</p>';
}
Exemple #11
0
    $emails = explode("\n", $_POST['unsubscribe']);
    $count = 0;
    $unsubbed = $blacklisted = 0;
    foreach ($emails as $email) {
        $email = trim($email);
        $count++;
        set_time_limit(30);
        Sql_Query(sprintf('update %s set confirmed = 0 where email = "%s"', $GLOBALS['tables']['user'], $email));
        $unsubbed += Sql_Affected_Rows();
        if (!empty($_POST['blacklist'])) {
            $blacklisted++;
            addUserToBlackList($email, $GLOBALS['I18N']->get('Blacklisted by') . ' ' . $_SESSION['logindetails']['adminname']);
        }
    }
    printf($GLOBALS['I18N']->get('All done, %d emails processed, %d emails marked unconfirmed, %d emails blacklisted<br/>'), $count, $unsubbed, $blacklisted);
    print PageLinkButton('massunconfirm', s('Add more'));
    return;
}
?>

<form method="post" action="">
<h3><?php 
echo $GLOBALS['I18N']->get('Manage suppression list');
?>
</h3>
<?php 
echo $GLOBALS['I18N']->get('Make suppression permanent');
?>
  <input type="checkbox" name="blacklist" value="1" checked="checked" /></br />
<p class="information"><?php 
echo $GLOBALS['I18N']->get('Paste the emails to mark unconfirmed in this box, and click continue');
Exemple #12
0
        $_SESSION['action_result'] .= '<br />' . PageLinkButton('send&amp;id=' . $messagedata['id'] . '&amp;tab=Scheduling', s('Review Scheduling'));
    }
    Redirect('messages&tab=active');
    exit;
}
require_once $coderoot . 'structure.php';
$result = Sql_Fetch_Assoc_query(sprintf('select id, subject from %s where id = %d %s', $tables['message'], $id, $owner_select_and));
if (empty($result['id'])) {
    print $GLOBALS['I18N']->get('No such campaign');
    return;
}
$campaignTitle = $result['subject'];
$msgdata = loadMessageData($id);
if ($msgdata['status'] == 'draft' || $msgdata['status'] == 'suspended') {
    print '<div class="actions">';
    print '<p>' . PageLinkButton('send&amp;id=' . $id, $GLOBALS['I18N']->get('Edit this message')) . '</p>';
    print '</div>';
} else {
    print '<div class="actions">';
    $editbutton = new ConfirmButton(s('Editing an active or finished campaign will place it back in the draft queue, continue?'), PageURL2('send&id=' . $id), s('Edit campaign'));
    print $editbutton->show();
    print '</div>';
}
$content = '<table class="messageView">';
$format = '<tr><td valign="top" class="dataname">%s</td><td valign="top">%s</td></tr>';
$content .= sprintf($format, s('entered'), stripslashes($msgdata['entered']));
$content .= sprintf($format, s('fromfield'), stripslashes($msgdata['fromfield']));
$content .= sprintf($format, s('message'), stripslashes($msgdata['message']));
$content .= sprintf($format, s('textmessage'), nl2br(stripslashes($msgdata['textmessage'])));
$content .= sprintf($format, s('footer'), stripslashes($msgdata['footer']));
$finishSending = mktime($msgdata['finishsending']['hour'], $msgdata['finishsending']['minute'], 0, $msgdata['finishsending']['month'], $msgdata['finishsending']['day'], $msgdata['finishsending']['year']);
Exemple #13
0
<?php

require_once dirname(__FILE__) . '/accesscheck.php';
# domain stats
$totalreq = Sql_Fetch_Row_Query(sprintf('select count(*) from %s', $GLOBALS['tables']['user']));
$total = $totalreq[0];
$download = !empty($_GET['dl']);
if ($download) {
    ob_end_clean();
    #  header("Content-type: text/plain");
    header('Content-type: text/csv');
    header('Content-disposition:  attachment; filename="phpList Domain statistics.csv"');
    ob_start();
}
print '<div class="actions">' . PageLinkButton('domainstats&dl=true', $GLOBALS['I18N']->get('Download as CSV file')) . '</div>';
$confirmed = array();
$req = Sql_Query(sprintf('select lcase(substring_index(email,"@",-1)) as domain,count(email) as num from %s where confirmed group by domain order by num desc limit 50', $GLOBALS['tables']['user']));
$ls = new WebblerListing($GLOBALS['I18N']->get('Top 50 domains with more than 5 emails'));
while ($row = Sql_Fetch_Array($req)) {
    if ($row['num'] > 5) {
        $ls->addElement($row['domain']);
        $confirmed[$row['domain']] = $row['num'];
        $ls->addColumn($row['domain'], $GLOBALS['I18N']->get('confirmed'), $row['num']);
        $perc = sprintf('%0.2f', $row['num'] / $total * 100);
        $ls->addColumn($row['domain'], '<!-conf-->' . $GLOBALS['I18N']->get('perc'), $perc);
    }
}
$req = Sql_Query(sprintf('select lcase(substring_index(email,"@",-1)) as domain,count(email) as num from %s where !confirmed group by domain order by num desc limit 50', $GLOBALS['tables']['user']));
while ($row = Sql_Fetch_Array($req)) {
    /*  if (!in_array($confirmed,$row['domain'])) {
        $ls->addElement($row['domain']);
Exemple #14
0
    if ($row['tablesize'] > $maxsize) {
        $maxsize = $row['tablesize'];
    }
}
$maxsize = (int) $maxsize;
$avail = disk_free_space('/');
## we have no idea where MySql stores the data, so this is only a crude check and warning.
$maxsize = (int) ($maxsize * 1.2);
## add another 20%
$require_confirmation = !isset($_GET['force']) || $_GET['force'] != 'yes';
if ($maxsize > $avail && $require_confirmation) {
    print '<div class="error">' . s('Converting to UTF-8 requires sufficient diskspace on your system.') . '<br/>';
    print s('The maximum table size in your system is %s and space available on the root filesystem is %s, which means %s is required.', formatBytes($maxsize), formatBytes($avail), formatBytes($maxsize - $avail));
    print ' ' . s('This is not a problem if your Database server is on a different filesystem. Click the button to continue.');
    print ' ' . s('Otherwise, free up some diskspace and try again');
    print '<br/>' . PageLinkButton('converttoutf8&force=yes', s('Confirm UTF8 conversion'));
    print '</div>';
    return;
}
cl_output(s('Converting DB to use UTF-8, please wait'));
if (empty($isUTF8)) {
    set_time_limit(5000);
    print s('Converting DB to use UTF-8, please wait') . '<br/>';
    ## convert to UTF8
    $dbname = $GLOBALS['database_name'];
    if (!empty($dbname)) {
        ## the conversion complains about a key length
        Sql_Query(sprintf('alter table ' . $GLOBALS['tables']['user_blacklist_data'] . ' change column email email varchar(150) not null unique'));
        $req = Sql_Query('select * from information_schema.columns where table_schema = "' . $dbname . '" and CHARACTER_SET_NAME != "utf8"');
        $dbcolumns = array();
        $dbtables = array();
Exemple #15
0
    }
    $result = '<select name="list">;';
    if ($optionAll) {
        $result .= sprintf('<option value="0">%s</option>', $GLOBALS['I18N']->get('-All-'));
    }
    $result .= $optionList;
    $result .= '</select>';
    return $result;
}
print '<ul class="reconcile">';
#echo '<li>'.PageLinkButton("reconcileusers&amp;option=nolists",$GLOBALS['I18N']->get("Delete all subscribers who are not subscribed to any list")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&amp;option=invalidemail",$GLOBALS['I18N']->get("Find users who have an invalid email")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&amp;option=adduniqid",$GLOBALS['I18N']->get("Make sure that all users have a UniqID")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&amp;option=markinvalidunconfirmed",$GLOBALS['I18N']->get("Mark all users with an invalid email as unconfirmed")).'</li>';
echo '<li>' . PageLinkButton('reconcileusers&amp;option=markallhtml', $GLOBALS['I18N']->get('Mark all subscribers to receive HTML')) . '</li>';
echo '<li>' . PageLinkButton('reconcileusers&amp;option=markalltext', $GLOBALS['I18N']->get('Mark all subscribers to receive text')) . '</li>';
#echo '<li>'.$GLOBALS['I18N']->get('To try to (automatically)').' '. PageLinkButton("reconcileusers&amp;option=fixinvalidemail",$GLOBALS['I18N']->get("Fix emails for users who have an invalid email")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&amp;option=removestaleentries",$GLOBALS['I18N']->get("Remove Stale entries from the database")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&amp;option=mergeduplicates",$GLOBALS['I18N']->get("Merge Duplicate Users")).'</li>';
print '</ul>';
?>
<hr/>
<form method="get">
    <input type="hidden" name="page" value="reconcileusers"/>
    <input type="hidden" name="option" value="markallconfirmed"/>
    <p class="information">
        <?php 
echo sprintf($GLOBALS['I18N']->get('Mark all subscribers on list %s confirmed'), snippetListsSelector(true));
?>
    </p>
    <input class="submit" type="submit" value="<?php 
Exemple #16
0
} else {
    print $ls->display('', 'draggable');
}
/*
  echo '<table class="x" border="0">
      <tr>
        <td>'.$GLOBALS['I18N']->get('No').'</td>
        <td>'.$GLOBALS['I18N']->get('Name').'</td>
        <td>'.$GLOBALS['I18N']->get('Order').'</td>
        <td>'.$GLOBALS['I18N']->get('Functions').'</td>
        <td>'.$GLOBALS['I18N']->get('Active').'</td>
        <td>'.$GLOBALS['I18N']->get('Owner').'</td>
        <td>'.$html . '
    <tr>
        <td colspan="6" align="center">
        <input type="submit" name="update" value="'.$GLOBALS['I18N']->get('Save Changes').'"></td>
      </tr>
    </table>';
}
*/
?>

</form>
<p>
<?php 
if ($canaddlist) {
    print PageLinkButton('editlist', $GLOBALS['I18N']->get('Add a list'));
}
?>
</p>
Exemple #17
0
    $query = sprintf('select * from %s where status %s "unidentified bounce" order by date desc limit %s offset %s', $tables['bounce'], $status_compare, $limit, $offset);
    $result = Sql_Query($query);
} else {
    $paging = '';
    $query = sprintf('select * from %s where status ' . $status_compare . ' "unidentified bounce" order by date desc', $tables['bounce']);
    $result = Sql_Query($query);
}
$buttons = new ButtonGroup(new Button(PageURL2('bounces'), s('delete')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('are you sure you want to delete all unidentified bounces older than 2 months') . '?', PageURL2("{$baseurl}&action=deleteunidentified"), $GLOBALS['I18N']->get('delete all unidentified (&gt; 2 months old)')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('are you sure you want to delete all bounces older than 2 months') . '?', PageURL2("{$baseurl}&action=deleteprocessed"), $GLOBALS['I18N']->get('delete all processed (&gt; 2 months old)')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('are you sure you want to delete all bounces') . '?', PageURL2("{$baseurl}&action=deleteall"), $GLOBALS['I18N']->get('Delete all')));
print "<div class='actions'>\n";
print "<div class='minitabs'>\n";
print $tabs->display();
print "</div>\n";
print PageLinkButton('listbounces', $GLOBALS['I18N']->get('view bounces by list'));
if (ALLOW_DELETEBOUNCE) {
    print '<div class="fright">' . $buttons->show() . '</div>';
}
print "</div><!-- .actions div-->\n";
if (!Sql_Num_Rows($result)) {
    switch ($status) {
        case 'unidentified':
            print '<p class="information">' . s('no unidentified bounces available') . '</p>';
            break;
        case 'processed':
            print '<p class="information">' . s('no processed bounces available') . '</p>';
            break;
    }
}
$ls = new WebblerListing(s($status) . ' ' . s('bounces'));
Exemple #18
0
    if (!empty($count['invalid'])) {
        $report .= s('%d invalid email addresses', $count['invalid']) . "\n";
        $report .= s('Invalid addresses will be reported in the report that is sent to %s', getConfig("admin_address"));
    }
    if ($count['foundonblacklist']) {
        $report .= s('%d addresses were blacklisted and have not been subscribed to the list', $count['foundonblacklist']) . "\n";
    }
    print ActionResult(nl2br($report));
    if ($_GET['page'] == 'importsimple') {
        if (!empty($_GET['list'])) {
            $toList = sprintf('&list=%d', $_GET['list']);
        } else {
            $toList = '';
        }
        print '<div class="actions">
    ' . PageLinkButton('send&new=1' . $toList, s('Send a campaign')) . PageLinkButton('importsimple', s('Import some more emails')) . '</div>';
    }
    if (!empty($rejectReport['invalid'])) {
        $report .= "\n\n" . s('Rejected email addresses') . ":\n";
        $report .= $rejectReport['invalid'];
    }
    sendMail(getConfig("admin_address"), s('phplist Import Results'), $report);
    foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
        $plugin->importReport($report);
    }
    return;
}
if ($GLOBALS["require_login"] && !isSuperUser()) {
    $access = accessLevel("import1");
    switch ($access) {
        case "owner":
Exemple #19
0
        print $ls->tabDelimited();
    }
    if ($some) {
        print '<p>' . $GLOBALS['I18N']->get('Select URL to view') . '</p>';
        print '<div class="actions">' . PageLinkButton('uclicks&dl=true', $GLOBALS['I18N']->get('Download as CSV file')) . '</div>';
        print $ls->display();
    } else {
        print '<p class="information">' . $GLOBALS['I18N']->get('There are currently no statistics available') . '</p>';
    }
    return;
}
print '<div class="actions">' . PageLinkButton('uclicks&dl=true&id=' . $id, $GLOBALS['I18N']->get('Download as CSV file')) . '</div>';
$ls = new WebblerListing($GLOBALS['I18N']->get('URL Click Statistics'));
$urldata = Sql_Fetch_Array_Query(sprintf('select url from %s where id = %d', $GLOBALS['tables']['linktrack_forward'], $id));
print '<h3>' . $GLOBALS['I18N']->get('Click details for a URL') . ' <b>' . $urldata['url'] . '</b></h3><br/>';
print PageLinkButton('userclicks&fwdid=' . $id, s('View subscribers'));
if ($download) {
    header('Content-disposition:  attachment; filename="phpList URL click statistics for ' . $urldata['url'] . '.csv"');
}
$req = Sql_Query(sprintf('select messageid,firstclick,date_format(latestclick,
  "%%e %%b %%Y %%H:%%i") as latestclick,total,clicked from %s where forwardid = %d and firstclick is not null order by firstclick desc
  ', $GLOBALS['tables']['linktrack_ml'], $id));
$summary = array();
$summary['totalsent'] = 0;
$summary['totalclicks'] = 0;
$summary['uniqueclicks'] = 0;
while ($row = Sql_Fetch_Array($req)) {
    $msgsubj = Sql_Fetch_Row_query(sprintf('select subject from %s where id = %d', $GLOBALS['tables']['message'], $row['messageid']));
    if (!$download) {
        $element = '<!-- ' . $row['messageid'] . '-->' . shortenTextDisplay($msgsubj[0], 30);
    } else {
Exemple #20
0
                $ls->addColumn($column, $GLOBALS['I18N']->get('maps to'), $attributes[$rec["record"]]);
            } elseif (!empty($rec['record'])) {
                $ls->addColumn($column, $GLOBALS['I18N']->get('maps to'), $rec['record']);
            } else {
                $ls->addColumn($column, $GLOBALS['I18N']->get('maps to'), $GLOBALS['I18N']->get('none'));
            }
        }
    }
    print $ls->display();
    #var_dump($_SESSION["import_attribute"]);
    # print "SYSTEM INDEX";
    # var_dump($_SESSION["systemindex"]);
    print '<h3>';
    printf($GLOBALS['I18N']->get('%d lines will be imported'), $total);
    print '</h3>';
    print '<p>' . PageLinkButton($_GET["page"] . '&amp;confirm=yes', $GLOBALS['I18N']->get('Confirm Import')) . '</p>';
    print '<h3>' . $GLOBALS['I18N']->get('Test Output') . '</h3>';
    #  dbg($_SESSION["import_attribute"]);
} elseif (sizeof($email_list)) {
    print '<h3>' . s('Importing %d subscribers to %d lists, please wait', sizeof($email_list), sizeof($_SESSION['lists'])) . '</h3>';
    print $GLOBALS['img_busy'];
    print '<div id="progresscount" style="width: 200; height: 50;">Progress</div>';
    print '<br/> <iframe id="import2" src="./?page=pageaction&action=import2&ajaxed=true' . addCsrfGetToken() . '" scrolling="no" height="5" width="100"></iframe>';
    return;
}
#var_dump($system_attributes);
### show progress and adjust working space
if (sizeof($email_list)) {
    $import_field_delimiter = $_SESSION["import_field_delimiter"];
    if (sizeof($email_list) > 300 && !$_SESSION["test_import"]) {
        # this is a possibly a time consuming process, so show a progress bar
Exemple #21
0
    if (defined("ENABLE_RSS") && ENABLE_RSS && !function_exists("xml_parse") && WARN_ABOUT_PHP_SETTINGS) {
        Warn($GLOBALS['I18N']->get('You are trying to use RSS, but XML is not included in your PHP'));
    }
    if (ALLOW_ATTACHMENTS && WARN_ABOUT_PHP_SETTINGS && (!is_dir($GLOBALS["attachment_repository"]) || !is_writable($GLOBALS["attachment_repository"]))) {
        if (ini_get("open_basedir")) {
            Warn($GLOBALS['I18N']->get('open_basedir restrictions are in effect, which may be the cause of the next warning'));
        }
        Warn($GLOBALS['I18N']->get('The attachment repository does not exist or is not writable'));
    }
    if (MANUALLY_PROCESS_QUEUE && isSuperUser() && empty($_GET['pi']) && (!isset($_GET['page']) || $_GET['page'] != 'processqueue' && $_GET['page'] != 'messages' && $_GET['page'] != 'upgrade')) {
        ## avoid error on uninitialised DB
        if (Sql_Table_exists($tables['message'])) {
            $queued_count = Sql_Fetch_Row_Query(sprintf('select count(id) from %s where status in ("submitted","inprocess") and embargo < now()', $tables['message']));
            if ($queued_count[0]) {
                $link = PageLinkButton('processqueue', s('Process the queue'));
                $link2 = PageLinkButton('messages&amp;tab=active', s('View the queue'));
                if ($link || $link2) {
                    print Info(sprintf(s('You have %s message(s) waiting to be sent'), $queued_count[0]) . '<br/>' . $link . ' ' . $link2);
                }
            }
        }
    }
}
# always allow access to the about page
if (isset($_GET['page']) && $_GET['page'] == 'about') {
    $page = 'about';
    $include = 'about.php';
}
print $pageinfo->show();
if (!empty($_GET['action']) && $_GET['page'] != 'pageaction') {
    $action = basename($_GET['action']);
Exemple #22
0
                    print s('Plugin installed successfully');
                } else {
                    print s('Error installing plugin');
                }
                $zip->close();
                print '<hr/>' . PageLinkButton('plugins', s('Continue'));
                return;
            }
        } else {
            Error(s('Plugin directory is not writable'));
        }
    } else {
        Error(s('Invalid plugin package'));
    }
    print s('Plugin installation failed');
    print '<hr/>' . PageLinkButton('plugins', s('Continue'));
    return;
}
if (defined('PLUGIN_ROOTDIR') && !is_writable(PLUGIN_ROOTDIR)) {
    Info(s('The plugin root directory is not writable, please install plugins manually'));
} elseif (!class_exists('ZipArchive')) {
    Info(s('PHP has no <a href="http://php.net/zip">Zip capability</a>. This is required to allow installation from a remote URL'));
} else {
    print '<h3>' . s('Install a new plugin') . '</h3>';
    print '<p><a class="resourceslink" href="http://resources.phplist.com/plugins/" title="' . s('Find plugins') . '" target="_blank">' . s('Find plugins') . '</a></p>';
    print formStart();
    print '<fieldset>
      <label for="pluginurl">' . s('Plugin package URL') . '</label>
      <div type="field"><input type="text" id="pluginurl" name="pluginurl" /></div>
      <button type="submit" name="download">' . s('Install plugin') . '</button>
      </fieldset></form>';
Exemple #23
0
        if ($msg['status'] == 'inprocess' || $msg['status'] == 'submitted') {
            $actionbuttons .= '<span class="suspend">' . PageLinkButton('messages&suspend=' . $msg['id'], $GLOBALS['I18N']->get('Suspend'), '', '', s('Suspend')) . '</span>';
        } elseif ($msg['status'] != 'draft') {
            $actionbuttons .= '<span class="resend">' . PageLinkButton('messages', $GLOBALS['I18N']->get('Requeue'), 'resend=' . $msg['id'], '', s('Requeue')) . '</span>';
        }
        $actionbuttons .= '<span class="view">' . PageLinkButton('message', $GLOBALS['I18N']->get('View'), 'id=' . $msg['id'], '', s('View')) . '</span>';
        if ($clicks[0] && CLICKTRACK) {
            $actionbuttons .= '<span class="stats">' . PageLinkButton('statsoverview', $GLOBALS['I18N']->get('statistics'), 'id=' . $msg['id'], '', s('Statistics')) . '</span>';
        }
        #0012081: Add new 'Mark as sent' button
        if ($msg['status'] == 'suspended') {
            $actionbuttons .= '<span class="marksent">' . PageLinkButton('messages&amp;markSent=' . $msg['id'], $GLOBALS['I18N']->get('Mark&nbsp;sent'), '', '', s('Mark sent')) . '</span>';
            $actionbuttons .= '<span class="edit">' . PageLinkButton('send', $GLOBALS['I18N']->get('Edit'), 'id=' . $msg['id'], '', s('Edit')) . '</span>';
        } elseif ($msg['status'] == 'draft' || !empty($messagedata['istestcampaign'])) {
            ## only draft messages should be deletable, the rest isn't
            $deletebutton = new ConfirmButton(s('Are you sure you want to delete this campaign?'), PageURL2("messages{$url_keep}&delete=" . $msg['id']), s('delete this campaign'), '', 'button');
            #      $actionbuttons .= sprintf('<span class="delete"><a href="javascript:deleteRec(\'%s\');" class="button" title="'.$GLOBALS['I18N']->get("delete").'">'.$GLOBALS['I18N']->get("delete").'</a></span>',PageURL2("messages$url_keep","","delete=".$msg["id"]));
            $actionbuttons .= '<span class="edit">' . PageLinkButton('send', $GLOBALS['I18N']->get('Edit'), 'id=' . $msg['id'], '', s('Edit')) . '</span>';
            if (empty($clicks[0])) {
                ## disallow deletion when there are stats
                $actionbuttons .= '<span class="delete">' . $deletebutton->show() . '</span>';
            }
        }
        $ls->addColumn($listingelement, $GLOBALS['I18N']->get('Action'), '<div class="messageactions">' . $actionbuttons . '</div>');
    }
}
print $ls->display();
if ($total > 5 && $_GET['tab'] == 'active') {
    print PageLinkButton('messages', $GLOBALS['I18N']->get('Suspend All'), 'action=suspall');
    print PageLinkButton('messages', $GLOBALS['I18N']->get('Mark All Sent'), 'action=markallsent');
}
Exemple #24
0
        while (!feof($fp)) {
            $buffer = fgets($fp, 4096);
            if (strpos($buffer, "#") === false) {
                if (!$header) {
                    $header = $buffer;
                } else {
                    if (trim($buffer) != "") {
                        Sql_Query(sprintf('insert into %slistattr_%s (name) values("%s")', $table_prefix, $lc_name, trim($buffer)));
                    }
                }
            }
        }
        fclose($fp);
    }
    print $GLOBALS['I18N']->get('done') . "<br/><br/>";
    print PageLinkButton("attributes", $GLOBALS['I18N']->get('return to editing attributes'));
    #@@@@ not sure about this one:  print '<p class="button">'.PageLink2("attributes",$GLOBALS['I18N']->get('continue')).'</p>';
} else {
    ?>


<?php 
    echo formStart(' class="defaultsAdd"');
    reset($attributes);
    while (list($key, $attribute) = each($attributes)) {
        if (strstr($key, ':')) {
            list($name, $desc) = explode(":", $key);
            if ($name && $desc) {
                printf('<input type="checkbox" name="selected[]" value="%s" />%s<br/>', $attribute, $desc);
            }
        }
Exemple #25
0
$filterpanel .= '>' . $GLOBALS['I18N']->get('Unique ID') . '</option>';
$att_req = Sql_Query('select id,name from ' . $tables['attribute'] . ' where type = "hidden" or type = "textline" or type = "select"');
while ($row = Sql_Fetch_Array($att_req)) {
    $filterpanel .= sprintf('<option value="%d" %s>%s</option>', $row['id'], $row['id'] == $findby ? 'selected="selected"' : '', substr($row['name'], 0, 20));
}
$filterpanel .= '</select><input class="submit" type="submit" value="' . s('Go') . '" />&nbsp;&nbsp;<a href="./?page=users&amp;find=NULL" class="reset">' . s('reset') . '</a>';
$filterpanel .= '</form></div>';
//$filterpanel .= '<tr><td colspan="4"></td></tr>
//</table>';
print Info($countpanel);
$panel = new UIPanel($GLOBALS['I18N']->get('Find subscribers'), $filterpanel);
print $panel->display();
#if (($require_login && isSuperUser()) || !$require_login)
print '<div class="actions">';
print '<div id="add-csv-button">' . PageLinkButton('dlusers', $GLOBALS['I18N']->get('Download all users as CSV file'), 'nocache=' . uniqid('')) . '</div>';
print '<div id="add-user-button">' . PageLinkButton('adduser', $GLOBALS['I18N']->get('Add a User')) . '</div>';
print '</div>';
$some = 0;
$ls = new WebblerListing(s('users'));
$ls->usePanel($paging);
if ($result) {
    while ($user = Sql_fetch_array($result)) {
        $some = 1;
        $ls->addElement($user['email'], PageURL2("user&amp;start={$start}&amp;id=" . $user['id'] . $find_url));
        $ls->setClass($user['email'], 'row1');
        ## we make one column with the subscriber status being "on" or "off"
        ## two columns are too confusing and really unnecessary
        # ON = confirmed &&  !blacklisted
        #    $ls->addColumn($user["email"], $GLOBALS['I18N']->get('confirmed'), $user["confirmed"] ? $GLOBALS["img_tick"] : $GLOBALS["img_cross"]);
        #   if (in_array("blacklist", $columns)) {
        $onblacklist = isBlackListed($user['email']);
Exemple #26
0
    print ' 
   </select>';
    if (defined('IN_WEBBLER') && IN_WEBBLER || defined('WEBBLER') && WEBBLER) {
        if ($row['type'] == 'select' || $row['type'] == 'radio' || $row['type'] == 'checkboxgroup') {
            print ' ' . $I18N->get('authoritative list') . '&nbsp;';
            printf('<select name="keywordlib[%d]"><option value="">-- select</option>', $row['id']);
            $req = Sql_Query(sprintf('select id,name from keywordlib order by listorder,name'));
            while ($kwlib = Sql_Fetch_Array($req)) {
                printf('<option value="%d" %s>%s</option>', $kwlib['id'], $row['keywordlib'] == $kwlib['id'] ? 'selected="selected"' : '', htmlspecialchars($kwlib['name']));
            }
            print '</select>';
        }
    }
    if ((!defined('IN_WEBBLER') || !IN_WEBBLER) && (!defined('WEBBLER') || !WEBBLER)) {
        if ($row['type'] == 'select' || $row['type'] == 'radio' || $row['type'] == 'checkboxgroup') {
            print PageLinkButton('editattributes&id=' . $row['id'], $I18N->get('edit values'));
        }
    }
    print '<label>' . $GLOBALS['I18N']->get('Default Value') . ':</label>
  <input type="text" name="default[' . $row['id'] . ']" value="' . htmlspecialchars(stripslashes($row['default_value'])) . '" size="40" />';
    print '<label>' . $GLOBALS['I18N']->get('Order of Listing') . ':</label>
  <input type="text" name="listorder[' . $row['id'] . ']" value="' . $row['listorder'] . '" size="5" />';
    print '<label>' . $GLOBALS['I18N']->get('Is this attribute required ?') . '<input type="checkbox" name="required[' . $row['id'] . ']" value="1" ';
    print $row['required'] ? 'checked="checked"' : '';
    print '/></label>';
    print '</div>';
}
print '</div><br /><!--close accordion-->';
printf('<input class="submit" type="submit" name="action" value="%s" /> ', s('Save Changes'));
if ($c) {
    printf('<span class="buttonGroup"><input class="submit" type="submit" name="tagaction[delete]" value="%s" /> 
Exemple #27
0
  $("#addtoqueue").append(\'<div class="missing">' . $GLOBALS['I18N']->get('From missing') . '</div>\');
  </script>';
}
##16615, check that "send until" is in after the embargo and warn if it isn't
$finishSending = mktime($messagedata['finishsending']['hour'], $messagedata['finishsending']['minute'], 0, $messagedata['finishsending']['month'], $messagedata['finishsending']['day'], $messagedata['finishsending']['year']);
$embargoTime = mktime($messagedata['embargo']['hour'], $messagedata['embargo']['minute'], 0, $messagedata['embargo']['month'], $messagedata['embargo']['day'], $messagedata['embargo']['year']);
$currentTime = time();
if ($finishSending < $embargoTime) {
    $allReady = false;
    $GLOBALS['pagefooter']['addtoqueue'] .= '<script type="text/javascript">
  $("#addtoqueue").append(\'<div class="missing">' . s('This campaign is scheduled to stop sending before the embargo time. No mails will be sent.') . '<br/>' . PageLinkButton('send&amp;id=' . $messagedata['id'] . '&amp;tab=Scheduling', s('Review Scheduling')) . '</div>\');
  </script>';
} elseif ($finishSending < $currentTime) {
    $allReady = false;
    $GLOBALS['pagefooter']['addtoqueue'] .= '<script type="text/javascript">
  $("#addtoqueue").append(\'<div class="missing">' . s('This campaign is scheduled to stop sending in the past. No mails will be sent.') . '<br/>' . PageLinkButton('send&amp;id=' . $messagedata['id'] . '&amp;tab=Scheduling', s('Review Scheduling')) . '</div>\');
  </script>';
}
if (empty($messagedata['targetlist'])) {
    $allReady = false;
    $GLOBALS['pagefooter']['addtoqueue'] .= '<script type="text/javascript">
  $("#addtoqueue").append(\'<div class="missing">' . $GLOBALS['I18N']->get('destination lists missing') . '</div>\');
  </script>';
}
if ($hasClickTrackLinks && BLOCK_PASTED_CLICKTRACKLINKS) {
    $allReady = false;
    $GLOBALS['pagefooter']['addtoqueue'] .= '<script type="text/javascript">
  $("#addtoqueue").append(\'<div class="missing">' . s('Content contains click track links.') . resourceLink('http://resources.phplist.com/documentation/errors/pasteclicktrack') . '</div>\');
  </script>';
}
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
Exemple #28
0
function activateRemoteQueue()
{
    $result = '';
    $activated = file_get_contents(PQAPI_URL . '&cmd=start&key=' . getConfig('PQAPIkey') . '&s=' . urlencode(getConfig('remote_processing_secret')) . '&u=' . base64_encode($GLOBALS['admin_scheme'] . '://' . hostName() . dirname($_SERVER['REQUEST_URI'])));
    if ($activated == 'OK') {
        $result .= '<h3>' . s('Remote queue processing has been activated successfully') . '</h3>';
        $result .= '<p>' . PageLinkButton('messages&tab=active', $GLOBALS['I18N']->get('view progress')) . '</p>';
    } elseif ($activated == 'KEYFAIL' || $activated == 'NAC') {
        $result .= '<h3>' . s('Error activating remote queue processing') . '</h3>';
        if ($activated == 'KEYFAIL') {
            $result .= s('The API key is incorrect');
        } elseif ($activated == 'NAC') {
            $result .= s('The phpList.com server is unable to reach your phpList installation');
        } else {
            $result .= s('Unknown error');
        }
        $result .= '<p><a href="./?page=hostedprocessqueuesetup" class="button">' . s('Change settings') . '</a></p>';
        $result .= '<p><a href="./?page=processqueue&pqchoice=local" class="button">' . s('Run queue locally') . '</a></p>';
    } else {
        $result .= '<h3>' . s('Error activating remote queue processing') . '</h3>';
        $result .= '<p><a href="./?page=processqueue&pqchoice=local" class="button">' . s('Run queue locally') . '</a></p>';
    }
    return $result;
}
Exemple #29
0
    }
    if ($download) {
        ob_end_clean();
        print $ls->tabDelimited();
    }
    print $ls->display();
    return;
}
if ($download) {
    ob_end_clean();
    #  header("Content-type: text/plain");
    header('Content-type: text/csv');
    ob_start();
}
if (empty($start)) {
    print '<p>' . PageLinkButton('mviews&dl=true&id=' . $id . '&start=' . $start, $GLOBALS['I18N']->get('Download as CSV file')) . '</p>';
}
#print '<h3>'.$GLOBALS['I18N']->get('View Details for a Message').'</h3>';
$messagedata = Sql_Fetch_Array_query("SELECT * FROM {$tables['message']} where id = {$id} {$subselect}");
print '<table class="mviewsDetails">
<tr><td>' . $GLOBALS['I18N']->get('Subject') . '<td><td>' . $messagedata['subject'] . '</td></tr>
<tr><td>' . $GLOBALS['I18N']->get('Entered') . '<td><td>' . $messagedata['entered'] . '</td></tr>
<tr><td>' . $GLOBALS['I18N']->get('Sent') . '<td><td>' . $messagedata['sent'] . '</td></tr>
</table><hr/>';
if ($download) {
    header('Content-disposition:  attachment; filename="phpList Message open statistics for ' . $messagedata['subject'] . '.csv"');
}
$ls = new WebblerListing(ucfirst($GLOBALS['I18N']->get('Open statistics')));
$req = Sql_Query(sprintf('select um.userid
    from %s um,%s msg where um.messageid = %d and um.messageid = msg.id and um.viewed is not null %s
    group by userid', $GLOBALS['tables']['usermessage'], $GLOBALS['tables']['message'], $id, $subselect));
Exemple #30
0
    # add a testlist
    $info = $GLOBALS['I18N']->get('List for testing');
    $result = Sql_query("insert into {$tables['list']} (name,description,entered,active,owner) values(\"test\",\"{$info}\",now(),0,1)");
    $info = s('Sign up to our newsletter');
    $result = Sql_query("insert into {$tables['list']} (name,description,entered,active,owner) values(\"newsletter\",\"{$info}\",now(),1,1)");
    ## add the admin to the lists
    Sql_Query(sprintf('insert into %s (listid, userid, entered) values(%d,%d,now())', $tables['listuser'], 1, $userid));
    Sql_Query(sprintf('insert into %s (listid, userid, entered) values(%d,%d,now())', $tables['listuser'], 2, $userid));
    $uri = $_SERVER['REQUEST_URI'];
    $uri = str_replace('?' . $_SERVER['QUERY_STRING'], '', $uri);
    $body = '
    Version: ' . VERSION . "\r\n" . ' Url: ' . $_SERVER['SERVER_NAME'] . $uri . "\r\n";
    printf('<p class="information">' . $GLOBALS['I18N']->get('Success') . ': <a class="button" href="mailto:info@phplist.com?subject=Successful installation of phplist&amp;body=%s">' . $GLOBALS['I18N']->get('Tell us about it') . '</a>. </p>', $body);
    //printf('<p class="information">
    //'.$GLOBALS['I18N']->get("Please make sure to read the file README.security that can be found in the zip file.").'</p>');
    print subscribeToAnnouncementsForm($_REQUEST['adminemail']);
    if (ENCRYPT_ADMIN_PASSWORDS && !empty($adminid)) {
        print sendAdminPasswordToken($adminid);
    }
    # make sure the 0 template has the powered by image
    $query = sprintf('insert into %s (template, mimetype, filename, data, width, height) values (0, "image/png", "powerphplist.png", "%s", 70, 30)', $GLOBALS['tables']['templateimage'], $newpoweredimage);
    Sql_Query($query);
    print '<div id="continuesetup" style="display:none;" class="fleft">' . $GLOBALS['I18N']->get('Continue with') . ' ' . PageLinkButton('setup', $GLOBALS['I18N']->get('phpList Setup')) . '</div>';
    unset($_SESSION['hasI18Ntable']);
    ## load language files
    # this is too slow
    $GLOBALS['I18N']->initFSTranslations();
} else {
    print '<div class="initialiseOptions"><ul><li>' . s('Maybe you want to') . ' ' . PageLinkButton('upgrade', s('Upgrade')) . ' ' . s('instead?') . '</li>
    <li>' . PageLinkButton('initialise', s('Force Initialisation'), 'force=yes') . ' ' . s('(will erase all data!)') . ' ' . "</li></ul></div>\n";
}