

{$dbtbpre}ecms_news where classid=15<p>猜你喜欢</p>
<span class="news_rules_links">
<?php
$sid=$empire->fetch1("SELECT id FROM {$dbtbpre}ecms_".$class_r[$classid][tbname]." where classid={$classid} order by id asc limit 1");
$bid=$empire->fetch1("SELECT id FROM {$dbtbpre}ecms_".$class_r[$classid][tbname]." where classid={$classid} order by id desc limit 1");
$small=$sid[id];
$big=$bid[id];
$randnum=10; //随机数量
$randids='';
$randdh='';
for($i=1;$i<=$randnum;$i++)
{
$randids.=$randdh.rand($small,$big);
$randdh=',';
}
?>
[e:loop={'selfinfo',10,0,0,"id in ($randids)"}]
<a class="formsubmit" target="_blank" href="<?=$bqsr['titleurl']?>"><?=esub($bqr[title],30)?></a>
[/e:loop]
</span>