- VIP 리스트 모달을 루프 내 숨겨진 TR에 통합 (Bootstrap 호환성 유지) - X 아이콘 제거 및 액션 버튼 표시 조건 개선 (status='정상'인 경우만 표시) - 행 높이 표준화 (60px, align-middle) - 만료일이 오늘 이전일 경우 상태 자동 '만료' 처리 (AJAX 및 1회성 실행 모드) - 만료일 설정 페이지 결과 테이블에 상태 변경 정보 추가
410 lines
20 KiB
PHP
410 lines
20 KiB
PHP
<?php
|
|
// VIP LIST 페이지
|
|
include_once "_common.php";
|
|
if (!isset($_SESSION['user_id'])) header( 'Location: FG_MANAGER_URL' ); // 로그인 되어있지 않으면 로그인 페이지로 보냄
|
|
include_once FG_MANAGER_PATH."/head.php";
|
|
|
|
// table 세팅
|
|
$table = "{$fg['vip_list_table']} AS a LEFT JOIN {$fg['vip_category_table']} AS b ON a.gr_id = b.gr_id LEFT JOIN {$fg['member_group_table']} AS c ON a.rec_team = c.tid ";
|
|
|
|
// 검색 변수 초기화, 검색 관련
|
|
$search_word = isset($search_word) ? $search_word : "";
|
|
$search_group = isset($search_group) ? $search_group : "";
|
|
$search = $where = $search_count = "";
|
|
|
|
if (!empty($search_word)) $search .= " (vip_name LIKE '%$search_word%' OR vip_tel LIKE '%$search_word%' OR vip_card_no LIKE '%$search_word%') ";
|
|
if (!empty($search_group)) {
|
|
if (!empty($search_word)) $search .= "AND";
|
|
$search .= " a.gr_id = $search_group";
|
|
}
|
|
if (!empty($search)) {
|
|
$where = "WHERE {$search}";
|
|
$search_count = get_num_rows($table, $where);
|
|
}
|
|
// 검색 쿼리 끝
|
|
$record_count = get_num_rows($table); // 전체 갯수 구하기
|
|
$ord_by = "ORDER BY join_datetime DESC"; // 회원 가입일 기준 내림차순 정렬
|
|
$R = get_result($table, $ord_by, $query_limit, $where);
|
|
?>
|
|
<!-- 검색폼 시작 -->
|
|
<div class="d-flex flex-column mb-3">
|
|
<p>회원 검색은 회원구분/성명/연락처/카드번호로만 가능합니다.</p>
|
|
<form class="vipsearch" method="post" action="">
|
|
<div class="d-flex flex-row flex-wrap gap-2 mb-3">
|
|
<input type="radio" name="search_group" id="search_group_all" class="btn-check" value="" <?php if ($search_group == "") echo "checked" ?>>
|
|
<label class="btn btn-outline-primary" for="search_group_all">전체</label>
|
|
<?php
|
|
$group_name = getVipCatName();
|
|
$show_all = isset($_REQUEST['show_all_cat']) ? true : false;
|
|
foreach ($group_name as $row) { // VIP구분 가지고 와서 뿌려주기
|
|
// 비활성 카테고리 숨김
|
|
if ($row['gr_used'] == 0 && !$show_all) continue;
|
|
$inactive_class = ($row['gr_used'] == 0) ? ' inactive-cat' : '';
|
|
$display_style = ($row['gr_used'] == 0 && !$show_all) ? 'display: none;' : '';
|
|
?>
|
|
<input type="radio" name="search_group" id="search_group_<?=$row['gr_id']?>" class="btn-check" value="<?=$row['gr_id']?>" <?php if ($search_group === $row['gr_id']) echo "checked" ?>>
|
|
<label class="btn btn-outline-primary category-label<?=$inactive_class?>" for="search_group_<?=$row['gr_id']?>" style="<?=($row['gr_used'] == 0) ? 'opacity: 0.5;' : ''?><?=$display_style?>"><?=$row['gr_name']?></label>
|
|
<?php } ?>
|
|
<button type="button" class="btn btn-outline-secondary btn-sm" onclick="toggleShowAllCat()" data-show-all="<?=($show_all) ? 'true' : 'false'?>">
|
|
<?=($show_all) ? '활성만 보기' : '모두보기'?>
|
|
</button>
|
|
</div>
|
|
<div class="input-group col-md-6">
|
|
<span class="input-group-text" id="search_word">회원검색</span>
|
|
<input type="text" name="search_word" class="form-control" id="search_word" aria-describedby="search_word" placeholder="검색어를 입력하세요" autofocus value="<?=$search_word ?>">
|
|
<button type="submit" class="btn btn-secondary">검색</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<!-- 검색폼 끝 -->
|
|
<div class="d-flex justify-content-between my-1">
|
|
<div>
|
|
<p>전체 회원 수 : <b><?=$record_count?></b> | 검색 회원 수 : <?=$search_count ? $search_count : $record_count?></p>
|
|
</div>
|
|
<div class="d-flex flex-row-reverse column-gap-2">
|
|
<form method="post" action="vip_list.excel.php">
|
|
<button type="submit" class="btn btn-secondary" >엑셀저장</button>
|
|
</form>
|
|
|
|
<?php if($_SESSION['user_lv'] > "1"){ // 추가?>
|
|
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#add_modal">추가</button>
|
|
<!-- 추가 버튼을 누르면 출력한다. -->
|
|
<div id="add_modal" class="modal fade">
|
|
<div class="modal-dialog" style="width:800px;">
|
|
<div class="modal-content">
|
|
<form class="signup" > <!-- 폼 이름을 알려줌 -->
|
|
<input type="hidden" name="rec_name" class="form-control" readonly value="<?=$_SESSION['user_name']?>">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">VIP 추가</h4>
|
|
</div>
|
|
<div class="modal-body text-left">
|
|
<h5 class="modal-title my-3">발급정보</h5>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="gr_id">구분</span>
|
|
<?php foreach($group_name as $row){
|
|
if ($row['gr_used'] == 0) continue ?>
|
|
<input type="radio" class="btn-check" name="gr_id" id="gr_id_<?=$row['gr_id']?>" value="<?=$row['gr_id']?>"<?php if ($row['gr_id'] == 2) echo "checked" ?> required>
|
|
<label class="btn btn-outline-info" for="gr_id_<?=$row['gr_id']?>"><?=$row['gr_name']?></label>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="rec_team">부서</span>
|
|
<?php
|
|
$team_name = getTeamName(1);
|
|
foreach($team_name as $row){
|
|
?>
|
|
<input type="radio" class="btn-check" name="rec_team" id="rec_team_<?=$row['tid']?>" value="<?=$row['tid']?>" <?php /*if($_SESSION['user_team'] == $row['tname']) if ($row['tid'] === "1") */echo "checked" ?> required>
|
|
<label class="btn btn-outline-info" for="rec_team_<?=$row['tid']?>"><?=$row['tname']?></label>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="app_name">접수자</span>
|
|
<input type="text" class="form-control" id="app_name" name="app_name" placeholder="서류 접수자 성명" value="" required>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_card_no">번호</span>
|
|
<input type="text" class="form-control" oninput="checkDupNo(this.value)" id="vip_card_no" name="vip_card_no" maxlength="6" placeholder="발급한 VIP카드 번호" value="" required>
|
|
</div>
|
|
<div class="input-group mb-1 checkdup">
|
|
<span id="duplicate-no-warning"></span>
|
|
</div>
|
|
<h5 class="modal-title my-3">고객정보</h5>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_name">성명</span>
|
|
<input type="text" class="form-control" id="vip_name" name="vip_name" value="" required>
|
|
<input type="radio" class="btn-check" name="vip_gender" id="vip_gender_male" value="남" checked required>
|
|
<label class="btn btn-outline-primary" for="vip_gender_male">남</label>
|
|
<input type="radio" class="btn-check" name="vip_gender" id="vip_gender_female" value="여" required>
|
|
<label class="btn btn-outline-primary" for="vip_gender_female">여</label>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_tel">연락처</span>
|
|
<input type="number" class="form-control" oninput="checkDupTel(this.value)" name="vip_tel" name="vip_tel" maxlength="11" value="" required>
|
|
</div>
|
|
<div class="input-group mb-1 checkdup">
|
|
<span id="duplicate-tel-warning"></span>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_birth">생일</span>
|
|
<input type="date" class="form-control" max="9999-12-31" name="vip_birth" id="vip_birth" required>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_email">이메일</span>
|
|
<input type="text" class="form-control" name="vip_email" id="vip_email" >
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_addr">주소</span>
|
|
<input type="text" class="form-control" name="vip_addr" id="vip_addr" >
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_memo">메모</span>
|
|
<textarea class="form-control" name="vip_memo" id="vip_memo"></textarea>
|
|
</div>
|
|
<div id="vip_memo" class="form-text">
|
|
기타 메모 및 발급사유를 입력합니다.
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" id="add_submit" class="btn btn-primary">추가</button>
|
|
<button type="button" class="btn btn-default" data-bs-dismiss="modal">닫기</button>
|
|
</div>
|
|
</form>
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
<table class="table table-striped align-middle">
|
|
<colgroup>
|
|
<col width="70px">
|
|
<col width="70px">
|
|
<col width="100px">
|
|
<col width="130px">
|
|
<col width="100px">
|
|
<col width="90px">
|
|
<col width="90px">
|
|
<col width="50px">
|
|
<col width="100px">
|
|
</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>
|
|
<?php if($_SESSION['user_lv'] > "1"){ ?>
|
|
<th class="text-center">작업</th>
|
|
<?php } ?>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="table-group-divider">
|
|
<?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" : "" ?> vip-row <?=$expired_class?>" style="cursor: pointer; height: 60px;" data-bs-toggle="modal" data-bs-target="#modify_modal_<?=$R['idx']?>">
|
|
<td class="text-center align-middle"><?=$R['vip_card_no']?></td>
|
|
<td class="text-center align-middle"><?=$R['status']?></td>
|
|
<td class="text-center align-middle"><?=$R['vip_name']?></td>
|
|
<td class="text-center align-middle"><?=$R['vip_tel']?></td>
|
|
<td class="text-center align-middle"><?=$R['vip_birth']?></td>
|
|
<td class="text-center align-middle" style="<?=($is_expired) ? 'color: #999; opacity: 0.6;' : ''?>"><?=($R['vip_date'] == '9999-12-31')? '평생' : $R['vip_date']?></td>
|
|
<td class="text-center align-middle">
|
|
<?php
|
|
$edate = $R['last_ent_date'];
|
|
echo ($edate == '0000-00-00 00:00:00')? '미이용' : date('Y-m-d',strtotime($edate));
|
|
?></td>
|
|
<td class="text-center align-middle"><?=$R['ent_count']?></td>
|
|
<td class="text-center align-middle d-flex justify-content-center gap-1" onclick="event.stopPropagation();" style="min-height: 60px;">
|
|
<?php if($_SESSION['user_lv'] > "1"){ ?>
|
|
<?php if($R['status'] == '정상') { ?>
|
|
<a class="btn btn-danger btn-xs" href="javascript:entMemWithConfirm('<?=$R['idx']?>', <?=$is_expired ? 'true' : 'false'?>)" role="button"><i class="fas fa-sign-in-alt"></i></a>
|
|
<button type="button" class="btn btn-success btn-xs" data-bs-toggle="modal" data-bs-target="#modify_modal_<?=$R['idx']?>" onclick="event.stopPropagation()"><i class="fa-solid fa-pen-to-square"></i></button>
|
|
<button type="button" class="btn btn-primary btn-xs" data-bs-toggle="modal" data-bs-target="#renew_modal_<?=$R['idx']?>" onclick="event.stopPropagation()"><i class="fa-solid fa-repeat"></i></button>
|
|
<?php } ?>
|
|
<?php if($_SESSION['user_lv'] === "4" && $R['status'] != "재발급"){ ?>
|
|
<a class="btn btn-danger btn-xs" href="javascript:deleteItem('<?=$R['idx']?>')" role="button"><?=($R['status'] == '정상')? '<i class="fa-solid fa-trash-can"></i>' : '<i class="fa-solid fa-trash-can-arrow-up"></i>'?></a>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
|
|
<div id="modify_modal_<?=$R['idx']?>" class="modal fade" tabindex="-1" aria-labelledby="modify_modal_<?=$R['idx']?>" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<form class="modify" id="modify_<?=$R['idx']?>">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">정보 보기/수정</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body text-start">
|
|
<input type="hidden" id="idx_<?=$R['idx']?>" name="idx" value="<?=$R['idx']?>" readonly>
|
|
<input type="hidden" id="last_edit_name" name="last_edit_name" value="<?=$_SESSION['user_name']?>" readonly>
|
|
<?php
|
|
// 폐기된 카드의 경우 수정을 하면 안되므로 수정할 수 없게 함
|
|
$ro = "";
|
|
if($R['status'] != "정상") {
|
|
$ro = "disabled";
|
|
echo "<p>폐기된 카드는 수정할 수 없습니다.</p>";
|
|
}
|
|
$gender = '';
|
|
if($R['status'] == "정상") {
|
|
$gender = $R['vip_gender'];
|
|
}
|
|
?>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_card_no_<?=$R['idx']?>">번호</span>
|
|
<input type="text" class="form-control" id="vip_card_no_<?=$R['idx']?>" name="vip_card_no" value="<?=$R['vip_card_no'] ?>" disabled>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="team_name_<?=$R['idx']?>">부서</span>
|
|
<input type="text" class="form-control" id="team_name_<?=$R['idx']?>" name="team_name" value="<?=$R['tname'] ?>" disabled >
|
|
<span class="input-group-text col-md-2" id="gr_name_<?=$R['idx']?>">사유</span>
|
|
<input type="text" class="form-control" id="gr_name_<?=$R['idx']?>" name="gr_name_" value="<?=$R['gr_name'] ?>" disabled>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="app_name_<?=$R['idx']?>">접수</span>
|
|
<input type="text" class="form-control" id="app_name_<?=$R['idx']?>" name="app_name" value="<?=$R['app_name'] ?>" disabled>
|
|
<span class="input-group-text col-md-2" id="rec_name_<?=$R['idx']?>">등록</span>
|
|
<input type="text" class="form-control" id="rec_name_<?=$R['idx']?>" name="rec_name" value="<?=$R['rec_name'] ?>" disabled>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="join_datetime_<?=$R['idx']?>">등록일</span>
|
|
<input type="text" class="form-control" id="join_datetime_<?=$R['idx']?>" name="join_datetime" value="<?=$R['join_datetime'] ?>" disabled>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_date_<?=$R['idx']?>">만료일</span>
|
|
<input type="text" class="form-control" id="vip_date_<?=$R['idx']?>" name="vip_date" value="<?=$R['vip_date']?>" <?php echo ($_SESSION['user_lv'] != "4") ? "disabled" : "" ?>>
|
|
</div>
|
|
<?php if($R['last_edit_name']) { ?>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="last_edit_date_<?=$R['idx']?>">수정일</span>
|
|
<input type="text" class="form-control" id="last_edit_date_<?=$R['idx']?>" name="last_edit_date" value="<?=$R['last_edit_date'] ?>" disabled>
|
|
<span class="input-group-text col-md-2" id="last_edit_name_<?=$R['idx']?>">수정</span>
|
|
<input type="text" class="form-control" id="last_edit_name_<?=$R['idx']?>" name="last_edit_name" value="<?=$R['last_edit_name'] ?>" disabled>
|
|
</div>
|
|
<?php } ?>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_name_<?=$R['idx']?>">고객명</span>
|
|
<input type="text" class="form-control" id="vip_name_<?=$R['idx']?>" name="vip_name" value="<?=$R['vip_name']?>" required <?=$ro?>>
|
|
<?php if($R['status'] == "정상") { ?>
|
|
<input type="radio" class="btn-check" name="vip_gender" id="vip_gender_<?=$R['idx']?>_male" value="남" <?php if($gender == "남") echo "checked" ?> required>
|
|
<label class="btn btn-outline-primary" for="vip_gender_<?=$R['idx']?>_male">남</label>
|
|
<input type="radio" class="btn-check" name="vip_gender" id="vip_gender_<?=$R['idx']?>_female" value="여" <?php if($gender =="여") echo "checked" ?> required>
|
|
<label class="btn btn-outline-primary" for="vip_gender_<?=$R['idx']?>_female">여</label>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_tel_<?=$R['idx']?>">연락처</span>
|
|
<input type="text" onkeydown='return onlyNumber(event)' onkeyup='removeChar(event)' maxlength="11" class="form-control" id="vip_tel_<?=$R['idx']?>" name="vip_tel" value="<?=$R['vip_tel'] ?>" required <?=$ro?>>
|
|
<span class="input-group-text col-md-2" id="vip_birth_<?=$R['idx']?>">생일</span>
|
|
<input type="date" class="form-control" id="vip_birth_<?=$R['idx']?>" max="9999-12-31" name="vip_birth" value="<?=$R['vip_birth']?>" <?=$ro?>>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_email_<?=$R['idx']?>">E-Mail</span>
|
|
<input type="text" class="form-control" id="vip_email_<?=$R['idx']?>" name="vip_email" value="<?=$R['vip_email'] ?>" <?=$ro?>>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_addr_<?=$R['idx']?>">주소</span>
|
|
<input type="text" class="form-control" id="vip_addr_<?=$R['idx']?>" name="vip_addr" value="<?=$R['vip_addr']?>" <?=$ro?>>
|
|
</div>
|
|
<div class="input-group mb-1">
|
|
<span class="input-group-text col-md-2" id="vip_memo_<?=$R['idx']?>">메모</span>
|
|
<textarea class="form-control" id="vip_memo_<?=$R['idx']?>" name="vip_memo" <?=$ro?>><?=$R['vip_memo']?></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-primary" <?=$ro?> >수정</button>
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 재발급 모달 -->
|
|
<?php if ( $R['status'] === "정상" ) { ?>
|
|
<div id="renew_modal_<?=$R['idx']?>" class="modal fade" tabindex="-1" aria-labelledby="renew_modal_<?=$R['idx']?>" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<form class="renew" id="renew_<?=$R['idx']?>">
|
|
<input type="hidden" id="idx_<?=$R['idx']?>" name="idx" value="<?=$R['idx']?>" readonly>
|
|
<input type="hidden" id="last_edit_name_<?=$R['idx']?>" name="last_edit_name" value="<?=$_SESSION['user_name']?>" readonly>
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">재발급</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body text-start">
|
|
<div class="input-group">
|
|
<span class="input-group-text col-md-4" id="re_no_<?=$R['idx']?>">재발급 카드번호</span>
|
|
<input type="number" class="form-control" oninput="checkDupRc(this.value)" id="rc_no_<?=$R['idx']?>" name="rc_no" maxlength="6" value="" required>
|
|
</div>
|
|
<div class="input-group checkdup">
|
|
<span id="duplicate-rc-warning"></span>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" id="renew_submit" class="btn btn-primary">확인</button>
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<style>
|
|
.expired-vip {
|
|
opacity: 0.7;
|
|
color: #999;
|
|
}
|
|
.expired-vip td {
|
|
color: #999 !important;
|
|
}
|
|
.vip-row:hover {
|
|
background-color: #f5f5f5;
|
|
}
|
|
.inactive-cat {
|
|
opacity: 0.6;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
function toggleShowAllCat() {
|
|
const btn = event.target;
|
|
const showAll = !btn.getAttribute('data-show-all') || btn.getAttribute('data-show-all') === 'false';
|
|
|
|
// UI 즉시 업데이트
|
|
const categoryLabels = document.querySelectorAll('.category-label');
|
|
categoryLabels.forEach(label => {
|
|
if (label.classList.contains('inactive-cat')) {
|
|
label.style.display = showAll ? 'inline-block' : 'none';
|
|
}
|
|
});
|
|
|
|
// 버튼 텍스트 업데이트
|
|
btn.textContent = showAll ? '활성만 보기' : '모두보기';
|
|
btn.setAttribute('data-show-all', showAll ? 'true' : 'false');
|
|
|
|
// URL 업데이트 (새로고침 없음)
|
|
const url = new URL(window.location);
|
|
if (showAll) {
|
|
url.searchParams.set('show_all_cat', '1');
|
|
} else {
|
|
url.searchParams.delete('show_all_cat');
|
|
}
|
|
window.history.pushState({}, '', url.toString());
|
|
}
|
|
|
|
function openVipModal(idx) {
|
|
const modal = document.getElementById('modify_modal_' + idx);
|
|
if (modal) {
|
|
const bsModal = new bootstrap.Modal(modal);
|
|
bsModal.show();
|
|
}
|
|
}
|
|
|
|
function entMemWithConfirm(idx, isExpired) {
|
|
let confirmMsg = isExpired ? '만료된 회원입니다. 입장처리 하시겠습니까?' : '입장처리 하시겠습니까?';
|
|
|
|
if (confirm(confirmMsg)) {
|
|
entMem(idx);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<?php include_once FG_MANAGER_PATH."/tail.php";
|