list.skin.php 불러오지 못하고 있습니다.. 채택완료
안녕하세요!
게시판 faq 영문 파일을 따로 만들어 사용하려 하는데요!
faq_en.php파일을 만들어 faq_en 폴더에 있는 list.skin.php 파일을 불러오고 싶습니다.
사이트에서 루트 faq_en.php 파일은 불러오는데 리스트 페이지는 불러오지 못하고 있어서요..
한글 파일 (fqa / basic / list.skin.php)
영문 파일 (fqa_en / basic / list.skin.php) 이렇게 만들어 두었습니다.
faq_en.php 코드는 하단과 같습니다! (자꾸 한글 파일이 불러와지는데 수정해야할 부분이 있을까요..?)
</strong></p>
<p><strong><?php
include_once('./_common.php');</strong></p>
<p><strong>//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
die('<meta charset="utf-8">관리자 모드에서 게시판관리->FAQ관리를 먼저 확인해 주세요.');
}</strong></p>
<p><strong>// FAQ MASTER
$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;
}</strong></p>
<p><strong>if ($fm_id){
$qstr .= '&fm_id=' . $fm_id; // 마스터faq key_id
}</strong></p>
<p><strong>$fm = $faq_master_list[$fm_id];
if (!$fm['fm_id'])
alert('등록된 내용이 없습니다.');</strong></p>
<p><strong>$g5['title'] = $fm['fm_subject'];</strong></p>
<p><strong>$skin_file = $faq_skin_path.'/list.skin.php';</strong></p>
<p><strong>include_once('./_head_en.php');</strong></p>
<p><strong>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;</strong></p>
<p><strong> 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';
}</strong></p>
<p><strong> $timg = G5_DATA_PATH.'/faq/'.$fm_id.'_t';
if (is_file($timg)){
$timg_src = G5_DATA_URL.'/faq/'.$fm_id.'_t';
}
}</strong></p>
<p><strong> $category_href = G5_BBS_URL.'/faq_en.php';
$category_stx = '';
$faq_list = array();</strong></p>
<p><strong> $stx = trim($stx);
$sql_search = '';</strong></p>
<p><strong> if($stx) {
$sql_search = " and ( INSTR(fa_subject, '$stx') > 0 or INSTR(fa_content, '$stx') > 0 ) ";
}</strong></p>
<p><strong> if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)</strong></p>
<p><strong> $page_rows = G5_IS_MOBILE ? $config['cf_mobile_page_rows'] : $config['cf_page_rows'];</strong></p>
<p><strong> $sql = " select count(*) as cnt
from {$g5['faq_table']} A
INNER JOIN `g5_faq_master` B
ON A.fm_id = B.fm_id
$sql_search ";
$total = sql_fetch($sql);
$total_count = $total['cnt'];</strong></p>
<p><strong> $total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함</strong></p>
<p><strong> $sql = " select *
from {$g5['faq_table']} A
INNER JOIN `g5_faq_master` B
ON A.fm_id = B.fm_id
$sql_search
order by fa_order , fa_id
limit $from_record, $page_rows ";
$result = sql_query($sql);
for ($i=0;$row=sql_fetch_array($result);$i++){
$faq_list[] = $row;
if($stx) {
$faq_list[$i]['fa_subject'] = search_font($stx, conv_content($faq_list[$i]['fa_subject'], 1));
$faq_list[$i]['fa_content'] = search_font($stx, conv_content($faq_list[$i]['fa_content'], 1));
}
}
include_once($skin_file);
} else {
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
}</strong></p>
<p><strong>include_once('./_tail.php');
?></strong>
</p>
<p><strong>
답변 1개
$faq_skin_path 를 수정해줘야 합니다.
아래와 같이 한줄을 추가해주세요
</p>
<p>$g5['title'] = $fm['fm_subject'];</p>
<p>$faq_skin_path = str_replace('/faq/','/faq_en/',$faq_skin_path);</p>
<p>$skin_file = $faq_skin_path.'/list.skin.php';</p>
<p>
답변에 대한 댓글 2개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
한 줄 추가해서 확인해봤더니 전체를 못 불러오고 있어서요.. 다른 곳 수정하거나 추가해야할 부분이 있을까요..??ㅠㅠ