本文整理汇总了PHP中WebblerListing::setClass方法的典型用法代码示例。如果您正苦于以下问题:PHP WebblerListing::setClass方法的具体用法?PHP WebblerListing::setClass怎么用?PHP WebblerListing::setClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebblerListing
的用法示例。
在下文中一共展示了WebblerListing::setClass方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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
示例2: max
$req = Sql_Query(sprintf('select userid,email,um.entered as sent,min(um.viewed) as firstview,
max(um.viewed) as lastview, count(um.viewed) as viewcount,
abs(unix_timestamp(um.entered) - unix_timestamp(um.viewed)) as responsetime
from %s um, %s user, %s msg where um.messageid = %d and um.messageid = msg.id and um.userid = user.id and um.status = "sent" and um.viewed is not null %s
group by userid %s', $GLOBALS['tables']['usermessage'], $GLOBALS['tables']['user'], $GLOBALS['tables']['message'], $id, $subselect, $limit));
$summary = array();
while ($row = Sql_Fetch_Array($req)) {
if ($download) {
## with download, the 50 per page limit is not there.
set_time_limit(60);
$element = $row['email'];
} else {
$element = shortenTextDisplay($row['email'], 15);
}
$ls->addElement($element, PageUrl2('userhistory&id=' . $row['userid']));
$ls->setClass($element, 'row1');
$ls->addRow($element, '<div class="listingsmall gray">' . $GLOBALS['I18N']->get('sent') . ': ' . formatDateTime($row['sent'], 1) . '</div>', '');
if ($row['viewcount'] > 1) {
$ls->addColumn($element, $GLOBALS['I18N']->get('firstview'), formatDateTime($row['firstview'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('lastview'), formatDateTime($row['lastview']));
$ls->addColumn($element, $GLOBALS['I18N']->get('views'), $row['viewcount']);
} else {
$ls->addColumn($element, $GLOBALS['I18N']->get('firstview'), formatDateTime($row['firstview'], 1));
$ls->addColumn($element, $GLOBALS['I18N']->get('responsetime'), secs2time($row['responsetime']));
}
}
if ($download) {
ob_end_clean();
print $ls->tabDelimited();
} else {
print $ls->display();
示例3: while
if ($total) {
$result = Sql_query('SELECT * FROM ' . $tables['message'] . " {$whereClause} {$sortBySql} limit {$limit} offset {$offset}");
while ($msg = Sql_fetch_array($result)) {
$editlink = '';
$messagedata = loadMessageData($msg['id']);
if ($messagedata['subject'] != $messagedata['campaigntitle']) {
$listingelement = '<!--' . $msg['id'] . '-->' . stripslashes($messagedata['campaigntitle']) . '<br/><strong>' . stripslashes($messagedata['subject']) . '</strong>';
} else {
$listingelement = '<!--' . $msg['id'] . '-->' . stripslashes($messagedata['subject']);
}
# $listingelement = '<!--'.$msg['id'].'-->'.stripslashes($messagedata["campaigntitle"]);
if ($msg['status'] == 'draft') {
$editlink = PageUrl2('send&id=' . $msg['id']);
}
$ls->addElement($listingelement, $editlink);
$ls->setClass($listingelement, 'row1');
$uniqueviews = Sql_Fetch_Row_Query("select count(userid) from {$tables['usermessage']} where viewed is not null and status = 'sent' and messageid = " . $msg['id']);
$clicks = Sql_Fetch_Row_Query("select sum(clicked) from {$tables['linktrack_ml']} where messageid = " . $msg['id']);
# $clicks = array(0);
/*
foreach ($messagedata as $key => $val) {
$ls->addColumn($listingelement,$key,$val);
}
*/
$ls->addColumn($listingelement, $GLOBALS['I18N']->get('Entered'), formatDateTime($msg['entered']));
$_GET['id'] = $msg['id'];
$statusdiv = '<div id="messagestatus' . $msg['id'] . '">';
include 'actions/msgstatus.php';
$statusdiv .= $status;
$statusdiv .= '</div>';
$GLOBALS['pagefooter']['statusupdate' . $msg['id']] = '<script type="text/javascript">
示例4: Info
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&start={$start}&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']);
# $ls->addColumn($user["email"], $GLOBALS['I18N']->get('bl l'), $onblacklist ? $GLOBALS["img_tick"] : $GLOBALS["img_cross"]);
# }
if ($user['confirmed'] && !$onblacklist) {
$ls_confirmed = $GLOBALS['img_tick'];
} else {
$ls_confirmed = $GLOBALS['img_cross'];
}
$ls_del = '';
# $ls->addColumn($user["email"], $GLOBALS['I18N']->get('del'), sprintf('<a href="%s" onclick="return deleteRec(\'%s\');">del</a>',PageUrl2('users'.$find_url), PageURL2("users&start=$start&delete=" .$user["id"])));
示例5: formStart
} else {
$delete = 0;
}
if ($delete) {
Sql_Query(sprintf('delete from %s where id = %d', $tables["subscribepage"], $delete));
Sql_Query(sprintf('delete from %s where id = %d', $tables["subscribepage_data"], $delete));
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')));
示例6: shortenTextDisplay
$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 {
$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'];
}
示例7: s
<button type="submit" name="download">' . s('Install plugin') . '</button>
</fieldset></form>';
}
$ls = new WebblerListing(s('Installed plugins'));
if (empty($GLOBALS['allplugins'])) {
return;
}
ksort($GLOBALS['allplugins'], SORT_FLAG_CASE | SORT_STRING);
foreach ($GLOBALS['allplugins'] as $pluginname => $plugin) {
$pluginDetails = array();
$refl = new ReflectionObject($plugin);
if (is_file(dirname($refl->getFileName()) . '/' . $pluginname . '.info.txt')) {
$pluginDetails = unserialize(file_get_contents($pluginDestination . '/' . $pluginname . '.info.txt'));
}
$ls->addElement($pluginname);
$ls->setClass($pluginname, 'row1');
# $ls->addColumn($pluginname,s('name'),$plugin->name);
$details = '<div class="plugindetails">';
$details .= '<div class="detail"><span class="label">' . s('name') . '</span>';
$details .= '<span class="value">' . $plugin->name . '</span></div>';
$details .= '<div class="detail"><span class="label">' . s('version') . '</span>';
$details .= '<span class="value">' . $plugin->version . '</span></div>';
$details .= '<div class="detail"><span class="label">' . s('description') . '</span>';
$details .= '<span class="value">' . $plugin->description . '</span></div>';
if (!empty($GLOBALS['developer_email'])) {
## show the origin of the plugin, as many may exist
$details .= '<div class="detail"><span class="label">' . s('origin') . '</span>';
$details .= '<span class="value">' . $plugin->origin . '</span></div>';
}
# $ls->addRow($pluginname,s('description'),$plugin->description);
# $ls->addColumn($pluginname,s('version'),$plugin->version);
示例8: 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();
示例9: formStart
} else {
$delete = 0;
}
if ($delete) {
Sql_Query(sprintf('delete from %s where id = %d', $tables['subscribepage'], $delete));
Sql_Query(sprintf('delete from %s where id = %d', $tables['subscribepage_data'], $delete));
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')));
示例10: Info
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("user", $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&start={$start}&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"]);
# $ls->addColumn($user["email"], $GLOBALS['I18N']->get('bl l'), $onblacklist ? $GLOBALS["img_tick"] : $GLOBALS["img_cross"]);
# }
if ($user['confirmed'] && !$onblacklist) {
$ls_confirmed = $GLOBALS["img_tick"];
} else {
$ls_confirmed = $GLOBALS["img_cross"];
}
$ls_del = "";
# $ls->addColumn($user["email"], $GLOBALS['I18N']->get('del'), sprintf('<a href="%s" onclick="return deleteRec(\'%s\');">del</a>',PageUrl2('users'.$find_url), PageURL2("users&start=$start&delete=" .$user["id"])));
示例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: WebblerListing
}
}
if ($some) {
print '<h3><a name="plugins">' . $GLOBALS['I18N']->get('Plugins') . '</a></h3>';
$ls->noShader();
$ls->noHeader();
print '<div>' . $ls->display() . '</div>';
}
$some = 0;
$ls = new WebblerListing('');
if (checkAccess("initialise") && !$_GET["pi"]) {
$some = 1;
$element = $GLOBALS['I18N']->get('setup');
$ls->addElement($element, PageURL2("setup"));
$ls->addColumn($element, " ", PageLinkClass('setup', $GLOBALS['I18N']->get('Setup ') . NAME, '', 'hometext'));
$ls->setClass($element, "setup");
}
if (checkAccess("upgrade") && !$_GET["pi"] && $upgrade_required) {
$some = 1;
$element = $GLOBALS['I18N']->get('upgrade');
$ls->addElement($element, PageURL2("upgrade"));
$ls->addColumn($element, " ", PageLinkClass('upgrade', $GLOBALS['I18N']->get('Upgrade'), '', 'hometext'));
$ls->setClass($element, "upgrade");
}
if (checkAccess("dbcheck")) {
$some = 1;
$element = $GLOBALS['I18N']->get('dbcheck');
$ls->addElement($element, PageURL2("dbcheck"));
$ls->addColumn($element, " ", PageLinkClass('dbcheck', $GLOBALS['I18N']->get('Check Database structure'), '', 'hometext'));
$ls->setClass($element, "dbcheck");
}
示例13: simplePaging
$limit = 'limit 0,50';
$start = 0;
}
print simplePaging("eventlog{$find_url}", $start, $total, MAX_USER_PP);
$result = Sql_query(sprintf('select * from %s %s order by entered desc, id desc %s', $tables['eventlog'], $where, $limit));
} else {
$result = Sql_Query(sprintf('select * from %s %s order by entered desc, id desc', $tables['eventlog'], $where));
}
$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_Affected_Rows()) {
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();
示例14: if
$summary['totalclicks'] = 0;
$summary['totalsent'] = 0;
$summary['uniqueclicks'] = 0;
while ($row = Sql_Fetch_Array($req)) {
# 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'], $id, $row['forwardid']));
# }
# $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));
if (!$download) {
$element = shortenTextDisplay($row['url']);
} else {
$element = $row['url'];
}
$ls->addElement($element, PageURL2('uclicks&id=' . $row['forwardid']));
$ls->setClass($element, 'row1');
# $ls->addColumn($element,$GLOBALS['I18N']->get('firstclick'),formatDateTime($row['firstclick'],1));
# $ls->addColumn($element,$GLOBALS['I18N']->get('latestclick'),$row['latestclick']);
## set is confusing, as it is total links sent, not total users sent, https://mantis.phplist.com/view.php?id=17057
## remove
# $ls->addColumn($element,$GLOBALS['I18N']->get('sent'),$row['total']);
//$ls->addColumn($element,$GLOBALS['I18N']->get('clicks'),$row['clicked'].'<span class="viewusers"><a class="button" href="'.PageUrl2('userclicks&msgid='.$id.'&fwdid='.$row['forwardid']).'" 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.'%');
# if (CLICKTRACK_SHOWDETAIL) {
$ls->addColumn($element, $GLOBALS['I18N']->get('clicks'), $uniqueclicks['users']);
$perc = sprintf('%0.2f', $uniqueclicks['users'] / $totalusers[0] * 100);
$ls->addColumn($element, $GLOBALS['I18N']->get('clickrate'), $perc . '%');
$summary['uniqueclicks'] += $uniqueclicks['users'];
$moreInfo1 = '
<div class="content listingsmall fright gray">' . s('html') . ': ' . $row['htmlclicked'] . '</div>' . '