帝国CMS 6.0功能解密之会员信息调用

帝国CMS 6.0功能解密之会员信息调用,第1张

概述天我们解密的是如何使用帝国CMS6.0新增的会员信息调用函数调用会员资料。前言:先前版本调用会员资料要通过SQL查询调用,对于比较基础的用户略显麻烦,所以V6.0直接内置调用函数,调用更简单。两种调用函数:1、会员

天我们解密的是如何使用帝国CMS6.0新增的会员信息调用函数调用会员资料。

前言:
先前版本调用会员资料要通过SQL查询调用,对于比较基础的用户略显麻烦,所以V6.0直接内置调用函数,调用更简单。

两种调用函数:
1、会员信息调用函数:sys_ShowMemberInfo(用户ID,查询字段)

@H_419_17@

其它说明:函数返回结果为会员资料数组,显示用<?=$userr[字段名]?>

2、会员列表调用函数:sys_ListMemberInfo(调用条数, *** 作类型,会员组ID,用户ID,查询字段)

用户ID:设置要调用的会员信息的用户ID,在信息内容页下调用可以设置为0,表示调用信息发布者的资料。
查询字段:默认为查询所有会员字段,此参数一般不用设置,如果为了效率更高可以指定相应的字段。如:&ldquo;u.userID,ui.company&rdquo;(u为主表,ui为副表)。
@H_419_17@

其它说明:函数返回结果为会员资料数组,显示用<?=$userr[字段名]?>

会员信息调用函数:sys_ShowMemberInfo
例子:在任意模板中加入:

调用条数:调用前几条记录。
*** 作类型:0为按注册时间、1为按积分排行、2为按资金排行、3为按会员空间人气排行
会员组ID:指定要调用的会员组ID,不设置为不限,多个会员组用逗号隔开,如:'1,2'
用户ID:指定要调用的会员ID,不设置为不限,多个用户ID用逗号隔开,如:'25,27'
查询字段:默认为查询所有会员字段,此参数一般不用设置,如果为了效率更高可以指定相应的字段。如:&ldquo;u.userID,ui.company&rdquo;(u为主表,ui为副表)。
@H_419_17@

会员列表调用函数:sys_ListMemberInfo

例子:在任意模板中加入:

<table wIDth="600" border="0" align="center" cellpadding="3" cellspacing="1" >   <tr > <td wIDth="345"><div align="center">公司名称</div></td><td wIDth="119"><div align="center">注册帐号</div></td><td wIDth="114"><div align="center">访问空间</div></td>   </tr><?PHP$usersql=sys_ListMemberInfo(3,'3','','');while($userr=$empire->fetch($usersql)){?>   <tr bgcolor="#FFFFFF"> <td>    <div align="center">        <?=$userr[company]?>   </div></td><td>    <div align="center">        <?=$userr[username]?>   </div></td><td>    <div align="center"><a href="/e/space/?userID=<?=$userr[userID]?>">[点击访问]</a></div></td>   </tr><?PHP}?></table>


总结

以上是内存溢出为你收集整理的帝国CMS 6.0功能解密之会员信息调用全部内容,希望文章能够帮你解决帝国CMS 6.0功能解密之会员信息调用所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/1009098.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

<?PHP
$userr=sys_ShowMemberInfo(1,'');
?>
<table wIDth="500" border="0" cellspacing="1" cellpadding="3" align="center">
<tr bgcolor="#FFFFFF" >
<td height="23" colspan="2"><Font color="#333333">会员资料</Font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">会员头像</Font></td>
<td><img src="<?=$userr[userpic]?$userr[userpic]:'/e/data/images/nouserpic.gif'?>" border="0"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td wIDth="23%" height="23"><Font color="#333333">用户名</Font></td>
<td wIDth="77%"><a href="/e/space/?userID=<?=$userr[userID]?>"><?=$userr[username]?></a>
<Font color="#666666">(点击访问会员空间)</Font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">会员组</Font></td>
<td><?=$userr[groupname]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">注册时间</Font></td>
<td><?=$userr[registertime]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">公司名称</Font></td>
<td><?=$userr[company]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">联系人</Font></td>
<td><?=$userr[truename]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">联系电话</Font></td>
<td><?=$userr[call]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">传真</Font></td>
<td><?=$userr[fax]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">手机</Font></td>
<td><?=$userr[phone]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">联系邮箱</Font></td>
<td><?=$userr[email]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">QQ号码</Font></td>
<td><?=$userr[oicq]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">MSN</Font></td>
<td><?=$userr[msn]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">网站</Font></td>
<td><?=$userr[homepage]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><Font color="#333333">联系地址</Font></td>
<td><?=$userr[address]?>&nbsp;&nbsp;&nbsp;邮编:<?=$userr[zip]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23" valign="top"><Font color="#333333">公司介绍</Font></td>
<td><?=nl2br($userr[saytext])?></td>
</tr>
</table>