= UOJLocale::get('problems lists') ?>
printHTML(); ?>
ID |
{$problem_list_caption} |
{$ac_caption} |
{$total_caption} |
EOD;
$cond = array();
$search_tag = null;
if (isset($_GET['tag'])) {
$search_tag = $_GET['tag'];
}
if ($search_tag) {
$cond[] = "'" . DB::escape($search_tag) . "' in (select tag from lists_tags where lists_tags.list_id = a.id)";
}
if (!isSuperUser($myUser)) {
$cond[] = "is_hidden = 0";
}
if ($cond) {
$cond = join($cond, ' and ');
} else {
$cond = '1';
}
$from = "lists a left join lists_problems b on a.id = b.list_id left join best_ac_submissions c on (b.problem_id = c.problem_id and c.submitter = '{$myUser['username']}')";
$table_config = array(
'page_len' => 40,
'table_classes' => array('table', 'table-bordered', 'table-hover', 'table-striped'),
'head_pagination' => true,
'pagination_table' => 'lists'
);
if (isset($REQUIRE_LIB['bootstrap5'])) {
$table_config['div_classes'] = array('card', 'mb-3');
$table_config['table_classes'] = array('table', 'uoj-table', 'mb-0');
}
echoLongTable(
array('a.id as list_id', 'a.title as title', 'a.is_hidden as is_hidden', 'count(b.problem_id) as problem_count', 'count(c.submitter) as accepted'),
$from, $cond, 'group by a.id order by a.id desc',
$header,
'echoList',
$table_config,
);
?>