Merge branch 'g5'
This commit is contained in:
@ -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' ");
|
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 = "내용";
|
$html_title = "내용";
|
||||||
$g5['title'] = $html_title.' 관리';
|
$g5['title'] = $html_title.' 관리';
|
||||||
|
|
||||||
@ -36,6 +50,8 @@ else
|
|||||||
{
|
{
|
||||||
$html_title .= ' 입력';
|
$html_title .= ' 입력';
|
||||||
$co['co_html'] = 2;
|
$co['co_html'] = 2;
|
||||||
|
$co['co_skin'] = 'basic';
|
||||||
|
$co['co_mobile_skin'] = 'basic';
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||||
@ -69,6 +85,22 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
<th scope="row">내용</th>
|
<th scope="row">내용</th>
|
||||||
<td><?php echo editor_html('co_content', get_text($co['co_content'], 0)); ?></td>
|
<td><?php echo editor_html('co_content', get_text($co['co_content'], 0)); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">모바일 내용</th>
|
||||||
|
<td><?php echo editor_html('co_mobile_content', get_text($co['co_mobile_content'], 0)); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="co_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo get_skin_select('content', 'co_skin', 'co_skin', $co['co_skin'], 'required'); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="co_mobile_skin">모바일스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo get_mobile_skin_select('content', 'co_mobile_skin', 'co_mobile_skin', $co['co_mobile_skin'], 'required'); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
||||||
<td>
|
<td>
|
||||||
@ -160,6 +192,7 @@ function frmcontentform_check(f)
|
|||||||
|
|
||||||
<?php echo get_editor_js('co_content'); ?>
|
<?php echo get_editor_js('co_content'); ?>
|
||||||
<?php echo chk_editor_js('co_content'); ?>
|
<?php echo chk_editor_js('co_content'); ?>
|
||||||
|
<?php echo get_editor_js('co_mobile_content'); ?>
|
||||||
|
|
||||||
check_field(f.co_id, "ID를 입력하세요.");
|
check_field(f.co_id, "ID를 입력하세요.");
|
||||||
check_field(f.co_subject, "제목을 입력하세요.");
|
check_field(f.co_subject, "제목을 입력하세요.");
|
||||||
|
|||||||
@ -21,7 +21,10 @@ $sql_common = " co_include_head = '$co_include_head',
|
|||||||
co_html = '$co_html',
|
co_html = '$co_html',
|
||||||
co_tag_filter_use = '$co_tag_filter_use',
|
co_tag_filter_use = '$co_tag_filter_use',
|
||||||
co_subject = '$co_subject',
|
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 == "")
|
if ($w == "")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,7 +30,6 @@ $str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use'])
|
|||||||
unset($src);
|
unset($src);
|
||||||
unset($dst);
|
unset($dst);
|
||||||
$src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
|
$src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
|
||||||
//$dst[] = $default[de_subject];
|
|
||||||
$dst[] = $config['cf_title'];
|
$dst[] = $config['cf_title'];
|
||||||
$src[] = "/{{회사명}}|{{상호}}/";
|
$src[] = "/{{회사명}}|{{상호}}/";
|
||||||
$dst[] = $default['de_admin_company_name'];
|
$dst[] = $default['de_admin_company_name'];
|
||||||
@ -59,39 +58,33 @@ $dst[] = $default['de_admin_info_email'];
|
|||||||
|
|
||||||
$str = preg_replace($src, $dst, $str);
|
$str = preg_replace($src, $dst, $str);
|
||||||
|
|
||||||
if ($is_admin)
|
// 스킨경로
|
||||||
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
|
if(trim($co['co_skin']) == '')
|
||||||
?>
|
$co['co_skin'] = 'basic';
|
||||||
|
|
||||||
<!-- 등록내용 시작 { -->
|
$content_skin_path = G5_SKIN_PATH.'/content/'.$co['co_skin'];
|
||||||
<?php
|
$content_skin_url = G5_SKIN_URL.'/content/'.$co['co_skin'];
|
||||||
$himg = G5_DATA_PATH.'/content/'.$co_id.'_h';
|
$skin_file = $content_skin_path.'/content.skin.php';
|
||||||
if (file_exists($himg)) // 상단 이미지
|
|
||||||
echo '<div id="ctt_himg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<article id="ctt" class="ctt_<?php echo $co_id; ?>">
|
|
||||||
<header>
|
|
||||||
<h1><?php echo $g5['title']; ?></h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div id="ctt_con">
|
|
||||||
<?php echo $str; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</article>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$timg = G5_DATA_PATH.'/content/'.$co_id.'_t';
|
|
||||||
if (file_exists($timg)) // 하단 이미지
|
|
||||||
echo '<div id="ctt_timg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_t" alt=""></div>';
|
|
||||||
|
|
||||||
if ($is_admin)
|
if ($is_admin)
|
||||||
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
|
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
|
||||||
?>
|
?>
|
||||||
<!-- } 등록내용 끝 -->
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
if(is_file($skin_file)) {
|
||||||
|
$himg = G5_DATA_PATH.'/content/'.$co_id.'_h';
|
||||||
|
if (file_exists($himg)) // 상단 이미지
|
||||||
|
echo '<div id="ctt_himg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>';
|
||||||
|
|
||||||
|
include($skin_file);
|
||||||
|
|
||||||
|
$timg = G5_DATA_PATH.'/content/'.$co_id.'_t';
|
||||||
|
if (file_exists($timg)) // 하단 이미지
|
||||||
|
echo '<div id="ctt_timg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_t" alt=""></div>';
|
||||||
|
} else {
|
||||||
|
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($co['co_include_tail'])
|
if ($co['co_include_tail'])
|
||||||
@include_once($co['co_include_tail']);
|
@include_once($co['co_include_tail']);
|
||||||
else
|
else
|
||||||
|
|||||||
@ -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 {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}
|
.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}
|
.sch_word {color:#ff3061}
|
||||||
|
|
||||||
|
|||||||
@ -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 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}
|
.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}
|
.sch_word {color:#ff3061}
|
||||||
|
|
||||||
|
|||||||
@ -781,6 +781,9 @@ CREATE TABLE IF NOT EXISTS `g5_content` (
|
|||||||
`co_html` tinyint(4) NOT NULL DEFAULT '0',
|
`co_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`co_subject` varchar(255) NOT NULL DEFAULT '',
|
`co_subject` varchar(255) NOT NULL DEFAULT '',
|
||||||
`co_content` longtext NOT NULL,
|
`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_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`co_hit` int(11) NOT NULL DEFAULT '0',
|
`co_hit` int(11) NOT NULL DEFAULT '0',
|
||||||
`co_include_head` varchar(255) NOT NULL,
|
`co_include_head` varchar(255) NOT NULL,
|
||||||
|
|||||||
@ -10,13 +10,13 @@ if (!$co['co_id'])
|
|||||||
$g5['title'] = $co['co_subject'];
|
$g5['title'] = $co['co_subject'];
|
||||||
include_once('./_head.php');
|
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 로 변환
|
// $src 를 $dst 로 변환
|
||||||
unset($src);
|
unset($src);
|
||||||
unset($dst);
|
unset($dst);
|
||||||
$src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
|
$src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
|
||||||
//$dst[] = $default[de_subject];
|
|
||||||
$dst[] = $config['cf_title'];
|
$dst[] = $config['cf_title'];
|
||||||
$src[] = "/{{회사명}}|{{상호}}/";
|
$src[] = "/{{회사명}}|{{상호}}/";
|
||||||
$dst[] = $default['de_admin_company_name'];
|
$dst[] = $default['de_admin_company_name'];
|
||||||
@ -44,21 +44,20 @@ $src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
|
|||||||
$dst[] = $default['de_admin_info_email'];
|
$dst[] = $default['de_admin_info_email'];
|
||||||
|
|
||||||
$str = preg_replace($src, $dst, $str);
|
$str = preg_replace($src, $dst, $str);
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- 등록내용 시작 { -->
|
// 스킨경로
|
||||||
<article id="ctt" class="ctt_<?php echo $co_id; ?>">
|
if(trim($co['co_mobile_skin']) == '')
|
||||||
<header>
|
$co['co_mobile_skin'] = 'basic';
|
||||||
<h1><?php echo $g5['title']; ?></h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div id="ctt_con">
|
$content_skin_path = G5_MOBILE_PATH .'/'.G5_SKIN_DIR.'/content/'.$co['co_mobile_skin'];
|
||||||
<?php echo $str; ?>
|
$content_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/content/'.$co['co_mobile_skin'];
|
||||||
</div>
|
$skin_file = $content_skin_path.'/content.skin.php';
|
||||||
|
|
||||||
</article>
|
if(is_file($skin_file)) {
|
||||||
<!-- } 등록내용 끝 -->
|
include($skin_file);
|
||||||
|
} else {
|
||||||
|
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
<?php
|
|
||||||
include_once('./_tail.php');
|
include_once('./_tail.php');
|
||||||
?>
|
?>
|
||||||
|
|||||||
18
mobile/skin/content/basic/content.skin.php
Normal file
18
mobile/skin/content/basic/content.skin.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
|
add_stylesheet('<link rel="stylesheet" href="'.$content_skin_url.'/style.css">', 0);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<article id="ctt" class="ctt_<?php echo $co_id; ?>">
|
||||||
|
<header>
|
||||||
|
<h1><?php echo $g5['title']; ?></h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="ctt_con">
|
||||||
|
<?php echo $str; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</article>
|
||||||
8
mobile/skin/content/basic/style.css
Normal file
8
mobile/skin/content/basic/style.css
Normal file
@ -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}
|
||||||
17
skin/content/basic/content.skin.php
Normal file
17
skin/content/basic/content.skin.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
|
add_stylesheet('<link rel="stylesheet" href="'.$content_skin_url.'/style.css">', 0);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<article id="ctt" class="ctt_<?php echo $co_id; ?>">
|
||||||
|
<header>
|
||||||
|
<h1><?php echo $g5['title']; ?></h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="ctt_con">
|
||||||
|
<?php echo $str; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</article>
|
||||||
8
skin/content/basic/style.css
Normal file
8
skin/content/basic/style.css
Normal file
@ -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}
|
||||||
Reference in New Issue
Block a user