<?php
include_once('./_common.php');
//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크
if( !isset($g5['content_table']) ){
die('<meta charset="utf-8">관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.');
}
if (G5_IS_MOBILE) {
include_once(G5_MOBILE_PATH.'/content.php');
return;
}
// 내용
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
$co = sql_fetch($sql);
if (!$co['co_id'])
alert('등록된 내용이 없습니다.');
$g5['title'] = $co['co_subject'];
if ($co['co_include_head'])
@include_once($co['co_include_head']);
else
include_once('./_head.php');
$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);
// $src 를 $dst 로 변환
unset($src);
unset($dst);
$src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
$dst[] = $config['cf_title'];
$src[] = "/{{회사명}}|{{상호}}/";
$dst[] = $default['de_admin_company_name'];
$src[] = "/{{대표자명}}/";
$dst[] = $default['de_admin_company_owner'];
$src[] = "/{{사업자등록번호}}/";
$dst[] = $default['de_admin_company_saupja_no'];
$src[] = "/{{대표전화번호}}/";
$dst[] = $default['de_admin_company_tel'];
$src[] = "/{{팩스번호}}/";
$dst[] = $default['de_admin_company_fax'];
$src[] = "/{{통신판매업신고번호}}/";
$dst[] = $default['de_admin_company_tongsin_no'];
$src[] = "/{{사업장우편번호}}/";
$dst[] = $default['de_admin_company_zip'];
$src[] = "/{{사업장주소}}/";
$dst[] = $default['de_admin_company_addr'];
$src[] = "/{{운영자명}}|{{관리자명}}/";
$dst[] = $default['de_admin_name'];
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
$dst[] = $default['de_admin_email'];
$src[] = "/{{정보관리책임자명}}/";
$dst[] = $default['de_admin_info_name'];
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
$dst[] = $default['de_admin_info_email'];
$str = preg_replace($src, $dst, $str);
// 스킨경로
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 '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
?>
<?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'])
@include_once($co['co_include_tail']);
else
include_once('./_tail.php');
?>
왕계란님.
답변감사합니다.
주신 소스를 붙이니 깨어지는 군요.
위의 것이 content.php 인데 어디에 추가하면 되는지 다시한 번 부탁드립니다.
죄송,감사