帝国CMS模板判断内容页没有图片时显示广告
<?
$string=$navinfor['newstext'];//内容字段
$some="<img ";
$num=explode($some,$string);
if(count($num)>1){//判断内容中是否有图片
?>
[!--newstext--]
<?
}else{
?>
<div id="ad">这里是你的广告代码或者调用</div>
[!--newstext--]
<?
}
?>
<?
$string=$navinfor['newstext'];//内容字段
$some="<img ";
$num=explode($some,$string);
if(count($num)>1){//判断内容中是否有图片
?>
[!--newstext--]
<?
}else{
?>
<div id="ad">这里是你的广告代码或者调用</div>
[!--newstext--]
<?
}
?> 调用会员头像php代码 <?php $muserid=(int)getcvar('mluserid'); $member=$empire->fetch1("select userpic from phome_enewsmemberadd where userid='$muserid'"...
帝国cms内容页SQl方式调用当前TAG标签的方式 具体调用代码如下: <?php $fr=$empire->fetch1("select infotags from {$dbtbpre}ecms_news_data_{$navinfor[stb]} where id='$navinf...
做帝国cms模板网时候,经常需要使用到自定义页面,例如我们做单页(比如“公司介绍”、“联系我们”,联系我们等页面)时一般采用自定义页面的方式来做,那么帝国CMS自定义页面怎么调用呢? 调用出自定义页面导航可以用标签SQL调用。如下: 例子1:调用自定义页面分类ID=1的页面导航 [e:loop={...
帝国CMS会员退出后跳转到指定地址的方法! 教程方法如下: 打开 /e/member/class/member_loginfun.php 查找: $gotourl="../../"; 修改成: $gotourl="/e/member/cp/"; 这是跳转到会员中心首页,根据实际需要,可修改。 是...
[e:loop={栏目ID,显示条数,操作类型,只显示有标题图片,附加SQL条件,显示排序}] <?=$bqno?><a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?><...
帝国cms灵动标签调用字母所属的信息 [e:loop={"select * from [!db.pre!]ecms_news where infozm='A'",5,24,0}] <a href="<?=$bqsr['titleurl']?>" target="_blank"&g...