代码如下:

$userr=$empire->fetch1("select userpic  from {$dbtbpre}enewsmemberadd where userid='$r[userid]' limit 1");
$listtemp='
<table width="100%" border="0" cellspacing="4" cellpadding="0">
 <tr>
   <td><a href="[!--news.url--]e/space/?userid=[!--userid--]"><img src=" '.($userr[userpic]?$userr[userpic]:$public_r[newsurl].'e/data/images/nouserpic.gif').' " width="28" height="28" border="0" /></a></td>
   <td><a href="[!--news.url--]e/space/?userid=[!--userid--]">[!--username--]</a></td>
   <td><a href="[!--titleurl--]" title="[!--oldtitle--]">[!--title--]</td>
 </tr>
</table>
';

解释: 

{$dbtbpre}enewsmemberadd  会员数据库附表,存放了会员的头像等信息

$listtemp='代码内容';    列表内容使用PHP必须使用的语法,记得勾选使用程序代码

'.($userr[userpic]?$userr[userpic]:$public_r[newsurl].'e/data/images/nouserpic.gif').'   获取头像地址,如果没有头像显示默认头像nouserpic.gif

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。