1 Star 5 Fork 4

虎绿林团队 / 虎绿林网站程序

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
<?php
$tpl = $PAGE->start();
$USER->start($tpl);
$bbs = new bbs($USER);
$chat = new chat($USER);
$size = page::pageSize(1, 20, 1000);
$p = (int)$_GET['p'];
if ($p < 1) $p = 1;
$offset = ($p - 1) * $size;
//首页不显示一个月前的帖子和审核未通过的帖子
$newTopicList = $bbs->newTopicList($size + 1, $offset);
if (count($newTopicList) == $size + 1) {
$tpl->assign('hasNextPage', true);
array_pop($newTopicList);
} else {
$tpl->assign('hasNextPage', false);
}
foreach ($newTopicList as &$v) {
$forum = $bbs->forumMeta($v['forum_id'], 'name');
$v['forum_name'] = $forum['name'];
$v['reply_count'] = $bbs->topicContentCount($v['id']) - 1;
$v['uinfo'] = new userinfo();
$v['uinfo']->uid($v['uid']);
}
$tpl->assign('newTopicList', $newTopicList);
$tpl->assign('topicPage', $p);
// 是否显示机器人待审核
$showBot = (bool)$_GET['showBot'];
// 待审核帖子+回复数量
$tpl->assign('countReview', $bbs->countReview($showBot));
// 待审核聊天室发言数量
$tpl->assign('chatCountReview', $chat->chatReviewCount($showBot));
// 版块信息
$forumList = $bbs->childForumMeta(0, '*', 2);
$tpl->assign('forumList', $forumList);
$tpl->display('tpl:index');
1
https://gitee.com/hu60t/hu60wap6.git
git@gitee.com:hu60t/hu60wap6.git
hu60t
hu60wap6
虎绿林网站程序
master

搜索帮助