代码如下:
<ul>
<li>
<!--{get sql="SELECT * FROM `phpcms_content` WHERE contentid>$contentid AND catid=$catid AND status=99 ORDER BY updatetime ASC" rows="1"}-->
{php $front=1;}
上一篇:<a href="{$r[url]}" titile="{$r[title]}">{str_cut($r[title],50)}</a>
{/get}
{if $front!=1}
上一篇:没有了
{/if}
</li>
<li>
<!--{get sql="SELECT * FROM `phpcms_content` WHERE contentid<$contentid AND catid=$catid AND status=99 ORDER BY updatetime DESC" rows="1"}-->
{php $next=1;}
下一篇:<a href="{$r[url]}" titile="{$r[title]}">{str_cut($r[title],50)}</a>
{/get}
{if $next!=1}
下一篇:没有了
{/if}
</li>
</ul>
|