| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- requirePHPLib('form');
- requirePHPLib('judger');
- requirePHPLib('data');
-
- function echoRemoteProblem($problem) {
- global $myUser;
- echo '<tr class="text-center">';
- echo '<td>' . $problem['pid'] . '</td>';
- echo '<td class="text-left">';
- echo '<a href="/rp/', $problem['pid'], '">', $problem['title'], '</a>';
- echo '</td></tr>';
- }
-
-
- $header = '<tr>';
- $header .= '<th class="text-center" style="width:5em;">PID</th>';
- $header .= '<th>远端题目</th>';
- $header .= '</tr>';
- $pag_config = array('page_len' => 100);
- $pag_config['col_names'] = array('pid', 'title');
- $pag_config['table_name'] = "rp";
- $pag_config['cond'] = '1';
- $pag_config['tail'] = "order by pid asc";
- $pag = new Paginator($pag_config);
- $div_classes = array('table-responsive', 'shadow');
- $table_classes = array('table', 'table-bordered', 'table-hover', 'table-striped');
- ?>
- <?php echoUOJPageHeader('远端题目') ?>
- <div class="row my-4">
- <div class="col-sm-9">
- <?= HTML::tablist($tabs_info, $cur_tab, 'nav-pills') ?>
- </div>
- </div>
- <div class="top-buffer-sm"></div>
- <?php
- echo '<div class="', join($div_classes, ' '), '">';
- echo '<table class="', join($table_classes, ' '), '">';
- echo '<thead>';
- echo $header;
- echo '</thead>';
- echo '<tbody>';
- foreach ($pag->get() as $idx => $row) {
- echoRemoteProblem($row);
- echo "\n";
- }
- if ($pag->isEmpty()) {
- echo '<tr><td class="text-center" colspan="233">'.UOJLocale::get('none').'</td></tr>';
- }
-
- echo '</tbody>';
- echo '</table>';
- echo '</div>';
- echo "<div class='mt-4'>";
- echo $pag->pagination();
- echo "</div>";
- ?>
- <?php echoUOJPageFooter() ?>
|