本文整理汇总了PHP中WebblerListing::addRow方法的典型用法代码示例。如果您正苦于以下问题:PHP WebblerListing::addRow方法的具体用法?PHP WebblerListing::addRow怎么用?PHP WebblerListing::addRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebblerListing
的用法示例。
在下文中一共展示了WebblerListing::addRow方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
//}
//if ($msg["bouncecount"]) {
//$bouncedrow = sprintf('<tr><td colspan="%d">%s</td><td>%d</td></tr>',
//$colspan-1,$GLOBALS['I18N']->get("Bounced"),$msg["bouncecount"]);
//}
$sendstats = sprintf('<table class="messagesendstats">
%s
<tr><td>' . $GLOBALS['I18N']->get('total') . '</td><td>' . $GLOBALS['I18N']->get('text') . '</td><td>' . $GLOBALS['I18N']->get('html') . '</td>
%s%s
</tr>
<tr><td><b>%d</b></td><td><b>%d</b></td><td><b>%d</b></td>
%s %s %s %s
</tr>
</table>', !empty($timetosend) ? '<tr><td colspan="' . $colspan . '">' . $timetosend . '</td></tr>' : '', !empty($msg['aspdf']) ? '<td>' . $GLOBALS['I18N']->get('PDF') . '</td>' : '', !empty($msg['astextandpdf']) ? '<td>' . $GLOBALS['I18N']->get('both') . '</td>' : '', $msg['astext'] + $msg['ashtml'] + $msg['astextandhtml'] + $msg['aspdf'] + $msg['astextandpdf'], $msg['astext'], $msg['ashtml'] + $msg['astextandhtml'], !empty($msg['aspdf']) ? '<td><b>' . $msg['aspdf'] . '</b></td>' : '', !empty($msg['astextandpdf']) ? '<td><b>' . $msg['astextandpdf'] . '</b></td>' : '', $clicksrow, $bouncedrow);
if ($msg['status'] != 'draft') {
$ls->addRow($listingelement, '', $resultStats . $sendstats);
}
$actionbuttons = '';
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&markSent=' . $msg['id'], $GLOBALS['I18N']->get('Mark sent'), '', '', s('Mark sent')) . '</span>';
$actionbuttons .= '<span class="edit">' . PageLinkButton('send', $GLOBALS['I18N']->get('Edit'), 'id=' . $msg['id'], '', s('Edit')) . '</span>';
示例2: WebblerListing
print $ls->display();
print $bouncels->display();
if (isBlackListed($user["email"])) {
print "<h3>" . $GLOBALS['I18N']->get('user is Blacklisted since') . " ";
$blacklist_info = Sql_Fetch_Array_Query(sprintf('select * from %s where email = "%s"', $tables["user_blacklist"], $user["email"]));
print $blacklist_info["added"] . "</h3><br/>";
print '';
print "<a href=\"javascript:deleteRec2('" . str_replace("'", ' ', $GLOBALS['I18N']->get('are you sure you want to delete this user from the blacklist')) . "?\\n" . str_replace("'", ' ', $GLOBALS['I18N']->get('it should only be done with explicit permission from this user')) . "','./?page=userhistory&unblacklist={$user["id"]}&id={$user["id"]}')\">\n " . $GLOBALS['I18N']->get('remove User from Blacklist') . "</a>" . '<br/><br/>';
$ls = new WebblerListing($GLOBALS['I18N']->get('Blacklist Info'));
$req = Sql_Query(sprintf('select * from %s where email = "%s"', $tables["user_blacklist_data"], $user["email"]));
while ($row = Sql_Fetch_Array($req)) {
$ls->addElement($row["name"]);
$ls->addColumn($row["name"], $GLOBALS['I18N']->get('value'), stripslashes($row["data"]));
}
print $ls->display();
}
print "<h3>" . $GLOBALS['I18N']->get('user subscription history') . "</h3>";
$ls = new WebblerListing($GLOBALS['I18N']->get('Subscription History'));
$req = Sql_Query(sprintf('select * from %s where userid = %d order by date desc', $tables["user_history"], $user["id"]));
if (!Sql_Affected_Rows()) {
print $GLOBALS['I18N']->get('no details found');
}
while ($row = Sql_Fetch_Array($req)) {
$ls->addElement($row["id"]);
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('ip'), $row["ip"]);
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('date'), $row["date"]);
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('summary'), $row["summary"]);
$ls->addRow($row["id"], $GLOBALS['I18N']->get('detail'), nl2br(htmlspecialchars($row["detail"])));
$ls->addRow($row["id"], $GLOBALS['I18N']->get('info'), nl2br($row["systeminfo"]));
}
print $ls->display();
示例3: sprintf
} else {
$element = '<!-- ' . $row['messageid'] . '-->' . $msgsubj[0];
}
# $element = $GLOBALS['I18N']->get('msg').' '.$row['messageid'].': '.substr($msgsubj[0],0,25). '...';
# $element = sprintf('<a href="%s" target="_blank" class="url" title="%s">%s</a>',$row['url'],$row['url'],substr(str_replace('http://','',$row['url']),0,50));
# $total = Sql_Verbose_Query(sprintf('select count(*) as total from %s where messageid = %d and url = "%s"',
# $GLOBALS['tables']['linktrack'],$id,$row['url']));
# if (CLICKTRACK_SHOWDETAIL) {
$uniqueclicks = Sql_Fetch_Array_Query(sprintf('select count(distinct userid) as users from %s
where messageid = %d and forwardid = %d', $GLOBALS['tables']['linktrack_uml_click'], $row['messageid'], $id));
# }
$ls->addElement($element, PageUrl2('mclicks&id=' . $row['messageid']));
$ls->setClass($element, 'row1');
$ls->addColumn($element, $GLOBALS['I18N']->get('firstclick'), formatDateTime($row['firstclick'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('latestclick'), $row['latestclick']);
$ls->addRow($element, '<div class="listingsmall gray">' . $GLOBALS['I18N']->get('sent') . ': ' . $row['total'] . '</div>', '');
# $ls->addColumn($element,$GLOBALS['I18N']->get('clicks'),$row['clicked'].'<span class="viewusers"><a class="button" href="'.PageUrl2('userclicks&msgid='.$row['messageid'].'&fwdid='.$id.'" title="'.$GLOBALS['I18N']->get('view users').'"></a></span>'));
# $perc = sprintf('%0.2f',($row['clicked'] / $row['total'] * 100));
# $ls->addColumn($element,$GLOBALS['I18N']->get('clickrate'),$perc.'%');
$summary['totalsent'] += $row['total'];
# if (CLICKTRACK_SHOWDETAIL) {
$ls->addColumn($element, $GLOBALS['I18N']->get('clicks'), $uniqueclicks['users'] . '<span class="viewusers"><a class="button" href="' . PageUrl2('userclicks&msgid=' . $row['messageid'] . '&fwdid=' . $id) . '" title="' . s('view subscribers who clicked') . '"></a></span>');
$perc = sprintf('%0.2f', $uniqueclicks['users'] / $row['total'] * 100);
$ls->addColumn($element, $GLOBALS['I18N']->get('click rate'), $perc . '%');
$summary['uniqueclicks'] += $uniqueclicks['users'];
# }
$summary['totalclicks'] += $row['clicked'];
}
$ls->addElement($GLOBALS['I18N']->get('total'));
$ls->setClass($GLOBALS['I18N']->get('total'), 'rowtotal');
#$ls->addColumn($GLOBALS['I18N']->get('total'),$GLOBALS['I18N']->get('clicks'),$summary['totalclicks']);
示例4: PageLinkActionButton
}
$req = Sql_Query(sprintf('select id,entered,subject,unix_timestamp(now()) - unix_timestamp(entered) as age from %s where status = "draft" %s order by entered desc', $GLOBALS['tables']['message'], $ownership));
$numdraft = Sql_Num_Rows($req);
if ($numdraft > 0 && !isset($_GET['id']) && !isset($_GET['new'])) {
print '<p>' . PageLinkActionButton('send&new=1', $I18N->get('start a new message'), '', '', s('Start a new campaign')) . '</p>';
print '<p><h3>' . $I18N->get('Choose an existing draft message to work on') . '</h3></p><br/>';
$ls = new WebblerListing($I18N->get('Draft messages'));
$ls->noShader();
while ($row = Sql_Fetch_Array($req)) {
$element = '<!--' . $row['id'] . '-->' . $row['subject'];
$ls->addElement($element, PageUrl2('send&id=' . $row['id']));
$ls->setClass($element, 'row1');
# $ls->addColumn($element,$I18N->get('edit'),PageLink2('send&id='.$row['id'],$I18N->get('edit')));
$ls->addColumn($element, $I18N->get('entered'), $row['entered']);
$ls->addColumn($element, $I18N->get('age'), secs2time($row['age']));
$ls->addRow($element, '', '<a class="del" href="' . PageUrl2('send&delete=' . $row['id']) . '" title="' . $I18N->get('del') . '">' . $I18N->get('del') . '</a>');
}
$ls->addButton($I18N->get('delete all'), PageUrl2('send&delete=alldraft'));
print $ls->display();
return;
}
}
include "send_core.php";
if ($done) {
if ($GLOBALS["commandline"]) {
ob_end_clean();
print clineSignature();
print "Message with subject " . $_POST["subject"] . " was sent to " . $lists . "\n";
exit;
}
return;
示例5: sprintf
$query = 'select * from %s %s order by entered desc, id desc %s';
$query = sprintf($query, $tables['eventlog'], $where, $limit);
$result = Sql_query($query);
} else {
$query = 'select * from %s %s order by entered desc, id desc';
$query = sprintf($query, $tables['eventlog'], $where);
$result = Sql_Query($query);
}
$buttons = new ButtonGroup(new Button(PageURL2("eventlog"), 'delete'));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('Are you sure you want to delete all events older than 2 months?'), PageURL2("eventlog", "Delete", "start={$start}&action=deleteprocessed"), $GLOBALS['I18N']->get('Delete all (> 2 months old)')));
$buttons->addButton(new ConfirmButton($GLOBALS['I18N']->get('Are you sure you want to delete all events matching this filter?'), PageURL2("eventlog", "Delete", "start={$start}&action=deleteall{$find_url}"), $GLOBALS['I18N']->get('Delete all')));
print $buttons->show();
if (!Sql_Num_Rows($result)) {
print '<p class="information">' . $GLOBALS['I18N']->get('No events available') . '</p>';
}
printf('<form method="get" action="">
<input type="hidden" name="page" value="eventlog" />
<input type="hidden" name="start" value="%d" />
%s: <input type="text" name="filter" value="%s" /> %s <input type="checkbox" name="exclude" value="1" %s />
</form><br/>', $start, $GLOBALS['I18N']->get('Filter'), htmlspecialchars(stripslashes($filter)), $GLOBALS['I18N']->get('Exclude filter'), $exclude == 1 ? 'checked="checked"' : '');
$ls = new WebblerListing($GLOBALS['I18N']->get('Events'));
# @@@@ Looks like there are a few del, page, date, message which may not be i18nable.
while ($event = Sql_fetch_array($result)) {
$ls->addElement($event["id"]);
$ls->setClass($event["id"], 'row1');
$ls->addColumn($event["id"], $GLOBALS['I18N']->get('date'), $event["entered"]);
$ls->addColumn($event["id"], $GLOBALS['I18N']->get('message'), strip_tags($event["entry"]));
$delete_url = sprintf('<a href="javascript:deleteRec(\'%s\');" class="del" >%s</a>', PageURL2("eventlog", "delete", "start={$start}&delete=" . $event["id"]), $GLOBALS['I18N']->get('del'));
$ls->addRow($event['id'], '<div class="listingsmall">' . $GLOBALS['I18N']->get('page') . ': ' . $event["page"] . '</div>', '<div class="fright">' . $delete_url . ' </div>');
}
print $ls->display();
示例6: formStart
Info($GLOBALS['I18N']->get('Deleted') . " {$delete}");
}
print formStart('name="pagelist" class="spageEdit" ');
print '<input type="hidden" name="active[-1]" value="1" />';
## to force the active array to exist
$ls = new WebblerListing($GLOBALS['I18N']->get('subscribe pages'));
$req = Sql_Query(sprintf('select * from %s %s order by title', $tables["subscribepage"], $subselect));
while ($p = Sql_Fetch_Array($req)) {
$ls->addElement($p["id"]);
$ls->setClass($p["id"], 'row1');
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('title'), stripslashes($p["title"]));
if ($require_login && isSuperUser() || !$require_login) {
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('owner'), adminName($p["owner"]));
if ($p["id"] == $default) {
$checked = 'checked="checked"';
} else {
$checked = "";
}
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('default'), sprintf('<input type="radio" name="default" value="%d" %s onchange="document.pagelist.submit()" />', $p["id"], $checked));
} else {
$adminname = "";
$isdefault = "";
}
$ls->addColumn($p["id"], s('active'), sprintf('<input type="checkbox" name="active[%d]" value="1" %s onchange="document.pagelist.submit()" />', $p["id"], $p["active"] ? 'checked="checked"' : ''));
$ls->addRow($p["id"], $p["active"] ? '<span class="yes" title="' . $GLOBALS['I18N']->get('active') . '"></span>' : '<span class="no" title="' . $GLOBALS['I18N']->get('not active') . '"></span>', sprintf('<span class="edit"><a class="button" href="%s&id=%d" title="' . $GLOBALS['I18N']->get('edit') . '">%s</a></span>', PageURL2("spageedit", ""), $p["id"], $GLOBALS['I18N']->get('edit')) . sprintf('<span class="delete"><a class="button" href="javascript:deleteRec(\'%s\');" title="' . $GLOBALS['I18N']->get('delete') . '">%s</a></span>', PageURL2("spage", "", "delete=" . $p["id"]), $GLOBALS['I18N']->get('del')) . sprintf('<span class="view"><a class="button" href="%s&id=%d" title="' . $GLOBALS['I18N']->get('view') . '">%s</a></span>', getConfig("subscribeurl"), $p["id"], $GLOBALS['I18N']->get('view')));
}
print $ls->display();
print '<p class="button">' . PageLink2("spageedit", s('Add a new subscribe page')) . '</p>';
?>
</form>
示例7: sprintf
$ls->setClass($element, 'rows row1');
$ls->addColumn($element, $GLOBALS['I18N']->get('Members'), '<div style="display:inline-block;text-align:right;width:50%;float:left;">' . $membersDisplay . '</div><span class="view" style="text-align:left;display:inline-block;float:right;width:48%;"><a class="button " href="./?page=members&id=' . $row["id"] . '" title="' . $GLOBALS['I18N']->get('View Members') . '">' . $GLOBALS['I18N']->get('View Members') . '</a></span>');
$ls->addColumn($element, $GLOBALS['I18N']->get('Public'), sprintf('<input type="checkbox" name="active[%d]" value="1" %s %s />', $row["id"], $row["active"] ? 'checked="checked"' : '', listUsedInSubscribePage($row["id"]) ? ' disabled="disabled" ' : ''));
/* $owner = adminName($row['owner']);
if (!empty($owner)) {
$ls->addColumn($element,
$GLOBALS['I18N']->get('Owner'),$GLOBALS['require_login'] ? adminName($row['owner']):$GLOBALS['I18N']->get('n/a'));
}
if (trim($desc) != '') {
$ls->addRow($element,
$GLOBALS['I18N']->get('Description'),$desc);
}
*/
$ls->addColumn($element, $GLOBALS['I18N']->get('Order'), sprintf('<input type="text" name="listorder[%d]" value="%d" size="3" class="listorder" />', $row['id'], $row['listorder']));
$deletebutton = new ConfirmButton(s('Are you sure you want to delete this list?'), PageURL2("list&delete=" . $row["id"]), s('delete this list'));
$ls->addRow($element, '', '<span class="edit-list"><a class="button" href="?page=editlist&id=' . $row["id"] . '" title="' . $GLOBALS['I18N']->get('Edit this list') . '"></a></span>' . '<span class="send-list">' . PageLinkButton('send&new=1&list=' . $row['id'], $GLOBALS['I18N']->get('send'), '', '', $GLOBALS['I18N']->get('start a new campaign targetting this list')) . '</span>' . '<span class="add_member">' . PageLinkDialogOnly('importsimple&list=' . $row["id"], $GLOBALS['I18N']->get('Add Members')) . '</span>' . '<span class="delete">' . $deletebutton->show() . '</span>', '', '', 'actions nodrag');
$some = 1;
}
$ls->addSubmitButton('update', $GLOBALS['I18N']->get('Save Changes'));
if (!$some) {
echo $GLOBALS['I18N']->get('No lists, use Add List to add one');
} 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>
示例8: array
print '<input type="checkbox" name="checkall" class="checkallcheckboxes" />' . $GLOBALS['I18N']->get('Tag all users in this page');
}
$columns = array();
$columns = explode(',', getConfig('membership_columns'));
# $columns = array('country','Lastname');
$ls = new WebblerListing($GLOBALS['I18N']->get('Members'));
$ls->usePanel($paging);
while ($user = Sql_fetch_array($result)) {
$element = shortenTextDisplay($user['email']);
$ls->addElement($element, PageUrl2('user&id=' . $user['id']));
$ls->setClass($element, 'row1');
$ls_delete = '';
if ($access != 'view') {
$ls_delete = sprintf('<a title="' . $GLOBALS['I18N']->get('Delete') . '" class="del" href="javascript:deleteRec(\'%s\');"></a>', PageURL2('members', '', "start={$start}&{$pagingKeep}&id={$id}&delete=" . $user['id']));
}
$ls->addRow($element, '', $user['confirmed'] && !$user['blacklisted'] ? $ls_delete . $GLOBALS['img_tick'] : $ls_delete . $GLOBALS['img_cross']);
if ($access != 'view' && !$listAll) {
$ls->addColumn($element, $GLOBALS['I18N']->get('tag'), sprintf('<input type="checkbox" name="user[%d]" value="1" />', $user['id']));
} else {
$ls->addColumn($element, ' ', '', $user['id']);
}
## allow plugins to add columns
foreach ($GLOBALS['plugins'] as $plugin) {
$plugin->displayUsers($user, $element, $ls);
}
if (count($columns)) {
# let's not do this when not required, adds rather many db requests
# $attributes = getUserAttributeValues('',$user['id']);
# foreach ($attributes as $key => $val) {
# $ls->addColumn($user["email"],$key,$val);
# }
示例9: formStart
if (!Sql_Affected_Rows()) {
print '<p class="information">' . $GLOBALS['I18N']->get("No template have been defined") . '</p>';
}
$defaulttemplate = getConfig('defaultmessagetemplate');
$systemtemplate = getConfig('systemmessagetemplate');
print formStart('name="templates" class="templatesEdit" ');
$ls = new WebblerListing($GLOBALS['I18N']->get("Existing templates"));
while ($row = Sql_fetch_Array($req)) {
$img_template = '<img src="images/no-image-template.png" />';
if (file_exists('templates/' . $row['id'] . '.jpg')) {
$img_template = '<img src="templates/' . $row['id'] . '.jpg" />';
}
$element = $row['title'];
$ls->addElement($element, PageUrl2('template&id=' . $row['id']));
$ls->setClass($element, 'row1');
$ls->addColumn($element, $GLOBALS['I18N']->get('ID'), $row['id']);
$ls->addRow($element, $img_template, '<span class="button">' . PageLinkDialogOnly("viewtemplate&id=" . $row["id"], $GLOBALS['img_view']) . '</span>' . sprintf('<span class="delete"><a class="button" href="javascript:deleteRec(\'%s\');" title="' . $GLOBALS['I18N']->get('delete') . '">%s</a>', PageUrl2("templates", "", "delete=" . $row["id"]), $GLOBALS['I18N']->get('delete')));
# $imgcount = Sql_Fetch_Row_query(sprintf('select count(*) from %s where template = %d',
# $GLOBALS['tables']['templateimage'],$row['id']));
# $ls->addColumn($element,$GLOBALS['I18N']->get('# imgs'),$imgcount[0]);
# $ls->addColumn($element,$GLOBALS['I18N']->get('View'),);
$ls->addColumn($element, $GLOBALS['I18N']->get('Campaign Default'), sprintf('<input type=radio name="defaulttemplate" value="%d" %s onchange="document.templates.submit();">', $row['id'], $row['id'] == $defaulttemplate ? 'checked' : ''));
$ls->addColumn($element, $GLOBALS['I18N']->get('System'), sprintf('<input type=radio name="systemtemplate" value="%d" %s onchange="document.templates.submit();">', $row['id'], $row['id'] == $systemtemplate ? 'checked' : ''));
}
print $ls->display();
print '</form>';
print '<p class="button">' . PageLink2("template", $GLOBALS['I18N']->get('Add new Template')) . "</p>";
$exists = Sql_Fetch_Row_Query(sprintf('select * from %s where title = "System Template"', $GLOBALS['tables']['template']));
if (empty($exists[0])) {
print '<p class="button">' . PageLink2("defaultsystemtemplate", $GLOBALS['I18N']->get('Add default system template')) . "</p>";
}
示例10: WebblerListing
}
$ls = new WebblerListing($GLOBALS['I18N']->get('Campaigns in the last year'));
$ls->usePanel($paging);
while ($row = Sql_Fetch_Array($req)) {
$element = '<!--' . $row['messageid'] . '-->' . shortenTextDisplay($row['subject'], 30);
$fwded = Sql_Fetch_Row_Query(sprintf('select count(id) from %s where message = %d', $GLOBALS['tables']['user_message_forward'], $row['messageid']));
$ls->addElement($element, PageURL2('statsoverview&id=' . $row['messageid']));
#,PageURL2('message&id='.$row['messageid']));
$ls->setClass($element, 'row1');
# $ls->addColumn($element,$GLOBALS['I18N']->get('owner'),$row['owner']);
$ls->addColumn($element, $GLOBALS['I18N']->get('sent'), $row['total']);
$ls->addColumn($element, $GLOBALS['I18N']->get('bncs'), $row['bounced']);
$ls->addColumn($element, $GLOBALS['I18N']->get('fwds'), sprintf('%d', $fwded[0]));
$ls->addColumn($element, $GLOBALS['I18N']->get('views'), $row['views'], $row['views'] ? PageURL2('mviews&id=' . $row['messageid']) : '');
$perc = sprintf('%0.2f', $row['views'] / ($row['total'] - $row['bounced']) * 100);
$ls->addRow($element, '', "<div class='content listingsmall fright gray'>" . $GLOBALS['I18N']->get('rate') . ": " . $perc . ' %' . "</div>" . "<div class='content listingsmall fright gray'>" . $GLOBALS['I18N']->get('date') . ": " . $row['sent'] . "</div>");
}
## needs reviewing
if (false && $addcomparison) {
$total = Sql_Fetch_Array_Query(sprintf('select count(entered) as total from %s um where um.status = "sent"', $GLOBALS['tables']['usermessage']));
$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();
}
示例11: stripslashes
$isSpamReport = $isSpamReport || $row['data'] == 'blacklisted due to spam complaints';
$ls->addColumn($row['name'], $GLOBALS['I18N']->get('value'), stripslashes($row['data']));
}
$ls->addElement('<!-- remove -->');
if (!$isSpamReport) {
$button = new ConfirmButton(htmlspecialchars($GLOBALS['I18N']->get('are you sure you want to delete this subscriber from the blacklist')) . '?\\n' . htmlspecialchars($GLOBALS['I18N']->get('it should only be done with explicit permission from this subscriber')), PageURL2("userhistory&unblacklist={$user['id']}&id={$user['id']}", 'button', s('remove subscriber from blacklist')), s('remove subscriber from blacklist'));
$ls->addRow('<!-- remove -->', s('remove'), $button->show());
} else {
$ls->addRow('<!-- remove -->', s('remove'), s('For this subscriber to be removed from the blacklist, you need to ask them to re-subscribe using the phpList subscribe page'));
}
print $ls->display();
}
$ls = new WebblerListing($GLOBALS['I18N']->get('Subscription History'));
$ls->setElementHeading($GLOBALS['I18N']->get('Event'));
$req = Sql_Query(sprintf('select * from %s where userid = %d order by id desc', $tables['user_history'], $user['id']));
if (!Sql_Affected_Rows()) {
print $GLOBALS['I18N']->get('no details found');
}
while ($row = Sql_Fetch_Array($req)) {
$ls->addElement($row['id']);
$ls->setClass($row['id'], 'row1');
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('ip'), $row['ip']);
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('date'), $row['date']);
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('summary'), $row['summary']);
$ls->addRow($row['id'], "<div class='gray'>" . $GLOBALS['I18N']->get('detail') . ': </div>', "<div class='tleft'>" . nl2br(htmlspecialchars($row['detail'])) . '</div>');
$ls->addRow($row['id'], "<div class='gray'>" . $GLOBALS['I18N']->get('info') . ': </div>', "<div class='tleft'>" . nl2br($row['systeminfo']) . '</div>');
}
print $ls->display();
print '</div>';
print '</div>';
## end of tabbed
示例12: array
?>
<?php
$columns = array();
$columns = explode(',', getConfig('membership_columns'));
# $columns = array('country','Lastname');
$ls = new WebblerListing($GLOBALS['I18N']->get("Members"));
$ls->usePanel($paging);
while ($user = Sql_fetch_array($result)) {
$element = shortenTextDisplay($user["email"]);
$ls->addElement($element, PageUrl2("user&id=" . $user["id"]));
$ls->setClass($element, 'row1');
$ls_delete = "";
if ($access != "view") {
$ls_delete = sprintf('<a title="' . $GLOBALS['I18N']->get('Delete') . '" class="del" href="javascript:deleteRec(\'%s\');"></a>', PageURL2("members", "", "start={$start}&{$pagingKeep}&id={$id}&delete=" . $user["id"]));
}
$ls->addRow($element, '', $user["confirmed"] && !$user["blacklisted"] ? $ls_delete . $GLOBALS["img_tick"] : $ls_delete . $GLOBALS["img_cross"]);
if ($access != "view") {
$ls->addColumn($element, $GLOBALS['I18N']->get("tag"), sprintf('<input type="checkbox" name="user[%d]" value="1" />', $user["id"]));
}
/*
$query
= ' select count(*)'
. ' from %s lm, %s um'
. ' where lm.messageid = um.messageid'
. ' and lm.listid = ?'
. ' and um.userid = ?';
// TODO: Could left join with above query.
$query = sprintf($query, $tables['listmessage'], $tables['usermessage']);
$rs = Sql_Query_Params($query, array($id, $user['id']));
$msgcount = Sql_Fetch_Row($rs);
$ls->addColumn($user["email"],$GLOBALS['I18N']->get("# msgs"),$msgcount[0]);
示例13: count
# $GLOBALS['tables']['linktrack'],$id,$row['url']));
# $totalsent = Sql_Fetch_Array_Query(sprintf('select count(*) as total from %s where url = "%s"',
# $GLOBALS['tables']['linktrack'],$urldata['url']));
$ls_userid = '';
if (!$userid) {
$ls_userid = '<span class="viewusers"><a class="button" href="' . PageUrl2('userclicks&userid=' . $row['userid']) . '" title="' . $GLOBALS['I18N']->get('view user') . '"></a></span>';
}
if (!empty($row['userid'])) {
$userStatus = Sql_Fetch_Assoc_Query(sprintf('select blacklisted,confirmed from %s where id = %d', $GLOBALS['tables']['user'], $row['userid']));
$ls->addColumn($element, s('Status'), $userStatus['confirmed'] && empty($userStatus['blacklisted']) ? $GLOBALS['img_tick'] : $GLOBALS['img_cross']);
}
$ls->addColumn($element, $GLOBALS['I18N']->get('firstclick'), formatDateTime($row['firstclick'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('latestclick'), $row['latestclick']);
$ls->addColumn($element, $GLOBALS['I18N']->get('clicks'), $row['clicked'] . $ls_userid);
if (!empty($row['htmlclicked']) && !empty($row['textclicked'])) {
$ls->addRow($element, '<div class="content listingsmall fright gray">' . $GLOBALS['I18N']->get('HTML') . ': ' . $row['htmlclicked'] . '</div>' . '<div class="content listingsmall fright gray">' . $GLOBALS['I18N']->get('text') . ': ' . $row['textclicked'] . '</div>', '');
}
# $ls->addColumn($element,$GLOBALS['I18N']->get('sent'),$total['total']);
# $perc = sprintf('%0.2f',($row['numclicks'] / $totalsent['total'] * 100));
# $ls->addColumn($element,$GLOBALS['I18N']->get('clickrate'),$perc.'%');
$summary['totalclicks'] += $row['clicked'];
}
}
## adding a total doesn't make sense if we're not listing everything, it'll only do the total of the page
//$ls->addElement($GLOBALS['I18N']->get('total'));
//$ls->setClass($GLOBALS['I18N']->get('total'),'rowtotal');
//$ls->addColumn($GLOBALS['I18N']->get('total'),$GLOBALS['I18N']->get('clicks'),$summary['totalclicks']);
if (!$download) {
print $ls->display();
} else {
ob_end_clean();
示例14: stripslashes
$ls->addElement($row["name"]);
$isSpamReport = $isSpamReport || $row['data'] == 'blacklisted due to spam complaints';
$ls->addColumn($row["name"], $GLOBALS['I18N']->get('value'), stripslashes($row["data"]));
}
$ls->addElement('<!-- remove -->');
if (!$isSpamReport) {
$button = new ConfirmButton(htmlspecialchars($GLOBALS['I18N']->get('are you sure you want to delete this subscriber from the blacklist')) . "?\\n" . htmlspecialchars($GLOBALS['I18N']->get('it should only be done with explicit permission from this subscriber')), PageURL2("userhistory&unblacklist={$user["id"]}&id={$user["id"]}", "button", s('remove subscriber from blacklist')), s('remove subscriber from blacklist'));
$ls->addRow('<!-- remove -->', s('remove'), $button->show());
} else {
$ls->addRow('<!-- remove -->', s('remove'), s('For this subscriber to be removed from the blacklist, you need to ask them to re-subscribe using the phpList subscribe page'));
}
print $ls->display();
}
$ls = new WebblerListing($GLOBALS['I18N']->get('Subscription History'));
$req = Sql_Query(sprintf('select * from %s where userid = %d order by date desc', $tables["user_history"], $user["id"]));
if (!Sql_Affected_Rows()) {
print $GLOBALS['I18N']->get('no details found');
}
while ($row = Sql_Fetch_Array($req)) {
$ls->addElement($row["id"]);
$ls->setClass($row["id"], 'row1');
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('ip'), $row["ip"]);
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('date'), $row["date"]);
$ls->addColumn($row["id"], $GLOBALS['I18N']->get('summary'), $row["summary"]);
$ls->addRow($row["id"], "<div class='gray'>" . $GLOBALS['I18N']->get('detail') . ": </div>", "<div class='tleft'>" . nl2br(htmlspecialchars($row["detail"])) . "</div>");
$ls->addRow($row["id"], "<div class='gray'>" . $GLOBALS['I18N']->get('info') . ": </div>", "<div class='tleft'>" . nl2br($row["systeminfo"]) . "</div>");
}
print $ls->display();
print '</div>';
print '</div>';
## end of tabbed
示例15: s
if (pluginCanEnable($pluginname)) {
$ls->addColumn($pluginname, s('enabled'), $plugin->enabled ? PageLinkAjax('plugins&disable=' . $pluginname, $GLOBALS['img_tick']) : PageLinkAjax('plugins&enable=' . $pluginname, $GLOBALS['img_cross']));
}
if (DEVVERSION) {
//$ls->addColumn($pluginname,s('initialise'),$plugin->enabled ?
//PageLinkAjax('plugins&initialise='.$pluginname,s('Initialise')) : '');
if ($plugin->enabled) {
$details .= '<div class="detail"><span class="label">' . s('initialise') . '</span>';
$details .= '<span class="value">';
$details .= PageLinkAjax('plugins&initialise=' . $pluginname, s('Initialise'));
$details .= '</span></div>';
}
}
if (!empty($pluginDetails['installUrl']) && is_writable($pluginDestination . '/' . $pluginname)) {
## we can only delete the ones that were installed from the interface
$ls->addColumn($pluginname, s('delete'), '<span class="delete"><a href="javascript:deleteRec(\'./?page=plugins&delete=' . $pluginname . '\');" class="button" title="' . s('delete this plugin') . '">' . s('delete') . '</a></span>');
}
if (!pluginCanEnable($pluginname)) {
$details .= '<div class="detail"><span class="label">' . s('Dependency check') . '</span>';
$details .= '<span class="value">' . s('Plugin can not be enabled, because it fails a dependency check - ') . $plugin->dependencyFailure . '</span></div>';
}
if (!empty($pluginDetails['installUrl']) && class_exists('ZipArchive')) {
$updateForm = formStart();
$updateForm .= '<input type="hidden" name="pluginurl" value="' . $pluginDetails['installUrl'] . '"/>
<button type="submit" name="update" title="' . s('update this plugin') . '">' . s('update') . '</button></form>';
$ls->addColumn($pluginname, s('update'), $updateForm);
}
$details .= '</div>';
$ls->addRow($pluginname, s('details'), $details);
}
print $ls->display();