1st methods:
<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 ;}
Previous article: <a href = "{$ r [url]}" titile = "{$ r [title]}"> {str_cut ($ r [title], 50 )} </a>
{/Get}
{If $ front! = 1}
Previous article: no
{/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 ;}
Next Article: <a href = "{$ r [url]}" titile = "{$ r [title]}"> {str_cut ($ r [title], 50 )} </a>
{/Get}
{If $ next! = 1}
Next Article: no
{/If}
</Li>
</Ul>
2nd methods:
<P> previous article:
{Get SQL = "select contentid, catid, url, title from phpcms_content where contentid <'$ contentid' and catid = '$ catid' order by contentid desc "rows =" 1 "return =" v "} {php $ front = 1;}
<A href = "{$ v [url]}" >{$ v [title]} </a>
{/Get} {if $ front! = 1} none {/if} </p>
<P> next article: {get SQL = "select contentid, catid, url, title from phpcms_content where contentid> '$ contentid' and catid = '$ catid' order by contentid asc "rows =" 1 "return =" s "} {php $ front = 2;}
<A href = "{$ s [url]}" >{$ s [title] }</a >{/ get }{ if $ front! = 2} none {/if} </p>
3rd methods:
This method is called by js. You need to download a php file in the attachment and put it in the root directory of the website.
<P> previous article: <script type = "text/javascript" src = "{$ PHPCMS [siteurl]} page. php? Contentid = {$ contentid} & catid = {$ catid} "language =" javascript "> </script> </p>
<P> next article: <script type = "text/javascript" src = "{$ PHPCMS [siteurl]} page. php? Content = {$ contentid} & cat = {$ catid} "language =" javascript "> </script> </p>
4th methods:
{Get SQL = "select * from phpcms2008_content where contentid> $ contentid and catid = $ catid order by updatetime desc" rows = "1 "}
<DIV style = "FLOAT: left"> previous article: <a href = "{$ r [url]}" title = "{$ r [title]}" target = "_ blank"> {str_cut ($ r [title], 70) }</a> </DIV> {/get}
{Get SQL = "select * from phpcms_content where contentid <$ contentid and catid = $ catid order by updatetime desc" rows = "1 "}
<DIV style = "FLOAT: right"> Next article: <a href = "{$ r [url]}" title = "{$ r [title]}" target = "_ blank"> {str_cut ($ r [title], 70) }</a> </DIV>
{/Get}
Well, there are some differences between each method.