Merge branch 'php81-jw'
This commit is contained in:
@ -9,4 +9,6 @@ if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
include_once('./admin.shop.lib.php');
|
||||
|
||||
run_event('admin_common');
|
||||
|
||||
check_order_inicis_tmps();
|
||||
@ -157,7 +157,6 @@ else {
|
||||
|
||||
<form name="fcategoryform" action="./categoryformupdate.php" onsubmit="return fcategoryformcheck(this);" method="post" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="codedup" value="<?php echo $default['de_code_dup_use']; ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
|
||||
@ -184,7 +183,6 @@ else {
|
||||
<?php if ($w == "") { ?>
|
||||
<?php echo help("자동으로 보여지는 분류코드를 사용하시길 권해드리지만 직접 입력한 값으로도 사용할 수 있습니다.\n분류코드는 나중에 수정이 되지 않으므로 신중하게 결정하여 사용하십시오.\n\n분류코드는 2자리씩 10자리를 사용하여 5단계를 표현할 수 있습니다.\n0~z까지 입력이 가능하며 한 분류당 최대 1296가지를 표현할 수 있습니다.\n그러므로 총 3656158440062976가지의 분류를 사용할 수 있습니다."); ?>
|
||||
<input type="text" name="ca_id" value="<?php echo $subid; ?>" id="ca_id" required class="required frm_input" size="<?php echo $sublen; ?>" maxlength="<?php echo $sublen; ?>">
|
||||
<!-- <?php if ($default['de_code_dup_use']) { ?><a href="javascript:;" onclick="codedupcheck(document.getElementById('ca_id').value)">코드 중복검사</a><?php } ?> -->
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="ca_id" value="<?php echo $ca['ca_id']; ?>">
|
||||
<span class="frm_ca_id"><?php echo $ca['ca_id']; ?></span>
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$it_id = isset($it_id) ? clean_xss_tags(trim($it_id)) : '';
|
||||
$ca_id = isset($ca_id) ? clean_xss_tags(trim($ca_id)) : '';
|
||||
|
||||
$code = '';
|
||||
$name = '';
|
||||
|
||||
if ($it_id)
|
||||
{
|
||||
$row = get_shop_item($it_id, true);
|
||||
$code = $it_id;
|
||||
$name = $row['it_name'];
|
||||
}
|
||||
else if ($ca_id)
|
||||
{
|
||||
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
$code = $ca_id;
|
||||
$name = $row['ca_name'];
|
||||
}
|
||||
|
||||
echo '{ "code": "' . $code . '", "name": "' . $name . '" }';
|
||||
@ -1398,13 +1398,6 @@ if(!$default['de_kakaopay_cancelpwd']){
|
||||
<?php echo get_member_level_select('de_level_sell', 1, 10, $default['de_level_sell']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="de_code_dup_use">코드 중복검사</label></th>
|
||||
<td>
|
||||
<?php echo help("분류, 상품 등을 추가할 때 자동으로 코드 중복검사를 하려면 체크하십시오."); ?>
|
||||
<input type="checkbox" name="de_code_dup_use" value="1" id="de_code_dup_use"<?php echo $default['de_code_dup_use']?' checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="de_cart_keep_term">장바구니 보관기간</label></th>
|
||||
<td>
|
||||
|
||||
@ -210,7 +210,6 @@ if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false)
|
||||
|
||||
<form name="fitemform" action="./itemformupdate.php" method="post" enctype="MULTIPART/FORM-DATA" autocomplete="off" onsubmit="return fitemformcheck(this)">
|
||||
|
||||
<input type="hidden" name="codedup" value="<?php echo $default['de_code_dup_use']; ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
|
||||
@ -333,11 +332,8 @@ if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false)
|
||||
<th scope="row">상품코드</th>
|
||||
<td colspan="2">
|
||||
<?php if ($w == '') { // 추가 ?>
|
||||
<!-- 최근에 입력한 코드(자동 생성시)가 목록의 상단에 출력되게 하려면 아래의 코드로 대체하십시오. -->
|
||||
<!-- <input type=text class=required name=it_id value="<?php echo 10000000000-time()?>" size=12 maxlength=10 required> <a href='javascript:;' onclick="codedupcheck(document.all.it_id.value)"><img src='./img/btn_code.gif' border=0 align=absmiddle></a> -->
|
||||
<?php echo help("상품의 코드는 10자리 숫자로 자동생성합니다. <b>직접 상품코드를 입력할 수도 있습니다.</b>\n상품코드는 영문자, 숫자, - 만 입력 가능합니다."); ?>
|
||||
<input type="text" name="it_id" value="<?php echo time(); ?>" id="it_id" required class="frm_input required" size="20" maxlength="20">
|
||||
<!-- <?php if ($default['de_code_dup_use']) { ?><button type="button" class="btn_frmline" onclick="codedupcheck(document.all.it_id.value)">중복검사</a><?php } ?> -->
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="it_id" value="<?php echo $it['it_id']; ?>">
|
||||
<span class="frm_ca_id"><?php echo $it['it_id']; ?></span>
|
||||
@ -1782,35 +1778,6 @@ $(function() {
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
function codedupcheck(id)
|
||||
{
|
||||
if (!id) {
|
||||
alert('상품코드를 입력하십시오.');
|
||||
f.it_id.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var it_id = id.replace(/[A-Za-z0-9\-_]/g, "");
|
||||
if(it_id.length > 0) {
|
||||
alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$.post(
|
||||
"./codedupcheck.php",
|
||||
{ it_id: id },
|
||||
function(data) {
|
||||
if(data.name) {
|
||||
alert("코드 '"+data.code+"' 는 '".data.name+"' (으)로 이미 등록되어 있으므로\n\n사용하실 수 없습니다.");
|
||||
return false;
|
||||
} else {
|
||||
alert("'"+data.code+"' 은(는) 등록된 코드가 없으므로 사용하실 수 있습니다.");
|
||||
document.fitemform.codedup.value = '';
|
||||
}
|
||||
}, "json"
|
||||
);
|
||||
}
|
||||
|
||||
function fitemformcheck(f)
|
||||
{
|
||||
if (!f.ca_id.value) {
|
||||
|
||||
@ -21,7 +21,6 @@ if(! function_exists('column_char')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (phpversion() >= '5.2.0') {
|
||||
include_once(G5_LIB_PATH.'/PHPExcel.php');
|
||||
|
||||
$headers = array('주문번호', '주문자명', '주문자전화1', '주문자전화2', '배송자명', '배송지전화1', '배송지전화2', '배송지주소', '배송회사', '운송장번호');
|
||||
@ -47,7 +46,7 @@ if (phpversion() >= '5.2.0') {
|
||||
$data = array_merge(array($headers), $rows);
|
||||
|
||||
$excel = new PHPExcel();
|
||||
$excel->setActiveSheetIndex(0)->getStyle( "A1:${last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor);
|
||||
$excel->setActiveSheetIndex(0)->getStyle( "A1:{$last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor);
|
||||
$excel->setActiveSheetIndex(0)->getStyle( "A:$last_char" )->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
|
||||
foreach($widths as $i => $w) $excel->setActiveSheetIndex(0)->getColumnDimension( column_char($i) )->setWidth($w);
|
||||
$excel->getActiveSheet()->fromArray($data,NULL,'A1');
|
||||
@ -58,47 +57,3 @@ if (phpversion() >= '5.2.0') {
|
||||
|
||||
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5');
|
||||
$writer->save('php://output');
|
||||
} else {
|
||||
/*================================================================================
|
||||
php_writeexcel http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/
|
||||
=================================================================================*/
|
||||
|
||||
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_workbook.inc.php');
|
||||
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_worksheet.inc.php');
|
||||
|
||||
$fname = tempnam(G5_DATA_PATH, "tmp-deliverylist.xls");
|
||||
$workbook = new writeexcel_workbook($fname);
|
||||
$worksheet = $workbook->addworksheet();
|
||||
|
||||
// Put Excel data
|
||||
$data = array('주문번호', '주문자명', '주문자전화1', '주문자전화2', '배송자명', '배송지전화1', '배송지전화2', '배송지주소', '배송회사', '운송장번호');
|
||||
$data = array_map('iconv_euckr', $data);
|
||||
|
||||
$col = 0;
|
||||
foreach($data as $cell) {
|
||||
$worksheet->write(0, $col++, $cell);
|
||||
}
|
||||
|
||||
for($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
$row = array_map('iconv_euckr', $row);
|
||||
|
||||
$worksheet->write($i, 0, ' '.$row['od_id']);
|
||||
$worksheet->write($i, 1, $row['od_name']);
|
||||
$worksheet->write($i, 2, ' '.$row['od_tel']);
|
||||
$worksheet->write($i, 3, ' '.$row['od_hp']);
|
||||
$worksheet->write($i, 4, $row['od_b_name']);
|
||||
$worksheet->write($i, 5, ' '.$row['od_b_tel']);
|
||||
$worksheet->write($i, 6, ' '.$row['od_b_hp']);
|
||||
$worksheet->write($i, 7, print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']));
|
||||
$worksheet->write($i, 8, $row['od_delivery_company']);
|
||||
$worksheet->write($i, 9, $row['od_invoice']);
|
||||
}
|
||||
|
||||
$workbook->close();
|
||||
|
||||
header("Content-Type: application/x-msexcel; name=\"deliverylist-".date("ymd", time()).".xls\"");
|
||||
header("Content-Disposition: inline; filename=\"deliverylist-".date("ymd", time()).".xls\"");
|
||||
$fh=fopen($fname, "rb");
|
||||
fpassthru($fh);
|
||||
unlink($fname);
|
||||
}
|
||||
@ -168,7 +168,6 @@ if ($csv == 'xls')
|
||||
if (!$cnt)
|
||||
alert("출력할 내역이 없습니다.");
|
||||
|
||||
if (phpversion() >= '5.2.0') {
|
||||
include_once(G5_LIB_PATH.'/PHPExcel.php');
|
||||
|
||||
$headers = array('우편번호', '주소', '이름', '전화1', '전화2', '상품명', '수량', '선택사항', '배송비', '상품코드', '주문번호', '운송장번호', '전하실말씀');
|
||||
@ -235,7 +234,7 @@ if ($csv == 'xls')
|
||||
$data = array_merge(array($headers), $rows);
|
||||
|
||||
$excel = new PHPExcel();
|
||||
$excel->setActiveSheetIndex(0)->getStyle( "A1:${last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor);
|
||||
$excel->setActiveSheetIndex(0)->getStyle( "A1:{$last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor);
|
||||
$excel->setActiveSheetIndex(0)->getStyle( "A:$last_char" )->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true);
|
||||
foreach($widths as $i => $w) $excel->setActiveSheetIndex(0)->getColumnDimension( column_char($i) )->setWidth($w);
|
||||
$excel->getActiveSheet()->fromArray($data,NULL,'A1');
|
||||
@ -246,95 +245,6 @@ if ($csv == 'xls')
|
||||
|
||||
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5');
|
||||
$writer->save('php://output');
|
||||
|
||||
} else {
|
||||
/*================================================================================
|
||||
php_writeexcel http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/
|
||||
=================================================================================*/
|
||||
|
||||
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_workbook.inc.php');
|
||||
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_worksheet.inc.php');
|
||||
|
||||
$fname = tempnam(G5_DATA_PATH, "tmp-orderlist.xls");
|
||||
$workbook = new writeexcel_workbook($fname);
|
||||
$worksheet = $workbook->addworksheet();
|
||||
|
||||
// Put Excel data
|
||||
$data = array('우편번호', '주소', '이름', '전화1', '전화2', '상품명', '수량', '선택사항', '배송비', '상품코드', '주문번호', '운송장번호', '전하실말씀');
|
||||
$data = array_map('iconv_euckr', $data);
|
||||
|
||||
$col = 0;
|
||||
foreach($data as $cell) {
|
||||
$worksheet->write(0, $col++, $cell);
|
||||
}
|
||||
|
||||
$save_it_id = '';
|
||||
for($i=1; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
if($save_it_id != $row['it_id']) {
|
||||
// 합계금액 계산
|
||||
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
|
||||
SUM(ct_qty) as qty
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and od_id = '{$row['od_id']}' ";
|
||||
$sum = sql_fetch($sql);
|
||||
|
||||
switch($row['ct_send_cost'])
|
||||
{
|
||||
case 1:
|
||||
$ct_send_cost = '착불';
|
||||
break;
|
||||
case 2:
|
||||
$ct_send_cost = '무료';
|
||||
break;
|
||||
default:
|
||||
$ct_send_cost = '선불';
|
||||
break;
|
||||
}
|
||||
|
||||
// 조건부무료
|
||||
if($row['it_sc_type'] == 2) {
|
||||
$sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $row['od_id']);
|
||||
|
||||
if($sendcost == 0)
|
||||
$ct_send_cost = '무료';
|
||||
}
|
||||
|
||||
$save_it_id = $row['it_id'];
|
||||
|
||||
$ct_send_cost = iconv_euckr($ct_send_cost);
|
||||
}
|
||||
|
||||
$pull_address = iconv('UTF-8', 'UHC', print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']));
|
||||
|
||||
$row = array_map('iconv_euckr', $row);
|
||||
|
||||
$worksheet->write($i, 0, ' '.$row['od_b_zip1'].$row['od_b_zip2']);
|
||||
$worksheet->write($i, 1, $pull_address);
|
||||
$worksheet->write($i, 2, $row['od_b_name']);
|
||||
$worksheet->write($i, 3, ' '.$row['od_b_tel']);
|
||||
$worksheet->write($i, 4, ' '.$row['od_b_hp']);
|
||||
$worksheet->write($i, 5, $row['it_name']);
|
||||
$worksheet->write($i, 6, $row['ct_qty']);
|
||||
$worksheet->write($i, 7, $row['ct_option']);
|
||||
$worksheet->write($i, 8, $ct_send_cost);
|
||||
$worksheet->write($i, 9, ' '.$row['it_id']);
|
||||
$worksheet->write($i, 10, ' '.$row['od_id']);
|
||||
$worksheet->write($i, 11, $row['od_invoice']);
|
||||
$worksheet->write($i, 12, $row['od_memo']);
|
||||
}
|
||||
|
||||
$workbook->close();
|
||||
|
||||
header("Content-Type: application/x-msexcel; name=\"orderlist-".date("ymd", time()).".xls\"");
|
||||
header("Content-Disposition: inline; filename=\"orderlist-".date("ymd", time()).".xls\"");
|
||||
$fh=fopen($fname, "rb");
|
||||
fpassthru($fh);
|
||||
unlink($fname);
|
||||
|
||||
exit;
|
||||
} //end if php 5.2.0
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<dt><a href="http://shopping.daum.net/" target="_blank">다음 쇼핑하우</a></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>입점 안내 : <a href="http://commerceone.biz.daum.net/join/intro.daum" target="_blank">http://commerceone.biz.daum.net/join/intro.daum</a></li>
|
||||
<li>입점 안내 : <a href="https://shopping.biz.daum.net/join/main" target="_blank">https://shopping.biz.daum.net/join/main</a></li>
|
||||
<li>전체상품 URL : <a href="<?php echo G5_SHOP_URL; ?>/price/daum.php" target="_blank"><?php echo G5_SHOP_URL; ?>/price/daum.php</a></li>
|
||||
<li>요약상품 URL : <a href="<?php echo G5_SHOP_URL; ?>/price/daum_summary.php" target="_blank"><?php echo G5_SHOP_URL; ?>/price/daum_summary.php</a></li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user