php开发论坛系统


当前第2页 返回上一页

<?php
include("conn.php");
$page=(isset($_GET['page']))?$_GET['page']:"1";
$zq=(isset($_GET['zq']))?$_GET['zq']:"热帖";
?>
<style type="text/css">
<!--
a:link {
 text-decoration: none;
 color: #3333CC;
}
a:visited {
 text-decoration: none;
}
a:hover {
 text-decoration: none;
}
a:active {
 text-decoration: none;
 color: #FF0000;
}
.style1 { font-size: 13px;
 font-family: "宋体";
 font-weight: normal;
}
.style2 { font-size: 14px;
 font-family: "宋体";
}
body {
 background-color: #EFF3FF;
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
}
-->
</style>
<div align="center"><?php include("head.php");?></div>
<p>&nbsp;</p>
 
<table width="476">
<div class="container">
 <ul class="nav nav-tabs">
  <li class="nav-item">
   <a class="nav-link active"  rel="external nofollow" rel="external nofollow" rel="external nofollow" >本页</a>
  </li>
  <li class="nav-item">
   <a class="nav-link"  rel="external nofollow" rel="external nofollow" rel="external nofollow" >主页</a>
  </li>
  <li class="nav-item">
   <a class="nav-link"  rel="external nofollow" rel="external nofollow" >登录</a>
  </li>
  <li class="nav-item">
   <a class="nav-link"  rel="external nofollow" rel="external nofollow" >注册</a>
  </li>
  
  <table width="776" border="0" align="center" cellpadding="0" cellspacing="0" background="">
  <tr>
   <td width="109" height="25" background="">&nbsp;</td>
   <td width="638" align="right" valign="middle"><div align="center"><marquee direction="left" scrollamount="1" scrolldelay="7"
    onMouseOver="this.stop();" onMouseOut="this.start();">
   <img src="timg.jpg" width="19" height="18"><span class="style1">欢迎访问东河论坛网站!</span> &nbsp;&nbsp;<?php echo date("Y-m-d H:i:s")?>
            </marquee></div></td>
   <td width="29" >&nbsp;</td>
  </tr>
 </table>
  
 </ul>
</div>
</table>

 <table width="776" height="30" border="0" align="center" cellpadding="0" cellspacing="0" background="timg.jpg">
   <tr>
    <td height="30" align="center"><h2><p class="text-muted"><?php echo $zq;?>专区 &nbsp;
    </p></h2></td>
    <td width="584">&nbsp;</td>
   </tr>
  </table>
