리빌더 부분 추가
This commit is contained in:
31
adm/rb/reservation_set_update.php
Normal file
31
adm/rb/reservation_set_update.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?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);
|
||||
?>
|
||||
Reference in New Issue
Block a user