前台用灵动标签调用友情链接的排序分享

网上用得比较多的是按照后台添加的先后顺序排序:

<!– 文字链接 –>

[e:loop={‘select * from [!db.pre!]enewslink where checked=1 and lpic=”” order by lid’,20,24,0}]

<li><a href=”<?=$bqr[lurl]?>”><?=$bqr[lname]?></a></li>

[/e:loop]

 

区别在于是按lid还是按myorder排序。

 

 

这是按照后台设置的大小顺序排序:

<!– 文字链接 –>

[e:loop={‘select * from [!db.pre!]enewslink where checked=1 and lpic=”” order by myorder’,20,24,0}]

<li><a href=”<?=$bqr[lurl]?>”><?=$bqr[lname]?></a></li>

[/e:loop]

 

这是友情连接的下拉形式:

<form id=”form1″ name=”form1″ method=”post” action=””>

<label for=”FRIEND LINK “>友情链接:</label>

<select name=”FRIEND LINK” size=”1″ id=”FRIEND LINK”>

[e:loop={‘select * from [!db.pre!]enewslink where checked=1 order by lid’,20,24,0}]

<option value=”<?=$bqr[lurl]?>”>

<?=$bqr[lname]?>

</option>

[/e:loop]

</select>

</form>

Drop Your Comment