From 937a9588b9f9eb951c47965803e8847a081aa65c Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 6 Mar 2014 10:42:40 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=A4=EC=9D=B8=20=EB=B0=B0=EB=84=88=20?= =?UTF-8?q?=EC=8A=A4=ED=82=A8=ED=99=94=20=EC=9E=91=EC=97=85=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 14 +- skin/shop/basic/mainbanner.10.skin.php | 209 ++++++++++++++++++++++++- skin/shop/basic/style.css | 7 + 3 files changed, 221 insertions(+), 9 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 52b3ad451..f84e0178a 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1117,11 +1117,17 @@ function display_banner($position, $skin='') if (!$position) $position = '왼쪽'; if (!$skin) $skin = 'boxbanner.skin.php'; - // 배너 출력 - $sql = " select * from {$g5['g5_shop_banner_table']} where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time and bn_position = '$position' order by bn_order, bn_id desc "; - $result = sql_query($sql); + $skin_path = G5_SHOP_SKIN_PATH.'/'.$skin; - include G5_SHOP_SKIN_PATH.'/boxbanner'.$num.'.skin.php'; + if(file_exists($skin_path)) { + // 배너 출력 + $sql = " select * from {$g5['g5_shop_banner_table']} where '".G5_TIME_YMDHIS."' between bn_begin_time and bn_end_time and bn_position = '$position' order by bn_order, bn_id desc "; + $result = sql_query($sql); + + include $skin_path; + } else { + echo '

'.str_replace(G5_PATH.'/', '', $skin_path).'파일이 존재하지 않습니다.

'; + } } diff --git a/skin/shop/basic/mainbanner.10.skin.php b/skin/shop/basic/mainbanner.10.skin.php index b5ff0b98a..896b69973 100644 --- a/skin/shop/basic/mainbanner.10.skin.php +++ b/skin/shop/basic/mainbanner.10.skin.php @@ -6,9 +6,12 @@ add_stylesheet('', ?>

쇼핑몰 배너

'.PHP_EOL.''.PHP_EOL; +?> + + \ No newline at end of file diff --git a/skin/shop/basic/style.css b/skin/shop/basic/style.css index 6c8682128..b8a9203d7 100644 --- a/skin/shop/basic/style.css +++ b/skin/shop/basic/style.css @@ -58,6 +58,13 @@ .sbn li {margin:0 0 1px} .sbn .sbn_border {border:1px solid #d5d5d5} /* 인덱스 배너도 함께 사용 */ +#sbn_idx ul {position:relative;overflow:hidden} +#sbn_idx ul li {position:absolute;display:none;top:0;left:0} +#sbn_idx ul li.sbn_first{display:block} +#sbn_idx button {position:absolute;top:100px;z-index:100} +#sbn_idx #sbn_btn_prev{left:50px} +#sbn_idx #sbn_btn_next{right:50px} + /* aside:장바구니 */ #sbsk {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9} #sbsk h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}