Merge branch 'master' into conv
This commit is contained in:
@ -90,7 +90,10 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td headers="th_img" colspan="6" class="td_img_view"><?php echo $bn_img; ?></td>
|
||||
<td headers="th_img" colspan="6" class="td_img_view sbn_img">
|
||||
<div class="sbn_image"><?php echo $bn_img; ?></div>
|
||||
<button type="button" class="sbn_img_view btn_frmline">이미지확인</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
@ -106,6 +109,14 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(".sbn_img_view").on("click", function() {
|
||||
$(this).closest(".td_img_view").find(".sbn_image").slideToggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
|
||||
@ -844,9 +844,9 @@ if(!isset($default['de_mobile_rel_list_use'])) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">로고이미지</th>
|
||||
<th scope="row">상단로고이미지</th>
|
||||
<td>
|
||||
<?php echo help("쇼핑몰 로고를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
|
||||
<?php echo help("쇼핑몰 상단로고를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
|
||||
<input type="file" name="logo_img" id="logo_img">
|
||||
<?php
|
||||
$logo_img = G5_DATA_PATH."/common/logo_img";
|
||||
@ -855,46 +855,46 @@ if(!isset($default['de_mobile_rel_list_use'])) {
|
||||
$size = getimagesize($logo_img);
|
||||
?>
|
||||
<input type="checkbox" name="logo_img_del" value="1" id="logo_img_del">
|
||||
<label for="logo_img_del"><span class="sound_only">로고이미지</span> 삭제</label>
|
||||
<label for="logo_img_del"><span class="sound_only">상단로고이미지</span> 삭제</label>
|
||||
<span class="scf_img_logoimg"></span>
|
||||
<div id="logoimg" class="banner_or_img">
|
||||
<img src="<?php echo G5_DATA_URL; ?>/common/logo_img" alt="">
|
||||
<button type="button" class="sit_wimg_close">닫기</button>
|
||||
</div>
|
||||
<script>
|
||||
$('<button type="button" id="cf_logoimg_view" class="btn_frmline scf_img_view">로고이미지 확인</button>').appendTo('.scf_img_logoimg');
|
||||
$('<button type="button" id="cf_logoimg_view" class="btn_frmline scf_img_view">상단로고이미지 확인</button>').appendTo('.scf_img_logoimg');
|
||||
</script>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">메인이미지</th>
|
||||
<th scope="row">하단로고이미지</th>
|
||||
<td>
|
||||
<?php echo help("쇼핑몰 메인이미지를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
|
||||
<input type="file" name="main_img">
|
||||
<?php echo help("쇼핑몰 하단로고를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
|
||||
<input type="file" name="logo_img2" id="logo_img2">
|
||||
<?php
|
||||
$main_img = G5_DATA_PATH."/common/main_img";
|
||||
if (file_exists($main_img))
|
||||
$logo_img2 = G5_DATA_PATH."/common/logo_img2";
|
||||
if (file_exists($logo_img2))
|
||||
{
|
||||
$size = getimagesize($main_img);
|
||||
$size = getimagesize($logo_img2);
|
||||
?>
|
||||
<input type="checkbox" name="main_img_del" value="1" id="main_img_del">
|
||||
<label for="main_img_del"><span class="sound_only">메인이미지</span> 삭제</label>
|
||||
<span class="scf_img_mainimg"></span>
|
||||
<div id="mainimg" class="banner_or_img">
|
||||
<img src="<?php echo G5_DATA_URL; ?>/common/main_img" alt="">
|
||||
<input type="checkbox" name="logo_img_del2" value="1" id="logo_img_del2">
|
||||
<label for="logo_img_del2"><span class="sound_only">하단로고이미지</span> 삭제</label>
|
||||
<span class="scf_img_logoimg2"></span>
|
||||
<div id="logoimg2" class="banner_or_img">
|
||||
<img src="<?php echo G5_DATA_URL; ?>/common/logo_img2" alt="">
|
||||
<button type="button" class="sit_wimg_close">닫기</button>
|
||||
</div>
|
||||
<script>
|
||||
$('<button type="button" id="cf_mainimg_view" class="btn_frmline scf_img_view">메인이미지 확인</button>').appendTo('.scf_img_mainimg');
|
||||
$('<button type="button" id="cf_logoimg2_view" class="btn_frmline scf_img_view">하단로고이미지 확인</button>').appendTo('.scf_img_logoimg2');
|
||||
</script>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일 로고이미지</th>
|
||||
<th scope="row">모바일 상단로고이미지</th>
|
||||
<td>
|
||||
<?php echo help("모바일 쇼핑몰 로고를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
|
||||
<?php echo help("모바일 쇼핑몰 상단로고를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
|
||||
<input type="file" name="mobile_logo_img" id="mobile_logo_img">
|
||||
<?php
|
||||
$mobile_logo_img = G5_DATA_PATH."/common/mobile_logo_img";
|
||||
@ -903,14 +903,38 @@ if(!isset($default['de_mobile_rel_list_use'])) {
|
||||
$size = getimagesize($mobile_logo_img);
|
||||
?>
|
||||
<input type="checkbox" name="mobile_logo_img_del" value="1" id="mobile_logo_img_del">
|
||||
<label for="mobile_logo_img_del"><span class="sound_only">모바일 로고이미지</span> 삭제</label>
|
||||
<label for="mobile_logo_img_del"><span class="sound_only">모바일 상단로고이미지</span> 삭제</label>
|
||||
<span class="scf_img_mobilelogoimg"></span>
|
||||
<div id="mobilelogoimg" class="banner_or_img">
|
||||
<img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img" alt="">
|
||||
<button type="button" class="sit_wimg_close">닫기</button>
|
||||
</div>
|
||||
<script>
|
||||
$('<button type="button" id="cf_mobilelogoimg_view" class="btn_frmline scf_img_view">로고이미지 확인</button>').appendTo('.scf_img_mobilelogoimg');
|
||||
$('<button type="button" id="cf_mobilelogoimg_view" class="btn_frmline scf_img_view">모바일 상단로고이미지 확인</button>').appendTo('.scf_img_mobilelogoimg');
|
||||
</script>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일 하단로고이미지</th>
|
||||
<td>
|
||||
<?php echo help("모바일 쇼핑몰 하단로고를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
|
||||
<input type="file" name="mobile_logo_img2" id="mobile_logo_img2">
|
||||
<?php
|
||||
$mobile_logo_img2 = G5_DATA_PATH."/common/mobile_logo_img2";
|
||||
if (file_exists($mobile_logo_img2))
|
||||
{
|
||||
$size = getimagesize($mobile_logo_img2);
|
||||
?>
|
||||
<input type="checkbox" name="mobile_logo_img_del2" value="1" id="mobile_logo_img_del2">
|
||||
<label for="mobile_logo_img_del2"><span class="sound_only">모바일 하단로고이미지</span> 삭제</label>
|
||||
<span class="scf_img_mobilelogoimg2"></span>
|
||||
<div id="mobilelogoimg2" class="banner_or_img">
|
||||
<img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img2" alt="">
|
||||
<button type="button" class="sit_wimg_close">닫기</button>
|
||||
</div>
|
||||
<script>
|
||||
$('<button type="button" id="cf_mobilelogoimg2_view" class="btn_frmline scf_img_view">모바일 하단로고이미지 확인</button>').appendTo('.scf_img_mobilelogoimg2');
|
||||
</script>
|
||||
<?php } ?>
|
||||
</td>
|
||||
@ -986,7 +1010,7 @@ if(!isset($default['de_mobile_rel_list_use'])) {
|
||||
|
||||
<?php echo $frm_submit; ?>
|
||||
|
||||
<?php if (file_exists($logo_img) || file_exists($main_img)) { ?>
|
||||
<?php if (file_exists($logo_img) || file_exists($logo_img2) || file_exists($mobile_logo_img) || file_exists($mobile_logo_img2)) { ?>
|
||||
<script>
|
||||
$(".banner_or_img").addClass("scf_img");
|
||||
$(function() {
|
||||
|
||||
@ -10,12 +10,14 @@ auth_check($auth[$sub_menu], "w");
|
||||
if (!$de_admin_company_owner) goto_url("./configform.php");
|
||||
|
||||
if ($logo_img_del) @unlink(G5_DATA_PATH."/common/logo_img");
|
||||
if ($main_img_del) @unlink(G5_DATA_PATH."/common/main_img");
|
||||
if ($logo_img_del2) @unlink(G5_DATA_PATH."/common/logo_img2");
|
||||
if ($mobile_logo_img_del) @unlink(G5_DATA_PATH."/common/mobile_logo_img");
|
||||
if ($mobile_logo_img_del2) @unlink(G5_DATA_PATH."/common/mobile_logo_img2");
|
||||
|
||||
if ($_FILES['logo_img']['name']) upload_file($_FILES['logo_img']['tmp_name'], "logo_img", G5_DATA_PATH."/common");
|
||||
if ($_FILES['main_img']['name']) upload_file($_FILES['main_img']['tmp_name'], "main_img", G5_DATA_PATH."/common");
|
||||
if ($_FILES['logo_img2']['name']) upload_file($_FILES['logo_img2']['tmp_name'], "logo_img2", G5_DATA_PATH."/common");
|
||||
if ($_FILES['mobile_logo_img']['name']) upload_file($_FILES['mobile_logo_img']['tmp_name'], "mobile_logo_img", G5_DATA_PATH."/common");
|
||||
if ($_FILES['mobile_logo_img2']['name']) upload_file($_FILES['mobile_logo_img2']['tmp_name'], "mobile_logo_img2", G5_DATA_PATH."/common");
|
||||
|
||||
$de_kcp_mid = substr($_POST['de_kcp_mid'],0,3);
|
||||
|
||||
|
||||
@ -559,7 +559,7 @@ echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
|
||||
<script>
|
||||
if (confirm("계속 입력하시겠습니까?"))
|
||||
//location.href = "<?php echo "./itemform.php?it_id=$it_id&sort1=$sort1&sort2=$sort2&sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&page=$page"?>";
|
||||
location.href = "<?php echo "./itemform.php?$qstr"; ?>";
|
||||
location.href = "<?php echo "./itemform.php?".str_replace('&', '&', $qstr); ?>";
|
||||
else
|
||||
location.href = "<?php echo "./itemlist.php?$qstr"; ?>";
|
||||
location.href = "<?php echo "./itemlist.php?".str_replace('&', '&', $qstr); ?>";
|
||||
</script>
|
||||
|
||||
@ -303,6 +303,16 @@ if(!sql_query(" select mb_id from {$g5['g5_shop_order_delete_table']} limit 1 ",
|
||||
if($row['od_mobile'])
|
||||
$od_mobile = '(M)';
|
||||
|
||||
// 주문번호에 - 추가
|
||||
switch(strlen($row['od_id'])) {
|
||||
case 16:
|
||||
$disp_od_id = substr($row['od_id'],0,8).'-'.substr($row['od_id'],8);
|
||||
break;
|
||||
default:
|
||||
$disp_od_id = substr($row['od_id'],0,6).'-'.substr($row['od_id'],6);
|
||||
break;
|
||||
}
|
||||
|
||||
// 주문 번호에 에스크로 표시
|
||||
$od_paytype = '';
|
||||
if($default['de_escrow_use'] && $row['od_escrow'])
|
||||
@ -331,7 +341,7 @@ if(!sql_query(" select mb_id from {$g5['g5_shop_order_delete_table']} limit 1 ",
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>"><?php echo $row['od_id']; ?></a><br>
|
||||
</td> -->
|
||||
<td headers="th_ordnum" class="td_odrnum2" rowspan="2" colspan="2">
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="orderitem"><?php echo substr($row['od_id'],0,8).'-'.substr($row['od_id'],8); ?></a>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="orderitem"><?php echo $disp_od_id; ?></a>
|
||||
<?php echo $od_mobile; ?>
|
||||
<?php echo $od_paytype; ?>
|
||||
</td>
|
||||
|
||||
@ -728,6 +728,10 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
#sodr_print_pop_total span {display:block;margin:0 0 10px;font-size:1.5em}
|
||||
#sodr_print_pop_total strong {color:#ff3600}
|
||||
|
||||
/* 배너관리 */
|
||||
.sbn_img {text-align:center}
|
||||
.sbn_image {display:none;margin:0 0 10px;text-align:left}
|
||||
|
||||
/* SMS문자전송 */
|
||||
#sms_send {padding-bottom:100px;zoom:1}
|
||||
#sms_send:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
|
||||
@ -535,9 +535,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
|
||||
|
||||
/* 배너 인덱스 출력 */
|
||||
#sbn_idx {}
|
||||
#sbn_idx h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#sbn_idx ul {margin:0;padding:0;border:0;list-style:none}
|
||||
#sbn_idx li {margin:0 0 1px}
|
||||
|
||||
/* 상품검색 */
|
||||
#ssch_frm {padding:20px;border:1px solid #e9e9e9;background:#f2f5f9;zoom:1}
|
||||
|
||||
@ -559,8 +559,9 @@ fclose($f);
|
||||
|
||||
if($g5_shop_install) {
|
||||
@copy('./logo_img', $data_path.'/common/logo_img');
|
||||
@copy('./logo_img', $data_path.'/common/logo_img2');
|
||||
@copy('./mobile_logo_img', $data_path.'/common/mobile_logo_img');
|
||||
@copy('./main_img', $data_path.'/common/main_img');
|
||||
@copy('./mobile_logo_img', $data_path.'/common/mobile_logo_img2');
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
?>
|
||||
|
||||
BIN
install/main_img
BIN
install/main_img
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
13
js/shop.js
13
js/shop.js
@ -250,6 +250,7 @@ $(function() {
|
||||
// 선택옵션 추가처리
|
||||
function sel_option_process(add_exec)
|
||||
{
|
||||
var it_price = parseInt($("input#it_price").val());
|
||||
var id = "";
|
||||
var value, info, sel_opt, item, price, stock, run_error = false;
|
||||
var option = sep = "";
|
||||
@ -285,6 +286,12 @@ function sel_option_process(add_exec)
|
||||
price = info[1];
|
||||
stock = info[2];
|
||||
|
||||
// 금액 음수 체크
|
||||
if(it_price + parseInt(price) < 0) {
|
||||
alert("구매금액이 음수인 상품은 구매할 수 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(add_exec) {
|
||||
if(same_option_check(option))
|
||||
return;
|
||||
@ -317,6 +324,12 @@ function sel_supply_process($el, add_exec)
|
||||
var price = info[1];
|
||||
var stock = info[2];
|
||||
|
||||
// 금액 음수 체크
|
||||
if(parseInt(price) < 0) {
|
||||
alert("구매금액이 음수인 상품은 구매할 수 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(add_exec) {
|
||||
if(same_option_check(option))
|
||||
return;
|
||||
|
||||
@ -1883,10 +1883,7 @@ function convert_charset($from_charset, $to_charset, $str)
|
||||
function escape_trim($field)
|
||||
{
|
||||
if ($field) {
|
||||
$str = mysql_real_escape_string(@trim($field));
|
||||
|
||||
//if(PHP_VERSION < '5.3.0')
|
||||
// $str = stripslashes($str);
|
||||
$str = call_user_func(G5_ESCAPE_FUNCTION, $field);
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
@ -1110,13 +1110,24 @@ function date_conv($date, $case=1)
|
||||
|
||||
|
||||
// 배너출력
|
||||
function display_banner($position, $num="")
|
||||
function display_banner($position, $skin='')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
if (!$position) $position = '왼쪽';
|
||||
if (!$skin) $skin = 'boxbanner.skin.php';
|
||||
|
||||
include G5_SHOP_SKIN_PATH.'/boxbanner'.$num.'.skin.php';
|
||||
$skin_path = G5_SHOP_SKIN_PATH.'/'.$skin;
|
||||
|
||||
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 '<p>'.str_replace(G5_PATH.'/', '', $skin_path).'파일이 존재하지 않습니다.</p>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ $admin = get_admin("super");
|
||||
|
||||
<div id="ft">
|
||||
<h2><?php echo $config['cf_title']; ?> 정보</h2>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/"><img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img" alt="처음으로"></a>
|
||||
<a href="<?php echo $default['de_root_index_use'] ? G5_URL : G5_SHOP_URL; ?>/"><img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img2" alt="처음으로"></a>
|
||||
<p>
|
||||
<span><?php echo $default['de_admin_company_addr']; ?></span>
|
||||
<span><b>대표</b> <?php echo $default['de_admin_company_owner']; ?></span><br>
|
||||
|
||||
|
Before Width: | Height: | Size: 53 B After Width: | Height: | Size: 53 B |
@ -55,7 +55,7 @@
|
||||
#sct_location {border:1px solid #e9e9e9;background:#f2f5f9;letter-spacing:-4px}
|
||||
#sct_location a {display:inline-block;padding:5px 10px;text-decoration:none;letter-spacing:0 !important}
|
||||
.sct_here {font-weight:bold}
|
||||
.sct_bg {padding-right:13px !important;background:url('../shop/img/sct_bg_toright.gif') right 8px no-repeat}
|
||||
.sct_bg {padding-right:13px !important;background:url('img/sct_bg_toright.gif') right 8px no-repeat}
|
||||
|
||||
/* 상품 목록 카테고리 목록 */
|
||||
.sct_ct {}
|
||||
|
||||
@ -215,6 +215,15 @@ else // 장바구니에 담기
|
||||
$io_price = $opt_list[$io_type][$io_id]['price'];
|
||||
$ct_qty = $_POST['ct_qty'][$it_id][$k];
|
||||
|
||||
// 구매가격이 음수인지 체크
|
||||
if($io_type) {
|
||||
if((int)$io_price < 0)
|
||||
alert('구매금액이 음수인 상품은 구매할 수 없습니다.');
|
||||
} else {
|
||||
if((int)$it['it_price'] + (int)$io_price < 0)
|
||||
alert('구매금액이 음수인 상품은 구매할 수 없습니다.');
|
||||
}
|
||||
|
||||
// 동일옵션의 상품이 있으면 수량 더함
|
||||
$sql2 = " select ct_id
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
|
||||
@ -13,7 +13,7 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
|
||||
|
||||
<!-- 메인이미지 시작 { -->
|
||||
<div id="sidx_img">
|
||||
<img src="<?php echo G5_DATA_URL; ?>/common/main_img" alt="">
|
||||
<?php echo display_banner('메인', 'mainbanner.10.skin.php'); ?>
|
||||
</div>
|
||||
<!-- } 메인이미지 끝 -->
|
||||
|
||||
@ -146,13 +146,6 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
|
||||
|
||||
<?php echo visit('shop_basic'); // 접속자 ?>
|
||||
|
||||
<!-- 메인배너 시작 { -->
|
||||
<section id="sbn_idx">
|
||||
<h2>쇼핑몰 메인 배너</h2>
|
||||
<?php echo display_banner('메인'); ?>
|
||||
</section>
|
||||
<!-- } 메인배너 끝 -->
|
||||
|
||||
<?php
|
||||
include_once(G5_SHOP_PATH.'/shop.tail.php');
|
||||
?>
|
||||
@ -103,10 +103,7 @@ include_once(G5_LIB_PATH.'/latest.lib.php');
|
||||
<?php include_once(G5_SHOP_SKIN_PATH.'/boxcommunity.skin.php'); // 커뮤니티 ?>
|
||||
|
||||
<!-- 쇼핑몰 배너 시작 { -->
|
||||
<aside id="sbn_aside">
|
||||
<h2>쇼핑몰 배너</h2>
|
||||
<?php echo display_banner('왼쪽'); ?>
|
||||
</aside>
|
||||
<?php echo display_banner('왼쪽'); ?>
|
||||
<!-- } 쇼핑몰 배너 끝 -->
|
||||
</div>
|
||||
<!-- } 상단 끝 -->
|
||||
|
||||
@ -15,7 +15,7 @@ $admin = get_admin("super");
|
||||
|
||||
<div id="ft">
|
||||
<div>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/" id="ft_logo"><img src="<?php echo G5_DATA_URL; ?>/common/logo_img" alt="처음으로"></a>
|
||||
<a href="<?php echo $default['de_root_index_use'] ? G5_URL : G5_SHOP_URL; ?>/" id="ft_logo"><img src="<?php echo G5_DATA_URL; ?>/common/logo_img2" alt="처음으로"></a>
|
||||
<ul>
|
||||
<li><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a></li>
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 배너 출력
|
||||
$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);
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
|
||||
?>
|
||||
@ -12,10 +8,11 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
if ($i==0) echo '<ul>'.PHP_EOL;
|
||||
|
||||
if ($i==0) echo '<aside id="sbn_side" class="sbn"><h2>쇼핑몰 배너</h2><ul>'.PHP_EOL;
|
||||
//print_r2($row);
|
||||
// 테두리 있는지
|
||||
$bn_border = $row['bn_border'];
|
||||
$bn_border = ($row['bn_border']) ? ' sbn_border' : '';;
|
||||
// 새창 띄우기인지
|
||||
$bn_new_win = ($row['bn_new_win']) ? ' target="'.$row['bn_new_win'].'"' : '';
|
||||
|
||||
@ -29,11 +26,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
echo '<a href="'.G5_SHOP_URL.'/bannerhit.php?bn_id='.$row['bn_id'].'&url='.urlencode($row['bn_url']).'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo '<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'" alt="'.$row['bn_alt'].'" width="'.$size[0].'" height="'.$size[1].'">';
|
||||
echo '<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'" alt="'.$row['bn_alt'].'" width="'.$size[0].'" height="'.$size[1].'" class="'.$bn_border.'">';
|
||||
if($row['bn_url'])
|
||||
echo '</a>'.PHP_EOL;
|
||||
echo '</li>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
if ($i>0) echo '</ul>'.PHP_EOL;
|
||||
if ($i>0) echo '</ul></aside>'.PHP_EOL;
|
||||
?>
|
||||
BIN
skin/shop/basic/img/sbn_btn.png
Normal file
BIN
skin/shop/basic/img/sbn_btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
skin/shop/basic/img/sct_bg_toright.gif
Normal file
BIN
skin/shop/basic/img/sct_bg_toright.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 B |
244
skin/shop/basic/mainbanner.10.skin.php
Normal file
244
skin/shop/basic/mainbanner.10.skin.php
Normal file
@ -0,0 +1,244 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<?php
|
||||
$max_width = $max_height = 0;
|
||||
$bn_first_class = ' class="sbn_first"';
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
if ($i==0) echo '<section id="sbn_idx" class="sbn">'.PHP_EOL.'<h2>쇼핑몰 배너</h2>'.PHP_EOL.'<ul>'.PHP_EOL;
|
||||
//print_r2($row);
|
||||
// 테두리 있는지
|
||||
$bn_border = ($row['bn_border']) ? ' sbn_border' : '';;
|
||||
// 새창 띄우기인지
|
||||
$bn_new_win = ($row['bn_new_win']) ? ' target="'.$row['bn_new_win'].'"' : '';
|
||||
|
||||
$bimg = G5_DATA_PATH.'/banner/'.$row['bn_id'];
|
||||
if (file_exists($bimg))
|
||||
{
|
||||
$size = getimagesize($bimg);
|
||||
|
||||
if($size[2] < 1 || $size[2] > 16)
|
||||
continue;
|
||||
|
||||
if($max_width < $size[0])
|
||||
$max_width = $size[0];
|
||||
|
||||
if($max_height < $size[1])
|
||||
$max_height = $size[1];
|
||||
|
||||
echo '<li'.$bn_first_class.'>'.PHP_EOL;
|
||||
if ($row['bn_url'][0] == '#')
|
||||
echo '<a href="'.$row['bn_url'].'">';
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
echo '<a href="'.G5_SHOP_URL.'/bannerhit.php?bn_id='.$row['bn_id'].'&url='.urlencode($row['bn_url']).'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo '<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'" width="'.$size[0].'" alt="'.$row['bn_alt'].'" class="'.$bn_border.'">';
|
||||
if($row['bn_url'])
|
||||
echo '</a>'.PHP_EOL;
|
||||
echo '</li>'.PHP_EOL;
|
||||
|
||||
$bn_first_class = '';
|
||||
}
|
||||
}
|
||||
if ($i>0) echo '</ul>'.PHP_EOL.'</section>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
var intervals = {};
|
||||
|
||||
var methods = {
|
||||
init: function(option)
|
||||
{
|
||||
if(this.length < 1)
|
||||
return false;
|
||||
|
||||
var $bnnr = this.find("li:has(img)");
|
||||
var count = $bnnr.size();
|
||||
var $bnnr_a = $bnnr.find("a");
|
||||
var width = <?php echo $max_width; ?>;
|
||||
var height = <?php echo $max_height; ?>;
|
||||
var wrap_width = this.parent().width();
|
||||
var c_idx = o_idx = 0;
|
||||
var el_id = this[0].id;
|
||||
var $this = this;
|
||||
|
||||
if(width > wrap_width) {
|
||||
height = parseInt(height * (wrap_width / width));
|
||||
}
|
||||
width = wrap_width;
|
||||
|
||||
this.width(wrap_width).height(height)
|
||||
.find("ul").width(width).height(height)
|
||||
.find("li").width(width).height(height);
|
||||
|
||||
$bnnr.not(".sbn_first").css("left", width+"px");
|
||||
|
||||
$bnnr.each(function() {
|
||||
var $img = $(this).find("img");
|
||||
var img_width = parseInt($img.attr("width"));
|
||||
if(img_width > width)
|
||||
img_width = width;
|
||||
|
||||
$img.removeAttr("width");
|
||||
$img.width(img_width);
|
||||
});
|
||||
|
||||
// 기본 설정값
|
||||
var settings = $.extend({
|
||||
interval: 5000,
|
||||
duration: 1500
|
||||
}, option);
|
||||
|
||||
if(count > 1) {
|
||||
var slide_button = "<div id=\"sbn_btn_p\" class=\"sbn_btn\"><button type=\"button\" id=\"sbn_btn_prev\" class=\"sbn_btn_slide\"><span></span>이전</button></div>\n";
|
||||
slide_button += "<div id=\"sbn_btn_n\" class=\"sbn_btn\"><button type=\"button\" id=\"sbn_btn_next\" class=\"sbn_btn_slide\"><span></span>다음</button></div>";
|
||||
|
||||
this.find("ul").before(slide_button);
|
||||
|
||||
var $bnnr_btn = this.find(".sbn_btn_slide");
|
||||
|
||||
$bnnr_btn.on("focusin", function() {
|
||||
clear_interval();
|
||||
});
|
||||
|
||||
$bnnr_btn.on("focusout", function() {
|
||||
set_interval();
|
||||
});
|
||||
}
|
||||
|
||||
set_interval();
|
||||
|
||||
$(".sbn_btn_slide").on("click", function() {
|
||||
if($this.find(":animated").size() > 0)
|
||||
return false;
|
||||
|
||||
clear_interval();
|
||||
|
||||
var id = $(this).attr("id");
|
||||
if(id.search("prev") > -1) {
|
||||
right_rolling();
|
||||
} else {
|
||||
left_rolling();
|
||||
}
|
||||
});
|
||||
|
||||
$bnnr.hover(
|
||||
function() {
|
||||
clear_interval();
|
||||
},
|
||||
function() {
|
||||
set_interval();
|
||||
}
|
||||
);
|
||||
|
||||
$bnnr_a.on("focusin", function() {
|
||||
clear_interval();
|
||||
});
|
||||
|
||||
$bnnr_a.on("focusout", function() {
|
||||
set_interval();
|
||||
});
|
||||
|
||||
function left_rolling() {
|
||||
$bnnr.each(function(index) {
|
||||
if($(this).is(":visible")) {
|
||||
o_idx = index;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$bnnr.not(":visible").css({
|
||||
display: "none",
|
||||
left: "+"+width+"px"
|
||||
});
|
||||
|
||||
$bnnr.eq(o_idx).animate(
|
||||
{ left: "-="+width+"px" }, settings.duration,
|
||||
function() {
|
||||
$(this).css("display", "none").css("left", width+"px");
|
||||
}
|
||||
);
|
||||
|
||||
c_idx = (o_idx + 1) % count;
|
||||
|
||||
$bnnr.eq(c_idx).css("display", "block").animate(
|
||||
{ left: "-="+width+"px" }, settings.duration,
|
||||
function() {
|
||||
o_idx = c_idx;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function right_rolling() {
|
||||
$bnnr.each(function(index) {
|
||||
if($(this).is(":visible")) {
|
||||
o_idx = index;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$bnnr.not(":visible").css({
|
||||
display: "none",
|
||||
left: "-"+width+"px"
|
||||
});
|
||||
|
||||
$bnnr.eq(o_idx).animate(
|
||||
{ left: "+="+width+"px" }, settings.duration,
|
||||
function() {
|
||||
$(this).css("display", "none").css("left", "-"+width+"px");
|
||||
}
|
||||
);
|
||||
|
||||
c_idx = (o_idx + 1) % count;
|
||||
|
||||
$bnnr.eq(c_idx).css("display", "block").animate(
|
||||
{ left: "+="+width+"px" }, settings.duration,
|
||||
function() {
|
||||
o_idx = c_idx;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function set_interval() {
|
||||
if(count > 1) {
|
||||
clear_interval();
|
||||
|
||||
intervals[el_id] = setInterval(left_rolling, settings.interval);
|
||||
}
|
||||
}
|
||||
|
||||
function clear_interval() {
|
||||
if(intervals[el_id]) {
|
||||
clearInterval(intervals[el_id]);
|
||||
}
|
||||
}
|
||||
},
|
||||
stop: function()
|
||||
{
|
||||
var el_id = this[0].id;
|
||||
if(intervals[el_id])
|
||||
clearInterval(intervals[el_id]);
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.bannerRolling = function(option) {
|
||||
if (methods[option])
|
||||
return methods[option].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
else
|
||||
return methods.init.apply(this, arguments);
|
||||
}
|
||||
}(jQuery));
|
||||
|
||||
$(function() {
|
||||
$("#sbn_idx").bannerRolling();
|
||||
// 기본 설정값을 변경하려면 아래처럼 사용
|
||||
//$("#sbn_idx").leftRolling({ interval: 6000, duration: 2000 });
|
||||
});
|
||||
</script>
|
||||
@ -52,10 +52,23 @@
|
||||
#scomm_empty {padding:15px 0;text-align:center}
|
||||
|
||||
/* aside:배너 */
|
||||
#sbn_aside {margin:0 0 5px}
|
||||
#sbn_aside h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#sbn_aside ul {margin:0;padding:0;border:0;list-style:none}
|
||||
#sbn_aside li {margin:0 0 1px}
|
||||
.sbn {margin:0 0 5px}
|
||||
.sbn h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
.sbn ul {margin:0;padding:0;border:0;list-style:none}
|
||||
.sbn li {margin:0 0 1px}
|
||||
.sbn .sbn_border {border:1px solid #d5d5d5} /* 인덱스 배너도 함께 사용 */
|
||||
|
||||
#sbn_idx {position:relative}
|
||||
#sbn_idx .sbn_btn {z-index:100;position:absolute;top:50%}
|
||||
#sbn_idx .sbn_btn button {position:relative;top:-35px;margin:0;padding:0;width:70px;height:70px;border:0;background:transparent;overflow:hidden}
|
||||
#sbn_idx .sbn_btn span {display:block;width:100%;height:100%;background:url('img/sbn_btn.png')}
|
||||
#sbn_idx #sbn_btn_p {left:25px}
|
||||
#sbn_idx .sbn_btn #sbn_btn_prev span {background-position:0 0}
|
||||
#sbn_idx #sbn_btn_n {right:25px}
|
||||
#sbn_idx .sbn_btn #sbn_btn_next span {background-position:-70px 0}
|
||||
#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}
|
||||
|
||||
/* aside:장바구니 */
|
||||
#sbsk {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#f2f5f9}
|
||||
@ -249,7 +262,7 @@
|
||||
#sct_location {margin:0 0 10px;border:1px solid #e9e9e9;background:#f2f5f9;letter-spacing:-4px}
|
||||
#sct_location a {display:inline-block;padding:10px 10px 8px;text-decoration:none;letter-spacing:0 !important}
|
||||
.sct_here {font-weight:bold}
|
||||
.sct_bg {padding-right:15px !important;background:url('../shop/img/sct_bg_toright.gif') right 11px no-repeat}
|
||||
.sct_bg {padding-right:15px !important;background:url('img/sct_bg_toright.gif') right 11px no-repeat}
|
||||
|
||||
/* 상품 목록 카테고리 목록 */
|
||||
.sct_ct {}
|
||||
|
||||
Reference in New Issue
Block a user