faq 분류 검색 기능 추가

This commit is contained in:
chicpro
2014-03-14 17:27:54 +09:00
parent 2fbd3e66fa
commit 3c3bfc2b8f
14 changed files with 477 additions and 76 deletions

View File

@ -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']) {
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_faq_skin">FAQ 스킨<strong class="sound_only">필수</strong></label></th>
<td>
<select name="cf_faq_skin" id="cf_faq_skin" required class="required">
<?php
$arr = get_skin_dir('faq');
for ($i=0; $i<count($arr); $i++) {
if ($i == 0) echo "<option value=\"\">선택</option>";
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_faq_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
}
?>
</select>
</td>
<th scope="row"><label for="cf_mobile_faq_skin">모바일 FAQ 스킨<strong class="sound_only">필수</strong></label></th>
<td>
<select name="cf_mobile_faq_skin" id="cf_mobile_faq_skin" required class="required">
<?php
$arr = get_skin_dir('faq', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
for ($i=0; $i<count($arr); $i++) {
if ($i == 0) echo "<option value=\"\">선택</option>";
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_faq_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_editor">에디터 선택</label></th>
<td colspan="3">

View File

@ -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']}',

View File

@ -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');
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="fm_order">출력순서</label></th>
<td>
<?php echo help('숫자가 작을수록 FAQ 분류에서 먼저 출력됩니다.'); ?>
<input type="text" name="fm_order" value="<?php echo $fm['fm_order']; ?>" id="fm_order" class="frm_input" maxlength="10" size="10">
</td>
</tr>
<tr>
<th scope="row"><label for="fm_subject">제목</label></th>
<td>
@ -107,6 +121,18 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<?php echo editor_html('fm_tail_html', $fm['fm_tail_html']); ?>
</td>
</tr>
<tr>
<th scope="row">모바일상단 내용</th>
<td>
<?php echo editor_html('fm_mobile_head_html', $fm['fm_mobile_head_html']); ?>
</td>
</tr>
<tr>
<th scope="row">모바일하단 내용</th>
<td>
<?php echo editor_html('fm_mobile_tail_html', $fm['fm_mobile_tail_html']); ?>
</td>
</tr>
</tbody>
</table>
</div>
@ -123,6 +149,8 @@ function frmfaqmasterform_check(f)
{
<?php echo get_editor_js('fm_head_html'); ?>
<?php echo get_editor_js('fm_tail_html'); ?>
<?php echo get_editor_js('fm_mobile_head_html'); ?>
<?php echo get_editor_js('fm_mobile_tail_html'); ?>
}
// document.frmfaqmasterform.fm_subject.focus();

View File

@ -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 == "")
{

View File

@ -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);
<th scope="col">ID</th>
<th scope="col">제목</th>
<th scope="col">FAQ수</th>
<th scope="col">순서</th>
<th scope="col">관리</th>
</tr>
</thead>
@ -102,6 +103,7 @@ $result = sql_query($sql);
<td class="td_num"><?php echo $row['fm_id']; ?></td>
<td><a href="./faqlist.php?fm_id=<?php echo $row['fm_id']; ?>&amp;fm_subject=<?php echo $row['fm_subject']; ?>"><?php echo stripslashes($row['fm_subject']); ?></a></td>
<td class="td_num"><?php echo $cnt; ?></td>
<td class="td_num"><?php echo $row['fm_order']?></td>
<td class="td_mng">
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>보기</a>
<a href="./faqmasterform.php?w=u&amp;fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>수정</a>

View File

@ -1,96 +1,104 @@
<?php
include_once('./_common.php');
if (!$fm_id) $fm_id = 1;
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
die('<meta charset="utf-8">관리자 모드에서 게시판관리->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 .= '&amp;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');
?>
<?php
if ($is_admin)
echo '<div class="faq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&amp;fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
?>
if(is_file($skin_file)) {
$admin_href = '';
$himg_src = '';
$timg_src = '';
if($is_admin)
$admin_href = G5_ADMIN_URL.'/faqmasterform.php?w=u&amp;fm_id='.$fm_id;
<!-- FAQ 시작 { -->
<?php
$himg = G5_DATA_PATH.'/faq/'.$fm_id.'_h';
if (file_exists($himg))
echo '<div id="faq_himg" class="faq_img"><img src="'.G5_DATA_URL.'/faq/'.$fm_id.'_h" alt=""></div>';
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 '<div id="faq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
?>
$timg = G5_DATA_PATH.'/faq/'.$fm_id.'_t';
if (is_file($timg)){
$timg_src = G5_DATA_URL.'/faq/'.$fm_id.'_t';
}
}
<div id="faq_wrap" class="faq_<?php echo $fm_id; ?>">
<?php // FAQ 목차
$sql = " select * from {$g5['faq_table']}
where fm_id = '$fm_id'
order by fa_order , fa_id ";
$category_href = G5_BBS_URL.'/faq.php';
$category_stx = '';
$faq_list = array();
$stx = trim($stx);
$sql_search = '';
if($stx) {
$sql_search = " and ( INSTR(fa_subject, '$stx') > 0 or INSTR(fa_content, '$stx') > 0 ) ";
$category_stx = '&amp;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)
{
?>
<section id="faq_list">
<h2><?php echo $g5['title']; ?> 목차</h2>
<ol>
<?php } ?>
<li><a href="#faq_<?php echo $fm_id.'_'.$i; ?>"><?php echo stripslashes($row['fa_subject']); ?></a></li>
<?php }
if ($i > 1) echo '</ol></section>';
?>
<?php // FAQ 내용
$resultb = sql_query($sql);
for ($i=1; $row=sql_fetch_array($resultb); $i++)
{
if ($i == 1)
{
?>
<section id="faq_con">
<h2><?php echo $g5['title']; ?> 내용</h2>
<ol>
<?php } ?>
<li id="faq_<?php echo $fm_id.'_'.$i; ?>">
<h3><?php echo stripslashes($row['fa_subject']); ?></h3>
<div id="con_inner">
<?php echo stripslashes($row['fa_content']); ?>
</div>
<div class="faq_tolist"><a href="#faq_list" class="btn01">FAQ 목차</a></div>
</li>
<?php }
if ($i > 1) echo '</ol></section>';
if ($i == 1) echo '<p>등록된 FAQ가 없습니다.<br><a href="'.G5_ADMIN_URL.'/faqmasterlist.php">FAQ를 새로 등록하시려면 FAQ관리</a> 메뉴를 이용하십시오.</p>';
?>
</div>
<?php
// 하단 HTML
echo '<div id="faq_thtml">'.stripslashes($fm['fm_tail_html']).'</div>';
$timg = G5_DATA_PATH.'/faq/'.$fm_id.'_t';
if (file_exists($timg))
echo '<div id="faq_timg" class="faq_img"><img src="'.G5_DATA_URL.'/faq/'.$fm_id.'_t" alt=""></div>';
?>
<!-- } FAQ 끝 -->
<?php
if ($is_admin)
echo '<div class="faq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&amp;fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
while ($row=sql_fetch_array($result)){
$faq_list[] = $row;
}
include_once($skin_file);
} else {
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
}
include_once('./_tail.php');
?>

View File

@ -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}
/* 전체 검색 */

