mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-09 17:18:42 +00:00
fix(web/blogs): display hidden blogs
This commit is contained in:
parent
a03a5063d7
commit
a52b553e6d
@ -3,7 +3,11 @@
|
||||
|
||||
function echoBlogCell($blog) {
|
||||
echo '<tr>';
|
||||
echo '<td>' . getBlogLink($blog['id']) . '</td>';
|
||||
if ($blog['is_hidden']) {
|
||||
echo '<td><span class="text-danger">[已隐藏]</span>' . getBlogLink($blog['id']) . '</td>';
|
||||
} else {
|
||||
echo '<td>' . getBlogLink($blog['id']) . '</td>';
|
||||
}
|
||||
echo '<td>' . getUserLink($blog['poster']) . '</td>';
|
||||
echo '<td>' . $blog['post_time'] . '</td>';
|
||||
echo '</tr>';
|
||||
@ -28,5 +32,5 @@ EOD;
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h3>博客总览</h3>
|
||||
<?php echoLongTable(array('id', 'poster', 'title', 'post_time', 'zan'), 'blogs', 'is_hidden = 0', 'order by post_time desc', $header, 'echoBlogCell', $config); ?>
|
||||
<?php echoLongTable(array('id', 'poster', 'title', 'post_time', 'zan', 'is_hidden'), 'blogs', "is_hidden = 0 or poster = '{$myUser['username']}'", 'order by post_time desc', $header, 'echoBlogCell', $config); ?>
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
Loading…
Reference in New Issue
Block a user