diff --git a/adm/contentform.php b/adm/contentform.php index 8f00030ff..a20bf373e 100644 --- a/adm/contentform.php +++ b/adm/contentform.php @@ -19,6 +19,20 @@ if(!sql_query(" select co_tag_filter_use from {$g5['content_table']} limit 1 ", sql_query(" update {$g5['content_table']} set co_tag_filter_use = '1' "); } +// 모바일 내용 추가 +if(!sql_query(" select co_mobile_content from {$g5['content_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['content_table']}` + ADD `co_mobile_content` longtext NOT NULL AFTER `co_content` ", true); +} + +// 스킨 설정 추가 +if(!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['content_table']}` + ADD `co_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_mobile_content`, + ADD `co_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_skin` ", true); + sql_query(" update {$g5['content_table']} set co_skin = 'basic', co_mobile_skin = 'basic' "); +} + $html_title = "내용"; $g5['title'] = $html_title.' 관리'; @@ -36,6 +50,8 @@ else { $html_title .= ' 입력'; $co['co_html'] = 2; + $co['co_skin'] = 'basic'; + $co['co_mobile_skin'] = 'basic'; } include_once (G5_ADMIN_PATH.'/admin.head.php'); @@ -69,6 +85,22 @@ include_once (G5_ADMIN_PATH.'/admin.head.php'); 내용 + + 모바일 내용 + + + + + + + + + + + + + + @@ -160,6 +192,7 @@ function frmcontentform_check(f) + check_field(f.co_id, "ID를 입력하세요."); check_field(f.co_subject, "제목을 입력하세요."); diff --git a/adm/contentformupdate.php b/adm/contentformupdate.php index 4f9786ffd..57c26e172 100644 --- a/adm/contentformupdate.php +++ b/adm/contentformupdate.php @@ -21,7 +21,10 @@ $sql_common = " co_include_head = '$co_include_head', co_html = '$co_html', co_tag_filter_use = '$co_tag_filter_use', co_subject = '$co_subject', - co_content = '$co_content' "; + co_content = '$co_content', + co_mobile_content = '$co_mobile_content', + co_skin = '$co_skin', + co_mobile_skin = '$co_mobile_skin' "; if ($w == "") { diff --git a/bbs/content.php b/bbs/content.php index a8ba46f2a..f712cffc6 100644 --- a/bbs/content.php +++ b/bbs/content.php @@ -30,7 +30,6 @@ $str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']) unset($src); unset($dst); $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/"; -//$dst[] = $default[de_subject]; $dst[] = $config['cf_title']; $src[] = "/{{회사명}}|{{상호}}/"; $dst[] = $default['de_admin_company_name']; @@ -59,39 +58,33 @@ $dst[] = $default['de_admin_info_email']; $str = preg_replace($src, $dst, $str); -if ($is_admin) - echo '
내용 수정
'; -?> +// 스킨경로 +if(trim($co['co_skin']) == '') + $co['co_skin'] = 'basic'; - -'; -?> - -
-
-

-
- -
- -
- -
- -'; +$content_skin_path = G5_SKIN_PATH.'/content/'.$co['co_skin']; +$content_skin_url = G5_SKIN_URL.'/content/'.$co['co_skin']; +$skin_file = $content_skin_path.'/content.skin.php'; if ($is_admin) echo '
내용 수정
'; ?> - '; + + include($skin_file); + + $timg = G5_DATA_PATH.'/content/'.$co_id.'_t'; + if (file_exists($timg)) // 하단 이미지 + echo '
'; +} else { + echo '

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

'; +} + if ($co['co_include_tail']) @include_once($co['co_include_tail']); else diff --git a/css/default.css b/css/default.css index a90193c32..9a9e4288c 100644 --- a/css/default.css +++ b/css/default.css @@ -252,13 +252,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em} .new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none} -/* 내용관리 */ -#ctt {margin:10px 0;padding:10px;border:1px solid #e9e9e9} -.ctt_admin {text-align:right} -#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} -#ctt_con {padding:10px 0} -.ctt_img {text-align:center} - /* 검색결과 색상 */ .sch_word {color:#ff3061} diff --git a/css/mobile.css b/css/mobile.css index 9d2b3328a..feb6f507f 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -225,13 +225,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .new_win .win_btn button {display:inline-block;padding:0 10px;height:2.5em;border:0;background:#666;color:#fff;text-decoration:none;line-height:2.5em} .new_win .win_btn input {padding:0 10px;height:2.5em;line-height:2.5em} -/* 내용관리 */ -#ctt {margin:10px 0;padding:10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} -.ctt_admin {margin:0 5px;text-align:right} -#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} -#ctt_con {padding:10px 0} -.ctt_img {text-align:center} - /* 검색결과 색상 */ .sch_word {color:#ff3061} diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql index 5c1a5a2bb..731e6f53b 100644 --- a/install/gnuboard5.sql +++ b/install/gnuboard5.sql @@ -781,6 +781,9 @@ CREATE TABLE IF NOT EXISTS `g5_content` ( `co_html` tinyint(4) NOT NULL DEFAULT '0', `co_subject` varchar(255) NOT NULL DEFAULT '', `co_content` longtext NOT NULL, + `co_mobile_content` longtext NOT NULL, + `co_skin` varchar(255) NOT NULL DEFAULT '', + `co_mobile_skin` varchar(255) NOT NULL DEFAULT '', `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0', `co_hit` int(11) NOT NULL DEFAULT '0', `co_include_head` varchar(255) NOT NULL, diff --git a/mobile/content.php b/mobile/content.php index 4ca181961..c789834b8 100644 --- a/mobile/content.php +++ b/mobile/content.php @@ -10,13 +10,13 @@ if (!$co['co_id']) $g5['title'] = $co['co_subject']; include_once('./_head.php'); -$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']); +$co_content = $co['co_mobile_content'] ? $co['co_mobile_content'] : $co['co_content']; +$str = conv_content($co_content, $co['co_html'], $co['co_tag_filter_use']); // $src 를 $dst 로 변환 unset($src); unset($dst); $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/"; -//$dst[] = $default[de_subject]; $dst[] = $config['cf_title']; $src[] = "/{{회사명}}|{{상호}}/"; $dst[] = $default['de_admin_company_name']; @@ -44,21 +44,20 @@ $src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i"; $dst[] = $default['de_admin_info_email']; $str = preg_replace($src, $dst, $str); -?> - -
-
-

-
+// 스킨경로 +if(trim($co['co_mobile_skin']) == '') + $co['co_mobile_skin'] = 'basic'; -
- -
+$content_skin_path = G5_MOBILE_PATH .'/'.G5_SKIN_DIR.'/content/'.$co['co_mobile_skin']; +$content_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/content/'.$co['co_mobile_skin']; +$skin_file = $content_skin_path.'/content.skin.php'; -
- +if(is_file($skin_file)) { + include($skin_file); +} else { + echo '

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

'; +} - diff --git a/mobile/skin/content/basic/content.skin.php b/mobile/skin/content/basic/content.skin.php new file mode 100644 index 000000000..79d47d932 --- /dev/null +++ b/mobile/skin/content/basic/content.skin.php @@ -0,0 +1,18 @@ +', 0); + +?> + +
+
+

+
+ +
+ +
+ +
\ No newline at end of file diff --git a/mobile/skin/content/basic/style.css b/mobile/skin/content/basic/style.css new file mode 100644 index 000000000..638229597 --- /dev/null +++ b/mobile/skin/content/basic/style.css @@ -0,0 +1,8 @@ +@charset "utf-8"; + +/* 내용관리 */ +#ctt {margin:10px 0;padding:10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} +.ctt_admin {margin:0 5px;text-align:right} +#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ctt_con {padding:10px 0} +.ctt_img {text-align:center} \ No newline at end of file diff --git a/skin/content/basic/content.skin.php b/skin/content/basic/content.skin.php new file mode 100644 index 000000000..5fd7fcecd --- /dev/null +++ b/skin/content/basic/content.skin.php @@ -0,0 +1,17 @@ +', 0); +?> + +
+
+

+
+ +
+ +
+ +
\ No newline at end of file diff --git a/skin/content/basic/style.css b/skin/content/basic/style.css new file mode 100644 index 000000000..8c69c58c6 --- /dev/null +++ b/skin/content/basic/style.css @@ -0,0 +1,8 @@ +@charset "utf-8"; + +/* 내용관리 */ +#ctt {margin:10px 0;padding:10px;border:1px solid #e9e9e9} +.ctt_admin {text-align:right} +#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#ctt_con {padding:10px 0} +.ctt_img {text-align:center} \ No newline at end of file