<?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>