그누보드 [G4] 회원 추가필드 활용하여 회원검색 하기
페이지 정보
본문
회원관리 검색을 추가필드 활용하기
< 수정 1 >
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "mb_point" :
$sql_search .= " ($sfl >= '$stx') ";
break;
case "mb_level" :
$sql_search .= " ($sfl = '$stx') ";
break;
case "mb_tel" :
case "mb_hp" :
$sql_search .= " ($sfl like '%$stx') ";
break;
default :
$sql_search .= " ($sfl like '$stx%') ";
break;
}
$sql_search .= " ) ";
}
를 아래와 같이 수정
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "mb_point" :
$sql_search .= " ($sfl >= '$stx') ";
break;
case "mb_level" :
$sql_search .= " ($sfl = '$stx') ";
break;
case "mb_3" : // 학년
case "mb_4" : // 반
$sql_search .= " ($sfl like '%$stx') and (mb_3 = '$sfl2') ";
break;
case "mb_tel" :
case "mb_hp" :
$sql_search .= " ($sfl like '%$stx') ";
break;
default :
$sql_search .= " ($sfl like '$stx%') ";
break;
}
$sql_search .= " ) ";
}
< 수정 2 >
<td width=50% align=right>
<select name=sfl class=cssfl>
<option value='mb_id'>회원아이디</option>
<option value='mb_name'>이름</option>
<option value='mb_nick'>별명</option>
<option value='mb_level'>권한</option>
<option value='mb_email'>E-MAIL</option>
<option value='mb_tel'>전화번호</option>
<option value='mb_hp'>핸드폰번호</option>
<option value='mb_point'>포인트</option>
<option value='mb_datetime'>가입일시</option>
<option value='mb_ip'>IP</option>
<option value='mb_recommend'>추천인</option>
</select>
<input type=text name=stx required itemname='검색어' value='<? echo $stx ?>'>
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle></td>
를 아래와 같이 수정
<td width=50% align=right>
<select name=sfl class=cssfl>
<option value='mb_id'>회원아이디</option>
<option value='mb_1'>회원구분</option>
<option value='mb_4'>학년/반</option>
<option value='mb_name'>이름</option>
<option value='mb_nick'>별명</option>
<option value='mb_level'>권한</option>
<option value='mb_email'>E-MAIL</option>
<option value='mb_tel'>전화번호</option>
<option value='mb_hp'>핸드폰번호</option>
<option value='mb_point'>포인트</option>
<option value='mb_datetime'>가입일시</option>
<option value='mb_ip'>IP</option>
<option value='mb_recommend'>추천인</option>
</select>
<select name=sfl2 class=cssfl>
<option value=''>학년선택</option>
<option value='1'<? if ($sfl2 == "1") { ?> selected<? } ?>>1학년</option>
<option value='2'<? if ($sfl2 == "2") { ?> selected<? } ?>>2학년</option>
<option value='3'<? if ($sfl2 == "3") { ?> selected<? } ?>>3학년</option>
</select>
<input type=text name=stx required itemname='검색어' value='<? echo $stx ?>'>
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle><br />
회원구분 : 일반 , 재학생 , 졸업생 , 학부모 , 교직원</td>
< 수정 3 >
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
를 아래와 같이 수정
/* 학년-반 검색 기능 추가를 위해 ( 해피정닷컴 정창용: 2009-03-24 추가)
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "?sfl2=$sfl2&$qstr&page=");
댓글목록
등록된 댓글이 없습니다.