Files
firstgarden-web-gnu/extend/rb_reservation.extend.php
2025-07-02 14:13:16 +09:00

44 lines
1.9 KiB
PHP
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_replace('admin_menu', 'add_admin_bbs_menu_reservation', 0, 1); // 관리자 메뉴를 추가함
function add_admin_bbs_menu_reservation($admin_menu){ // 메뉴추가
$admin_menu['menu000'][] = array('000810', '티켓 관리', G5_ADMIN_URL.'/rb/reservation_list.php', 'rb_config');
//$admin_menu['menu000'][] = array('000811', '예약 캘린더', G5_ADMIN_URL.'/rb/reservation_list_cal.php', 'rb_config');
$admin_menu['menu000'][] = array('000000', ' ', G5_ADMIN_URL, 'rb_config');
return $admin_menu;
}
$g5['rb_prefix'] = G5_TABLE_PREFIX.'rb_'; // 리빌더 테이블명 접두사
$rb_reservation_table_name = $g5['rb_prefix'].'reservation'; // g5_rb_reservation
$rb_item_res = sql_fetch (" select * from {$rb_reservation_table_name} "); // 테이블 조회
// 사용하지 않는 페이지 리다이렉트 처리
$redirect_map_reservation = [
'/adm/shop_admin/itemform.php' => '/adm/rb/shop/itemform.php',
];
// 현재 페이지의 URL을 확인 (쿼리 스트링을 제외한 경로)
$current_urls_reservation = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
// 쿼리 스트링을 확인 (파라미터)
$query_string_reservation = $_SERVER['QUERY_STRING'];
// 만약 현재 URL이 배열의 키에 있으면, 해당 값으로 리다이렉트
if (array_key_exists($current_urls_reservation, $redirect_map_reservation)) {
// 리다이렉트할 URL에 쿼리 스트링을 붙여서 처리
$redirect_urls_reservation = $redirect_map_reservation[$current_urls_reservation];
// 쿼리 스트링이 존재하면 '?'를 붙여서 추가
if (!empty($query_string_reservation)) {
$redirect_urls_reservation .= '?' . $query_string_reservation;
}
// 리다이렉트 실행
header('Location: ' . $redirect_urls_reservation);
exit; // 리다이렉트 후 스크립트 실행 중지
}