帝国cms会员中心判断会员组显示不同内容

15 篇文章 0 订阅
11 篇文章 0 订阅

帝国cms会员中心判断会员组显示不同内容

<?php  
if($tmgetgroupid==1){   //如果会员组id为1;
//开始 显示如下内容


  $infosql=$empire->query("select * from phome_ecms_news order by newstime desc limit 5");
  while($info=$empire->fetch($infosql)){
echo"<li  style='height:100px;line-height:31px;text-indent:10px;border-top:1px solid #eee;font-size:16px;'><a target=_blank href='"."$info[titleurl]"."'> "."$info[title]"."  <br/> &nbsp;&nbsp;&nbsp;&nbsp; 共: "."$info[Exnum]"." 题,&nbsp;&nbsp;&nbsp;&nbsp; 更新时间:".date('Y-m-d',$info[newstime])."</a></li>";  //date()不能加双引号,否则时间戳不会格式化;拼接是个很痛苦的活,改成<?php  {?>      <?php}   ?>

  }

//结束    
    
}elseif($tmgetgroupid==3){//如果会员组id为3;
    //开始  显示如下内容
    
      
    //结束
};
?>

 

不要拼接,用<?php  {?>      <?php}   ?>,不过有点多

<?php  

if($tmgetgroupid==1){
php

  {?>

html+<?=xxx>

<?php
  }
    
}elseif($tmgetgroupid==3){
   php
    
{?>    
    html+<?=xxx>
<?php
}
};
?>

<?php  
if($tmgetgroupid==1){
//开始
  $infosql=$empire->query("select * from phome_ecms_news order by newstime desc limit 5");
  while($info=$empire->fetch($infosql))

  {?>

  <li  style='    height:100px;line-height:31px;text-indent:10px;border-top:1px solid #eee;font-size:16px;'><a target=_blank href="<?=$info[titleurl]?>"> <?=$info[title]?>  <br/> 
          
       &nbsp;&nbsp;&nbsp;&nbsp; 共: <?=$info[Exnum]?> 题,
            
        &nbsp;&nbsp;&nbsp;&nbsp; 更新时间:<?=date('Y-m-d',$info[newstime])?></a></li>

<?php
  }


//结束    
    
}elseif($tmgetgroupid==3){
    //开始
    
      $infosql=$empire->query("select * from phome_ecms_news order by newstime desc limit 5");
  while($info=$empire->fetch($infosql))
    
{?>    
    <li  style='    height:100px;line-height:31px;text-indent:10px;border-top:1px solid #eee;font-size:16px;'><a target=_blank href="<?=$info[titleurl]?>"> <?=$info[title]?>  <br/> 
          
       &nbsp;&nbsp;&nbsp;&nbsp; 共: <?=$info[Exnum]?> 题,
            
        &nbsp;&nbsp;&nbsp;&nbsp; 更新时间:<?=date('Y-m-d',$info[newstime])?></a></li>
    
    //结束
<?php
}
};
?>

 

 

<?php
  $infosql=$empire->query("select * from phome_ecms_news order by newstime desc limit 5");
  while($info=$empire->fetch($infosql))
  {?>
  <li  style='    height:100px;line-height:31px;text-indent:10px;border-top:1px solid #eee;font-size:16px;'><a target=_blank href="<?=$info[titleurl]?>"> <?=$info[title]?>  <br/>         
       &nbsp;&nbsp;&nbsp;&nbsp; 共: <?=$info[Exnum]?> 题,         
        &nbsp;&nbsp;&nbsp;&nbsp; 更新时间:<?=date('Y-m-d',$info[newstime])?></a></li>
<?php
  }
?>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值