帝国cms 7.5 内容页判断是否已收藏

<?
$newsnum=$empire->gettotal("select count(*) as total from {$dbtbpre}enewsfava where id='".$navinfor['id']."' and classid='".$classid."' and userid='".$userid."'");
if ($newsnum){
?>
                    <div id="[!--id--]" cid="[!--classid--]" class='d-coll' isfrom="1" issc="1">
                        <i class='chose'></i>
                        <span>已收藏</span>
                    </div>
<?}else{?>
                    <div id="[!--id--]" cid="[!--classid--]" class='d-coll' isfrom="1" issc="0">
                        <i ></i>
                        <span>收藏</span>
                    </div>
<?}?>


发表评论:

Powered By Z-BlogPHP 1.7.0

Copyright Www.Niaoseo.Com Rights Reserved.