mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 19:28:41 +00:00
This commit is contained in:
parent
edef725860
commit
5219d8ddcc
@ -11,9 +11,9 @@
|
|||||||
become403Page();
|
become403Page();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_COOKIE['bootstrap4'])) {
|
if (!isset($_COOKIE['bootstrap4'])) {
|
||||||
$REQUIRE_LIB['bootstrap5'] = '';
|
$REQUIRE_LIB['bootstrap5'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSuperUser($myUser)) {
|
if (isSuperUser($myUser)) {
|
||||||
$new_group_form = new UOJForm('new_group');
|
$new_group_form = new UOJForm('new_group');
|
||||||
@ -34,19 +34,19 @@
|
|||||||
echo '<td>';
|
echo '<td>';
|
||||||
echo '#', $group['group_id'], '</td>';
|
echo '#', $group['group_id'], '</td>';
|
||||||
|
|
||||||
if (isset($REQUIRE_LIB['bootstrap5'])) {
|
if (isset($REQUIRE_LIB['bootstrap5'])) {
|
||||||
echo '<td class="text-start">';
|
echo '<td class="text-start">';
|
||||||
} else {
|
} else {
|
||||||
echo '<td class="text-left">';
|
echo '<td class="text-left">';
|
||||||
}
|
}
|
||||||
if ($group['is_hidden']) {
|
if ($group['is_hidden']) {
|
||||||
echo ' <span class="text-danger">[隐藏]</span> ';
|
echo ' <span class="text-danger">[隐藏]</span> ';
|
||||||
}
|
}
|
||||||
echo '<a ';
|
echo '<a ';
|
||||||
if (isset($REQUIRE_LIB['bootstrap5'])) {
|
if (isset($REQUIRE_LIB['bootstrap5'])) {
|
||||||
echo ' class="text-decoration-none" ';
|
echo ' class="text-decoration-none" ';
|
||||||
}
|
}
|
||||||
echo ' href="/group/', $group['group_id'], '">', $group['title'], '</a>';
|
echo ' href="/group/', $group['group_id'], '">', $group['title'], '</a>';
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo "<td>{$group['user_count']}</td>";
|
echo "<td>{$group['user_count']}</td>";
|
||||||
@ -94,23 +94,23 @@ EOD;
|
|||||||
|
|
||||||
$from = "`groups` a left join groups_users b on a.id = b.group_id";
|
$from = "`groups` a left join groups_users b on a.id = b.group_id";
|
||||||
|
|
||||||
$table_config = array('page_len' => 40,
|
$table_config = array('page_len' => 40,
|
||||||
'table_classes' => array('table', 'table-bordered', 'table-hover', 'table-striped'),
|
'table_classes' => array('table', 'table-bordered', 'table-hover', 'table-striped'),
|
||||||
'head_pagination' => true,
|
'head_pagination' => true,
|
||||||
'pagination_table' => "`groups`"
|
'pagination_table' => "`groups`"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($REQUIRE_LIB['bootstrap5'])) {
|
if (isset($REQUIRE_LIB['bootstrap5'])) {
|
||||||
$table_config['div_classes'] = array('card', 'mb-3');
|
$table_config['div_classes'] = array('card', 'mb-3');
|
||||||
$table_config['table_classes'] = array('table', 'uoj-table', 'mb-0');
|
$table_config['table_classes'] = array('table', 'uoj-table', 'mb-0');
|
||||||
}
|
}
|
||||||
|
|
||||||
echoLongTable(
|
echoLongTable(
|
||||||
array('a.id as group_id', 'a.title as title', 'a.is_hidden as is_hidden', 'count(b.username) as user_count'),
|
array('a.id as group_id', 'a.title as title', 'a.is_hidden as is_hidden', 'count(b.username) as user_count'),
|
||||||
$from, $cond, 'group by a.id order by a.id asc',
|
$from, $cond, 'group by a.id order by a.id asc',
|
||||||
$header,
|
$header,
|
||||||
'echoGroup',
|
'echoGroup',
|
||||||
$table_config
|
$table_config
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user