refactor: remove echo
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-09-20 17:20:23 +08:00
parent 03ba52b90d
commit 03e6a1cb99
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -127,6 +127,11 @@ EOD;
$table_classes = array('table', 'table-bordered', 'table-hover', 'table-striped'); $table_classes = array('table', 'table-bordered', 'table-hover', 'table-striped');
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('problems')) ?> <?php echoUOJPageHeader(UOJLocale::get('problems')) ?>
<?php
if (isSuperUser($myUser) || isProblemManager($myUser) || isProblemUploader($myUser)) {
$new_problem_form->printHTML();
}
?>
<div class="row"> <div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
<?= HTML::tablist($tabs_info, $cur_tab, 'nav-pills') ?> <?= HTML::tablist($tabs_info, $cur_tab, 'nav-pills') ?>
@ -158,13 +163,11 @@ $('#input-show_submit_mode').click(function() {
location.reload(); location.reload();
}); });
</script> </script>
<div class="<?= join($div_classes, ' ') ?>">
<table class="<?= join($table_classes, ' ') ?>">
<thead><?= $header ?></thead>
<tbody>
<?php <?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) { foreach ($pag->get() as $idx => $row) {
echoProblem($row); echoProblem($row);
@ -173,15 +176,9 @@ $('#input-show_submit_mode').click(function() {
if ($pag->isEmpty()) { if ($pag->isEmpty()) {
echo '<tr><td class="text-center" colspan="233">'.UOJLocale::get('none').'</td></tr>'; echo '<tr><td class="text-center" colspan="233">'.UOJLocale::get('none').'</td></tr>';
} }
echo '</tbody>';
echo '</table>';
echo '</div>';
if (isSuperUser($myUser) || isProblemManager($myUser) || isProblemUploader($myUser)) {
$new_problem_form->printHTML();
}
echo $pag->pagination();
?> ?>
</tbody>
</table>
</div>
<?= $pag->pagination() ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>