[求助]关于会员空间的添加内容页问题

发布时间:2019-10-12

仿站网>问答 > [求助]关于会员空间的添加内容页问题
[求助]请教高手,关于会员空间的问题
会员空间建立了单独显示页面,也关联好了,但是显示的时候全都显示了,这个怎么解决,谢谢!
我另建了show.php和show.temp.php两个文件。如下

show.php内代码:

<?php
require("../class/connect.php");
require("../class/db_sql.php");
require("../class/q_functions.php");
require("../data/dbcache/class.php");
require LoadLang("pub/fun.php");
require("../member/class/user.php");
$link=db_connect();
$empire=new mysqlquery();
$userid=0;
$username='';
$spacestyle='';
$search='';
require('CheckUser.php');//验证用户
$yhid=0;
$yhvar='qmlist';
//模型
$mid=intval($_GET['mid']);
if(!$mid)
{
        printerror("ErrorUrl","",1);
}
$mr=$empire->fetch1("select tbname,qmname,sonclass from {$dbtbpre}enewsmod where mid='$mid'");
if(!$mr['tbname']||InfoIsInTable($mr['tbname']))
{
        printerror("ErrorUrl","",1);
}
$yhid=$etable_r[$mr[tbname]][yhid];
$search.="&userid=$userid&mid=$mid";
//用户
$add="userid='$userid'";
//显示方式
if($public_r['qlistinfomod'])
{
        $modnum=$empire->gettotal("select count(*) as total from {$dbtbpre}enewsmod where tbname='$mr[tbname]'");
        if($modnum>1)
        {
                $add.=' and ('.ReturnClass($mr['sonclass']).')';
        }
}
//栏目
$classid=intval($_GET['classid']);
if($classid)
{
        if($class_r[$classid][islast])
        {
                $add.=" and classid='$classid'";
        }
        else
        {
                $add.=' and '.ReturnClass($class_r[$classid][sonclass]);
        }
        $yhid=$class_r[$classid][yhid];
        $search.="&classid=$classid";
}
//优化
$yhadd='';
if($yhid)
{
        $yhadd=ReturnYhSql($yhid,$yhvar,1);
}
$start=0;
$page=intval($_GET['page']);
$page=RepPIntvar($page);
$line=$public_r['space_num'];//每行显示
$page_line=10;
$offset=$page*$line;
$query="select ".ReturnSqlListF($mid)." from {$dbtbpre}ecms_".$mr['tbname']." where ".$yhadd.$add." and ismember=1";
$totalquery="select count(*) as total from {$dbtbpre}ecms_".$mr['tbname']." where ".$yhadd.$add." and ismember=1";
$totalnum=intval($_GET['totalnum']);
if($totalnum<1)
{
        $num=$empire->gettotal($totalquery);//取得总条数
}
else
{
        $num=$totalnum;
}
$search.="&totalnum=$num";
$query.=" order by newstime desc limit $offset,$line";
$sql=$empire->query($query);
$returnpage=page1($num,$line,$page_line,$start,$page,$search);
require('template/'.$spacestyle.'/show.temp.php');
db_close();
$empire=null;
?>







show.temp.php内代码如下:

<?php
if(!defined('InEmpireCMS'))
{
        exit();
}
//位置
$url="$spacename &gt; $mr[qmname]";
include("header.temp.php");
?>
<?=$spacegg?>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#96C8F1">
  <tr>
    <td height="24" background="template/default/images/bg_title_sider.gif">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                        <td><?=$mr['qmname']?></td>
                        <td align="right"><a href="../DoInfo/ChangeClass.php?mid=<?=$mid?>" target="_blank">增加<?=$mr['qmname']?></a></td>
                </tr>
          </table>
    </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <?php
        while($r=$empire->fetch($sql))
        {
                $titleurl=sys_ReturnBqTitleLink($r);//链接
        ?>
                <tr>
          <td height="23"><img src="template/default/images/li.gif" width="15" height="10">
                  <?=$r[title]?>
        
                  <?php
$fr=$empire->fetch1("select newstext from {$dbtbpre}ecms_".$class_r[$r[classid]][tbname]."_data_{$r[stb]} where id='$r[id]'");
echo $fr[newstext];
?>
                  
                  &nbsp;&nbsp;<font color="#666666">(<?=date("Y-m-d H:i:s",$r[newstime])?>)</font></td>
        </tr>
        <?php
        }
        ?>
                <tr>
          <td height="25">&nbsp;<?=$returnpage?></td>
        </tr>
        </table>
        </td>
  </tr>
</table>
<?php
include("footer.temp.php");
?>


但在列表页点击链接后显示出来的结果是全都显示了



上传以下图片:

回复列表
1.
参考wap的内容页
2.
解决了没有呢???
3.
内容页怎么还有分页?
相关问题
仿站网专注于帝国CMS仿站及二次开发、模板定制等各种有关帝国CMS程序疑难杂症!
  • 首页
  • 客服
  • 头部