Files
firstgarden-web-gnu/adm/rb/reservation_set_update.php
2025-07-02 14:13:16 +09:00

31 lines
831 B
PHP

<?php
$sub_menu = '000810';
include_once('./_common.php');
check_demo();
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$g5['rb_prefix'] = G5_TABLE_PREFIX.'rb_'; // 리빌더 테이블명 접두사
$rb_table_name = $g5['rb_prefix'].'reservation'; // g5_rb_reservation
// 컬럼이 있는지 검사한다.
$cnt = sql_fetch("SELECT COUNT(*) as cnt FROM {$rb_table_name}");
if ($cnt['cnt'] > 0) {
$sql = "UPDATE {$rb_table_name}
SET res_is = '{$_POST['res_is']}',
res_datetime = '" . G5_TIME_YMDHIS . "'";
sql_query($sql);
} else {
$sql = "INSERT INTO {$rb_table_name}
SET res_is = '{$_POST['res_is']}',
res_datetime = '" . G5_TIME_YMDHIS . "'";
sql_query($sql);
}
update_rewrite_rules();
goto_url('./reservation_set.php', false);
?>