本文整理汇总了PHP中Permission::set_boardid方法的典型用法代码示例。如果您正苦于以下问题:PHP Permission::set_boardid方法的具体用法?PHP Permission::set_boardid怎么用?PHP Permission::set_boardid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permission
的用法示例。
在下文中一共展示了Permission::set_boardid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: eval
$name[$i] = 'n/a';
$value[$i] = 'n/a';
}
mysql_free_result($r_posters);
eval($TRow->GetTemplate("stats_top10_row"));
$stats_top10_row .= "<br>";
}
/** top 10 boards **/
$data['title'] = 'Top 10 Boards (nach Posts)';
$name = array();
$value = array();
$a_boards = array();
$i = 0;
$r_boards = thwb_query("SELECT b.boardid, b.boardname, b.boardposts, c.categoryname FROM {$pref}" . "board AS b LEFT OUTER JOIN {$pref}" . "category AS c ON c.categoryid = b.categoryid ORDER BY boardposts DESC LIMIT 10");
while ($a_boards = mysql_fetch_array($r_boards)) {
$P->set_boardid($a_boards['boardid']);
if (!$P->has_permission(P_VIEW)) {
continue;
}
$name[$i] = '<a href="' . build_link('board.php?boardid=' . $a_boards['boardid']) . '">' . $a_boards['boardname'] . '</a>' . ' (Kategorie: ' . $a_boards['categoryname'] . ')';
$value[$i] = $a_boards['boardposts'];
$i++;
}
for (; $i <= 9; $i++) {
$name[$i] = 'n/a';
$value[$i] = 'n/a';
}
mysql_free_result($r_boards);
eval($TRow->GetTemplate("stats_top10_row"));
$stats_top10_row .= "<br>";
/** top 10 threads (by posts) **/
示例2: jumpmenu
function jumpmenu($currentboard = 1)
{
global $pref, $g_user;
$P = new Permission($g_user['groupids']);
// precache boards
$a_board = array();
$r_board = thwb_query("SELECT boardid, boardname, categoryid\n FROM " . $pref . "board\n WHERE boarddisabled = 0\n ORDER BY boardorder ASC");
while ($board = mysql_fetch_array($r_board)) {
$P->set_boardid($board['boardid']);
if ($P->has_permission(P_VIEW)) {
$a_board[$board['categoryid']][] = $board;
}
}
// category
$r_category = thwb_query("SELECT categoryid, categoryname FROM\n " . $pref . "category ORDER BY categoryorder ASC");
$JUMP_MENU = '<select class="tbselect" name="board[boardid]" onChange="Submit.click()">';
while ($category = mysql_fetch_array($r_category)) {
if (!empty($a_board[$category['categoryid']]) && $a_board[$category['categoryid']]) {
$JUMP_MENU .= '<option value="-' . $category['categoryid'] . '">' . $category['categoryname'] . '</option>';
while (list(, $board) = each($a_board[$category['categoryid']])) {
$JUMP_MENU .= '<option value="' . $board['boardid'] . '"' . ($board['boardid'] == $currentboard ? ' selected' : '') . '>- ' . $board['boardname'] . '</option>';
}
}
}
$JUMP_MENU .= '</select> <input class="tbbutton" type="submit" name="Submit" value="Jump">';
return $JUMP_MENU;
}
示例3: array
**/
$a_boardids = array();
if (defined(THWB_NEWS_INCLUDED)) {
$a_boardids[] = CFG_INCLUDE_BOARD;
} else {
if (!empty($_GET['limit'])) {
$a_boardids = explode(',', $_GET['limit']);
}
}
$r_boards = thwb_query("SELECT boardid FROM {$pref}board " . "WHERE boarddisabled = 0" . (count($a_boardids) ? " AND boardid IN (" . join(',', $a_boardids) . ")" : ''));
$a_boards = array();
while ($a_board = mysql_fetch_assoc($r_boards)) {
if (count($a_boardids) && !in_array($a_board['boardid'], $a_boardids)) {
continue;
}
$P->set_boardid($a_board['boardid']);
if (!$P->has_permission(0)) {
continue;
}
$a_boards[] = $a_board['boardid'];
}
if (!count($a_boards) && !defined('THWB_NEWS_INCLUDED')) {
print '<pre><strong>Fehler</strong>
Keine Boards gefunden.</pre>';
exit;
}
/**
* determine the order
**/
$orderby = 'threadcreationtime';
if (!empty($_GET['lastchanged'])) {