가격비교 사이트 코드 수정 1차
This commit is contained in:
@ -1751,6 +1751,63 @@ function get_item_sendcost($it_id, $price, $qty)
|
||||
}
|
||||
|
||||
|
||||
// 가격비교 사이트 상품 배송비
|
||||
function get_item_sendcost2($it_id, $price, $qty)
|
||||
{
|
||||
global $g5, $default;
|
||||
|
||||
$sql = " select it_id, it_sc_type, it_sc_method, it_sc_price, it_sc_minimum, it_sc_qty
|
||||
from {$g5['g5_shop_item_table']}
|
||||
where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
if(!$it['it_id'])
|
||||
return 0;
|
||||
|
||||
$sendcost = 0;
|
||||
|
||||
// 쇼핑몰 기본설정을 사용할 때
|
||||
if($it['it_sc_type'] == 0)
|
||||
{
|
||||
if($default['de_send_cost_case'] == '차등') {
|
||||
// 금액별차등 : 여러단계의 배송비 적용 가능
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
|
||||
for ($k=0; $k<count($send_cost_limit); $k++) {
|
||||
// 총판매금액이 배송비 상한가 보다 작다면
|
||||
if ($price < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
|
||||
$sendcost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($it['it_sc_type'] > 1) {
|
||||
if($it['it_sc_type'] == 2) { // 조건부무료
|
||||
if($price >= $it['it_sc_minimum'])
|
||||
$sendcost = 0;
|
||||
else
|
||||
$sendcost = $it['it_sc_price'];
|
||||
} else if($it['it_sc_type'] == 3) { // 유료배송
|
||||
$sendcost = $it['it_sc_price'];
|
||||
} else { // 수량별 부과
|
||||
if(!$it['it_sc_qty'])
|
||||
$it['it_sc_qty'] = 1;
|
||||
|
||||
$q = ceil((int)$qty / (int)$it['it_sc_qty']);
|
||||
$sendcost = (int)$it['it_sc_price'] * $q;
|
||||
}
|
||||
} else if($it['it_sc_type'] == 1) { // 무료배송
|
||||
$sendcost = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return $sendcost;
|
||||
}
|
||||
|
||||
|
||||
// 쿠폰 사용체크
|
||||
function is_used_coupon($mb_id, $cp_id)
|
||||
{
|
||||
|
||||
@ -6,20 +6,6 @@ ob_start();
|
||||
$lt = "";
|
||||
$gt = "<!>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -58,10 +44,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
// 배송비계산
|
||||
$delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
@ -6,20 +6,6 @@ ob_start();
|
||||
$lt = "";
|
||||
$gt = "<!>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
@ -59,10 +45,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
// 배송비계산
|
||||
$delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
@ -1,133 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
[[_BEGIN]]
|
||||
[[PRODID]]a111
|
||||
[[PRNAME]]테스트상품1
|
||||
[[_PRICE]]84000
|
||||
[[PRDURL]]http://www.auction.co.kr/pinfo/pdetail.asp?pid=a111
|
||||
[[IMGURL]]http://www.auction.co.kr/images/aa_1.jpg
|
||||
[[CATE_1]]의류
|
||||
[[CATE_2]]여성의류
|
||||
[[CATE_3]]나시
|
||||
[[CATE_4]]
|
||||
[[_MODEL]]쉬폰
|
||||
[[_BRAND]]
|
||||
[[_MAKER]]
|
||||
[[ORIGIN]]중국
|
||||
[[PRDATE]]2008-01-11
|
||||
[[DELIVR]]0/50000/3000
|
||||
[[_EVENT]]
|
||||
[[COUPON]]
|
||||
[[PRCARD]]신한5개월
|
||||
[[_POINT]]
|
||||
[[MODIMG]]
|
||||
[[SRATIO]]3.5
|
||||
[[___END]]
|
||||
|
||||
필수
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[PRDURL]] // 상품 상세페이지 URL
|
||||
[[IMGURL]] // 상품 대 이미지
|
||||
[[CATE_1]] // 쇼핑몰 대 카테고리
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
$shop_url = G5_SHOP_URL;
|
||||
$data_url = G5_DATA_URL;
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}{$row['it_name']}
|
||||
{$lt}_PRICE{$gt}{$row['it_price']}
|
||||
{$lt}PRDURL{$gt}$shop_url/item.php?it_id={$row['it_id']}
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MODEL{$gt}
|
||||
{$lt}_BRAND{$gt}
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_EVENT{$gt}
|
||||
{$lt}COUPON{$gt}
|
||||
{$lt}PRCARD{$gt}
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}MODIMG{$gt}Y
|
||||
{$lt}SRATIO{$gt}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
@ -1,129 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
// 신규상품URL은 전체 상품정보 양식에 맞춰서 해당날짜에 추가된 상품만 출력
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
[[_BEGIN]]
|
||||
[[PRODID]]a111
|
||||
[[PRNAME]]테스트상품1
|
||||
[[_PRICE]]84000
|
||||
[[PRDURL]]http://www.auction.co.kr/pinfo/pdetail.asp?pid=a111
|
||||
[[IMGURL]]http://www.auction.co.kr/images/aa_1.jpg
|
||||
[[CATE_1]]의류
|
||||
[[CATE_2]]여성의류
|
||||
[[CATE_3]]나시
|
||||
[[CATE_4]]
|
||||
[[_MODEL]]쉬폰
|
||||
[[_BRAND]]
|
||||
[[_MAKER]]
|
||||
[[ORIGIN]]중국
|
||||
[[PRDATE]]2008-01-11
|
||||
[[DELIVR]]0/50000/3000
|
||||
[[_EVENT]]
|
||||
[[COUPON]]
|
||||
[[PRCARD]]신한5개월
|
||||
[[_POINT]]
|
||||
[[MODIMG]]
|
||||
[[SRATIO]]3.5
|
||||
[[___END]]
|
||||
|
||||
필수
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[PRDURL]] // 상품 상세페이지 URL
|
||||
[[IMGURL]] // 상품 대 이미지
|
||||
[[CATE_1]] // 쇼핑몰 대 카테고리
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
$shop_url = G5_SHOP_URL;
|
||||
$data_url = G5_DATA_URL;
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}{$row['it_name']}
|
||||
{$lt}_PRICE{$gt}{$row['it_price']}
|
||||
{$lt}PRDURL{$gt}$shop_url/item.php?it_id={$row['it_id']}
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
@ -1,46 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
// 요약상품 URL
|
||||
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}{$row['it_name']}
|
||||
{$lt}_PRICE{$gt}{$row['it_price']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
@ -1,60 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 비비(베스트바이어) 엔진페이지
|
||||
*/
|
||||
function it_image($img)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$tmp = G5_DATA_PATH.'/item/'.$img;
|
||||
if (file_exists($tmp) && $img) {
|
||||
$str = G5_DATA_URL.'/item/'.$img;
|
||||
} else {
|
||||
$str = G5_SHOP_URL.'/img/no_image.gif';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
include_once('./_common.php');
|
||||
?>
|
||||
<html>
|
||||
<title>비비 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
// <p>상품번호^대분류^중분류^소분류^제조사^모델명^상품Url^이미지Url^가격
|
||||
$str = "";
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$image = get_it_imageurl($row['it_id']);
|
||||
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
|
||||
if (strlen($row['ca_id']) >= 4)
|
||||
$row3 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
|
||||
if (strlen($row['ca_id']) >= 6)
|
||||
$row4 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
|
||||
// 재고검사해서 없으면 상품가격을 0 으로 설정
|
||||
$stock = get_it_stock_qty($row['it_id']);
|
||||
if ($stock <= 0)
|
||||
$row['it_price'] = 0;
|
||||
|
||||
$str .= "<p>{$row['it_id']}^{$row2['ca_name']}^{$row3['ca_name']}^{$row4['ca_name']}^{$row['it_maker']}^{$row['it_name']}^".G5_SHOP_URL."/item.php?it_id={$row['it_id']}^$image^{$row['it_price']}";
|
||||
$str .= "\n";
|
||||
}
|
||||
|
||||
echo "<p>" . $config['cf_title'] . " 입니다. 총 (".$i.") 건 입니다.\n";
|
||||
echo $str;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,64 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 다나와 엔진페이지
|
||||
*/
|
||||
include_once('./_common.php');
|
||||
|
||||
$nl = ""; // new line \n
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
// 상품ID^카테고리^상품명^제조사^이미지URL^상품URL^가격^적립금^할인쿠폰^무이자할부^사은품^모델명^추가정보^출시일^배송료
|
||||
$str = "";
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row3 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name .= "|" . $row3['ca_name'];
|
||||
}
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
$str .= $nl;
|
||||
$str .= $row['it_id']; // 상품ID
|
||||
$str .= "^$ca_name"; // 카테고리
|
||||
$str .= "^{$row['it_name']}"; // 상품명
|
||||
$str .= "^{$row['it_maker']}"; // 제조사
|
||||
$str .= "^".$img_url; // 이미지URL
|
||||
$str .= "^".G5_SHOP_URL."/item.php?it_id={$row['it_id']}"; // 상품URL
|
||||
$str .= "^{$row['it_price']}"; // 가격
|
||||
$str .= "^{$row['it_point']}"; // 적립금
|
||||
$str .= "^"; // 할인쿠폰
|
||||
$str .= "^"; // 무이자할부
|
||||
$str .= "^"; // 사은품
|
||||
$str .= "^{$row['it_model']}"; // 모델명
|
||||
$str .= "^"; // 추가정보
|
||||
$str .= "^"; // 출시일
|
||||
$str .= "^$delivery"; // 배송료
|
||||
|
||||
$nl = "\n";
|
||||
}
|
||||
|
||||
echo $str;
|
||||
?>
|
||||
@ -67,20 +67,6 @@ $gt = ">>>";
|
||||
$shop_url = G5_SHOP_URL;
|
||||
$data_url = G5_DATA_URL;
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
$deliv = 1;
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$deliv2 = (int)$send_cost_list[0]."원";
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -113,25 +99,17 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$catename2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
$pdate = date("Ymd", strtotime($row['it_time']));
|
||||
$point = ($row['it_point'] <= 0) ? "" : (int)$row['it_point'];
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
// 배송비계산
|
||||
$delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1);
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
|
||||
@ -1,158 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 에누리 엔진페이지
|
||||
*/
|
||||
@extract($_GET);
|
||||
|
||||
function paging($write_pages, $cur_page, $total_page, $url )
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$str = "";
|
||||
|
||||
if ($cur_page > 1)
|
||||
{
|
||||
$str .= "<a href='" . $url . ($cur_page-1) . "'>◀</a>";
|
||||
}
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
$end_page = $start_page + $write_pages - 1;
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1)
|
||||
$str .= "<a href='" . $url . ($start_page-1) . "'>...</a>";
|
||||
|
||||
if ($total_page > 1)
|
||||
for ($k=$start_page;$k<=$end_page;$k++)
|
||||
if ($cur_page != $k)
|
||||
$str .= "[<a href='$url$k'>$k</a>]";
|
||||
else
|
||||
$str .= " <b>$k</b> ";
|
||||
|
||||
if ($total_page > $end_page)
|
||||
$str .= "<a href='" . $url . ($end_page+1) . "'>...</a>";
|
||||
|
||||
if ($cur_page < $total_page)
|
||||
{
|
||||
$str .= "<a href='$url" . ($cur_page+1) . "'>▶</a>";
|
||||
}
|
||||
$str .= "";
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
// 페이지당 행수
|
||||
$page_rows = 1000;
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_use = '1' and ca_id LIKE '$ca_id%'";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
?>
|
||||
<html>
|
||||
<title>에누리 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
A:link {text-decoration: underline; color:steelblue}
|
||||
A:visited {text-decoration: none; color:steelblue}
|
||||
A:hover {text-decoration: underline; color:RoyalBlue}
|
||||
font {font-family:굴림; font-size:10pt}
|
||||
th,td {font-family:굴림; font-size:10pt ; height:15pt}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p align=center>상품수 : <?php echo number_format($total_count); ?> 개
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="5" bgcolor="black" width="90%" align='center'>
|
||||
<tr bgcolor="#ededed" align=center>
|
||||
<td>번호</td>
|
||||
<td>제품명</td>
|
||||
<td>가격</td>
|
||||
<td>재고유무</td>
|
||||
<td>배송</td>
|
||||
<td>웹상품이미지</td>
|
||||
<td>할인쿠폰</td>
|
||||
<td>계산서</td>
|
||||
<td>제조사</td>
|
||||
<td>상품코드</td>
|
||||
</tr>
|
||||
<?php
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $page_rows);
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$caid = addslashes($ca_id);
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
and ca_id LIKE '$caid%'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$stock = get_it_stock_qty($row['it_id']);
|
||||
|
||||
if ($stock)
|
||||
$stock = "재고있음";
|
||||
else
|
||||
$stock = "재고없음";
|
||||
|
||||
$num = (($page - 1) * $page_rows) + $i + 1;
|
||||
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$send_cost = '무료';
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
$send_cost = '유료';
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
|
||||
if($delivery)
|
||||
$send_cost = '유료';
|
||||
else
|
||||
$send_cost = '무료';
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
echo '
|
||||
<tr bgcolor="white">
|
||||
<td align="center">'.$num.'</td>
|
||||
<td><a href="'.G5_SHOP_URL.'/item.php?it_id='.$row['it_id'].'">'.$row['it_name'].'</a></td>
|
||||
<td align="center">'.number_format($row['it_price']).'</td>
|
||||
<td align="center">'.$stock.'</td>
|
||||
<td align="center">'.$send_cost.'</td>
|
||||
<td align="center">'.$img_url.'</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">N</td>
|
||||
<td align="center">'.get_text($row['it_maker']).'</td>
|
||||
<td align="center">'.$row['it_id'].'</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
<p align=center>
|
||||
<?php echo paging(1000, $page, $total_page, "./enuri.php?ca_id=$caid&page="); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,72 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 에누리 분류페이지
|
||||
*/
|
||||
include_once('./_common.php');
|
||||
?>
|
||||
<html>
|
||||
<title>에누리 분류페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
A:link {text-decoration: underline; color:steelblue}
|
||||
A:visited {text-decoration: none; color:steelblue}
|
||||
A:hover {text-decoration: underline; color:RoyalBlue}
|
||||
font {font-family:굴림; font-size:10pt}
|
||||
th,td {font-family:굴림; font-size:10pt ; height:15pt}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="5" bgcolor="black" width="91%" align='center'>
|
||||
<tr bgcolor="#ededed">
|
||||
<th width=60 align='center'>대분류</th>
|
||||
<th>중분류</th>
|
||||
</tr>
|
||||
<tr bgcolor="white">
|
||||
|
||||
<?php
|
||||
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
|
||||
|
||||
$sql =" SELECT LENGTH(ca_id)=2 AS cnt, ca_id
|
||||
FROM {$g5['g5_shop_category_table']}
|
||||
HAVING cnt";
|
||||
$result = @mysql_query($sql);
|
||||
|
||||
$tr = "";
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".$row['ca_id']."'");
|
||||
echo $tr;
|
||||
echo " <td align=center><a href='./enuri.php?ca_id={$row['ca_id']}'>{$row2['ca_name']}</a></td>\n";
|
||||
$str = " <td>";
|
||||
$sql3 = "select ca_name,ca_id from {$g5['g5_shop_category_table']} where ca_id LIKE '".$row['ca_id']."%' AND LENGTH(ca_id) !=2 AND LENGTH(ca_id) < 5";
|
||||
$result3 = @mysql_query($sql3);
|
||||
|
||||
$bar = "";
|
||||
|
||||
for ($j=0;$row3=mysql_fetch_array($result3);$j++)
|
||||
{
|
||||
$str .= $bar;
|
||||
$str .= "<a href=\"./enuri.php?ca_id={$row3['ca_id']}\">{$row3['ca_name']}</a>";
|
||||
$bar = " | \n";
|
||||
}
|
||||
|
||||
$str .= " </td>\n";
|
||||
|
||||
echo $str;
|
||||
|
||||
$tr = " </tr>\n <tr bgcolor=\"white\">\n";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,138 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 마이마진 엔진페이지
|
||||
*/
|
||||
@extract($_GET);
|
||||
|
||||
function paging($write_pages, $cur_page, $total_page, $url)
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$str = "";
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
$end_page = $start_page + $write_pages - 1;
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1)
|
||||
$str .= "<a href='" . $url . ($start_page-1) . "'>...</a>";
|
||||
|
||||
if ($total_page > 1)
|
||||
for ($k=$start_page;$k<=$end_page;$k++)
|
||||
if ($cur_page != $k)
|
||||
$str .= "[<a href='$url$k'>$k</a>]";
|
||||
else
|
||||
$str .= " <b>$k</b> ";
|
||||
|
||||
if ($total_page > $end_page)
|
||||
$str .= "<a href='" . $url . ($end_page+1) . "'>...</a>";
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
function it_image($img)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$tmp = G5_DATA_PATH.'/item/'.$img;
|
||||
if (file_exists($tmp) && $img) {
|
||||
$str = G5_DATA_URL.'/item/'.$img;
|
||||
} else {
|
||||
$str = G5_SHOP_URL.'/img/no_image.gif';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
// 페이지당 행수
|
||||
$page_rows = 100;
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
?>
|
||||
<html>
|
||||
<title>마이마진 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body, td {font-family:굴림; font-size:10pt;}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>일련번호</td>
|
||||
<td>제품코드</td>
|
||||
<td>제품명</td>
|
||||
<td>제품가격</td>
|
||||
<td>상품분류</td>
|
||||
<td>제조사</td>
|
||||
<td>이미지</td>
|
||||
</tr>
|
||||
<?php
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $page_rows);
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = (($page - 1) * $page_rows) + $i;
|
||||
|
||||
$category = $bar = "";
|
||||
$len = strlen($row['ca_id']) / 2;
|
||||
for ($k=1; $k<=$len; $k++)
|
||||
{
|
||||
$code = substr($row['ca_id'],0,$k*2);
|
||||
|
||||
$sql3 = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$code' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
$category .= $bar . $row3['ca_name'];
|
||||
$bar = "/";
|
||||
}
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$image = get_it_imageurl($row['it_id']);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td>$num</td>
|
||||
<td>{$row['it_id']}</td>
|
||||
<td><a href='".G5_SHOP_URL."/item.php?it_id={$row['it_id']}'>{$row['it_name']}</a></td>
|
||||
<td>{$row['it_price']}</td>
|
||||
<td>$category</td>
|
||||
<td>{$row['it_maker']}</td>
|
||||
<td>$image</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=7><?php echo paging(1000, $page, $total_page, "./mymargin.php?page="); ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -42,18 +42,6 @@ $gt = ">>>";
|
||||
$shop_url = G5_SHOP_URL;
|
||||
$data_url = G5_DATA_URL;
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$send_cost = 0;
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$send_cost = (int)$send_cost_list[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -87,16 +75,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$cate2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($default['de_send_cost_case'] == '상한' && $row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
// 배송비계산
|
||||
$delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
@ -44,18 +44,6 @@ $gt = ">>>";
|
||||
$shop_url = G5_SHOP_URL;
|
||||
$data_url = G5_DATA_URL;
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$send_cost = 0;
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$send_cost = (int)$send_cost_list[0];
|
||||
}
|
||||
|
||||
// 하루전의 상품
|
||||
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
@ -88,16 +76,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$cate2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
}
|
||||
// 배송비계산
|
||||
$delivery = get_item_sendcost2($row['it_id'], $row['it_price'], 1);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
@ -6,20 +6,6 @@ ob_start();
|
||||
$lt = "";
|
||||
$gt = "<!>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -69,9 +55,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
@ -115,8 +100,7 @@ echo "\r\n";
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
|
||||
@ -6,20 +6,6 @@ ob_start();
|
||||
$lt = "";
|
||||
$gt = "<!>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
@ -70,9 +56,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
@ -116,8 +101,7 @@ echo "\r\n";
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
|
||||
@ -1,183 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
[[_BEGIN]]
|
||||
[[PRODID]]a111
|
||||
[[PRNAME]]테스트상품1
|
||||
[[_PRICE]]84000
|
||||
[[PRDURL]]http://www.auction.co.kr/pinfo/pdetail.asp?pid=a111
|
||||
[[IMGURL]]http://www.auction.co.kr/images/aa_1.jpg
|
||||
[[CATE_1]]의류
|
||||
[[CATE_2]]여성의류
|
||||
[[CATE_3]]나시
|
||||
[[CATE_4]]
|
||||
[[_MODEL]]쉬폰
|
||||
[[_BRAND]]
|
||||
[[_MAKER]]
|
||||
[[ORIGIN]]중국
|
||||
[[PRDATE]]2008-01-11
|
||||
[[DELIVR]]0/50000/3000
|
||||
[[_EVENT]]
|
||||
[[COUPON]]
|
||||
[[PRCARD]]신한5개월
|
||||
[[_POINT]]
|
||||
[[MODIMG]]
|
||||
[[SRATIO]]3.5
|
||||
[[___END]]
|
||||
|
||||
필수
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[PRDURL]] // 상품 상세페이지 URL
|
||||
[[IMGURL]] // 상품 대 이미지
|
||||
[[CATE_1]] // 쇼핑몰 대 카테고리
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MODEL{$gt}
|
||||
{$lt}_BRAND{$gt}
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_EVENT{$gt}
|
||||
{$lt}COUPON{$gt}
|
||||
{$lt}PRCARD{$gt}
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}MODIMG{$gt}Y
|
||||
{$lt}SRATIO{$gt}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MODEL{$gt}
|
||||
{$lt}_BRAND{$gt}
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_EVENT{$gt}
|
||||
{$lt}COUPON{$gt}
|
||||
{$lt}PRCARD{$gt}
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}MODIMG{$gt}Y
|
||||
{$lt}SRATIO{$gt}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
@ -1,172 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
// 신규상품URL은 전체 상품정보 양식에 맞춰서 해당날짜에 추가된 상품만 출력
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
[[_BEGIN]]
|
||||
[[PRODID]]a111
|
||||
[[PRNAME]]테스트상품1
|
||||
[[_PRICE]]84000
|
||||
[[PRDURL]]http://www.auction.co.kr/pinfo/pdetail.asp?pid=a111
|
||||
[[IMGURL]]http://www.auction.co.kr/images/aa_1.jpg
|
||||
[[CATE_1]]의류
|
||||
[[CATE_2]]여성의류
|
||||
[[CATE_3]]나시
|
||||
[[CATE_4]]
|
||||
[[_MODEL]]쉬폰
|
||||
[[_BRAND]]
|
||||
[[_MAKER]]
|
||||
[[ORIGIN]]중국
|
||||
[[PRDATE]]2008-01-11
|
||||
[[DELIVR]]0/50000/3000
|
||||
[[_EVENT]]
|
||||
[[COUPON]]
|
||||
[[PRCARD]]신한5개월
|
||||
[[_POINT]]
|
||||
[[MODIMG]]
|
||||
[[SRATIO]]3.5
|
||||
[[___END]]
|
||||
|
||||
필수
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[PRDURL]] // 상품 상세페이지 URL
|
||||
[[IMGURL]] // 상품 대 이미지
|
||||
[[CATE_1]] // 쇼핑몰 대 카테고리
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
@ -1,46 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
// 요약상품 URL
|
||||
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}{$row['it_name']}
|
||||
{$lt}_PRICE{$gt}{$row['it_price']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
@ -1,98 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 비비(베스트바이어) 엔진페이지
|
||||
*/
|
||||
function it_image($img)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$tmp = G5_DATA_PATH.'/item/'.$img;
|
||||
if (file_exists($tmp) && $img) {
|
||||
$str = G5_DATA_URL.'/item/'.$img;
|
||||
} else {
|
||||
$str = G5_SHOP_URL.'/img/no_image.gif';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
include_once('./_common.php');
|
||||
?>
|
||||
<html>
|
||||
<title>비비 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
// <p>상품번호^대분류^중분류^소분류^제조사^모델명^상품Url^이미지Url^가격
|
||||
$str = "";
|
||||
$cnt = 0;
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$image = get_it_imageurl($row['it_id']);
|
||||
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
|
||||
if (strlen($row['ca_id']) >= 4)
|
||||
$row3 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
|
||||
if (strlen($row['ca_id']) >= 6)
|
||||
$row4 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
$stock = get_it_stock_qty($row['it_id']);
|
||||
if ($stock <= 0)
|
||||
$it_price = 0;
|
||||
|
||||
$str .= "<p>{$row['it_id']}^{$row2['ca_name']}^{$row3['ca_name']}^{$row4['ca_name']}^{$row['it_maker']}^{$row['it_name']}^{$buy_url}^$image^{$it_price}";
|
||||
$str .= "\n";
|
||||
$cnt++;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
$stock = get_option_stock_qty($row['it_id'], $row2['io_id'], 0);
|
||||
if ($stock <= 0)
|
||||
$it_price = 0;
|
||||
|
||||
$str .= "<p>{$row['it_id']}^{$row2['ca_name']}^{$row3['ca_name']}^{$row4['ca_name']}^{$row['it_maker']}^{$row['it_name']}^{$buy_url}^$image^{$it_price}";
|
||||
$str .= "\n";
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<p>" . $config['cf_title'] . " 입니다. 총 (".$cnt.") 건 입니다.\n";
|
||||
echo $str;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,108 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 다나와 엔진페이지
|
||||
*/
|
||||
include_once('./_common.php');
|
||||
|
||||
$nl = ""; // new line \n
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
// 상품ID^카테고리^상품명^제조사^이미지URL^상품URL^가격^적립금^할인쿠폰^무이자할부^사은품^모델명^추가정보^출시일^배송료
|
||||
$str = "";
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row3 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name .= "|" . $row3['ca_name'];
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
$str .= $nl;
|
||||
$str .= $row['it_id']; // 상품ID
|
||||
$str .= "^$ca_name"; // 카테고리
|
||||
$str .= "^{$it_name}"; // 상품명
|
||||
$str .= "^{$row['it_maker']}"; // 제조사
|
||||
$str .= "^".$img_url; // 이미지URL
|
||||
$str .= "^{$buy_url}"; // 상품URL
|
||||
$str .= "^{$it_price}"; // 가격
|
||||
$str .= "^{$row['it_point']}"; // 적립금
|
||||
$str .= "^"; // 할인쿠폰
|
||||
$str .= "^"; // 무이자할부
|
||||
$str .= "^"; // 사은품
|
||||
$str .= "^{$row['it_model']}"; // 모델명
|
||||
$str .= "^"; // 추가정보
|
||||
$str .= "^"; // 출시일
|
||||
$str .= "^$delivery"; // 배송료
|
||||
|
||||
$nl = "\n";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
$str .= $nl;
|
||||
$str .= $row['it_id']; // 상품ID
|
||||
$str .= "^$ca_name"; // 카테고리
|
||||
$str .= "^{$it_name}"; // 상품명
|
||||
$str .= "^{$row['it_maker']}"; // 제조사
|
||||
$str .= "^".$img_url; // 이미지URL
|
||||
$str .= "^{$buy_url}"; // 상품URL
|
||||
$str .= "^{$it_price}"; // 가격
|
||||
$str .= "^{$row['it_point']}"; // 적립금
|
||||
$str .= "^"; // 할인쿠폰
|
||||
$str .= "^"; // 무이자할부
|
||||
$str .= "^"; // 사은품
|
||||
$str .= "^{$row['it_model']}"; // 모델명
|
||||
$str .= "^"; // 추가정보
|
||||
$str .= "^"; // 출시일
|
||||
$str .= "^$delivery"; // 배송료
|
||||
|
||||
$nl = "\n";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo $str;
|
||||
?>
|
||||
@ -65,20 +65,6 @@ header("Content-Type: text/html; charset=utf-8");
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
$deliv = 1;
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$deliv2 = (int)$send_cost_list[0]."원";
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -120,18 +106,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$pdate = date("Ymd", strtotime($row['it_time']));
|
||||
$point = ($row['it_point'] <= 0) ? "" : (int)$row['it_point'];
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
@ -143,8 +117,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
@ -154,8 +128,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$deliv2 = "";
|
||||
}
|
||||
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
{$lt}pid{$gt}{$row['it_id']}
|
||||
@ -192,8 +164,7 @@ HEREDOC;
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
|
||||
@ -1,206 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 에누리 엔진페이지
|
||||
*/
|
||||
@extract($_GET);
|
||||
|
||||
function paging($write_pages, $cur_page, $total_page, $url )
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$str = "";
|
||||
|
||||
if ($cur_page > 1)
|
||||
{
|
||||
$str .= "<a href='" . $url . ($cur_page-1) . "'>◀</a>";
|
||||
}
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
$end_page = $start_page + $write_pages - 1;
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1)
|
||||
$str .= "<a href='" . $url . ($start_page-1) . "'>...</a>";
|
||||
|
||||
if ($total_page > 1)
|
||||
for ($k=$start_page;$k<=$end_page;$k++)
|
||||
if ($cur_page != $k)
|
||||
$str .= "[<a href='$url$k'>$k</a>]";
|
||||
else
|
||||
$str .= " <b>$k</b> ";
|
||||
|
||||
if ($total_page > $end_page)
|
||||
$str .= "<a href='" . $url . ($end_page+1) . "'>...</a>";
|
||||
|
||||
if ($cur_page < $total_page)
|
||||
{
|
||||
$str .= "<a href='$url" . ($cur_page+1) . "'>▶</a>";
|
||||
}
|
||||
$str .= "";
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
// 페이지당 행수
|
||||
$page_rows = 1000;
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_use = '1' and ca_id LIKE '$ca_id%'";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
?>
|
||||
<html>
|
||||
<title>에누리 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
A:link {text-decoration: underline; color:steelblue}
|
||||
A:visited {text-decoration: none; color:steelblue}
|
||||
A:hover {text-decoration: underline; color:RoyalBlue}
|
||||
font {font-family:굴림; font-size:10pt}
|
||||
th,td {font-family:굴림; font-size:10pt ; height:15pt}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p align=center>상품수 : <?php echo number_format($total_count); ?> 개
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="5" bgcolor="black" width="90%" align='center'>
|
||||
<tr bgcolor="#ededed" align=center>
|
||||
<td>번호</td>
|
||||
<td>제품명</td>
|
||||
<td>가격</td>
|
||||
<td>재고유무</td>
|
||||
<td>배송</td>
|
||||
<td>웹상품이미지</td>
|
||||
<td>할인쿠폰</td>
|
||||
<td>계산서</td>
|
||||
<td>제조사</td>
|
||||
<td>상품코드</td>
|
||||
</tr>
|
||||
<?php
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $page_rows);
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$caid = addslashes($ca_id);
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
and ca_id LIKE '$caid%'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = (($page - 1) * $page_rows) + $i + 1;
|
||||
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$send_cost = '무료';
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
$send_cost = '유료';
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
if($delivery)
|
||||
$send_cost = '유료';
|
||||
else
|
||||
$send_cost = '무료';
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
$stock = get_it_stock_qty($row['it_id']);
|
||||
if ($stock)
|
||||
$stock = "재고있음";
|
||||
else
|
||||
$stock = "재고없음";
|
||||
|
||||
echo '
|
||||
<tr bgcolor="white">
|
||||
<td align="center">'.$num.'</td>
|
||||
<td><a href="'.$buy_url.'">'.$it_name.'</a></td>
|
||||
<td align="center">'.number_format($it_price).'</td>
|
||||
<td align="center">'.$stock.'</td>
|
||||
<td align="center">'.$send_cost.'</td>
|
||||
<td align="center">'.$img_url.'</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">N</td>
|
||||
<td align="center">'.get_text($row['it_maker']).'</td>
|
||||
<td align="center">'.$row['it_id'].'</td>
|
||||
</tr>
|
||||
';
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
if($delivery)
|
||||
$send_cost = '유료';
|
||||
else
|
||||
$send_cost = '무료';
|
||||
|
||||
$stock = get_option_stock_qty($row['it_id'], $row2['io_id'], 0);
|
||||
if ($stock)
|
||||
$stock = "재고있음";
|
||||
else
|
||||
$stock = "재고없음";
|
||||
|
||||
echo '
|
||||
<tr bgcolor="white">
|
||||
<td align="center">'.$num.'</td>
|
||||
<td><a href="'.$buy_url.'">'.$it_name.'</a></td>
|
||||
<td align="center">'.number_format($it_price).'</td>
|
||||
<td align="center">'.$stock.'</td>
|
||||
<td align="center">'.$send_cost.'</td>
|
||||
<td align="center">'.$img_url.'</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">N</td>
|
||||
<td align="center">'.get_text($row['it_maker']).'</td>
|
||||
<td align="center">'.$row['it_id'].'</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
<p align=center>
|
||||
<?php echo paging(1000, $page, $total_page, "./enuri.php?ca_id=$caid&page="); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,72 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 에누리 분류페이지
|
||||
*/
|
||||
include_once('./_common.php');
|
||||
?>
|
||||
<html>
|
||||
<title>에누리 분류페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
A:link {text-decoration: underline; color:steelblue}
|
||||
A:visited {text-decoration: none; color:steelblue}
|
||||
A:hover {text-decoration: underline; color:RoyalBlue}
|
||||
font {font-family:굴림; font-size:10pt}
|
||||
th,td {font-family:굴림; font-size:10pt ; height:15pt}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="5" bgcolor="black" width="91%" align='center'>
|
||||
<tr bgcolor="#ededed">
|
||||
<th width=60 align='center'>대분류</th>
|
||||
<th>중분류</th>
|
||||
</tr>
|
||||
<tr bgcolor="white">
|
||||
|
||||
<?php
|
||||
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
|
||||
|
||||
$sql =" SELECT LENGTH(ca_id)=2 AS cnt, ca_id
|
||||
FROM {$g5['g5_shop_category_table']}
|
||||
HAVING cnt";
|
||||
$result = @mysql_query($sql);
|
||||
|
||||
$tr = "";
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '".$row['ca_id']."'");
|
||||
echo $tr;
|
||||
echo " <td align=center><a href='./enuri.php?ca_id={$row['ca_id']}'>{$row2['ca_name']}</a></td>\n";
|
||||
$str = " <td>";
|
||||
$sql3 = "select ca_name,ca_id from {$g5['g5_shop_category_table']} where ca_id LIKE '".$row['ca_id']."%' AND LENGTH(ca_id) !=2 AND LENGTH(ca_id) < 5";
|
||||
$result3 = @mysql_query($sql3);
|
||||
|
||||
$bar = "";
|
||||
|
||||
for ($j=0;$row3=mysql_fetch_array($result3);$j++)
|
||||
{
|
||||
$str .= $bar;
|
||||
$str .= "<a href=\"./enuri.php?ca_id={$row3['ca_id']}\">{$row3['ca_name']}</a>";
|
||||
$bar = " | \n";
|
||||
}
|
||||
|
||||
$str .= " </td>\n";
|
||||
|
||||
echo $str;
|
||||
|
||||
$tr = " </tr>\n <tr bgcolor=\"white\">\n";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,175 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 마이마진 엔진페이지
|
||||
*/
|
||||
@extract($_GET);
|
||||
|
||||
function paging($write_pages, $cur_page, $total_page, $url)
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$str = "";
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
$end_page = $start_page + $write_pages - 1;
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1)
|
||||
$str .= "<a href='" . $url . ($start_page-1) . "'>...</a>";
|
||||
|
||||
if ($total_page > 1)
|
||||
for ($k=$start_page;$k<=$end_page;$k++)
|
||||
if ($cur_page != $k)
|
||||
$str .= "[<a href='$url$k'>$k</a>]";
|
||||
else
|
||||
$str .= " <b>$k</b> ";
|
||||
|
||||
if ($total_page > $end_page)
|
||||
$str .= "<a href='" . $url . ($end_page+1) . "'>...</a>";
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
function it_image($img)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$tmp = G5_DATA_PATH.'/item/'.$img;
|
||||
if (file_exists($tmp) && $img) {
|
||||
$str = G5_DATA_URL.'/item/'.$img;
|
||||
} else {
|
||||
$str = G5_SHOP_URL.'/img/no_image.gif';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
// 페이지당 행수
|
||||
$page_rows = 100;
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
?>
|
||||
<html>
|
||||
<title>마이마진 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body, td {font-family:굴림; font-size:10pt;}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>일련번호</td>
|
||||
<td>제품코드</td>
|
||||
<td>제품명</td>
|
||||
<td>제품가격</td>
|
||||
<td>상품분류</td>
|
||||
<td>제조사</td>
|
||||
<td>이미지</td>
|
||||
</tr>
|
||||
<?php
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $page_rows);
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = (($page - 1) * $page_rows) + $i;
|
||||
|
||||
$category = $bar = "";
|
||||
$len = strlen($row['ca_id']) / 2;
|
||||
for ($k=1; $k<=$len; $k++)
|
||||
{
|
||||
$code = substr($row['ca_id'],0,$k*2);
|
||||
|
||||
$sql3 = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$code' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
$category .= $bar . $row3['ca_name'];
|
||||
$bar = "/";
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$image = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td>$num</td>
|
||||
<td>{$row['it_id']}</td>
|
||||
<td><a href='".$buy_url."'>{$it_name}</a></td>
|
||||
<td>{$it_price}</td>
|
||||
<td>$category</td>
|
||||
<td>{$row['it_maker']}</td>
|
||||
<td>$image</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td>$num</td>
|
||||
<td>{$row['it_id']}</td>
|
||||
<td><a href='".$buy_url."'>{$it_name}</a></td>
|
||||
<td>{$it_price}</td>
|
||||
<td>$category</td>
|
||||
<td>{$row['it_maker']}</td>
|
||||
<td>$image</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=7><?php echo paging(1000, $page, $total_page, "./mymargin.php?page="); ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -40,18 +40,6 @@ Field Status Notes
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$send_cost = 0;
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$send_cost = (int)$send_cost_list[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -88,12 +76,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($default['de_send_cost_case'] == '상한' && $row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
@ -102,9 +84,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
@ -149,8 +130,7 @@ HEREDOC;
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
|
||||
@ -42,18 +42,6 @@ Field Status Notes
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$send_cost = 0;
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$send_cost = (int)$send_cost_list[0];
|
||||
}
|
||||
|
||||
// 하루전의 상품
|
||||
$time = date("Y-m-d 00:00:00", G5_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
@ -86,12 +74,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$cate2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
@ -103,9 +85,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
@ -150,8 +131,7 @@ HEREDOC;
|
||||
}
|
||||
$buy_url = G5_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
$delivery = get_item_sendcost2($row['it_id'], $it_price, 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
|
||||
Reference in New Issue
Block a user