帝国CMS灵动标签调用会员列表教程
2017-12-07 站长 站长日志
使用万能的灵动标签来调用:
示例代码如下:
1 |
[e:loop={ "select u.username,u.userid,userpic,mycall,ui.company from phome_enewsmember u LEFT JOIN phome_enewsmemberadd ui ON u.userid=ui.userid where u.groupid=3 limit 10" ,10,24,0}]<li><div onmouseover= "this.className='current'" onmouseout= "this.className=''" ><dl><dt><a href= "/e/space/?userid=<?=$bqr[userid]?>" target= "_blank" title= "<?=$bqr[username]?>" ><img src= "<?=$bqr[userpic]?>" alt= "<?=$bqr[username]?>" /></a></dt><dd "overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:140px;" title= "<?=$bqr[username]?>" ><h1><a href= "/e/space/?userid=<?=$bqr[userid]?>" target= "_blank" title= "<?=$bqr[username]?>" ><?= $bqr [username]?></a></h1></dd><dd><span class = "ge" ><?= $bqr [mycall]?></span></dd></dl></div></li>[/e:loop]
|
1 |
会员ID:<?= $bqr [userid]?>
|
1 |
会员用户名:<?= $bqr [username]?>
|
1 |
会员头像:<?= $bqr [userpic]?>
|
1 |
联系电话:<?= $bqr [mycall]?>
|
以此为例,会员任何字段都可以调用。
示例二:
企业会员新建了字段 企业分类:qyfl
我们需要调用 企业分类=种植果蔬 的企业会员列表:
1 |
[e:loop={ "select u.username,u.userid,userpic,qyfl,mycall,ui.company from phome_enewsmember u LEFT JOIN
phome_enewsmemberadd ui ON u.userid=ui.userid where u.groupid=3 and qyfl='种植果蔬' order by userid desc limit 10" ,10,24,0}]
<li><div onmouseover= "this.className='current'" onmouseout= "this.className=''" ><dl>
<dt><a href= "/e/space/?userid=<?=$bqr[userid]?>" target= "_blank" title= "<?=$bqr[username]?>" >
<img src= "<?=$bqr[userpic]?>" alt= "<?=$bqr[username]?>" /></a></dt>
<dd "overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:140px;" title= "<?=$bqr[username]?>" >
<h1><a href= "/e/space/?userid=<?=$bqr[userid]?>" target= "_blank" title= "<?=$bqr[username]?>" ><?= $bqr [username]?></a></h1></dd><dd><span class = "ge" ><?= $bqr [mycall]?></span></dd></dl></div></li>[/e:loop]
|
上一篇:帝国CMS二次开发统计留言数量