+ UOJList::info('id')],
+ "order by problem_id asc",
+ <<
+ ID |
+ 标题 |
+
+ EOD,
+ function ($row) {
+ $problem = UOJProblem::query($row['problem_id']);
- echo HTML::tag_begin('tr');
- echo HTML::tag('td', ['class' => 'text-center'], $problem->info['id']);
- echo HTML::tag_begin('td');
- echo $problem->getLink(['with' => 'none']);
- if ($problem->info['is_hidden']) {
- echo ' ', UOJLocale::get('hidden'), ' ';
- }
- echo HTML::tag_end('td');
- echo HTML::tag('td', [], HTML::tag('form', [
- 'target' => '_self',
- 'method' => 'POST',
- 'class' => 'd-inline-block',
- 'onsubmit' => "return confirm('你确定要将 {$problem->info['id']} 从题单中移除吗?');",
- ], [
- HTML::hiddenToken(),
- HTML::empty_tag('input', ['type' => 'hidden', 'name' => 'problem_id', 'value' => $problem->info['id']]),
- html::tag('button', [
- 'type' => 'submit',
- 'class' => 'btn btn-link text-danger text-decoration-none p-0',
- 'name' => 'submit-remove_problem',
- 'value' => 'remove_problem',
- ], '移除'),
- ]));
- echo HTML::tag_end('tr');
+ echo HTML::tag_begin('tr');
+ echo HTML::tag('td', ['class' => 'text-center'], $problem->info['id']);
+ echo HTML::tag_begin('td');
+ echo $problem->getLink(['with' => 'none']);
+ if ($problem->info['is_hidden']) {
+ echo ' ', UOJLocale::get('hidden'), ' ';
+ }
+ echo HTML::tag_end('td');
+ echo HTML::tag_end('tr');
+ },
+ [
+ 'page_len' => 50,
+ 'div_classes' => ['table-responsive'],
+ 'table_classes' => ['table', 'align-middle'],
+ 'print_after_table' => function () use ($n_problems) {
+ echo '共 ', $n_problems, ' 道题目
';
},
- [
- 'page_len' => 10,
- 'div_classes' => ['table-responsive'],
- 'table_classes' => ['table', 'align-middle'],
- 'print_after_table' => function () use ($n_problems) {
- echo '共 ', $n_problems, ' 道题目
';
- },
- ]
- );
- ?>
-
-