小型bbs论坛系统开发8 首页
2017-01-13 23:27
316 查看
<?php include_once './inc/tool.inc.php'; include_once './inc/config.inc.php'; include_once './inc/mysql.inc.php'; // mysqli中获取时间的知识点补充: // NOW() CURDATE() CURTIME() // 2008-12-29 16:25:46 2008-12-29 16:25:46 //初始化css $cssArray = array('public.css','index.css'); //初始化网站标题 $webTitle = '首页'; //获取数据库连接 $link = sql_connect(); //验证登录状态 if(!$member_id=is_login($link)){ skip('login.php?url=index.php','error','请先登录!'); } ?> <?php include_once './inc/header.inc.php'; ?> <!-- 热门动态开始 --> <div id="hot" class="auto"> <div class="title">热门动态</div> <ul class="newlist"> <!-- 20条 --> <li><a href="#">[库队]</a> <a href="#">私房库实战项目录制中...</a></li> </ul> <div style="clear:both;"></div> </div> <!-- 热门动态结束 --> <!-- 父板块开始 --> <?php $query = "select * from sfk_father_module order by sort asc"; $result_father = sql_execute($link,$query); while($data_father = mysqli_fetch_assoc($result_father)){ ?> <div class="box auto"> <div class="title"> <!-- 输出父板块名称 --> <?php echo "<a href = 'list_father.php?id={$data_father['id']}'>{$data_father['module_name']}</a> "; ?> </div> <div class="classList"> <!-- 输出子板块名称 开始--> <?php $query = "select * from sfk_son_module where father_module_id = {$data_father['id']} order by sort asc"; $result_son = sql_execute($link,$query); if(mysqli_num_rows($result_son)){ while($data_son =mysqli_fetch_assoc($result_son)){ // 获取今日帖子数量 $query = "select count(*) from sfk_content where module_id = {$data_son['id']} and time > curdate()"; $countToday = sql_num($link,$query); // 获取历史帖子发布数量 $query = "select count(*) from sfk_content where module_id = {$data_son['id']}"; $countAll = sql_num($link,$query); $html = <<<B <div class="childBox new"> <h2> <a href="#">{$data_son['module_name']}</a> <span>(今日{$countToday})</span> </h2> 帖子:{$countAll}<br /> </div> B; echo $html; } }else{ echo '<div style="padding:10px 0;">暂无子版块...</div>'; } ?> <!-- 输出子板块名称 结束 --> <div style="clear:both;"></div> </div> </div> <?php }?> <?php include_once './inc/footer.inc.php'; ?>
相关文章推荐
- 小型bbs论坛系统开发2 模板页首页制作
- 小型bbs论坛系统开发3 后台父板块展示/删除
- 小型bbs论坛系统开发9 前台父板块列表页
- 小型bbs论坛系统开发4 后台父板块添加/修改
- 小型bbs论坛系统开发6 前台注册/登录页
- 小型bbs论坛系统开发1 需求分析
- 小型bbs论坛系统开发7 会员帖子发布页
- 小型bbs论坛系统开发10 前台子版块列表页
- 小型bbs论坛系统开发5 后台子板块添加/修改
- 基于Java Web技术开发的BBS论坛系统(原创+源码+论文)
- DXBBS V8.0 BBS论坛系统 简体中文正式版 [ 开发语言:ASP.NET 2.0 (C#) ]
- C++开发的论坛系统 - BBS
- 基于SSH开发的BBS论坛系统
- 原创+源码 基于Java Web技术开发的BBS论坛系统
- DXBBS V8.1 BBS论坛社区系统下载
- 使用 XForms 和 Ruby on Rails 开发小型门诊管理系统,第 4 部分
- 国内几大主流论坛(bbs)系统
- DXBBS V8.1 BBS论坛社区系统下载
- 使用 XForms 和 Ruby on Rails 开发小型门诊管理系统,第 1 部分: 安装配置 IBM DB2 9 pureXML
- BBS论坛系统需求说明书