From 2e8c7a9acd13216494fab8e37179ec2c8cc7a726 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 11:52:12 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=EA=B7=B8=EB=A3=B9=20=EA=B2=8C=EC=8B=9C?= =?UTF-8?q?=ED=8C=90=20=EB=A9=94=EB=89=B4=EB=B3=B4=EC=9D=B4=EA=B8=B0=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/board_copy_update.php | 1 - adm/board_form.php | 19 ------------------- adm/board_form_update.php | 3 --- adm/board_list.php | 7 +------ adm/board_list_update.php | 1 - adm/boardgroup_form.php | 17 +++-------------- adm/boardgroup_form_update.php | 3 +-- adm/boardgroup_list.php | 7 +------ adm/boardgroup_list_update.php | 3 +-- install/gnuboard5.sql | 19 +++++++++++++++++-- install/install_db.php | 1 + 11 files changed, 25 insertions(+), 56 deletions(-) diff --git a/adm/board_copy_update.php b/adm/board_copy_update.php index 5636b1cae..b17a19b91 100644 --- a/adm/board_copy_update.php +++ b/adm/board_copy_update.php @@ -88,7 +88,6 @@ $sql = " insert into {$g5['board_table']} bo_upload_size = '{$board[bo_upload_size]}', bo_reply_order = '{$board[bo_reply_order]}', bo_use_search = '{$board[bo_use_search]}', - bo_show_menu = '{$board[bo_show_menu]}', bo_order = '{$board[bo_order]}', bo_notice = '{$board['bo_notice']}', bo_upload_count = '{$board[bo_upload_count]}', diff --git a/adm/board_form.php b/adm/board_form.php index 6e9d2a54c..ecbea30f1 100644 --- a/adm/board_form.php +++ b/adm/board_form.php @@ -21,10 +21,6 @@ if (!isset($board['bo_device'])) { sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false); } -if (!isset($board['bo_show_menu'])) { - sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_search`, ADD `bo_order` INT NOT NULL DEFAULT '0' AFTER `bo_show_menu` ", false); -} - if (!isset($board['bo_mobile_skin'])) { sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false); } @@ -120,7 +116,6 @@ if ($w == '') { $board['bo_use_secret'] = 0; $board['bo_include_head'] = '_head.php'; $board['bo_include_tail'] = '_tail.php'; - $board['bo_show_menu'] = true; } else if ($w == 'u') { @@ -769,20 +764,6 @@ $frm_submit .= ''; - - - - - > - 사용 - - - - - - - - diff --git a/adm/board_form_update.php b/adm/board_form_update.php index 99ff23265..e7c374d0e 100644 --- a/adm/board_form_update.php +++ b/adm/board_form_update.php @@ -107,7 +107,6 @@ $sql_common = " gr_id = '{$_POST['gr_id']}', bo_reply_order = '{$_POST['bo_reply_order']}', bo_use_search = '{$_POST['bo_use_search']}', bo_order = '{$_POST['bo_order']}', - bo_show_menu = '{$_POST['bo_show_menu']}', bo_write_min = '{$_POST['bo_write_min']}', bo_write_max = '{$_POST['bo_write_max']}', bo_comment_min = '{$_POST['bo_comment_min']}', @@ -290,7 +289,6 @@ if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mob if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' "; if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' "; if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' "; -if (is_checked('chk_grp_show_menu')) $grp_fields .= " , bo_show_menu = '{$bo_show_menu}' "; for ($i=1; $i<=10; $i++) { if (is_checked('chk_grp_'.$i)) { $grp_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' "; @@ -374,7 +372,6 @@ if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mob if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' "; if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' "; if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' "; -if (is_checked('chk_all_show_menu')) $all_fields .= " , bo_show_menu = '{$bo_show_menu}' "; for ($i=1; $i<=10; $i++) { if (is_checked('chk_all_'.$i)) { $all_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' "; diff --git a/adm/board_list.php b/adm/board_list.php index 96de20f05..7a9639926 100644 --- a/adm/board_list.php +++ b/adm/board_list.php @@ -51,7 +51,7 @@ $listall = '전체목록
@@ -107,7 +107,6 @@ $colspan = 16; 다운P포인트 SNS
사용
검색
사용 - 메뉴
보임 출력
순서 접속기기 관리 @@ -174,10 +173,6 @@ $colspan = 16; > - - - > - diff --git a/adm/board_list_update.php b/adm/board_list_update.php index 0cf509bd7..9d8850660 100644 --- a/adm/board_list_update.php +++ b/adm/board_list_update.php @@ -39,7 +39,6 @@ if ($_POST['act_button'] == "선택수정") { bo_download_point = '{$_POST['bo_download_point'][$k]}', bo_use_search = '{$_POST['bo_use_search'][$k]}', bo_use_sns = '{$_POST['bo_use_sns'][$k]}', - bo_show_menu = '{$_POST['bo_show_menu'][$k]}', bo_order = '{$_POST['bo_order'][$k]}' where bo_table = '{$_POST['board_table'][$k]}' "; sql_query($sql); diff --git a/adm/boardgroup_form.php b/adm/boardgroup_form.php index 57b71054f..755c26c3c 100644 --- a/adm/boardgroup_form.php +++ b/adm/boardgroup_form.php @@ -26,9 +26,6 @@ if (!isset($group['gr_device'])) { sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false); } -if (!isset($group['gr_show_menu'])) { - sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `gr_use_access`, ADD `gr_order` INT NOT NULL DEFAULT '0' AFTER `gr_show_menu` ", false); -} $g5['title'] = $html_title; include_once('./admin.head.php'); @@ -52,11 +49,11 @@ include_once('./admin.head.php'); - class=" alnum_ frm_input" maxlength="10"> - class=" alnum_ frm_input" maxlength="10"> + 게시판그룹 바로가기'; ?> @@ -112,14 +109,6 @@ include_once('./admin.head.php'); ?> - - - - - > - 사용 - - 여분필드 diff --git a/adm/boardgroup_form_update.php b/adm/boardgroup_form_update.php index 5f55247c5..75af99927 100644 --- a/adm/boardgroup_form_update.php +++ b/adm/boardgroup_form_update.php @@ -17,7 +17,6 @@ if (!$gr_subject) alert('그룹 제목을 입력하세요.'); $sql_common = " gr_subject = '{$_POST['gr_subject']}', gr_device = '{$_POST['gr_device']}', gr_admin = '{$_POST['gr_admin']}', - gr_show_menu = '{$_POST['gr_show_menu']}', gr_1_subj = '{$_POST['gr_1_subj']}', gr_2_subj = '{$_POST['gr_2_subj']}', gr_3_subj = '{$_POST['gr_3_subj']}', @@ -38,7 +37,7 @@ $sql_common = " gr_subject = '{$_POST['gr_subject']}', gr_8 = '{$_POST['gr_8']}', gr_9 = '{$_POST['gr_9']}', gr_10 = '{$_POST['gr_10']}' "; -if (isset($_POST['gr_use_access'])) +if (isset($_POST['gr_use_access'])) $sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' "; else $sql_common .= ", gr_use_access = '' "; diff --git a/adm/boardgroup_list.php b/adm/boardgroup_list.php index ff14489dd..c3280883d 100644 --- a/adm/boardgroup_list.php +++ b/adm/boardgroup_list.php @@ -55,7 +55,7 @@ $listall = '처음'; $g5['title'] = '게시판그룹설정'; include_once('./admin.head.php'); -$colspan = 11; +$colspan = 10; ?>
@@ -105,7 +105,6 @@ $colspan = 11; 게시판 접근
사용 접근
회원수 - 메뉴
보임 출력
순서 접속기기 관리 @@ -153,10 +152,6 @@ $colspan = 11; value="1" id="gr_use_access_"> - - - value="1" id="gr_show_menu_"> - diff --git a/adm/boardgroup_list_update.php b/adm/boardgroup_list_update.php index 32c1e5aea..e7f9816eb 100644 --- a/adm/boardgroup_list_update.php +++ b/adm/boardgroup_list_update.php @@ -17,14 +17,13 @@ for ($i=0; $i<$count; $i++) { $k = $_POST['chk'][$i]; $gr_id = $_POST['group_id'][$k]; - + if($_POST['act_button'] == '선택수정') { $sql = " update {$g5['group_table']} set gr_subject = '{$_POST['gr_subject'][$k]}', gr_device = '{$_POST['gr_device'][$k]}', gr_admin = '{$_POST['gr_admin'][$k]}', gr_use_access = '{$_POST['gr_use_access'][$k]}', - gr_show_menu = '{$_POST['gr_show_menu'][$k]}', gr_order = '{$_POST['gr_order'][$k]}' where gr_id = '{$gr_id}' "; if ($is_admin != 'super') diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql index 4d80e68ad..19f858b38 100644 --- a/install/gnuboard5.sql +++ b/install/gnuboard5.sql @@ -84,7 +84,6 @@ CREATE TABLE IF NOT EXISTS `g5_board` ( `bo_upload_size` int(11) NOT NULL DEFAULT '0', `bo_reply_order` tinyint(4) NOT NULL DEFAULT '0', `bo_use_search` tinyint(4) NOT NULL DEFAULT '0', - `bo_show_menu` tinyint(4) NOT NULL DEFAULT '0', `bo_order` int(11) NOT NULL DEFAULT '0', `bo_count_write` int(11) NOT NULL DEFAULT '0', `bo_count_comment` int(11) NOT NULL DEFAULT '0', @@ -352,7 +351,6 @@ CREATE TABLE IF NOT EXISTS `g5_group` ( `gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both', `gr_admin` varchar(255) NOT NULL default '', `gr_use_access` tinyint(4) NOT NULL default '0', - `gr_show_menu` tinyint(4) NOT NULL default '0', `gr_order` int(11) NOT NULL default '0', `gr_1_subj` varchar(255) NOT NULL default '', `gr_2_subj` varchar(255) NOT NULL default '', @@ -864,3 +862,20 @@ CREATE TABLE IF NOT EXISTS `g5_new_win` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- + +-- +-- Table structure for table `g5_menu` +-- + +DROP TABLE IF EXISTS `g5_menu`; +CREATE TABLE IF NOT EXISTS `g5_menu` ( + `me_id` int(11) NOT NULL AUTO_INCREMENT, + `me_code` varchar(255) NOT NULL DEFAULT '', + `me_name` varchar(255) NOT NULL DEFAULT '', + `me_link` varchar(255) NOT NULL DEFAULT '', + `me_target` varchar(255) NOT NULL DEFAULT '', + `me_order` int(11) NOT NULL DEFAULT '0', + `me_use` tinyint(4) NOT NULL DEFAULT '0', + `me_mobile_use` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`me_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/install/install_db.php b/install/install_db.php index 7032bb7b1..19aab665d 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -122,6 +122,7 @@ $sql = " insert into `{$table_prefix}config` cf_mobile_search_skin = 'basic', cf_mobile_connect_skin = 'basic', cf_mobile_member_skin = 'basic', + cf_editor = 'ckeditor4', cf_captcha_mp3 = 'basic', cf_register_level = '2', cf_register_point = '1000', From 08fe7ee42abbcae5e19934cbc107680233462bf5 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 13:32:10 +0900 Subject: [PATCH 2/7] =?UTF-8?q?number=5Fformat=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=B6=80=ED=98=B8=20=EC=B2=98=EB=A6=AC=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/common.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/common.js b/js/common.js index 5c53df501..c5df66328 100644 --- a/js/common.js +++ b/js/common.js @@ -70,6 +70,11 @@ function number_format(data) var comma = ','; var i; + var sign = data.match(/^[\+\-]/); + if(sign.length) { + data = data.replace(/^[\+\-]/, ""); + } + len = data.length; mod = (len % cutlen); k = cutlen - mod; @@ -88,7 +93,7 @@ function number_format(data) } } - return number; + return sign[0]+number; } // 새 창 From bf0eb143a6ccb4a5fe17147b90e7ce9380ea87c1 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 14:01:59 +0900 Subject: [PATCH 3/7] =?UTF-8?q?number=5Fformat=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=B6=80=ED=98=B8=20=EC=B2=98=EB=A6=AC=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/common.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/common.js b/js/common.js index c5df66328..5848854a0 100644 --- a/js/common.js +++ b/js/common.js @@ -71,7 +71,7 @@ function number_format(data) var i; var sign = data.match(/^[\+\-]/); - if(sign.length) { + if(sign) { data = data.replace(/^[\+\-]/, ""); } @@ -93,7 +93,10 @@ function number_format(data) } } - return sign[0]+number; + if(sign != null) + number = sign+number; + + return number; } // 새 창 From 22519cd731a87f6a055645212c1369973f440ba1 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 14:29:51 +0900 Subject: [PATCH 4/7] =?UTF-8?q?okname=20=EB=B3=B4=EC=95=88=EA=B0=95?= =?UTF-8?q?=ED=99=94=20=ED=95=84=ED=84=B0=EB=A7=81=20=EC=98=B5=EC=85=98=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/okname/hpcert2.php | 4 ++++ plugin/okname/ipin2.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/plugin/okname/hpcert2.php b/plugin/okname/hpcert2.php index 11d3322c5..3f5ed6d72 100644 --- a/plugin/okname/hpcert2.php +++ b/plugin/okname/hpcert2.php @@ -26,11 +26,15 @@ if($resultCd != 'B000') { * 모듈 호출 ; 생년월일 본인 확인서비스 결과 데이터를 복호화한다. **************************************************************************/ $encInfo = $_POST['encInfo']; +if(preg_match('~[^0-9a-zA-Z+/=]~', $encInfo, $match)) {echo "입력 값 확인이 필요합니다"; exit;} //KCB서버 공개키 $WEBPUBKEY = trim($_POST['WEBPUBKEY']); +if(preg_match('~[^0-9a-zA-Z+/=]~', $WEBPUBKEY, $match)) {echo "입력 값 확인이 필요합니다"; exit;} + //KCB서버 서명값 $WEBSIGNATURE = trim($_POST['WEBSIGNATURE']); +if(preg_match('~[^0-9a-zA-Z+/=]~', $WEBSIGNATURE, $match)) {echo "입력 값 확인이 필요합니다"; exit;} // ######################################################################## // # 암호화키 파일 설정 (절대경로) - 파일은 주어진 파일명으로 자동 생성 됨 diff --git a/plugin/okname/ipin2.php b/plugin/okname/ipin2.php index ca5638177..43dc61e02 100644 --- a/plugin/okname/ipin2.php +++ b/plugin/okname/ipin2.php @@ -4,11 +4,15 @@ include_once('./ipin.config.php'); //아이핀팝업에서 조회한 PERSONALINFO이다. @$encPsnlInfo = $_POST["encPsnlInfo"]; +if(preg_match('~[^0-9a-zA-Z+/=]~', $encPsnlInfo, $match)) {echo "입력 값 확인이 필요합니다"; exit;} //KCB서버 공개키 @$WEBPUBKEY = trim($_POST["WEBPUBKEY"]); +if(preg_match('~[^0-9a-zA-Z+/=]~', $WEBPUBKEY, $match)) {echo "입력 값 확인이 필요합니다"; exit;} + //KCB서버 서명값 @$WEBSIGNATURE = trim($_POST["WEBSIGNATURE"]); +if(preg_match('~[^0-9a-zA-Z+/=]~', $WEBSIGNATURE, $match)) {echo "입력 값 확인이 필요합니다"; exit;} //아이핀 서버와 통신을 위한 키파일 생성 // 파라미터 정의 From 791457e0feb5adc5b75422fc10214f28137343b1 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 14:34:52 +0900 Subject: [PATCH 5/7] =?UTF-8?q?=EB=A9=94=EB=89=B4=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install_db.php | 1 + 1 file changed, 1 insertion(+) diff --git a/install/install_db.php b/install/install_db.php index 19aab665d..fb491c127 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -255,6 +255,7 @@ fwrite($f, "\$g5['content_table'] = G5_TABLE_PREFIX.'content'; // 내용(컨텐 fwrite($f, "\$g5['faq_table'] = G5_TABLE_PREFIX.'faq'; // 자주하시는 질문 테이블\n"); fwrite($f, "\$g5['faq_master_table'] = G5_TABLE_PREFIX.'faq_master'; // 자주하시는 질문 마스터 테이블\n"); fwrite($f, "\$g5['new_win_table'] = G5_TABLE_PREFIX.'new_win'; // 새창 테이블\n"); +fwrite($f, "\$g5['menu_table'] = G5_TABLE_PREFIX.'menu'; // 메뉴관리 테이블\n"); fwrite($f, "?>"); fclose($f); From 2fbd3e66fae1c819a7b0b119d39337e080fbc6b0 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 15:31:39 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=EB=B3=80=ED=99=98=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EB=9E=A8=EC=97=90=EC=84=9C=EB=8A=94=20gnb=20=EB=A9=94?= =?UTF-8?q?=EB=89=B4=20=ED=91=9C=EC=8B=9C=ED=95=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g4_import.php | 20 +------------------- g4_import_run.php | 20 +------------------- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/g4_import.php b/g4_import.php index a8d9b32c3..24554f248 100644 --- a/g4_import.php +++ b/g4_import.php @@ -100,25 +100,7 @@ if($is_admin != 'super')
diff --git a/g4_import_run.php b/g4_import_run.php index 02f3ab6b7..8392e0d6b 100644 --- a/g4_import_run.php +++ b/g4_import_run.php @@ -141,25 +141,7 @@ document.onkeydown = noRefresh ;
From 3c3bfc2b8fc0de1c450bdc119bf6b30aa72a45d0 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 17:27:54 +0900 Subject: [PATCH 7/7] =?UTF-8?q?faq=20=EB=B6=84=EB=A5=98=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 35 +++++++ adm/config_form_update.php | 2 + adm/faqmasterform.php | 28 +++++ adm/faqmasterformupdate.php | 5 +- adm/faqmasterlist.php | 4 +- bbs/faq.php | 156 +++++++++++++++------------- css/default.css | 7 ++ install/gnuboard5.sql | 2 + js/viewimageresize.js | 43 ++++++++ mobile/head.php | 1 + mobile/skin/faq/basic/list.skin.php | 118 +++++++++++++++++++++ mobile/skin/faq/basic/style.css | 10 ++ skin/faq/basic/list.skin.php | 132 +++++++++++++++++++++++ skin/faq/basic/style.css | 10 ++ 14 files changed, 477 insertions(+), 76 deletions(-) create mode 100644 mobile/skin/faq/basic/list.skin.php create mode 100644 mobile/skin/faq/basic/style.css create mode 100644 skin/faq/basic/list.skin.php create mode 100644 skin/faq/basic/style.css diff --git a/adm/config_form.php b/adm/config_form.php index 3c40bf393..b53870be1 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -134,6 +134,15 @@ if(!isset($config['cf_sms_use'])) { ADD `cf_icode_server_port` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_server_ip` ", true); } +if(!isset($config['cf_faq_skin'])) { + sql_query(" ALTER TABLE `{$g5['config_table']}` + ADD `cf_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_connect_skin`, + ADD `cf_mobile_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_mobile_connect_skin` ", true); +} + +if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic"; +if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic"; + $g5['title'] = '환경설정'; include_once ('./admin.head.php'); @@ -360,6 +369,32 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) { + + + + + + + + + + diff --git a/adm/config_form_update.php b/adm/config_form_update.php index 0a2682508..75dbbeb58 100644 --- a/adm/config_form_update.php +++ b/adm/config_form_update.php @@ -39,6 +39,7 @@ $sql = " update {$g5['config_table']} cf_new_rows = '{$_POST['cf_new_rows']}', cf_search_skin = '{$_POST['cf_search_skin']}', cf_connect_skin = '{$_POST['cf_connect_skin']}', + cf_faq_skin = '{$_POST['cf_faq_skin']}', cf_read_point = '{$_POST['cf_read_point']}', cf_write_point = '{$_POST['cf_write_point']}', cf_comment_point = '{$_POST['cf_comment_point']}', @@ -107,6 +108,7 @@ $sql = " update {$g5['config_table']} cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}', cf_mobile_search_skin = '{$_POST['cf_mobile_search_skin']}', cf_mobile_connect_skin = '{$_POST['cf_mobile_connect_skin']}', + cf_mobile_faq_skin = '{$_POST['cf_mobile_faq_skin']}', cf_mobile_member_skin = '{$_POST['cf_mobile_member_skin']}', cf_captcha_mp3 = '{$_POST['cf_captcha_mp3']}', cf_editor = '{$_POST['cf_editor']}', diff --git a/adm/faqmasterform.php b/adm/faqmasterform.php index 0a154e58f..54a5f67ad 100644 --- a/adm/faqmasterform.php +++ b/adm/faqmasterform.php @@ -22,6 +22,13 @@ else $html_title .= ' 입력'; } +// 모바일 상하단 내용 필드추가 +if(!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['faq_master_table']}` + ADD `fm_mobile_head_html` text NOT NULL AFTER `fm_tail_html`, + ADD `fm_mobile_tail_html` text NOT NULL AFTER `fm_mobile_head_html` ", true); +} + include_once (G5_ADMIN_PATH.'/admin.head.php'); ?> @@ -37,6 +44,13 @@ include_once (G5_ADMIN_PATH.'/admin.head.php'); + + + + + + + @@ -107,6 +121,18 @@ include_once (G5_ADMIN_PATH.'/admin.head.php'); + + 모바일상단 내용 + + + + + + 모바일하단 내용 + + + + @@ -123,6 +149,8 @@ function frmfaqmasterform_check(f) { + + } // document.frmfaqmasterform.fm_subject.focus(); diff --git a/adm/faqmasterformupdate.php b/adm/faqmasterformupdate.php index fa6d44a03..f6987d795 100644 --- a/adm/faqmasterformupdate.php +++ b/adm/faqmasterformupdate.php @@ -18,7 +18,10 @@ if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t"); $sql_common = " set fm_subject = '$fm_subject', fm_head_html = '$fm_head_html', - fm_tail_html = '$fm_tail_html' "; + fm_tail_html = '$fm_tail_html', + fm_mobile_head_html = '$fm_mobile_head_html', + fm_mobile_tail_html = '$fm_mobile_tail_html', + fm_order = '$fm_order' "; if ($w == "") { diff --git a/adm/faqmasterlist.php b/adm/faqmasterlist.php index 494cc7217..b2425d4b9 100644 --- a/adm/faqmasterlist.php +++ b/adm/faqmasterlist.php @@ -59,7 +59,7 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산 if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 -$sql = "select * $sql_common order by fm_id desc limit $from_record, {$config['cf_page_rows']} "; +$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} "; $result = sql_query($sql); ?> @@ -88,6 +88,7 @@ $result = sql_query($sql); ID 제목 FAQ수 + 순서 관리 @@ -102,6 +103,7 @@ $result = sql_query($sql); + 보기 수정 diff --git a/bbs/faq.php b/bbs/faq.php index 48c4a0da9..35906477d 100644 --- a/bbs/faq.php +++ b/bbs/faq.php @@ -1,96 +1,104 @@ 관리자 모드에서 게시판관리->FAQ관리를 먼저 확인해 주세요.'); } // FAQ MASTER -$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' "; -$fm = sql_fetch($sql); +$faq_master_list = array(); +$sql = " select * from {$g5['faq_master_table']} order by fm_order,fm_id "; +$result = sql_query($sql); +while ($row=sql_fetch_array($result)) +{ + $key = $row['fm_id']; + if (!$fm_id) $fm_id = $key; + $faq_master_list[$key] = $row; +} + +if ($fm_id){ + $qstr .= '&fm_id=' . $fm_id; // 마스터faq key_id +} + +$fm = $faq_master_list[$fm_id]; if (!$fm['fm_id']) alert('등록된 내용이 없습니다.'); $g5['title'] = $fm['fm_subject']; + +if(G5_IS_MOBILE){ + $faq_skin = $config['cf_mobile_faq_skin']; +} else { + $faq_skin = $config['cf_faq_skin']; +} + +if(!$faq_skin) $faq_skin = 'basic'; +$faq_skin_path = (G5_IS_MOBILE ? G5_MOBILE_PATH : G5_PATH).'/'.G5_SKIN_DIR.'/faq/'.$faq_skin; +$faq_skin_url = (G5_IS_MOBILE ? G5_MOBILE_URL : G5_URL).'/'.G5_SKIN_DIR.'/faq/'.$faq_skin; +$skin_file = $faq_skin_path.'/list.skin.php'; + include_once('./_head.php'); -?> -FAQ 수정'; -?> +if(is_file($skin_file)) { + $admin_href = ''; + $himg_src = ''; + $timg_src = ''; + if($is_admin) + $admin_href = G5_ADMIN_URL.'/faqmasterform.php?w=u&fm_id='.$fm_id; - -'; + if(!G5_IS_MOBILE) { + $himg = G5_DATA_PATH.'/faq/'.$fm_id.'_h'; + if (is_file($himg)){ + $himg_src = G5_DATA_URL.'/faq/'.$fm_id.'_h'; + } -// 상단 HTML -echo '
'.stripslashes($fm['fm_head_html']).'
'; -?> + $timg = G5_DATA_PATH.'/faq/'.$fm_id.'_t'; + if (is_file($timg)){ + $timg_src = G5_DATA_URL.'/faq/'.$fm_id.'_t'; + } + } -
- 0 or INSTR(fa_content, '$stx') > 0 ) "; + $category_stx = '&stx='.$stx; + } + + if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) + + $page_rows = G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages']; + + $sql = " select count(*) as cnt + from {$g5['faq_table']} + where fm_id = '$fm_id' + $sql_search "; + $total = sql_fetch($sql); + $total_count = $total['cnt']; + + $total_page = ceil($total_count / $page_rows); // 전체 페이지 계산 + $from_record = ($page - 1) * $page_rows; // 시작 열을 구함 + + $sql = " select * + from {$g5['faq_table']} + where fm_id = '$fm_id' + $sql_search + order by fa_order , fa_id + limit $from_record, $page_rows "; $result = sql_query($sql); - for ($i=1; $row=sql_fetch_array($result); $i++) - { - if ($i == 1) - { - ?> -
-

목차

-
    - -
  1. - 1) echo '
'; - ?> - - -
-

내용

-
    - -
  1. -

    -
    - -
    - -
  2. - 1) echo '
'; - - if ($i == 1) echo '

등록된 FAQ가 없습니다.
FAQ를 새로 등록하시려면 FAQ관리 메뉴를 이용하십시오.

'; - ?> -
- -'.stripslashes($fm['fm_tail_html']).''; - -$timg = G5_DATA_PATH.'/faq/'.$fm_id.'_t'; -if (file_exists($timg)) - echo '
'; -?> - - -FAQ 수정'; + while ($row=sql_fetch_array($result)){ + $faq_list[] = $row; + } + include_once($skin_file); +} else { + echo '

'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.

'; +} include_once('./_tail.php'); ?> diff --git a/css/default.css b/css/default.css index 92ee15405..41a81b87e 100644 --- a/css/default.css +++ b/css/default.css @@ -36,6 +36,13 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline} #hd_wrapper {position:relative;margin:0 auto;padding:26px 0;width:970px;zoom:1} #hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""} +#hd_pop {z-index:1000;position:relative;margin:0 auto;width:1000px;height:0} +#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} +.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff} +.hd_pops_con {margin:0 0 30px} +.hd_pops_footer {position:absolute;bottom:0;left:0;padding:10px 0;width:100%;background:#000;color:#fff;text-align:right} +.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff} + #logo {float:left;padding:5px 0 0} /* 전체 검색 */ diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql index 19f858b38..7b9012ea5 100644 --- a/install/gnuboard5.sql +++ b/install/gnuboard5.sql @@ -834,6 +834,8 @@ CREATE TABLE IF NOT EXISTS `g5_faq_master` ( `fm_subject` varchar(255) NOT NULL DEFAULT '', `fm_head_html` text NOT NULL, `fm_tail_html` text NOT NULL, + `fm_mobile_head_html` text NOT NULL, + `fm_mobile_tail_html` text NOT NULL, `fm_order` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`fm_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/js/viewimageresize.js b/js/viewimageresize.js index 4336e11c5..7b9a1eaf7 100644 --- a/js/viewimageresize.js +++ b/js/viewimageresize.js @@ -47,4 +47,47 @@ image_resize(); }); } + + $.fn.viewimageresize2 = function(selector) + { + var cfg = { + selector: "img" + }; + + if(typeof selector == "object") { + cfg = $.extend(cfg, selector); + } else { + if(selector) { + cfg = $.extend({ selector: selector }); + } + } + + var $img = this.find(cfg.selector); + var $this = this; + + function image_resize() + { + var width = $this.width(); + + $img.each(function() { + $(this).removeAttr("width") + .removeAttr("height") + .css("width","") + .css("height", ""); + + if($(this).data("width") == undefined) + $(this).data("width", $(this).width()); + + if($(this).data("width") > width) { + $(this).css("width", "100%"); + } + }); + } + + $(window).on("resize", function() { + image_resize(); + }); + + image_resize(); + } }(jQuery)); \ No newline at end of file diff --git a/mobile/head.php b/mobile/head.php index d131d92dc..588007ce8 100644 --- a/mobile/head.php +++ b/mobile/head.php @@ -163,6 +163,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');