View File

@ -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;

View File

@ -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));

View File

@ -163,6 +163,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<ul id="hd_nb">
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php" id="snb_new">1:1문의</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/faq.php" id="snb_faq">FAQ</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php" id="snb_cnt">접속자 <?php echo connect(); // 현재 접속자수 ?></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/new.php" id="snb_new">새글</a></li>
<?php if ($is_member) { ?>

View File

@ -0,0 +1,118 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$faq_skin_url.'/style.css">', 0);
?>
<!-- FAQ 시작 { -->
<?php
// 상단 HTML
echo '<div id="faq_hhtml">'.stripslashes($fm['fm_mobile_head_html']).'</div>';
?>
<form name="faq_search_form" method="get">
<input type="hidden" name="fm_id" value="<?php echo $fm_id;?>">
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx;?>" required id="stx" class="frm_input required" size="15" maxlength="15">
<input type="submit" value="검색" class="btn_submit">
</form>
<?php
if( count($faq_master_list) ){
?>
<nav id="bo_cate">
<h2>자주하시는질문 분류</h2>
<ul id="bo_cate_ul">
<?php
foreach( $faq_master_list as $v ){
$category_msg = '';
$category_option = '';
if($v['fm_id'] == $fm_id){ // 현재 선택된 카테고리라면
$category_option = ' id="bo_cate_on"';
$category_msg = '<span class="sound_only">열린 분류 </span>';
}
?>
<li><a href="<?php echo $category_href;?>?fm_id=<?php echo $v['fm_id'].$category_stx;?>" <?php echo $category_option;?> ><?php echo $category_msg.$v['fm_subject'];?></a></li>
<?php
}
?>
</ul>
</nav>
<?php } ?>
<div id="faq_wrap" class="faq_<?php echo $fm_id; ?>">
<?php // FAQ 내용
if( count($faq_list) ){
?>
<section id="faq_con">
<h2><?php echo $g5['title']; ?> 목록</h2>
<ol>
<?php
foreach($faq_list as $key=>$v){
if(empty($v))
continue;
?>
<li>
<h3><a href="#none" onclick="return faq_open(this);"><?php echo conv_content($v['fa_subject'], 1); ?></a></h3>
<div class="con_inner">
<?php echo conv_content($v['fa_content'], 1); ?>
<button type="button" class="btn_faq_close">닫기</button>
</div>
</li>
<?php
}
?>
</ol>
</section>
<?php
} else {
if($stx){
echo '<p>검색된 게시물이 없습니다.</p>';
} else {
echo '<p>등록된 FAQ가 없습니다.';
if($is_admin)
echo '<br><a href="'.G5_ADMIN_URL.'/faqmasterlist.php">FAQ를 새로 등록하시려면 FAQ관리</a> 메뉴를 이용하십시오.';
echo '</p>';
}
}
?>
</div>
<?php echo get_paging($page_rows, $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&amp;page='); ?>
<?php
// 하단 HTML
echo '<div id="faq_thtml">'.stripslashes($fm['fm_tail_html']).'</div>';
?>
<!-- } FAQ 끝 -->
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
<script>
$(function() {
$(".btn_faq_close").on("click", function() {
$(this).closest(".con_inner").slideToggle();
});
});
function faq_open(el)
{
var $con = $(el).closest("li").find(".con_inner");
if($con.is(":visible")) {
$con.slideUp();
} else {
$("#faq_con .con_inner:visible").css("display", "none");
$con.slideDown(
function() {
// 이미지 리사이즈
$con.viewimageresize2();
}
);
}
return false;
}
</script>

View File

@ -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}

