userCanView(Auth::user(), ['ensure' => true]); function getProblemTR($info) { $problem = new UOJProblem($info); $html = HTML::tag_begin('tr', ['class' => 'text-center']); $html .= HTML::tag('td', ['class' => $info['submission_id'] ? 'table-success' : ''], "#{$info['id']}"); $html .= HTML::tag_begin('td', ['class' => 'text-start']); $html .= $problem->getLink(['with' => 'none']); if ($problem->isUserOwnProblem(Auth::user())) { $html .= ' ' . UOJLocale::get('problems::my problem') . ' '; } if ($info['is_hidden']) { $html .= ' ' . UOJLocale::get('hidden') . ' '; } if (isset($_COOKIE['show_tags_mode'])) { foreach ($problem->queryTags() as $tag) { $html .= ' ' . '' . HTML::escape($tag) . '' . ' '; } } $html .= HTML::tag_end('td'); if (isset($_COOKIE['show_submit_mode'])) { $perc = $info['submit_num'] > 0 ? round(100 * $info['ac_num'] / $info['submit_num']) : 0; $html .= HTML::tag( 'td', [], HTML::tag( 'div', [ 'class' => 'progress', 'data-bs-toggle' => 'tooltip', 'data-bs-title' => "{$info['ac_num']} / {$info['submit_num']}", 'data-bs-placement' => 'bottom', ], HTML::tag('div', [ 'class' => 'progress-bar bg-success', 'role' => 'progressbar', 'aria-valuenow' => $perc, 'aria-valuemin' => 0, 'aria-valuemax' => 100, 'style' => "width: {$perc}%; min-width: 20px;", ], "{$perc}%") ) ); } $html .= HTML::tag('td', [], UOJProblem::getDifficultyHTML($problem->info['difficulty'])); $html .= HTML::tag('td', [], ClickZans::getCntBlock($problem->info['zan'])); $html .= HTML::tag_end('tr'); return $html; } $header = '