'friendly',
'time_font_size' => 'normal',
'judge_time_hidden' => true,
'table_config' => [
'div_classes' => ['card', 'mb-3', 'table-responsive'],
'table_classes' => ['table', 'mb-0', 'uoj-table', 'text-center'],
]
];
$q_problem_id = UOJRequest::get('problem_id', 'validateUInt', null);
$q_submitter = UOJRequest::get('submitter', 'validateUsername', null);
$q_min_score = UOJRequest::get('min_score', 'validateUFloat', null);
$q_max_score = UOJRequest::get('max_score', 'validateUFloat', null);
$q_lang = UOJRequest::get('language', 'is_short_string', null);
if ($q_problem_id !== null) {
$problem = UOJProblem::query($q_problem_id);
if ($problem) {
$config['problem'] = $problem;
}
$conds['problem_id'] = $q_problem_id;
}
if ($q_submitter !== null) {
$conds['submitter'] = $q_submitter;
}
if ($q_min_score !== null) {
$conds[] = ['score', '>=', $q_min_score];
}
if ($q_max_score !== null) {
$conds[] = ['score', '<=', $q_max_score];
}
if ($q_lang != null) {
$conds['language'] = $q_lang;
}
if (!$conds) {
$conds = '1';
}
function echoSubmissionItem($info) {
$submission = new UOJSubmission($info);
$submission->setProblem();
$submitter = UOJUser::query($submission->info['submitter']);
$cfg = [
'show_actual_score' => $submission->viewerCanSeeScore(Auth::user()),
'unknown_char' => '?',
'result_badge' => true,
];
$show_status_details = $submission->viewerCanSeeStatusDetailsHTML(Auth::user());
if ($show_status_details) {
echo '
';
} else {
echo '
';
}
echo '
';
echo '
';
echo '
';
echo HTML::tag('a', [
'href' => HTML::url('/user/' . $submitter['username']),
'class' => 'd-inline-block me-2',
], HTML::empty_tag('img', [
'src' => HTML::avatar_addr($submitter, 64),
'class' => 'uoj-user-avatar rounded',
'style' => 'width: 2.5rem; height: 2.5rem;',
]));
echo '
';
echo '
';
echo '
', UOJUser::getLink($submitter), '
';
echo '
', ' ', UOJTime::userFriendlyFormat($submission->info['submit_time']), '
';
echo '
';
echo '
';
echo '
';
echo '
', $submission->echoStatusBarTD('result', $cfg), '
';
echo '
';
echo '
';
echo $submission->problem->getLink();
echo '
';
$lang = UOJLang::getLanguageDisplayName($submission->info['language']);
echo '
';
echo '', ' ', $submission->echoStatusBarTD('used_time', $cfg), '', ' / ';
echo '', ' ', $submission->echoStatusBarTD('used_memory', $cfg), '', ' / ';
echo '', ' ', $submission->echoStatusBarTD('tot_size', $cfg), '';
if ($lang != '/') {
echo ' / ', $lang, ' ';
}
echo '
';
echo '
';
echo '
';
if ($show_status_details) {
echo '
';
echo '
';
echo '';
echo $submission->getStatusDetailsHTML();
echo '
';
echo '';
echo '
';
echo '
';
}
}
$pag = new Paginator([
'page_len' => 10,
'table_name' => 'submissions',
'col_names' => [
'id',
'problem_id',
'contest_id',
'submitter',
'used_time',
'used_memory',
'tot_size',
'language',
'submit_time',
'status_details',
'status',
'result_error',
'score',
'hide_score_to_others',
'hidden_score',
],
'cond' => $conds,
'tail' => 'order by id desc',
]);
?>
= UOJLocale::get('submissions') ?>
isEmpty()) : ?>
= UOJLocale::get('none') ?>
get() as $idx => $row) : ?>
= $pag->pagination() ?>