<form action="sys_admin_user.php" name="form1" method="get"> <table border="0" cellspacing="0" cellpadding="3"> <tr> <td>管理员搜索:</td> <td><input name="keyword" type="text" id="keyword" size="12" style="width:120px" value="{dede:global name='keyword'/}" /></td> <td><input name="imageField" class="np" type="image" src="images/button_search.gif" width="60" height="22" border="0" /></td> </tr> </table> </form> |
if(!isset($keyword)) $keyword = ''; else $keyword = trim(FilterSearch($keyword)); |
if($keyword<>'') { $query = "SELECT dede_admin.*,dede_arctype.typename FROM dede_admin LEFT JOIN dede_arctype ON dede_admin.typeid = dede_arctype.id $rank where userid LIKE '%$keyword%' OR uname LIKE '%$keyword%'"; } else { $query = "SELECT dede_admin.*,dede_arctype.typename FROM dede_admin LEFT JOIN dede_arctype ON dede_admin.typeid = dede_arctype.id $rank "; } |