<?php 
$page_size=5; //每页显示4条记录
$query="select * from tb_zqlb where zq='".$zq."'"; //从数据库中查询所有符合条件的数据
$result=mysqli_query($conn,$query);
$message_count=mysqli_num_rows($result);  //变量表示查询出结果的数量
if($message_count>0){
?>
<table width="776" height="30" border="1" align="center" cellpadding="1" cellspacing="1"
 class="table-hover">
 <thead>
 <tr align="center">
  <td width="51" height="26" class="style1"><p class="text-muted"><h6>状态</h6></p></td>
  <!--<td width="54" class="style1"><p class="text-muted"><h6>心情</h6></p></td> -->
  <td width="381" class="style1"><p class="text-muted"><h6>主&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 题</h6></p></td>
  <td width="79" class="style1"><p class="text-muted"><h6>作者</h6></p></td>
  <td width="76" class="style1"><p class="text-muted"><h6>回复/人气</h6></p></td>
  <td width="135" class="style1"><p class="text-muted"><h6>发表时间</h6></p></td>
 </tr>
 </thead>
<?php 
$page_count=ceil($message_count/$page_size); //变量表示按照每页1条记录显示共有多个页
$offset=($page-1)*$page_size;  //变量表示下一页的记录数是从那条记录开始的
$query="select * from tb_zqlb where zq='".$zq."' order by id desc limit $offset ,$page_size ";
$result=mysqli_query($conn,$query);
while($myrow=mysqli_fetch_array($result)){
?>
 <tr>
  <td width="51" height="30" align="center"><img src="timg.jpg" width="16" height="16"></td>
  <!--<td width="54" align="center"><img src="images.php?recid=<?php echo $myrow['xq'];?>" width="20" height="20"></td>-->
  <td width="381" align="center" class="style1"><a href="luntanzhubannr.php?zhuti=<?php echo urlencode($myrow['zhuti']);?>
  &recid=<?php echo $myrow['id'];?>"><?php echo $myrow['zhuti'];?></a></td>
  <td width="79" align="center" class="style1"><a href="luntanzhubannr.php?zhuti=<?php echo urlencode($myrow['zhuti']);?>
  &recid=<?php echo $myrow['id'];?>"><?php echo $myrow['username'];?></a></td>
  <td width="76" align="center" class="style1">
   <?php $quer="select count(*) as hfjl from tb_hflb where ljid='".$myrow['id']."'";
    $resul=mysqli_query($conn,$quer);
   $row=mysqli_fetch_array($resul);
    $hfjl=$row['hfjl'];
   echo $hfjl;
   
   ?>
   /<?php echo $myrow['fwjl'];?> </td>
  <td width="135" align="center" class="style1"><?php echo $myrow['fbsj'];?></td>
 </tr>
 
<?php } ?>
</table>
  <table width="776" height="40" border="0" align="center" cellpadding="0" cellspacing="0" background="timg.jpg">
    <tr>
     <td height="20" colspan="3">&nbsp;</td>
    </tr>
    <tr>
     <td width="240" height="20">&nbsp;</td>
     <td width="480">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr class="style1">
   <td width="40%">页次:<?php echo $page;?> /<?php echo $page_count;?>页 记录:<?php echo $message_count;?>条</td>
    <td width="50%"> 分页:
  <a >首页</a>
<?php
 if($page >= 2){
?>
  <a  rel="external nofollow" >上一页</a>
<?php 
 }
 if($page < $page_count){
?>
  <a  rel="external nofollow" >下一页</a>
<?php
 }
 if($page <= $page_count){ 
?>
  <a  rel="external nofollow" >尾页</a>
<?php 
 }
?>
 </td>
 </tr>
</table></td>
     <td width="56">&nbsp;</td>
    </tr>
</table>
 
<?php 
}else{
?>
 <div align="center">无数据!</div> 
<?php
}
?>
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
<div class="jumbotron text-center" style="margin-bottom:0">
  <p>
  <div id = "footer">
<dl>
 <dt><a href = "#">关于我们</a> || <a href = "#">产品目录</a> || <a href = "#">反馈问题</a> || <a
 href = "#">广告合作</a> || <a href = "#">联系我们</a></dt>
 <dd>Copyright &copy; 2019 - 2024 donghe.com All Rights Reserverd
 <br/>东河公司 版权所有 京 ICP 备 200000000 号
 </dd>
</dl>
</div>
</p>
</div>

2、登录/注册



3、数据库

部分数据库,tb_user。

总结

以上所述是小编给大家介绍的php开发论坛系统,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

更多相关Discuz论坛的内容来自木庄网络博客


标签:Discuz论坛

返回前面的内容

相关阅读 >>

php 小心urldecode引发的sql注入漏洞

telnet 服务器的25端口不通(无法发送邮件)的解决办法

提升网站原创文章高效收录的五个方面

discuz 7.0伪静态rewrite的.htaccess规则

如何在discuz!7.0的边栏添加广告

discuz 6.0+ 批量注册用户名

在新浪sae应用平台上搭建discuz!论坛的教程

一些 php 管理系统程序中的后门

discuz .net版本中的短消息系统

关于百科做外链的一些看法分析

更多相关阅读请进入《Discuz论坛》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...