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
131
|
<?php // 유럽상사에서에서 추가된 스킨모듈 Global $config, $configshop; $cur_img_url = $j3_img_url."/".$sk['sk_img_path'];
if(strpos($_SERVER['SCRIPT_NAME'],'index.php')>0){ $index_main = "Y"; } $stv = $_SESSION['stv']; $stv_img = $_SESSION['stv_img']; $stv_url = $_SESSION['stv_url'];
//_pr($_SESSION);
if($configshop['header_fixed']>=2){ $configshop['header_fixed']; }
if($skin_css!=''){ echo $skin_css; } else { ?> <!--최근본상품--> <style> .side_wrap{position: fixed;top: 200px;left:-100px;/*left: 50%;*/bottom: 0;width: 100px;margin: 0 0 0 0px;z-index: 9999;} .side_today{position: relative;width: 100px;display: block;border:1px solid #dddddd;background-color: #fff;} .side_today h4{height: 30px;line-height: 30px;text-align: center;border-bottom: 1px solid #dddddd;font-weight:600;font-size:13px;} .side_today h4 span{color:red;font-size:14px;} .side_today_pro{padding:5px;} .side_today_pro ul li{margin:10px 0;text-align:center;} .side_today_pro ul li img{width:70px;height:70px;}
.side_menu{position: relative;width: 100px;display: block;border:1px solid #dddddd;background-color: #fafafa;margin-top:5px;} {} .side_menu ul li{height: 30px;line-height: 30px;border-bottom: 1px solid #dddddd;text-align:center;} .side_menu ul li a{display:block;font-weight:600;} .side_menu_top{background: #4c4c4c;} .side_menu_top a{color:#fff;} .side_today_pro p{ text-align: center;height: 70px;line-height: 70px;} </style> <input type='hidden' id='top_idx' value='200'> <input type='hidden' id='top_etc' value='180'> <input type='hidden' id='up_top_fix' value='180'> <input type='hidden' id='up_top_nofix' value='10'> <input type='hidden' id='container_width' value='1250'> <?php }?> <div class="class_skin_idx_<?php echo $sk_idx;?>"> <div class="side_wrap" id='stv'> <!--최근본상품--> <div class="side_today"> <h4>최근본상품 <span>0</span></h4> <div class="side_today_pro"> <?php if(count($stv)>0){ echo "<ul>"; $cnt=0; for($i=count($stv);$i>(count($stv)-5);$i--){ if($cnt>=4 || $cnt>count($stv)-1){ break; } ?> <li><a href="<?php echo $stv_url[$i-1]?>"><img src="<?php echo $stv_img[$i-1]?>"></a></li> <?php $cnt++; } echo "</ul>"; } else { echo "<P class='side_today_none' style='display:;'>없음</P>"; } ?> </div> </div> <!--간편메뉴--> <div class="side_menu"> <ul> <li><a class='hdgnb_cart_class'>장바구니</a></li> <li><a class='hdgnb_wish_class'>위시리스트</a></li> <li><a class='hdgnb_order_class'>주문조회</a></li> <li class="side_menu_top"><a href="#">TOP</a></li> </ul> </div> </div> </div> <script> $(function(){ <?php if($index_main=='Y'){?> $top = parseInt($("#top_idx").val()); <?php } else {?> $top = parseInt($("#top_etc").val()); <?php }?>
<?php if($configshop['header_fixed']>=2){?> $up_top = $("#up_top_fix").val(); $top_scroll = $top+10-parseInt($up_top); <?php } else {?> $up_top = $("#up_top_nofix").val(); $top_scroll = $top+10; <?php }?> $("#stv").css("top",$top+"px"); $v = $("#stv"); $w_width = $(window).width(); $container_width = parseInt($("#container_width").val());
if($w_width>$container_width){ $v1 = parseInt(($w_width-$container_width)/2); $v2 = $container_width+$v1; $v.css("left",$v2+"px"); } else { $v.css("left",$container_width+"px"); } $(window).scroll(function(){ // 스크롤시 처리 var $windowScrollTop=$(window).scrollTop(); //console.log($windowScrollTop+" "+$top_scroll+" "+$up_top); if($windowScrollTop>$top_scroll){ $("#stv").css("top",$up_top+"px"); } else { $new_top = $top - $windowScrollTop; $("#stv").css("top",$new_top+"px"); } }); $(window).resize(function(){ // 가로사이즈 변경시 처리 console.log(document.body.clientWidth+" "+$container_width); $v = $("#stv"); if(document.body.clientWidth>$container_width){ $v1 = parseInt((document.body.clientWidth-$container_width)/2); $v2 = $container_width+$v1; $v.css("left",$v2+"px"); } else { $v.css("left",$container_width+"px"); } }); }); </script>
|