View File

@ -0,0 +1,132 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$faq_skin_url.'/style.css">', 0);
if ($admin_href)
echo '<div class="faq_admin"><a href="'.$admin_href.'" class="btn_admin">FAQ 수정</a></div>';
?>
<!-- FAQ 시작 { -->
<?php
if ($himg_src)
echo '<div id="faq_himg" class="faq_img"><img src="'.$himg_src.'" alt=""></div>';
// 상단 HTML
echo '<div id="faq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
?>
<form name="faq_search_form" method="get">
<input type="hidden" name="fm_id" value="<?php echo $fm_id;?>">
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx;?>" required id="stx" class="frm_input required" size="15" maxlength="15">
<input type="submit" value="검색" class="btn_submit">
</form>
<?php
if( count($faq_master_list) ){
?>
<nav id="bo_cate">
<h2>자주하시는질문 분류</h2>
<ul id="bo_cate_ul">
<?php
foreach( $faq_master_list as $v ){
$category_msg = '';
$category_option = '';
if($v['fm_id'] == $fm_id){ // 현재 선택된 카테고리라면
$category_option = ' id="bo_cate_on"';
$category_msg = '<span class="sound_only">열린 분류 </span>';
}
?>
<li><a href="<?php echo $category_href;?>?fm_id=<?php echo $v['fm_id'].$category_stx;?>" <?php echo $category_option;?> ><?php echo $category_msg.$v['fm_subject'];?></a></li>
<?php
}
?>
</ul>
</nav>
<?php } ?>
<div id="faq_wrap" class="faq_<?php echo $fm_id; ?>">
<?php // FAQ 내용
if( count($faq_list) ){
?>
<section id="faq_con">
<h2><?php echo $g5['title']; ?> 목록</h2>
<ol>
<?php
foreach($faq_list as $key=>$v){
if(empty($v))
continue;
?>
<li>
<h3><a href="#none" onclick="return faq_open(this);"><?php echo conv_content($v['fa_subject'], 1); ?></a></h3>
<div class="con_inner">
<?php echo conv_content($v['fa_content'], 1); ?>
<button type="button" class="btn_faq_close">닫기</button>
</div>
</li>
<?php
}
?>
</ol>
</section>
<?php
} else {
if($stx){
echo '<p>검색된 게시물이 없습니다.</p>';
} else {
echo '<p>등록된 FAQ가 없습니다.';
if($is_admin)
echo '<br><a href="'.G5_ADMIN_URL.'/faqmasterlist.php">FAQ를 새로 등록하시려면 FAQ관리</a> 메뉴를 이용하십시오.';
echo '</p>';
}
}
?>
</div>
<?php echo get_paging($page_rows, $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&amp;page='); ?>
<?php
// 하단 HTML
echo '<div id="faq_thtml">'.stripslashes($fm['fm_tail_html']).'</div>';
if ($timg_src)
echo '<div id="faq_timg" class="faq_img"><img src="'.$timg_src.'" alt=""></div>';
?>
<!-- } FAQ 끝 -->
<?php
if ($admin_href)
echo '<div class="faq_admin"><a href="'.$admin_href.'" class="btn_admin">FAQ 수정</a></div>';
?>
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
<script>
$(function() {
$(".btn_faq_close").on("click", function() {
$(this).closest(".con_inner").slideToggle();
});
});
function faq_open(el)
{
var $con = $(el).closest("li").find(".con_inner");
if($con.is(":visible")) {
$con.slideUp();
} else {
$("#faq_con .con_inner:visible").css("display", "none");
$con.slideDown(
function() {
// 이미지 리사이즈
$con.viewimageresize2();
}
);
}
return false;
}
</script>

10
skin/faq/basic/style.css Normal file
View File

@ -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}