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) 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');
- 1:1문의
+ - FAQ
- 접속자
- 새글
diff --git a/mobile/skin/faq/basic/list.skin.php b/mobile/skin/faq/basic/list.skin.php
new file mode 100644
index 000000000..e2dba126a
--- /dev/null
+++ b/mobile/skin/faq/basic/list.skin.php
@@ -0,0 +1,118 @@
+', 0);
+?>
+
+
+'.stripslashes($fm['fm_mobile_head_html']).'';
+?>
+
+
+
+
+
+
+
+
+
+
+ 목록
+
+ $v){
+ if(empty($v))
+ continue;
+ ?>
+ -
+
+
+
+
+
+
+
+
+
+ 검색된 게시물이 없습니다.';
+ } else {
+ echo ' 등록된 FAQ가 없습니다.';
+ if($is_admin)
+ echo ' FAQ를 새로 등록하시려면 FAQ관리 메뉴를 이용하십시오.';
+ echo ' ';
+ }
+ }
+ ?>
+
+
+
+
+'.stripslashes($fm['fm_tail_html']).'';
+?>
+
+
+
+
\ No newline at end of file
diff --git a/mobile/skin/faq/basic/style.css b/mobile/skin/faq/basic/style.css
new file mode 100644
index 000000000..263f3b57d
--- /dev/null
+++ b/mobile/skin/faq/basic/style.css
@@ -0,0 +1,10 @@
+@charset "utf-8";
+
+#bo_cate h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
+#bo_cate ul {margin-bottom:10px;padding-left:1px;width:728px;zoom:1}
+#bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""}
+#bo_cate li {float:left;margin-bottom:-1px}
+#bo_cate a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:90px;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer}
+#bo_cate a:focus, #bo_cate a:hover, #bo_cate a:active {text-decoration:none}
+#bo_cate #bo_cate_on {z-index:2;border:1px solid #565e60;background:#fff;color:#565e60;font-weight:bold}
+
diff --git a/skin/faq/basic/list.skin.php b/skin/faq/basic/list.skin.php
new file mode 100644
index 000000000..e57abe095
--- /dev/null
+++ b/skin/faq/basic/list.skin.php
@@ -0,0 +1,132 @@
+', 0);
+
+if ($admin_href)
+ echo '';
+?>
+
+
+ ';
+
+// 상단 HTML
+echo ''.stripslashes($fm['fm_head_html']).' ';
+?>
+
+
+
+
+
+
+
+
+
+
+ 목록
+
+ $v){
+ if(empty($v))
+ continue;
+ ?>
+ -
+
+
+
+
+
+
+
+
+
+ 검색된 게시물이 없습니다.';
+ } else {
+ echo ' 등록된 FAQ가 없습니다.';
+ if($is_admin)
+ echo ' FAQ를 새로 등록하시려면 FAQ관리 메뉴를 이용하십시오.';
+ echo ' ';
+ }
+ }
+ ?>
+
+
+
+
+'.stripslashes($fm['fm_tail_html']).'';
+
+if ($timg_src)
+ echo '';
+?>
+
+
+FAQ 수정';
+?>
+
+
+
\ No newline at end of file
diff --git a/skin/faq/basic/style.css b/skin/faq/basic/style.css
new file mode 100644
index 000000000..ae0c51445
--- /dev/null
+++ b/skin/faq/basic/style.css
@@ -0,0 +1,10 @@
+@charset "utf-8";
+
+#bo_cate h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
+#bo_cate ul {margin-bottom:10px;padding-left:1px;width:728px;zoom:1}
+#bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""}
+#bo_cate li {float:left;margin-bottom:-1px}
+#bo_cate a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:90px;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer}
+#bo_cate a:focus, #bo_cate a:hover, #bo_cate a:active {text-decoration:none}
+#bo_cate #bo_cate_on {z-index:2;border:1px solid #565e60;background:#fff;color:#565e60;font-weight:bold}
+
|