$old_res['customer_name'], 'customer_phone' => $old_res['customer_phone'], 'customer_email' => $old_res['customer_email'], 'reservation_date' => $old_res['reservation_date'], 'reservation_time' => substr($old_res['reservation_time'], 0, 5), 'payment_amount' => number_format($old_res['payment_amount']), 'cancel_reason' => $memo // 취소 사유로 메모 사용 ]; if ($send_sms) { consultant_send_notification('sms', $template_key, $noti_data); } if ($send_email) { consultant_send_notification('email', $template_key, $noti_data); } } } alert('상태가 변경되었습니다.', $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']); } else { alert('상태 변경에 실패했습니다.'); } } } // 검색 조건 구성 $where_conditions = ["is_deleted = 0"]; if ($status) { $where_conditions[] = "status = '" . sql_real_escape_string($status) . "'"; } if ($date) { $where_conditions[] = "reservation_date = '" . sql_real_escape_string($date) . "'"; } if ($search) { $search_escaped = sql_real_escape_string($search); $where_conditions[] = "(customer_name LIKE '%{$search_escaped}%' OR customer_phone LIKE '%{$search_escaped}%')"; } $where_clause = implode(' AND ', $where_conditions); // 전체 개수 조회 $count_sql = "SELECT COUNT(*) as total FROM consultant_reservations WHERE {$where_clause}"; $count_result = sql_fetch($count_sql); $total = $count_result['total']; // 페이징 계산 $offset = ($page - 1) * $per_page; $total_pages = ceil($total / $per_page); // 예약 목록 조회 $sql = "SELECT * FROM consultant_reservations WHERE {$where_clause} ORDER BY created_at DESC LIMIT {$offset}, {$per_page}"; $reservations = []; $result = sql_query($sql); while ($row = sql_fetch_array($result)) { $reservations[] = $row; } // 상태 라벨 $status_labels = [ 'payment_pending' => '입금대기', 'reserved' => '예약확정', 'completed' => '상담완료', 'cancelled' => '예약취소' ]; include_once(G5_ADMIN_PATH . '/admin.head.php'); ?>

초기화 대시보드로
예약 목록 (총 건) 페이지 /
예약번호 고객정보 예약일시 상담유형 상담비 상태 신청일 관리
#


'현장', 'online' => '온라인', 'phone' => '전화']; echo $types[$reservation['consultation_type']] ?? $reservation['consultation_type']; ?>
검색 조건에 맞는 예약이 없습니다.
1): ?>