帝国CMS会员中心首页调用各系统模型的内容SQL

 更新时间:2015年12月30日 16:42  点击:2153

帝国的会员中心比较丑,关键是没模板化,很多朋友估计不懂修改

现在教大家如何利用灵动标签在帝国的会员中心首页如何调用各系统模型的内容:

修改空间首页模板e/space/template/default/index.temp.php,显示信息的地方加下面代码,表改成要调用的数据表名

<?php
$spacesql=$empire->query("select * from phome(这个是表前缀)_ecms_表 where userid='$userid' and ismember=1 order by newstime desc limit 10");
while($spacer=$empire->fetch($spacesql))
{
$titleurl=sys_ReturnBqTitleLink($spacer);//链接
?>
<a href="<?=$titleurl?>"><?=$spacer[title]?></a><br>
<?php
}
?>


[!--infotagslink--]

相关文章