帝国CMS 6.0功能解密之会员自定义字段搜索

帝国CMS 6.0功能解密之会员自定义字段搜索

来源:帝国CMS模板网 作者:帝国CMS教程 时间:2010-02-08
浏览:9千+ 收藏 点赞(39)
简介: 帝国CMS6.0的会员列表功能新增了自定义字段搜索。今天我们就专门来讲解6.0的会员自定义字段搜索。使用会员搜索自定义字段说明:默认支持搜索username字段,其它自定义字段搜索

帝国CMS6.0的会员列表功能新增了自定义字段搜索。今天我们就专门来讲解6.0的会员自定义字段搜索。

使用会员搜索自定义字段说明

默认支持搜索username字段,其它自定义字段搜索要在会员表单中将字段选择为“搜索项”才能使用搜索功能。

搜索变量说明

一、支持多会员组: 会员组ID变量名:groupid

显示多个会员组可以用逗号格开

例子:下面为显示会员组ID=1和2的所有会员

/e/member/list/?groupid=1,2

二、字段搜索语法:

指定要使用字段搜索变量:sear,必须设置这个变量值为1才表示要使用搜索字段

搜索字段名变量:show[]

逻辑运算联结符变量:hh[] (有两种:LK和EQ,LK表示模糊搜索(默认);EQ为完全匹配搜索)

搜索关键字变量:keyboard[]

多条件搜索之间关联关系变量名为:andor (有两种:or和and,or表示或者的关系(默认);and表示并且的关系)

例子:下面为显示用户名等于ecms的会员列表

/e/member/list/?sear=1&show[]=username&hh[]=EQ&keyboard[]=ecms

综合例子:显示会员组ID=1和2、并且姓名包含“王”、联系地址包含“福建省”的会员列表

例1:链接的方式

/e/member/list/?groupid=1,2&sear=1&andor=and&show[]=truename&hh[]=LK&keyboard[]=王&show[]=address&hh[]=LK&keyboard[]=福建省例2:表单的方式

<form name="searchmemberform" method="GET" action="/e/member/list/index.php">
  <table width="380" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CDE2F8">
    <tr>
      <td height="25" colspan="2"><strong>搜索会员</strong></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="20%" height="25">姓名:</td>
      <td width="80%">
        <input name="show[]" type="hidden" value="truename">
        <input name="hh[]" type="hidden" value="LK">
        <input name="keyboard[]" type="text" value="王">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="25">地址:</td>
      <td>
        <input name="show[]" type="hidden" value="address">
        <input name="hh[]" type="hidden" value="LK">
        <input name="keyboard[]" type="text" value="福建省">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="25">&nbsp;</td>
      <td>
        <input type="submit" name="Submit" value="搜索">
        <input name="groupid" type="hidden" value="1,2">
        <input name="sear" type="hidden" value="1">
        <input name="andor" type="hidden" value="and">
      </td>
    </tr>
  </table>
</form>
 

帝国CMS模板网 帝国CMS模板网(www.daixiao360.cn)长期承接帝国CMS模板定制,帝国CMS仿站,帝国CMS采集规则,帝国CMS插件,帝国CMS二次开发。