= $username ?> 的所有赛后总结
'contests_registrants',
'page_len' => 10,
'div_classes' => ['card', 'card-default', 'table-responsive'],
'table_classes' => ['table', 'table-bordered', 'text-center', 'align-middle', 'uoj-table', 'mb-0'],
);
$header_row = '';
$header_row .= '';
$header_row .= ''.UOJLocale::get('contests::contest name').' | ';
$header_row .= ''.UOJLocale::get('problems::problem').' | ';
$header_row .= ''.UOJLocale::get('contests::problem self review').' | ';
$header_row .= ''.UOJLocale::get('contests::contest self review').' | ';
$header_row .= '
';
$parsedown = HTML::parsedown();
$purifier = HTML::purifier_inline();
$print_row = function($row) use ($parsedown, $purifier) {
global $username;
$contest_id = $row['contest_id'];
$contest = queryContest($contest_id);
$contest_problems = queryContestProblems($contest_id);
$n_contest_problems = count($contest_problems);
for ($i = 0; $i < $n_contest_problems; $i++) {
$problem_id = $contest_problems[$i]['problem_id'];
$problem = queryProblemBrief($problem_id);
$problem_self_review = DB::selectFirst("select content from contests_reviews where contest_id = $contest_id and problem_id = $problem_id and poster = '$username'");
$result .= '';
if ($i == 0) {
$result .= '' . $contest['name'] . ' | ';
}
$problem_review_id = "review-$contest_id-$i";
$result .= '' . chr(ord('A') + $i) . '. ' . $problem['title'] . ' | ';
$result .= '' . $purifier->purify($problem_self_review != null ? $parsedown->line($problem_self_review['content']) : '') . ' | ';
if ($i == 0) {
$contest_review_id = "review-$contest_id-overall";
$contest_self_review = DB::selectFirst("select content from contests_reviews where contest_id = $contest_id and problem_id = -1 and poster = '$username'");
$result .= '' . $purifier->purify($contest_self_review != null ? $parsedown->line($contest_self_review['content']) : '') . ' | ';
}
$result .= '
';
}
echo $result;
};
echoLongTable($col_names, $from, $cond, $tail, $header_row, $print_row, $config);
?>