<?php
if(!defined('InEmpireCMS'))
{
exit();
}
?>
<?php
$public_diyr['pagetitle']='会员中心';
$url="<a href=../../../>首页</a> > <a href=../cp/>会员中心</a>";
require(ECMS_PATH.'e/template/incfile/header.php');
?>
//添加查询自己的考试开始
<div style="border:1px solid #ddd; ">
<div class="header" style="border-bottom:1px solid #ddd">我的评论</div>
<ul style=" ">
<?php
$sql=$empire->query("select A.id,A.saytime,A.zongfen,B.title,B.titleurl from {$dbtbpre}enewspl_1 as A, {$dbtbpre}ecms_news as B where A.id=B.id && A.userid=$user[userid] order by A.saytime desc limit 10"); //查询评论这里其实是连表查询,就是查询了pl表和news表,这里我添加了pl表的自定义字段zongfen。这个查询非常有意思。
while($r=$empire->fetch($sql)) //循环获取查询记录
{
echo "<li style='height:26px;line-height:26px;text-indent:10px;border-top:1px solid #eee;'><a target=_blank href=".$r['titleurl']."> ".$r['title']." ( ".date('Y-m-d',$r[saytime])." ) 答对: ".$r['zongfen']." 题 </a></li>";
}
?>
<ul>
</div>
//添加查询自己的考试结束
<table width="100%" border="0" cellspacing="1" cellpadding="3" class="tableborder">
<tr class="header">
<td height="25">会员中心</td>