帝国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/> 共: "."$info[Exnum]"."
题, 更新时间:".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/>
共: <?=$info[Exnum]?> 题,
绩效考核与绩效管理
更新时间:<?=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/>
共: <?=$info[Exnum]?> 题,
更新时间:<?=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/>
共: <?=$info[Exnum]?> 题,
更新时间:<?=date('Y-m-d',$info[newstime])?></a></li>
<?php
}
>