S2OJ/web/app/controllers/announcements.php

57 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2016-07-18 16:39:37 +00:00
<?php
2022-11-06 02:26:21 +00:00
requirePHPLib('form');
?>
<?php echoUOJPageHeader(UOJLocale::get('announcements')) ?>
2022-04-03 10:18:17 +00:00
2022-11-06 02:26:21 +00:00
<div class="row">
<!-- left col -->
<div class="col-lg-9">
<h1>
<?= UOJLocale::get('announcements') ?>
</h1>
<?php
echoLongTable(
['blogs.id', 'poster', 'title', 'post_time', 'zan', 'level'],
'important_blogs, blogs',
[
'is_hidden' => 0,
'important_blogs.blog_id' => DB::raw('blogs.id')
],
'order by level desc, important_blogs.blog_id desc',
<<<EOD
2016-07-18 16:39:37 +00:00
<tr>
<th width="60%">标题</th>
<th width="20%">发表者</th>
<th width="20%">发表日期</th>
</tr>
2022-11-06 02:26:21 +00:00
EOD,
function ($info) {
$blog = new UOJBlog($info);
echo '<tr>';
echo '<td>' . $blog->getLink(['show_level' => true, 'show_new_tag' => true]) . '</td>';
echo '<td>' . UOJUser::getLink($blog->info['poster']) . '</td>';
2022-11-06 02:26:21 +00:00
echo '<td>' . $blog->info['post_time'] . '</td>';
echo '</tr>';
},
[
2023-02-17 13:50:04 +00:00
'page_len' => 25,
2022-11-06 02:26:21 +00:00
'div_classes' => ['card', 'my-3'],
'table_classes' => ['table', 'uoj-table', 'mb-0'],
]
);
?>
</div>
<!-- end left col -->
<!-- right col -->
<aside class="col-lg-3 mt-3 mt-lg-0">
<?php uojIncludeView('sidebar') ?>
</aside>
<!-- end right col -->
2022-10-07 10:24:11 +00:00
</div>
2016-07-18 16:39:37 +00:00
<?php echoUOJPageFooter() ?>