96 lines
3.6 KiB
PHP
96 lines
3.6 KiB
PHP
<?php
|
|
// 연간회원 입장처리 페이지
|
|
include_once "_common.php";
|
|
if (!isset($_SESSION['user_id'])) header( 'Location: FG_MANAGER_URL' ); // 로그인 되어있지 않으면 로그인 페이지로 보냄
|
|
include_once FG_MANAGER_PATH."/head.php";
|
|
?>
|
|
|
|
<div class="searchform">
|
|
<p>회원 검색은 성명/연락처/회원번호로 가능합니다.</p>
|
|
<form class="vipsearch" method="get" action="">
|
|
<label for="search_word" class="form-label">회원검색</label>
|
|
<input type="text" name="search_word" class="form-control" placeholder="검색어를 입력하세요" style="width: 200px; display: inline-block; margin: 5px 10px 5px 10px; " value="<?=isset($search_word)?$search_word:""?>" autofocus >
|
|
<button type="submit" class="btn btn-primary" style="display: inline-block; margin: 0; ">검색</button>
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
if( isset($search_word) && $search_word ) { // 검색어가 있을때만 돌림
|
|
$table = "{$fg['annual_member_table']} AS a LEFT JOIN {$fg['annual_category_table']} AS b ON a.ca_id = b.ca_id ";
|
|
|
|
$search = "name LIKE '%$search_word%' OR tel LIKE '%$search_word%' OR mem_no LIKE '%$search_word%'";
|
|
$where = "WHERE {$search}";
|
|
$ord_by = "ORDER BY name"; // 이름 오름차순
|
|
$record_count = get_num_rows($table, $where); // 전체 갯수 구하기
|
|
|
|
if ($record_count) { // 검색 결과가 있으면
|
|
$R = get_result($table, $ord_by, $query_limit, $where);
|
|
?>
|
|
<div>
|
|
<p>검색 회원 수 : <?=$record_count?></p>
|
|
</div>
|
|
<div class="text-center">
|
|
<table class="table table-striped align-middle table-hover">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="5%">
|
|
<col width="12%">
|
|
<col width="13%">
|
|
<col width="12%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col >
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="align-middle">
|
|
<th class="text-center">회원번호</th>
|
|
<th class="text-center">상태</th>
|
|
<th class="text-center">회원구분</th>
|
|
<th class="text-center">대표성명</th>
|
|
<th class="text-center">성명</th>
|
|
<th class="text-center">연락처</th>
|
|
<th class="text-center">입장횟수</th>
|
|
<th class="text-center">최종입장일</th>
|
|
<th class="text-center">만료일</th>
|
|
<th class="text-center">입장확인</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="table-group-divider">
|
|
<?php foreach($R as $R) { ?>
|
|
<tr class="<?=($R['status'] == '정상') ? "" : "unused" ?>">
|
|
<td class="text-center"><?=sprintf("%06d",$R['mem_no'])?></td>
|
|
<td class="text-center"><?=$R['status']?></td>
|
|
<td class="text-center"><?=$R['ca_name']?></td>
|
|
<td class="text-center"><?=$R['rep_name']?></td>
|
|
<td class="text-center"><?=$R['name']?></td>
|
|
<td class="text-center"><?=$R['tel']?></td>
|
|
<td class="text-center"><?=$R['ent_count']?></td>
|
|
<td class="text-center">
|
|
<?=($R['last_ent_date'] == '0000-00-00 00:00:00') ? '미이용' : date('Y-m-d',strtotime($R['last_ent_date'])); ?>
|
|
</td>
|
|
<td class="text-center">
|
|
<?=$R['edate']; ?>
|
|
</td>
|
|
<td class="text-center">
|
|
<?php if ($R['status'] == '정상' || $R['status'] == '검토대기') { ?>
|
|
<a class="btn btn-danger btn-xs" href="javascript:entMem('<?=$R['mem_no']?>')" role="button"><i class="fas fa-sign-in-alt"></i></a>
|
|
<?php } else { ?>
|
|
<i class="fas fa-times"></i>
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
<?php } // endforeach ?>
|
|
</tbody>
|
|
<tfoot>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
<?php } else { // 결과가 없으면 없다고 출력
|
|
echo '<h2 style="margin-top: 30px; text-align: center;">검색 결과가 없습니다.</h2>'.PHP_EOL;
|
|
}
|
|
}
|
|
include_once FG_MANAGER_PATH."/tail.php";
|