만료 카드에 대해 입장처리가 가능하도록 수정, 만료 카드의 경우 경고문구가 뜨도록 수정.

This commit is contained in:
2026-02-20 16:18:39 +09:00
parent 693625a0bc
commit 2884c209d2

View File

@ -49,22 +49,27 @@ if( isset($search_word) && $search_word ) { // 검색어가 있을때만 돌림
<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">VIP만료일</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" : "" ?>">
<?php foreach($R as $R) {
$today = date('Y-m-d');
$expire_date = $R['vip_date'];
$is_expired = ($expire_date != '9999-12-31' && strtotime($expire_date) < strtotime($today)) ? true : false;
$expired_class = $is_expired ? 'expired-vip' : '';
?>
<tr class="<?=($R['status'] != '정상') ? "unused" : "" ?> <?=$expired_class?>">
<td class="text-center"><?=sprintf("%06d",$R['vip_card_no'])?></td>
<td class="text-center"><?=$R['status']?></td>
<td class="text-center"><?=$R['gr_name']?></td>
<!--<td class="text-center"><?=$R['gr_name']?></td>-->
<td class="text-center"><?=$R['vip_name']?></td>
<td class="text-center"><?=$R['vip_tel']?></td>
<td class="text-center"><?=date('Y-m-d',strtotime($R['join_datetime']));?></td>
@ -76,8 +81,8 @@ if( isset($search_word) && $search_word ) { // 검색어가 있을때만 돌림
<?=($R['vip_date'] == "9999-12-31") ? "평생" : $R['vip_date']; ?>
</td>
<td class="text-center">
<?php if ($R['status'] == '정상') { ?>
<a class="btn btn-danger btn-xs" href="javascript:entMem('<?=$R['idx']?>')" role="button"><i class="fas fa-sign-in-alt"></i></a>
<?php if ($R['status'] == '정상' || $R['status'] == '만료' ) { ?>
<a class="btn btn-danger btn-xs" href="#" onclick="event.preventDefault(); entMemWithConfirm('<?=$R['idx']?>', <?=$is_expired ? 'true' : 'false'?>);" role="button"><i class="fas fa-sign-in-alt"></i></a>
<?php } else { ?>
<i class="fas fa-times"></i>
<?php } ?>
@ -93,4 +98,24 @@ if( isset($search_word) && $search_word ) { // 검색어가 있을때만 돌림
echo '<h2 style="margin-top: 30px; text-align: center;">검색 결과가 없습니다.</h2>'.PHP_EOL;
}
}
include_once FG_MANAGER_PATH."/tail.php";
?>
<style>
.expired-vip {
color: #777;
}
.expired-vip td {
color: #999 !important;
}
</style>
<script>
function entMemWithConfirm(idx, isExpired) {
let confirmMsg = isExpired ? '만료된 카드입니다. 입장처리 하시겠습니까?' : '입장처리 하시겠습니까?';
if (confirm(confirmMsg)) {
entMem(idx);
}
}
</script>
<?php include_once FG_MANAGER_PATH."/tail.php";