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 .= '×' . $info['ac_num'] . ''; $html .= '×' . $info['submit_num'] . ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= $perc . '%'; $html .= '
'; $html .= '
'; $html .= ''; } if (isset($_COOKIE['show_difficulty'])) { $html .= HTML::tag('td', [], $problem->getExtraConfig('difficulty')); } $html .= HTML::tag('td', [], ClickZans::getCntBlock($problem->info['zan'])); $html .= HTML::tag_end('tr'); return $html; } $header = ''; $header .= 'ID'; $header .= '' . UOJLocale::get('problems::problem') . ''; if (isset($_COOKIE['show_submit_mode'])) { $header .= '' . UOJLocale::get('problems::ac') . ''; $header .= '' . UOJLocale::get('problems::submit') . ''; $header .= '' . UOJLocale::get('problems::ac ratio') . ''; } if (isset($_COOKIE['show_difficulty'])) { $header .= '' . UOJLocale::get('problems::difficulty') . ''; } $header .= '' . UOJLocale::get('appraisal') . ''; $header .= ''; $pag_config = [ 'page_len' => 40, 'col_names' => [ 'best_ac_submissions.submission_id as submission_id', 'problems.id as id', 'problems.is_hidden as is_hidden', 'problems.title as title', 'problems.submit_num as submit_num', 'problems.ac_num as ac_num', 'problems.zan as zan', 'problems.extra_config as extra_config', 'problems.uploader as uploader', ], 'table_name' => [ "problems", "left join best_ac_submissions", "on", [ "best_ac_submissions.submitter" => Auth::id(), "problems.id" => DB::raw("best_ac_submissions.problem_id") ], "inner join lists_problems", "on", [ "lists_problems.list_id" => UOJList::info('id'), "lists_problems.problem_id" => DB::raw("problems.id"), ], ], 'cond' => '1', 'tail' => "order by id asc", 'page_len' => 40, 'post_filter' => function ($problem) { return (new UOJProblem($problem))->userCanView(Auth::user()); } ]; $pag = new Paginator($pag_config); ?>

(ID: #)

userCanManage(Auth::user())) : ?>

题单简介

queryContent()['content'] ?>
/>
/>
/>
pagination() ?>
get(), [ 'table_attr' => [ 'class' => ['table', 'uoj-table', 'mb-0'], ], 'tr' => function ($row, $idx) { return getProblemTR($row); } ]); ?>
pagination() ?>