/home/mjc1/public_html/j3demo/shop/shop_header.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
include_once($j3_path."/header.sub.php");

if(
$config['intro_use']=='1'){ // 인트로 사용시
    
if($id_ccode==''){ 
        if(
strpos($_SERVER['SCRIPT_NAME'],"/join.php")>|| strpos($_SERVER['SCRIPT_NAME'],"/register_form.php")>|| strpos($_SERVER['SCRIPT_NAME'],"/register_result.php")>|| strpos($_SERVER['SCRIPT_NAME'],"/orderview.php")>0){

        } else {
            
alert('로그인하셔야 사용가능합니다.',$j3_url); exit;
        }
    }
}

$kword_list add_search_list_get(10);

if(
$configshop['header_fixed']=='2' || $configshop['header_fixed']=='3'){
    
$header_fixed "1";
} else {
    
$header_fixed "0";
}
if(
$is_index_page){
    
$fixed_mh $_COOKIE['pc_hd_height'];
} else {
    
$fixed_mh $_COOKIE['pc_hd_height']+20;
}
?>
<style>
<?php 
    
if($header_fixed=='1'){
        if(
$_COOKIE['pc_hd_height']!=''){
            echo 
"#container { margin-top:{$fixed_mh}px } ";
        } else {
            echo 
"#container { margin-top:177px } ";
        }
    }
?>
</style>
<!-- header.php-->
<header class='header_class <?php if($header_fixed=='1'){?>fixed width_full ab_top_left bg_white z1000<?php }?>'>
    <h1 class="screen_out"><?php echo $config['shop_title'];?></h1>
    <?php 
        skin_module_show
("menu",$sample_idx); // 메뉴 스킨을 불러온다.
        
skin_module_show("header",$sample_idx); // 헤더 스킨을 불러온다.
    
?>    
</header>
<script>
$(function(){
    $(".hdgnb_join_class").click(function(){ // 회원가입 링크
        document.location.href=j3_shop_url+'/join.php';
    });

    $(".hdgnb_login_class").click(function(){ // 로그인 링크
        document.location.href=j3_shop_url+'/login.php';
    });

    $(".hdgnb_logout_class").click(function(){ // 로그아웃 링크
        document.location.href=j3_shop_url+'/logout.php';
    });

    $(".hdgnb_mypage_class").click(function(){ // 마이페이지 링크
        document.location.href=j3_shop_url+'/mypage.php';
    });

    $(".hdgnb_faq_class").click(function(){ // FAQ 링크
        document.location.href=j3_shop_url+'/faq.php';
    });

    $(".hdgnb_11_class").click(function(){ // 1:1문의 링크
        document.location.href=j3_shop_url+'/1n1.php';
    });

    $(".hdgnb_cart_class").click(function(){ // 장바구니 링크
        document.location.href=j3_shop_url+'/cart.php';
    });

    $(".hdgnb_order_class").click(function(){ // 주문링크 링크
        document.location.href=j3_shop_url+'/order.php';
    });

    $(".hdgnb_wish_class").click(function(){ // 위시리스트 링크
        document.location.href=j3_shop_url+'/wish.php';
    });

    $("#total_search_form #sch_submit").click(function(){ // 검색 버튼 클릭시
        total_search();
    });

    $("#total_search_form input[name='skey']").keyup(function(){ // 검색어창 엔터시
        if(event.keyCode==13){ 
            total_search(); 
        }
    });
});

function total_search(){
    $form_obj = $("#total_search_form");
    $skey = $form_obj.find("input[name='skey']").val();
    if($skey==''){ alert('검색어를 입력해주세요.'); return; }
<?php
if($app_id=='europe0515'){ // 유럽상사일경우 검색조건 다르게 처리될수 있도록 처리
?>
    if($skey.length<6){
        alert('6자리 이상 규격번호를 입력하시기 바랍니다.'); return;
    }
<?php
}
?>
    document.total_search_form.submit();
}
</script>

<script>
$(function(){
    if('<?php echo $header_fixed?>'=='1'){
        $hd_height = $(".header_class").outerHeight();
        setsave("pc_hd_height", $hd_height, 31); // 상단 높이를 쿠키에 저장해놓고 각 페이지에서 해당되는 높이는 스타일로 지정한다.
        //$(".header_class").css("height",$hd_height+"px");
        if('<?php echo $_COOKIE['pc_hd_height']?>'==''){
            if('<?php if($is_index_page) echo "1"?>'!='1'){
                $hd_height = parseInt($hd_height)+20;
            }
            $("#container").css("margin-top",$hd_height+"px"); // 쿠기 적용전에 처리용으로 사용
        }
    }
});
</script>
<div class='cate_layer' style='display:none;'></div>
<div class='cate2_layer' style='display:none;'></div>
<div class='sub_cate_layers' style='display:none;'></div>
<input type='hidden' id='cate2_mo' value='0'>