帝國(guó)CMS6.0的會(huì)員列表功能新增了自定義字段搜索。今天我們就專門來講解6.0的會(huì)員自定義字段搜索。
使用會(huì)員搜索自定義字段說明: 默認(rèn)支持搜索username字段,其它自定義字段搜索要在會(huì)員表單中將字段選擇為“搜索項(xiàng)”才能使用搜索功能。

搜索變量說明: 一、支持多會(huì)員組: 會(huì)員組ID變量名:groupid 顯示多個(gè)會(huì)員組可以用逗號(hào)格開 例子:下面為顯示會(huì)員組ID=1和2的所有會(huì)員 /e/member/list/?groupid=1,2
二、字段搜索語法: 指定要使用字段搜索變量:sear,必須設(shè)置這個(gè)變量值為1才表示要使用搜索字段 搜索字段名變量:show[] 邏輯運(yùn)算聯(lián)結(jié)符變量:hh[] (有兩種:LK和EQ,LK表示模糊搜索(默認(rèn));EQ為完全匹配搜索) 搜索關(guān)鍵字變量:keyboard[] 多條件搜索之間關(guān)聯(lián)關(guān)系變量名為:andor (有兩種:or和and,or表示或者的關(guān)系(默認(rèn));and表示并且的關(guān)系)
例子:下面為顯示用戶名等于ecms的會(huì)員列表 /e/member/list/?sear=1&show[]=username&hh[]=EQ&keyboard[]=ecms
綜合例子:顯示會(huì)員組ID=1和2、并且姓名包含“王”、聯(lián)系地址包含“福建省”的會(huì)員列表 例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>搜索會(huì)員</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> |

自定義會(huì)員字段搜索很適合行業(yè)站的會(huì)員搜索,至此本節(jié)講解完畢。
更多帝國(guó)CMS 6.0解密請(qǐng)聽下回分解。 |
|
|
|