', 0); $g5['rb_prefix'] = G5_TABLE_PREFIX.'rb_'; // 리빌더 테이블명 접두사 $rb_table_name = $g5['rb_prefix'].'reservation'; // g5_rb_reservation //테이블이 있는지 검사한다. if(!sql_query(" DESCRIBE {$rb_table_name} ", false)) { $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$rb_table_name}` ( `res_is` int(4) NOT NULL COMMENT '사용여부', `res_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); } $columns_to_add = [ 'it_types' => 'INT(10) NOT NULL DEFAULT 0', 'it_date_s' => 'DATE NOT NULL', 'it_date_e' => 'DATE NOT NULL', 'it_date_n' => 'LONGTEXT NOT NULL DEFAULT \'\'', 'it_date_t' => 'LONGTEXT NOT NULL DEFAULT \'\'', 'it_date_j' => 'INT(4) NOT NULL DEFAULT 0', 'it_date_g' => 'INT(4) NOT NULL DEFAULT 0', 'it_not_c' => 'INT(10) NOT NULL DEFAULT 0', 'it_not_d' => 'INT(10) NOT NULL DEFAULT 0', 'it_not_s' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_min' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_max' => 'INT(10) NOT NULL DEFAULT 0', 'it_date_min' => 'INT(10) NOT NULL DEFAULT 0', 'it_date_max' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_min1' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_max1' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_min2' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_max2' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_min3' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_max3' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_pri1' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_pri2' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_pri3' => 'INT(10) NOT NULL DEFAULT 0', 'it_user_use1' => 'INT(4) NOT NULL DEFAULT 0', 'it_user_use2' => 'INT(4) NOT NULL DEFAULT 0', 'it_user_use3' => 'INT(4) NOT NULL DEFAULT 0', 'it_user_txt1' => 'VARCHAR(100) NOT NULL DEFAULT \'\'', 'it_user_txt2' => 'VARCHAR(100) NOT NULL DEFAULT \'\'', 'it_user_txt3' => 'VARCHAR(100) NOT NULL DEFAULT \'\'', ]; foreach ($columns_to_add as $column => $attributes) { // 컬럼이 있는지 확인 $column_check = sql_query("SHOW COLUMNS FROM {$g5['g5_shop_item_table']} LIKE '{$column}'", false); if (!sql_num_rows($column_check)) { // 컬럼 추가 sql_query("ALTER TABLE {$g5['g5_shop_item_table']} ADD {$column} {$attributes}", true); } } $columns_to_add2 = [ 'ct_types' => 'INT(10) NOT NULL DEFAULT 0', 'ct_date_s' => 'DATE NOT NULL', //시작일 'ct_date_e' => 'DATE NOT NULL', //종료일 'ct_date_d' => 'INT(10) NOT NULL DEFAULT 0', //일수 'ct_date_t' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //선택옵션 'ct_user_txt1' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션1 항목 'ct_user_txt2' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션2 항목 'ct_user_txt3' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션3 항목 'ct_user_qty1' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션1 수량 'ct_user_qty2' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션2 수량 'ct_user_qty3' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션3 수량 'ct_user_pri1' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액1 'ct_user_pri2' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액2 'ct_user_pri3' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액3 ]; foreach ($columns_to_add2 as $column => $attributes) { // 컬럼이 있는지 확인 $column_check = sql_query("SHOW COLUMNS FROM {$g5['g5_shop_cart_table']} LIKE '{$column}'", false); if (!sql_num_rows($column_check)) { // 컬럼 추가 sql_query("ALTER TABLE {$g5['g5_shop_cart_table']} ADD {$column} {$attributes}", true); } } $sql = " select * from {$rb_table_name} limit 1"; $res = sql_fetch($sql); $pg_anchor = ''; $g5['title'] = '예약 설정'; include_once (G5_ADMIN_PATH.'/admin.head.php'); ?>

기본 설정

예약기능 사용여부 >