/home/mjc1/public_html/j3demo/shop/faq.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
include_once("./_common.php");
include_once(
$j3_shop_path."/shop_header.php");

if(
$faq_idx=='all'){ $faq_idx ""; } // 이상하게 탭에서 value값을 공백으로 지정하면 jquery attr에서 1로 받아와서 다른값을 넣고 치환함

$faq_cate_array faq_cate_list_get(""""19999); // FAQ 분류 가져오기

$where2 "";
if(
$faq_search!=''){
    
$where2 .= " and (faq_subject like '%$faq_search%' or faq_content like '%$faq_search%' )";
}

if (
$page 1) { $page 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$list_array faq_list_get($faq_idx$where21999);

$total_page $list_array[0]['total_page'];
$list_num $list_array[0]['list_num'];
$total_count $list_array[0]['total_count'];

$qstr $_SERVER['QUERY_STRING'];
?>
<div id="container">
    <div id="wrapper">

<?php
    skin_module_show
("faq",$sample_idx); // 자주하는질문 스킨을 불러온다.
?>

    </div><!--#wrapper-->
</div>
<script>
$(function(){
    //메뉴탭
    $("#tabs li").click(function () { // 탭 선택시 선택된 배경 처리
        /*$("#tabs li").removeClass("active").css("background-color", "#f8f8f8").css("border-bottom", "1px solid #ccc");
        $(this).addClass("active").css("background-color", "#FFF").css("border-bottom", "1px solid #FFF");*/
        document.location.href="?faq_idx="+$(this).attr("value");
    });

    //상세내용토글
    $(".faq_cont").hide();

    $(".faq_title").click(function () {
        if ($(this).next().css("display") == "none") {
            $(".faq_cont").slideUp();
        };
        $(this).next().slideToggle();
    });
    $(".faq_cont .close").click(function () {
        $(".faq_cont").slideUp();
    });

    $(".faq_search_class").click(function(){ // 검색버튼을 누를때
        faq_search_function();
    });
    $("#faq_search").keypress(function(){ // 검색에서 엔터키를 누를때
        if(event.keyCode==13){
            faq_search_function();
        }
    });
});

function faq_search_function(){
    $val = $("#faq_search").val();
    document.location.href="?faq_idx=<?php echo $faq_idx?>&faq_search="+$val;
}
</script>
<?php
include_once($j3_shop_path."/shop_footer.php");
?>