mysql db 업데이트가 안됩니다 - 코드가 길어 욕먹겠지만 한번만 봐주세요 채택완료
구비
8년 전
조회 7,520
코드가 길어 욕먹을 것 같지만 그래도 무식하게 올려봅니다 ^^
관리자에 새로운 테이블을 하나 만들어 폼형식으로 db를 업데이트 하려고 하는데 먹히질 않습니다.
새로운 테이블과 구조까지는 생성이 잘 됩니다.
그다음 폼을 작성한 뒤에 업데이트가 되지를 않네요..
mwb_config.php 와 mwb_config_update.php 두 파일입니다.
먼저 mwb_config.php 파일입니다.
</p><p><?php</p><p>$sub_menu = '950100';</p><p>include_once('./_common.php');</p><p> </p><p>auth_check($auth[$sub_menu], 'r');</p><p> </p><p>$g5['title'] = '기본 정보 관리';</p><p> </p><p>if(!sql_query(" DESCRIBE {$g5['mwb_config_table']} ", false)) {</p><p> sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['mwb_config_table']}` (</p><p> `company_name` text NOT NULL DEFAULT '',</p><p> `company_owner` text NOT NULL DEFAULT '',</p><p> `company_address_new` text NOT NULL DEFAULT '',</p><p> `company_address_old` text NOT NULL DEFAULT '',</p><p> `company_phone` text NOT NULL DEFAULT '',</p><p> `company_tel_1` text NOT NULL DEFAULT '',</p><p> `company_tel_2` text NOT NULL DEFAULT '',</p><p> `company_fax` text NOT NULL DEFAULT '',</p><p> `business_no` text NOT NULL DEFAULT '',</p><p> `tongsin_no` text NOT NULL DEFAULT '',</p><p> `bank_name` text NOT NULL DEFAULT '',</p><p> `account_no` text NOT NULL DEFAULT '',</p><p> `account_owner` text NOT NULL DEFAULT '',</p><p> `checkin_time` text NOT NULL DEFAULT '',</p><p> `checkout_time` text NOT NULL DEFAULT '',</p><p> `checkin_limit_time` text NOT NULL DEFAULT '',</p><p> `ddnayo_id` text NOT NULL DEFAULT '',</p><p> `facebook_id` text NOT NULL DEFAULT '',</p><p> `twitter_id` text NOT NULL DEFAULT '',</p><p> `og_description` text NOT NULL DEFAULT '',</p><p> `og_image` text NOT NULL DEFAULT '',</p><p> `naver_map_api_key` text NOT NULL DEFAULT '',</p><p> `naver_map_x` text NOT NULL DEFAULT '',</p><p> `naver_map_y` text NOT NULL DEFAULT '',</p><p> `period_s1` text NOT NULL DEFAULT '',</p><p> `period_s2` text NOT NULL DEFAULT '',</p><p> `period_s3` text NOT NULL DEFAULT '',</p><p> `period_s4` text NOT NULL DEFAULT '',</p><p> `period_s5` text NOT NULL DEFAULT '',</p><p> `period_s6` text NOT NULL DEFAULT '',</p><p> `period_w1` text NOT NULL DEFAULT '',</p><p> `period_w2` text NOT NULL DEFAULT '',</p><p> `period_w3` text NOT NULL DEFAULT '',</p><p> `period_w4` text NOT NULL DEFAULT '',</p><p> `period_w5` text NOT NULL DEFAULT '',</p><p> `period_w6` text NOT NULL DEFAULT '',</p><p> `period_e1` text NOT NULL DEFAULT '',</p><p> `period_e2` text NOT NULL DEFAULT '',</p><p> `period_e3` text NOT NULL DEFAULT '',</p><p> `period_e4` text NOT NULL DEFAULT '',</p><p> `period_e_name` text NOT NULL DEFAULT '',</p><p> `user_guide` text NOT NULL DEFAULT '',</p><p> `refund_0` text NOT NULL DEFAULT '',</p><p> `refund_1` text NOT NULL DEFAULT '',</p><p> `refund_2` text NOT NULL DEFAULT '',</p><p> `refund_3` text NOT NULL DEFAULT '',</p><p> `refund_4` text NOT NULL DEFAULT '',</p><p> `refund_5` text NOT NULL DEFAULT '',</p><p> `refund_6` text NOT NULL DEFAULT '',</p><p> `refund_7` text NOT NULL DEFAULT '',</p><p> `refund_8` text NOT NULL DEFAULT '',</p><p> `refund_9` text NOT NULL DEFAULT '',</p><p> `refund_10` text NOT NULL DEFAULT ''</p><p> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);</p><p>}</p><p> </p><p>include_once (G5_ADMIN_PATH.'/admin.head.php');</p><p>include_once(G5_EDITOR_LIB);</p><p> </p><p>$frm_submit = '<div class="btn_confirm01 btn_confirm"></p><p> <input type="submit" value="확인" class="btn_submit" accesskey="s"></p><p> <a href="'.G5_URL.'/">메인으로</a></p><p></div>';</p><p>?></p><p> </p><p><link type="text/css" href="<a href="<a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css" target="_blank" rel="noopener noreferrer">http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css</a>"><a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css" target="_blank" rel="noopener noreferrer">http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css</a></a>" rel="stylesheet" /></p><p><script type="text/javascript" src="<a href="<a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js" target="_blank" rel="noopener noreferrer">http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js</a>"><a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js" target="_blank" rel="noopener noreferrer">http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js</a></a>"></script></p><p> </p><p><style></p><p> section {margin-top: 50px; }</p><p> .ui-datepicker-trigger {cursor:pointer;}</p><p></style></p><p> </p><p><form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);"></p><p><input type="hidden" name="token" value="" id="token"></p><p> </p><p><section></p><p> <h2 class="h2_frm">사업장 정보 관리</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>사업장 정보를 변경할 수 있습니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>사업장 정보 설정</caption></p><p> <colgroup></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row"><label for="cf_title">홈페이지 제목 <?php if($is_admin) { ?>(cf_title)<?php } ?></label></th></p><p> <td></p><p> <input type="text" name="cf_title" value="<?php echo $config['cf_title'] ?>" id="cf_title" required class="required frm_input" size="30"></p><p> </td></p><p> <th scope="row"></th></p><p> <td></p><p> </td></p><p> </tr></p><p> <tr></p><p> <tr></p><p> <th scope="row"><label for="company_name">상호명</label></th></p><p> <td></p><p> <?php echo help("사업자 등록증의 상호를 입력합니다."); ?></p><p> <input type="text" name="company_name" value="<?php echo $mwbcfg['company_name'] ?>" id="company_name" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="company_owner">대표자 이름</label></th></p><p> <td></p><p> <?php echo help("사업자 등록증의 대표자 이름을 입력합니다."); ?></p><p> <input type="text" name="company_owner" value="<?php echo $mwbcfg['company_owner'] ?>" id="company_owner" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="business_no">사업자 번호</label></th></p><p> <td></p><p> <?php echo help("사업자 번호를 입력합니다."); ?></p><p> <input type="text" name="business_no" value="<?php echo $mwbcfg['business_no'] ?>" id="business_no" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="tongsin_no">통신판매업 번호</label></th></p><p> <td></p><p> <?php echo help("통신판매업 번호를 입력합니다. 없는 경우 생략합니다."); ?></p><p> <input type="text" name="tongsin_no" value="<?php echo $mwbcfg['tongsin_no'] ?>" id="tongsin_no" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="company_address_new">도로명 주소</label></th></p><p> <td></p><p> <?php echo help("도로명 주소를 입력합니다."); ?></p><p> <input type="text" name="company_address_new" value="<?php echo $mwbcfg['company_address_new'] ?>" id="company_address_new" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="company_address_old">지번 주소</label></th></p><p> <td></p><p> <?php echo help("지번 주소를 입력합니다."); ?></p><p> <input type="text" name="company_address_old" value="<?php echo $mwbcfg['company_address_old'] ?>" id="company_address_old" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="company_phone">휴대전화 번호</label></th></p><p> <td></p><p> <?php echo help("휴대번화번호를 입력합니다.
모바일페이지에서 전화 바로걸기에 사용할 전화번호입니다."); ?></p><p> <input type="text" name="company_phone" value="<?php echo $mwbcfg['company_phone'] ?>" id="company_phone" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="company_fax">팩스 번호</label></th></p><p> <td></p><p> <?php echo help("팩스번호를 입력합니다."); ?></p><p> <input type="text" name="company_fax" value="<?php echo $mwbcfg['company_fax'] ?>" id="company_fax" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="company_tel_1">전화번호 1</label></th></p><p> <td></p><p> <?php echo help("전화번호 1을 입력합니다. 첫번째로 노출됩니다.
휴대전화번호가 없으면 모바일페이지에서 전화 바로걸기에 사용할 전화번호입니다."); ?></p><p> <input type="text" name="company_tel_1" value="<?php echo $mwbcfg['company_tel_1'] ?>" id="company_tel_1" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="company_tel_2">전화번호 2</label></th></p><p> <td></p><p> <?php echo help("전화번호 2를 입력합니다. 두번째로 노출됩니다."); ?></p><p> <input type="text" name="company_tel_2" value="<?php echo $mwbcfg['company_tel_2'] ?>" id="company_tel_2" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><section></p><p> <h2 class="h2_frm">입금 계좌 관리</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>입금 계좌 정보를 변경할 수 있습니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>입금 계좌 설정</caption></p><p> <colgroup></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row"><label for="bank_name">무통장 계좌 은행명</label></th></p><p> <td></p><p> <?php echo help("무통장 계좌의 은행명을 입력합니다."); ?></p><p> <input type="text" name="bank_name" value="<?php echo $mwbcfg['bank_name'] ?>" id="bank_name" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="account_no">무통장 계좌 번호</label></th></p><p> <td></p><p> <?php echo help("무통장 계좌의 번호를 입력합니다."); ?></p><p> <input type="text" name="account_no" value="<?php echo $mwbcfg['account_no'] ?>" id="account_no" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="account_owner">무통장 계좌 예금주</label></th></p><p> <td></p><p> <?php echo help("무통장 계좌의 예금주를 입력합니다."); ?></p><p> <input type="text" name="account_owner" value="<?php echo $mwbcfg['account_owner'] ?>" id="account_owner" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"></th></p><p> <td></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><?php echo $frm_submit; ?></p><p> </p><p><section></p><p> <h2 class="h2_frm">입퇴실 시간 관리</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>입퇴실 시간 정보를 변경할 수 있습니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>입퇴실 시간 설정</caption></p><p> <colgroup></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row"><label for="checkin_time">입실 시간</label></th></p><p> <td></p><p> <?php echo help("통상적인 입실시간을 입력합니다.
'오전(오후) XX시' 와 같이 입력합니다."); ?></p><p> <input type="text" name="checkin_time" value="<?php echo $mwbcfg['checkin_time'] ?>" id="checkin_time" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="checkin_limit_time">입실 마감 시간</label></th></p><p> <td></p><p> <?php echo help("통상적인 입실 마감시간을 입력합니다. (생략 가능)
'오전(오후) XX시' 와 같이 입력합니다."); ?></p><p> <input type="text" name="checkin_limit_time" value="<?php echo $mwbcfg['checkin_limit_time'] ?>" id="checkin_limit_time" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="checkout_time">퇴실 시간</label></th></p><p> <td></p><p> <?php echo help("통상적인 퇴실시간을 입력합니다.
'오전(오후) XX시' 와 같이 입력합니다."); ?></p><p> <input type="text" name="checkout_time" value="<?php echo $mwbcfg['checkout_time'] ?>" id="checkout_time" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"></th></p><p> <td></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><section></p><p> <h2 class="h2_frm">떠나요 펜션 예약시스템 관리</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>떠나요 예약시스템을 사용하는 펜션의 코드를 입력하면 됩니다</p></p><p> <p>객실관리 페이지에서 펜션 코드를 입력하지 않아도 이 곳에 입력되어 있으면 사용 가능합니다.</p></p><p> <p>각 객실의 코드는 객실관리에서 각각 입력합니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>떠나요 설정</caption></p><p> <colgroup></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row"><label for="ddnayo_id">떠나요 예약시스템 펜션 코드</label></th></p><p> <td></p><p> <?php echo help("떠나요 예약시스템의 펜션코드를 입력합니다.
'id_hotel'값의 숫자만 입력합니다."); ?></p><p> <input type="text" name="ddnayo_id" value="<?php echo $mwbcfg['ddnayo_id'] ?>" id="ddnayo_id" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"></th></p><p> <td></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><section></p><p> <h2 class="h2_frm">소셜 서비스 & SEO 관리</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>소셜 서비스 및 SEO 정보를 변경할 수 있습니다.</p></p><p> <p>SEO, 네이버 사이트 등록, SNS 공유 페이지 설정 등에 이용됩니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>SEO 설정</caption></p><p> <colgroup></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row"><label for="facebook_id">사업장 페이스</label></th></p><p> <td></p><p> <?php echo help("운영하는 페이스북 계정이 있으면 ID를 입력합니다."); ?></p><p> <input type="text" name="facebook_id" value="<?php echo $mwbcfg['facebook_id'] ?>" id="facebook_id" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="twitter_id">사업장 트위터</label></th></p><p> <td></p><p> <?php echo help("운영하는 트위터 계정이 있으면 ID를 입력합니다."); ?></p><p> <input type="text" name="twitter_id" value="<?php echo $mwbcfg['twitter_id'] ?>" id="twitter_id" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="og_description">사업장 og 사이트 설명 <?php if($is_admin) { ?>(1)<?php } ?></label></th></p><p> <td></p><p> <?php echo help("og 메타에 들어가는 사이트 설명을 입력합니다
네이버, 카카오, 페이스북, 트위터, 인스타그램 등에 사용됩니다."); ?></p><p> <input type="text" name="og_description" value="<?php echo $mwbcfg['og_description'] ?>" id="og_description" class="frm_input" size="50"></p><p> </td></p><p> <th scope="row"><label for="og_image">og 이미지 파일명</label></th></p><p> <td></p><p> <?php echo help("og 메타에 들어가는 이미지의 파일명을 입력합니다.
네이버, 카카오, 페이스북, 트위터, 인스타그램 등에 사용됩니다."); ?></p><p> <input type="text" name="og_image" value="<?php echo $mwbcfg['og_image'] ?>" id="og_image" class="frm_input" size="50"></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><?php echo $frm_submit; ?></p><p> </p><p><section></p><p> <h2 class="h2_frm">사업장 네이버 지도 관리</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>사업장의 네이버 지도 정보를 변경할 수 있습니다.</p></p><p> <p>네이버 지도를 약도로 대신하는 경우 네이버 지도 API에 가입해야 합니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>네이버 지도 설정</caption></p><p> <colgroup></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> <col class="grid_4"></p><p> <col class="grid_8"></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row"><label for="naver_map_api_key">네이버 지도 키</label></th></p><p> <td></p><p> <?php echo help("네이버 지도 API의 키를 입력합니다.
설정값을 모르는 경우 수정하지 않습니다."); ?></p><p> <input type="text" name="naver_map_api_key" value="<?php echo $mwbcfg['naver_map_api_key'] ?>" id="naver_map_api_key" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"></th></p><p> <td></p><p> </td></p><p> </tr></p><p> <tr></p><p> <th scope="row"><label for="naver_map_x">네이버 지도 좌표 x값</label></th></p><p> <td></p><p> <?php echo help("네이버 지도상의 펜션 x 좌표.
설정값을 모르는 경우 수정하지 않습니다."); ?></p><p> <input type="text" name="naver_map_x" value="<?php echo $mwbcfg['naver_map_x'] ?>" id="naver_map_x" class="frm_input" size="30"></p><p> </td></p><p> <th scope="row"><label for="naver_map_y">네이버 지도 좌표 y값 <?php if($is_admin) { ?>(38)<?php } ?></label></th></p><p> <td></p><p> <?php echo help("네이버 지도상의 펜션 y 좌표.
설정값을 모르는 경우 수정하지 않습니다."); ?></p><p> <input type="text" name="naver_map_y" value="<?php echo $mwbcfg['naver_map_y'] ?>" id="naver_map_y" class="frm_input" size="30"></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><script></p><p>jQuery(function($){</p><p> $.datepicker.regional['ko'] = {</p><p> closeText: '닫기',</p><p> prevText: '이전달',</p><p> nextText: '다음달',</p><p> currentText: '오늘',</p><p> numberOfMonths: [1,1], //달력의 갯수 2줄 3개씩 6개 표기</p><p> monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',</p><p> '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],</p><p> monthNamesShort: ['1월','2월','3월','4월','5월','6월',</p><p> '7월','8월','9월','10월','11월','12월'],</p><p> dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],</p><p> dayNamesShort: ['일','월','화','수','목','금','토'],</p><p> dayNamesMin: ['일','월','화','수','목','금','토'],</p><p> weekHeader: 'Wk',</p><p> dateFormat: 'yy-mm-dd (D)', //날짜표기방법 D = 요일 DD = 요일 길게</p><p> firstDay: 0,</p><p> isRTL: false,</p><p> showMonthAfterYear: true,</p><p> yearSuffix: ''};</p><p> $.datepicker.setDefaults($.datepicker.regional['ko']);</p><p>});</p><p></script></p><p> </p><p><section id="anc_cf_extra"></p><p> <h2 class="h2_frm">기간 설정</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>기간을 변경할 수 있습니다</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>기간 설정</caption></p><p> <colgroup></p><p> <col class="grid_2"></p><p> <col class="grid_6"></p><p> <col class="grid_2"></p><p> <col class="grid_6"></p><p> <col class="grid_2"></p><p> <col class="grid_6"></p><p> </colgroup></p><p> <tbody></p><p> </p><p> <tr style="background:#eee;"></p><p> <th scope="row"><label style="width:100px;" for="period_s1">여름시즌 준성수기</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_s1" value="<?php echo $mwbcfg['period_s1'] ?>" id="period_s1" class="frm_input" size="30" style="width:110px"> ~ <input type="text" name="period_s2" value="<?php echo $mwbcfg['period_s2'] ?>" id="period_s2" class="frm_input" size="30" style="width:110px"></p><p> </td></p><p> <th scope="row"><label style="width:100px;" for="period_s3">여름시즌 성수기</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_s3" value="<?php echo $mwbcfg['period_s3'] ?>" id="period_s3" class="frm_input" size="30" style="width:110px"> ~ <input type="text" name="period_s4" value="<?php echo $mwbcfg['period_s4'] ?>" id="period_s4" class="frm_input" size="30" style="width:110px"></p><p> </td></p><p> <th scope="row"><label style="width:100px;" for="period_s5">여름시즌 준성수기</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_s5" value="<?php echo $mwbcfg['period_s5'] ?>" id="period_s5" class="frm_input" size="30" style="width:110px"> ~ <input type="text" name="period_s6" value="<?php echo $mwbcfg['period_s6'] ?>" id="period_s6" class="frm_input" size="30" style="width:110px"></p><p> </td></p><p> </tr></p><p> <tr style="background:#ddd;border-bottom-color:#ddd;border-top-color:#ddd;"></p><p> <th scope="row"><label style="width:100px;" for="period_w1">겨울시즌 준성수기</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_w1" value="<?php echo $mwbcfg['period_w1'] ?>" id="period_w1" class="frm_input" size="30" style="width:110px"> ~ <input type="text" name="period_w2" value="<?php echo $mwbcfg['period_w2'] ?>" id="period_w2" class="frm_input" size="30" style="width:110px"> </p><p> </td></p><p> <th scope="row"><label style="width:100px;" for="period_w3">겨울시즌 성수기</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_w3" value="<?php echo $mwbcfg['period_w3'] ?>" id="period_w3" class="frm_input" size="30" style="width:110px"> ~ <input type="text" name="period_w4" value="<?php echo $mwbcfg['period_w4'] ?>" id="period_w4" class="frm_input" size="30" style="width:110px"></p><p> </td></p><p> <th scope="row"><label style="width:100px;" for="period_w5">겨울시즌 준성수기</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_w5" value="<?php echo $mwbcfg['period_w5'] ?>" id="period_w5" class="frm_input" size="30" style="width:110px"> ~ <input type="text" name="period_w6" value="<?php echo $mwbcfg['period_w6'] ?>" id="period_w6" class="frm_input" size="30" style="width:110px"></p><p> </td></p><p> </tr></p><p> <tr style="background:#ccc;"></p><p> <th scope="row"><label for="period_e_name">지정 기간 별칭</label></th></p><p> <td></p><p> <?php echo help("지정 기간의 별칭을 입력합니다. 가급적 6글자 이내로 입력합니다."); ?></p><p> <input type="text" name="period_e_name" value="<?php echo $mwbcfg['period_e_name'] ?>" id="period_e_name" class="frm_input" size="20"></p><p> </td></p><p> <th scope="row"><label style="width:100px;" for="period_e1">지정기간 설정</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_e1" value="<?php echo $mwbcfg['period_e1'] ?>" id="period_e1" class="frm_input" size="30" style="width:110px"> ~ </p><p> <input type="text" name="period_e2" value="<?php echo $mwbcfg['period_e2'] ?>" id="period_e2" class="frm_input" size="30" style="width:110px"></p><p> </td></p><p> <th scope="row"><label style="width:100px;" for="period_e3">할인기간 설정</label></th></p><p> <td class="td_extra"></p><p> <input type="text" name="period_e3" value="<?php echo $mwbcfg['period_e3'] ?>" id="period_e3" class="frm_input" size="30" style="width:110px"> ~ </p><p> <input type="text" name="period_e4" value="<?php echo $mwbcfg['period_e4'] ?>" id="period_e4" class="frm_input" size="30" style="width:110px"></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><?php echo $frm_submit; ?></p><p> </p><p><section></p><p> <h2 class="h2_frm">예약 관련 내용</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>실시간 예약 페이지의 내용을 추가,수정할 수 있습니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>예약 관련 내용</caption></p><p> <colgroup></p><p> <col class="grid_4"></p><p> <col></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row"><label for="user_guide">이용 안내</label></th></p><p> <td></p><p> <?php echo help("이용 안내에 들어가는 내용을 작성하세요."); ?></p><p> <?php echo editor_html('user_guide', get_text($mwbcfg['user_guide'], 0)); ?></p><p> </td></p><p> <th scope="row"></th></p><p> <td></p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><section></p><p> <style></p><p> .bld {border-left:1px #c7c7c7 dashed !important; text-align:center; }</p><p> </style></p><p> <h2 class="h2_frm">환불 금액</h2></p><p> <div class="local_desc02 local_desc"></p><p> <p>실시간 예약 페이지의 환불 금액을 추가,수정할 수 있습니다.</p></p><p> </div></p><p> </p><p> <div class="tbl_frm01 tbl_wrap"></p><p> <table></p><p> <caption>환불 금액</caption></p><p> <colgroup></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> <col class="grid_2"></p><p> </colgroup></p><p> <tbody></p><p> <tr></p><p> <th scope="row">취소 날짜</th></p><p> <td class="bld"><label for="refund_0">이용 당일</label></td></p><p> <td class="bld"><label for="refund_1">이용 1일전</label></td></p><p> <td class="bld"><label for="refund_2">이용 2일전</label></td></p><p> <td class="bld"><label for="refund_3">이용 3일전</label></td></p><p> <td class="bld"><label for="refund_4">이용 4일전</label></td></p><p> <td class="bld"><label for="refund_5">이용 5일전</label></td></p><p> <td class="bld"><label for="refund_6">이용 6일전</label></td></p><p> <td class="bld"><label for="refund_7">이용 7일전</label></td></p><p> <td class="bld"><label for="refund_8">이용 8일전</label></td></p><p> <td class="bld"><label for="refund_9">이용 9일전</label></td></p><p> <td class="bld"><label for="refund_10">이용 10일전</label></td></p><p> </tr></p><p> <tr></p><p> <th scope="row">환불 금액</th></p><p> <td class="bld">환불 <input type="text" name="refund_0" value="<?php echo $mwbcfg['refund_0'] ?>" id="refund_0" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_1" value="<?php echo $mwbcfg['refund_1'] ?>" id="refund_1" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_2" value="<?php echo $mwbcfg['refund_2'] ?>" id="refund_2" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_3" value="<?php echo $mwbcfg['refund_3'] ?>" id="refund_3" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_4" value="<?php echo $mwbcfg['refund_4'] ?>" id="refund_4" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_5" value="<?php echo $mwbcfg['refund_5'] ?>" id="refund_5" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_6" value="<?php echo $mwbcfg['refund_6'] ?>" id="refund_6" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_7" value="<?php echo $mwbcfg['refund_7'] ?>" id="refund_7" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_8" value="<?php echo $mwbcfg['refund_8'] ?>" id="refund_8" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_9" value="<?php echo $mwbcfg['refund_9'] ?>" id="refund_9" class="frm_input" size="4">%</td></p><p> <td class="bld">환불 <input type="text" name="refund_10" value="<?php echo $mwbcfg['refund_10'] ?>" id="refund_10" class="frm_input" size="4">%</td></p><p> </tr></p><p> </tbody></p><p> </table></p><p> </div></p><p></section></p><p> </p><p><?php echo $frm_submit; ?></p><p> </p><p></form> </p><p> </p><p><script></p><p>function fconfigform_submit(f)</p><p>{</p><p> <?php echo get_editor_js("user_guide"); ?></p><p> f.action = "./mwb_config_update.php";</p><p> return true;</p><p>}</p><p>jQuery(function($){</p><p> $('#period_s1,#period_s2,#period_s3,#period_s4,#period_s5,#period_s6,#period_w1,#period_w2,#period_w3,#period_w4,#period_w5,#period_w6,#period_e1,#period_e2,#period_e3,#period_e4').datepicker({</p><p> showOn: 'button',</p><p> buttonImage: 'img/calendar.gif',</p><p> buttonImageOnly: true,</p><p> buttonText: "달력",</p><p> changeMonth: true,</p><p> changeYear: true,</p><p> showButtonPanel: true,</p><p> yearRange: 'c-99:c+99'</p><p> });</p><p>});</p><p></script></p><p><?php</p><p>include_once (G5_ADMIN_PATH.'/admin.tail.php');</p><p>?></p><p>
다음은 mwb_config_update.php 파일입니다.
</p><p><?php</p><p>$sub_menu = "950100";</p><p>include_once('./_common.php');</p><p> </p><p>check_demo();</p><p> </p><p>auth_check($auth[$sub_menu], 'w');</p><p> </p><p>check_admin_token();</p><p> </p><p>$sql = " update {$g5['mwb_config_table']}</p><p> set company_name = '{$_POST['company_name']}',</p><p> company_owner = '{$_POST['company_owner']}',</p><p> company_address_new = '{$_POST['company_address_new']}',</p><p> company_address_old = '{$_POST['company_address_old']}',</p><p> company_phone = '{$_POST['company_phone']}',</p><p> company_tel_1 = '{$_POST['company_tel_1']}',</p><p> company_tel_2 = '{$_POST['company_tel_2']}',</p><p> company_fax = '{$_POST['company_fax']}',</p><p> business_no = '{$_POST['business_no']}',</p><p> tongsin_no = '{$_POST['tongsin_no']}',</p><p> bank_name = '{$_POST['bank_name']}',</p><p> account_no = '{$_POST['account_no']}',</p><p> account_owner = '{$_POST['account_owner']}',</p><p> checkin_time = '{$_POST['checkin_time']}',</p><p> checkout_time = '{$_POST['checkout_time']}',</p><p> checkin_limit_time = '{$_POST['checkin_limit_time']}',</p><p> ddnayo_id = '{$_POST['ddnayo_id']}',</p><p> facebook_idtwitter_id = '{$_POST['facebook_idtwitter_id']}',</p><p> twitter_id = '{$_POST['twitter_id']}',</p><p> og_description = '{$_POST['og_description']}',</p><p> og_image = '{$_POST['og_image']}',</p><p> naver_map_api_key = '{$_POST['naver_map_api_key']}',</p><p> naver_map_x = '{$_POST['naver_map_x']}',</p><p> naver_map_y = '{$_POST['naver_map_y']}',</p><p> period_s1 = '{$_POST['period_s1']}',</p><p> period_s2 = '{$_POST['period_s2']}',</p><p> period_s3 = '{$_POST['period_s3']}',</p><p> period_s4 = '{$_POST['period_s4']}',</p><p> period_s5 = '{$_POST['period_s5']}',</p><p> period_s6 = '{$_POST['period_s6']}',</p><p> period_w1 = '{$_POST['period_w1']}',</p><p> period_w2 = '{$_POST['period_w2']}',</p><p> period_w3 = '{$_POST['period_w3']}',</p><p> period_w4 = '{$_POST['period_w4']}',</p><p> period_w5 = '{$_POST['period_w5']}',</p><p> period_w6 = '{$_POST['period_w6']}',</p><p> period_e1 = '{$_POST['period_e1']}',</p><p> period_e2 = '{$_POST['period_e2']}',</p><p> period_e3 = '{$_POST['period_e3']}',</p><p> period_e4 = '{$_POST['period_e4']}',</p><p> period_e_name = '{$_POST['period_e_name']}',</p><p> user_guide = '{$_POST['user_guide']}',</p><p> refund_0 = '{$_POST['refund_0']}',</p><p> refund_1 = '{$_POST['refund_1']}',</p><p> refund_2 = '{$_POST['refund_2']}',</p><p> refund_3 = '{$_POST['refund_3']}',</p><p> refund_4 = '{$_POST['refund_4']}',</p><p> refund_5 = '{$_POST['refund_5']}',</p><p> refund_6 = '{$_POST['refund_6']}',</p><p> refund_7 = '{$_POST['refund_7']}',</p><p> refund_8 = '{$_POST['refund_8']}',</p><p> refund_9 = '{$_POST['refund_9']}',</p><p> refund_10 = '{$_POST['refund_10']}'</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>";</p><p>sql_query($sql);</p><p> </p><p>//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");</p><p> </p><p>goto_url('./mwb_config.php', false);</p><p>?></p><p>
extend 폴더에 mwb_extend.php 파일을 만들어 두었습니다.
</p><p><?php</p><p>if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가</p><p> </p><p>// mwb 상수 선언</p><p> </p><p>define('MWB_DIR','mwb-gb');</p><p>define('MWB_PATH',G5_PATH.'/'.MWB_DIR);</p><p>define('MWB_URL',G5_URL.'/'.MWB_DIR);</p><p> </p><p>define('MWB_ADMIN_DIR','mwb_admin');</p><p>define('MWB_ADMIN_PATH',G5_ADMIN_PATH.'/'.MWB_ADMIN_DIR);</p><p>define('MWB_ADMIN_URL',G5_ADMIN_URL.'/'.MWB_ADMIN_DIR);</p><p> </p><p>//mwb 테이블명</p><p>$g5['mwb_prefix'] = 'mwb_';</p><p>$g5['mwb_config_table'] = $g5['mwb_prefix'] . 'config';</p><p> </p><p>$mwbcfg = sql_fetch(" select * from {$g5['mwb_config_table']} ");</p><p> </p><p>?></p><p>
요렇게 해놓으니 처음 관리자페이지에서
mwb_config.php를 실행하면
mwb_config 테이블을 만들어 해당 구조까지는 생성이 됩니다.
그다음 폼값에 블라블라~ 적어놓구 submit 버튼을 누르면 sql값이 업데이트가 되질 않네요..
고수님들의 도움 부탁드립니다.
댓글을 작성하려면 로그인이 필요합니다.
답변 4개
채택된 답변
+20 포인트
8년 전
두번째 실제 업데이트 파일 $sql 변수를 echo로 출력한다음 phpmysqladmin에서 실행해보세요.
영향이 있는 업데이트 행이 존재하는지 ...^^
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인