當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WebblerListing::setElementHeading方法代碼示例

本文整理匯總了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>';
開發者ID:gillima,項目名稱:phplist3,代碼行數:31,代碼來源:userhistory.php


注:本文中的WebblerListing::setElementHeading方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。