= UOJLocale::get('problems lists') ?>
printHTML(); ?>
ID |
{$list_caption} |
{$ac_caption} |
{$total_caption} |
EOD;
$cond = [];
$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 ($cond) {
$cond = join($cond, ' and ');
} else {
$cond = '1';
}
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'),
"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']}')",
$cond,
'group by a.id order by a.id desc',
$header,
function($list) use ($myUser) {
if (isListVisibleToUser($list, $myUser)) {
echo '
';
if ($list['problem_count'] == $list['accepted'] && $list['problem_count'] > 0) {
echo '';
} else {
echo ' | ';
}
echo '#', $list['list_id'], ' | ';
echo '';
echo '', $list['title'], ' ';
if ($list['is_hidden']) {
echo ' ', UOJLocale::get('hidden'), ' ';
}
foreach (queryProblemListTags($list['list_id']) as $tag) {
echo '', '', HTML::escape($tag), '', ' ';
}
echo ' | ';
echo "{$list['accepted']} | ";
echo "{$list['problem_count']} | ";
echo '
';
}
},
[
'page_len' => 40,
'table_classes' => ['table', 'table-bordered', 'table-hover', 'table-striped'],
'head_pagination' => true,
'pagination_table' => 'lists',
'div_classes' => ['card', 'my-3'],
'table_classes' => ['table', 'uoj-table', 'mb-0'],
]
);
?>