|
帝国CMS列表页内容显示判断文章来源,并带连接的方法- $userr=$empire->fetch1("select befrom from {$dbtbpre}ecms_news_data_{$r[stb]} where id='$r[id]'");
- if(empty($userr[befrom]))
- {
- $userr[befrom]='未知'; //没有填写来源显示
- }
- if($userr[befrom])
- {
- $userr[befrom]=ReplaceBefrom($userr[befrom]);
- }
- $listtemp='
- <li>
- <h4><a href="[!--tt.url--]">[!--tt.name--]</a> <a href="[!--titleurl--]" target="_blank" >[!--title--]</a></h4>
- <p> [!--newstime--] 来源于: '.$userr[befrom].'</p>
- <p>[!--smalltext--]... <a href="[!--titleurl--]">[查阅全文]</a></p>
- </li>
- ';
复制代码
|
上一篇:帝国CMS 首页列表页调用TAGS文章教程下一篇:帝国cms多表查询多个表调用最新文章
|