Phpcms call example in the next article

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.