帝国cms列表模板作者来源为空时显示其他方法

帝国CMS列表页内容显示判断文章来源,并带连接的方法
  1. $userr=$empire->fetch1("select befrom from {$dbtbpre}ecms_news_data_{$r[stb]} where id='$r[id]'");
  2. if(empty($userr[befrom]))
  3. {
  4. $userr[befrom]='未知'; //没有填写来源显示
  5. }
  6. if($userr[befrom])
  7. {
  8. $userr[befrom]=ReplaceBefrom($userr[befrom]);
  9. }
  10. $listtemp='
  11. <li>
  12. <h4><a href="[!--tt.url--]">[!--tt.name--]</a>   <a href="[!--titleurl--]" target="_blank" >[!--title--]</a></h4>
  13. <p>   [!--newstime--]      来源于: '.$userr[befrom].'</p>
  14. <p>[!--smalltext--]...  <a href="[!--titleurl--]">[查阅全文]</a></p>   
  15. </li>
  16. ';
复制代码







上一篇:帝国CMS 首页列表页调用TAGS文章教程
下一篇:帝国cms多表查询多个表调用最新文章
如无回复请发邮件