本文目錄
- 使用會員搜索自定義字段說明
- 搜索變量說明
帝國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"> </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>







