sql_query($sql)) {
bb_die('Could not select group data #1');
}
$group_list = '';
if (DB()->num_rows($result) != 0) {
$template->assign_block_vars('groups_exist', []);
while ($row = DB()->sql_fetchrow($result)) {
$group_list .= '';
}
}
$sql = 'SELECT * FROM ' . BB_RANKS . ' ORDER BY rank_title';
if (!($result = DB()->sql_query($sql))) {
bb_die('Could not obtain ranks data');
}
$rank_select_box = '';
if (DB()->num_rows($result) != 0) {
$template->assign_block_vars('ranks_exist', []);
while ($row = DB()->sql_fetchrow($result)) {
$rank = $row['rank_title'];
$rank_id = $row['rank_id'];
$rank_select_box .= '';
}
}
$language_list = \TorrentPier\Legacy\Select::language('', 'language_type');
$timezone_list = \TorrentPier\Legacy\Select::timezone('', 'timezone_type');
$sql = 'SELECT f.forum_id, f.forum_name, f.forum_parent, c.cat_id, c.cat_title
FROM ( ' . BB_FORUMS . ' AS f INNER JOIN ' . BB_CATEGORIES . ' AS c ON c.cat_id = f.cat_id )
ORDER BY c.cat_order, f.forum_order ASC';
if (!$result = DB()->sql_query($sql)) {
bb_die('Could not select forum data');
}
$forums = [];
$last_cat_id = -1;
$forums_list = '';
if (DB()->num_rows($result) != 0) {
$template->assign_block_vars('forums_exist', []);
while ($row = DB()->sql_fetchrow($result)) {
if ($row['cat_id'] != $last_cat_id) {
$forums_list .= '