本文整理汇总了PHP中WebblerListing::setElementHeading方法的典型用法代码示例。如果您正苦于以下问题:PHP WebblerListing::setElementHeading方法的具体用法?PHP WebblerListing::setElementHeading怎么用?PHP WebblerListing::setElementHeading使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebblerListing
的用法示例。
在下文中一共展示了WebblerListing::setElementHeading方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
while ($row = Sql_Fetch_Array($req)) {
$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'));
$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>';