📄 lmzy.php
字号:
<?php include ("conn.php");if ($page=="") {$page=1;};?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>华宇在线论坛</title>
<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></head>
<body>
<center>
<table width="776" border="0" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle">
<td colspan="3"><?php include("head.php");?></td>
</tr>
<tr>
<td width="109" height="25" background="image/2.gif"> </td>
<td width="531" align="right" valign="middle" background="image/2.gif"><marquee direction="left" scrollamount="1" scrolldelay="7" onMouseOver="this.stop();" onMouseOut="this.start();">
<img src="image/run.gif" width="19" height="18"><span class="style1">欢迎访问华宇论坛!</span> <?php echo $date;?>
</marquee></td>
<td width="136" background="image/2.gif"> </td>
</tr>
</table>
</center>
<table width="776" height="81" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td height="37" colspan="6" valign="top" class="style1"><table width="776" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" align="center">== <?php echo $zq;?>专区 ==</td>
<td width="584"> </td>
</tr>
</table></td>
</tr>
<tr align="center">
<td width="51" height="26" class="style1">状态</td>
<td width="54" >心情</td>
<td width="381" >主 题</td>
<td width="79" >作者</td>
<td width="76" >回复/人气</td>
<td width="135" >发表时间 </td>
</tr>
<?php
$soudh="zq='$zq' and username='mrsoft'";
$query="select * from hw_tzxx where $soudh";
$res=mysql_query($query);
if($res){
while($row=mysql_fetch_array($res)){
?>
<tr valign="middle">
<td height="28" align="center"><img src="image/bbs.gif" width="20" height="16"></td>
<td align="center"><img src="<?php echo "image_11.php?recid=$row[xq]";?>" width="20" height="20"></td>
<td align="center" class="style1"><a href="zthf.php?zhuti=<?php echo urlencode($row[zhuti]);?>&recid=<?php echo $row[id];?>" target="_blank"><?php echo $row[zhuti];?></a></td>
<td align="center" class="style1"><?php echo $row[username];?></td>
<td align="center" class="style1">
<?php $quer="select count(*) as hfjl from hw_hftz where ljid='$row[id]'";
$resul=mysql_query($quer);
$hfjl=mysql_result($resul,0,'hfjl');
echo $hfjl;
?>
/<?php echo $row[fwjl];?>
</td>
<td align="center" class="style1"><?php echo $row[fbsj];?></td>
</tr>
<?php }}?>
</table>
<table width="776" height="30" border="0" align="center" cellpadding="0" cellspacing="0" background="image/3.gif">
<?php
if($page){
$page_size=10;
$soudh="zq='$zq' and username!='mrsoft'";
$query="select count(*) as total from hw_tzxx where $soudh";
$result=mysql_query($query);
$message_count=mysql_result($result,0,'total');
$page_count=ceil($message_count/$page_size);
$offset=($page-1)*$page_size; //变量表示下一页的记录数是从那条记录开始的
$query="select * from hw_tzxx where $soudh order by id desc limit $offset ,$page_size ";
$result=mysql_query($query);
if ($result){
while ($myrow=mysql_fetch_array($result)){
?>
<tr>
<td width="51" height="30" align="center"><img src="image/reader.gif" width="16" height="16"></td>
<td width="54" align="center"><img src="<?php echo "image_11.php?recid=$myrow[xq]";?>" width="20" height="20"></td>
<td width="381" align="center" class="style1"><a href="zthf.php?zhuti=<?php echo urlencode($myrow[zhuti]);?>&lmbs=<?php echo $myrow[id];?>"><?php echo $myrow[zhuti];?></a></td>
<td width="79" align="center" class="style1"><?php echo $myrow[username];?></td>
<td width="76" align="center" class="style1">
<?php $quer="select count(*) as hfjl from hw_hftz where ljid='$myrow[id]'";
$resul=mysql_query($quer);
$hfjl=mysql_result($resul,0,'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="image/4.gif">
<tr>
<td height="20" colspan="3"> </td>
</tr>
<tr>
<td width="240" height="20"> </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%"> 分页:
<?php
$zq=urlencode($zq); //对变量值进行编码
$xsoudh="zq=$zq"; //设置新的变量
$next=$ljjl*10; //变量表示显示10链接
$n=$ljjl-1; //前一页
$m=$ljjl+1; //后一页
$prev_page=$page-10; //前十页
if ($ljjl==0){
echo "";
}else{
$ccc=$vv-10;
echo "<a href='$PATH_INFO?vv=$ccc&ljjl=$n&page=$prev_page&$xsoudh'>上十页</a>"; }
?>
<?php
for ($j=1;$j<=$page_count;$j++) {
$pnext=$next+$j;
if ($mm==10){ break; }
if ($mm>$page_count){ break; }
if ($page_count-$vv<10){ if ($mm>=$page_count-$vv){ break; } }
?>
<?php echo "<a href='$PATH_INFO?vv=$vv&ljjl=$ljjl&page=$pnext&$xsoudh'> $pnext </a>";
$mm=$mm+1; } ?> </td>
<td width="10%">
<?php
$vv=$vv+$mm;
if ($page_count-$vv<=0){
echo "";
}else{
echo "<a href='$PATH_INFO?vv=$vv&ljjl=$m&page=$pnext&$xsoudh'>下十页</a>"; }
if ($message_count==0){ echo "没有记录!"; }
}?>
</td>
</tr>
</table></td>
<td width="56"> </td>
</tr>
</table>
<div align="center"><?php include"under.php"?></div>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -