FAQ 검색어가 있을시 search_font적용 및 탭주소에 검색어 포함하지 않음

This commit is contained in:
thisgun
2014-06-13 16:01:55 +09:00
parent 61c2fd4c51
commit f18614588a
3 changed files with 9 additions and 7 deletions

View File

@ -64,11 +64,9 @@ if(is_file($skin_file)) {
$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 = '&stx='.$stx;
}
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
@ -92,8 +90,12 @@ if(is_file($skin_file)) {
order by fa_order , fa_id
limit $from_record, $page_rows ";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)){
for ($i=0;$row=sql_fetch_array($result);$i++){
$faq_list[] = $row;
if($stx) {
$faq_list[$i]['fa_subject'] = search_font($stx, $faq_list[$i]['fa_subject']);
$faq_list[$i]['fa_content'] = search_font($stx, $faq_list[$i]['fa_content']);
}
}
include_once($skin_file);
} else {

View File

@ -26,7 +26,7 @@ if( count($faq_master_list) ){
$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>
<li><a href="<?php echo $category_href;?>?fm_id=<?php echo $v['fm_id']?>" <?php echo $category_option;?> ><?php echo $category_msg.$v['fm_subject'];?></a></li>
<?php
}
?>
@ -62,7 +62,7 @@ if( count($faq_master_list) ){
} else {
if($stx){
echo '<p>검색된 게시물이 없습니다.</p>';
echo '<p class="empty_list">검색된 게시물이 없습니다.</p>';
} else {
echo '<div class="empty_table">등록된 FAQ가 없습니다.';
if($is_admin)

View File

@ -32,7 +32,7 @@ if( count($faq_master_list) ){
$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>
<li><a href="<?php echo $category_href;?>?fm_id=<?php echo $v['fm_id'];?>" <?php echo $category_option;?> ><?php echo $category_msg.$v['fm_subject'];?></a></li>
<?php
}
?>
@ -68,7 +68,7 @@ if( count($faq_master_list) ){
} else {
if($stx){
echo '<p>검색된 게시물이 없습니다.</p>';
echo '<p class="empty_list">검색된 게시물이 없습니다.</p>';
} else {
echo '<div class="empty_list">등록된 FAQ가 없습니다.';
if($is_admin)