作者:nararedd
项目:phplist
$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
作者:juvena
项目:PHPlis
$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").
//'&uid='.$user["uniqid"],$GLOBALS['I18N']->get('update page'));
//printf('<a href="%s" class="button">%s</a>',getConfig("unsubscribeurl").'&uid='.$user["uniqid"],$GLOBALS['I18N']->get('unsubscribe page'));
print PageLinkButton("user&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"];
作者:gillim
项目:phplist
">
<?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}&delete=" . $admin['id']));
$ls->addElement($admin['loginname'], PageUrl2('admin', $GLOBALS['I18N']->get('Show'), "start={$start}&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>';
作者:Marcelv
项目:phplist
$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');
作者:nararedd
项目:phplist
# 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&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'] = '';
}
作者:gillim
项目:phplist
}
// 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);
}
作者:Marcelv
项目:phplist
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);
作者:dehvCurti
项目:phplis
}
} 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}");
}
作者:juvena
项目:PHPlis
$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, ' ', shortenTextDisplay($messagedata['subject'], 30));
$element = ucfirst(s('Date entered'));
$ls->addElement($element);
$ls->addColumn($element, ' ', $messagedata['entered']);
$element = ucfirst(s('Date sent'));
$ls->addElement($element);
$ls->addColumn($element, ' ', $messagedata['sent']);
$element = ucfirst(s('Sent as HTML'));
$ls->addElement($element);
作者:gillim
项目:phplist
# 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>';
}
作者:dehvCurti
项目:phplis
$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');
作者:nararedd
项目:phplist
$_SESSION['action_result'] .= '<br />' . PageLinkButton('send&id=' . $messagedata['id'] . '&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&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']);
作者:dehvCurti
项目:phplis
<?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']);
作者:Marcelv
项目:phplist
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();
作者:gillim
项目:phplist
}
$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&option=nolists",$GLOBALS['I18N']->get("Delete all subscribers who are not subscribed to any list")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&option=invalidemail",$GLOBALS['I18N']->get("Find users who have an invalid email")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&option=adduniqid",$GLOBALS['I18N']->get("Make sure that all users have a UniqID")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&option=markinvalidunconfirmed",$GLOBALS['I18N']->get("Mark all users with an invalid email as unconfirmed")).'</li>';
echo '<li>' . PageLinkButton('reconcileusers&option=markallhtml', $GLOBALS['I18N']->get('Mark all subscribers to receive HTML')) . '</li>';
echo '<li>' . PageLinkButton('reconcileusers&option=markalltext', $GLOBALS['I18N']->get('Mark all subscribers to receive text')) . '</li>';
#echo '<li>'.$GLOBALS['I18N']->get('To try to (automatically)').' '. PageLinkButton("reconcileusers&option=fixinvalidemail",$GLOBALS['I18N']->get("Fix emails for users who have an invalid email")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&option=removestaleentries",$GLOBALS['I18N']->get("Remove Stale entries from the database")).'</li>';
#echo '<li>'.PageLinkButton("reconcileusers&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
作者:juvena
项目:PHPlis
} 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>
作者:gillim
项目:phplist
$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 (> 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 (> 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'));
作者:Gerberu
项目:phplist
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":
作者:nararedd
项目:phplist
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 {
作者:nararedd
项目:phplist
$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"] . '&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