contest-dashboard.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <div class="table-responsive shadow my-4">
  2. <table class="table table-bordered table-hover table-striped table-text-center">
  3. <thead>
  4. <tr>
  5. <th style="width:5em">#</th>
  6. <th><?= UOJLocale::get('problems::problem') ?></th>
  7. </tr>
  8. </thead>
  9. <tbody>
  10. <?php for ($i = 0; $i < count($contest_problems); $i++): ?>
  11. <tr>
  12. <?php
  13. echo $contest_problems[$i]['submission_id'] ? '<td class="success">' : '<td>';
  14. echo chr(ord('A') + $i);
  15. echo '</td>';
  16. ?>
  17. <td><?= getContestProblemLink($contest_problems[$i]['problem'], $contest['id']) ?></td>
  18. </tr>
  19. <?php endfor ?>
  20. </tbody>
  21. </table>
  22. </div>
  23. <h3><?= UOJLocale::get('contests::contest notice') ?></h3>
  24. <div class="table-responsive shadow my-4">
  25. <table class="table table-bordered table-hover table-vertical-middle table-text-center">
  26. <thead>
  27. <tr>
  28. <th style="width:10em"><?= UOJLocale::get('title') ?></th>
  29. <th><?= UOJLocale::get('content') ?></th>
  30. <th style="width:12em"><?= UOJLocale::get('time') ?></th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <?php if (empty($contest_notice)): ?>
  35. <tr><td colspan="233"><?= UOJLocale::get('none') ?></td></tr>
  36. <?php else: foreach ($contest_notice as $notice): ?>
  37. <tr>
  38. <td><?= HTML::escape($notice['title']) ?></td>
  39. <td style="white-space:pre-wrap; text-align: left"><?= $notice['content'] ?></td>
  40. <td><?= $notice['time'] ?></td>
  41. </tr>
  42. <?php endforeach; endif ?>
  43. </tbody>
  44. </table>
  45. </div>
  46. <?php if ($post_notice): ?>
  47. <div class="text-center">
  48. <button id="button-display-post-notice" type="button" class="btn btn-danger btn-xs">发布比赛公告</button>
  49. </div>
  50. <div id="div-form-post-notice" style="display:none" class="bot-buffer-md">
  51. <?php $post_notice->printHTML() ?>
  52. </div>
  53. <script type="text/javascript">
  54. $(document).ready(function() {
  55. $('#button-display-post-notice').click(function() {
  56. $('#div-form-post-notice').toggle('fast');
  57. });
  58. });
  59. </script>
  60. <?php endif ?>
  61. <h3>提问</h3>
  62. <?php if ($my_questions_pag != null): ?>
  63. <div>
  64. <?php if ($post_question): ?>
  65. <div class="float-right">
  66. <button id="button-display-post-question" type="button" class="btn btn-primary btn-xs">提问题</button>
  67. </div>
  68. <?php endif ?>
  69. <h4>我的提问</h4>
  70. <?php if ($post_question): ?>
  71. <div id="div-form-post-question" style="display:none" class="bot-buffer-md">
  72. <?php $post_question->printHTML() ?>
  73. </div>
  74. <script type="text/javascript">
  75. $(document).ready(function() {
  76. $('#button-display-post-question').click(function() {
  77. $('#div-form-post-question').toggle('fast');
  78. });
  79. });
  80. </script>
  81. <?php endif ?>
  82. <?php uojIncludeView('contest-question-table', ['pag' => $my_questions_pag]) ?>
  83. </div>
  84. <?php endif ?>
  85. <div>
  86. <?php if ($my_questions_pag != null): ?>
  87. <h4>其他人的提问</h4>
  88. <?php else: ?>
  89. <h4>所有人的提问</h4>
  90. <?php endif ?>
  91. <?php uojIncludeView('contest-question-table', ['pag' => $others_questions_pag]) ?>
  92. </div>