Merge branch 'master' of github.com:gnuboard/yc4s
This commit is contained in:
@ -375,19 +375,19 @@ $pg_anchor = '<ul class="anchor">
|
||||
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
|
||||
<td>
|
||||
<?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?> </textarea>
|
||||
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?></textarea>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th>
|
||||
<td>
|
||||
<?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?> </textarea>
|
||||
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리스틱'); ?>
|
||||
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?> </textarea>
|
||||
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -467,7 +467,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<th scope="row"><label for="cf_filter">단어 필터링</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?>
|
||||
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?> </textarea>
|
||||
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -613,7 +613,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_privacy">개인정보취급방침</label></th>
|
||||
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?> </textarea></td>
|
||||
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -471,13 +471,13 @@ function set_date(today)
|
||||
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME - 86400); ?>";
|
||||
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME - 86400); ?>";
|
||||
} else if (today == "이번주") {
|
||||
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('last Monday', G5_SERVER_TIME)); ?>";
|
||||
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('this Monday', G5_SERVER_TIME)); ?>";
|
||||
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME); ?>";
|
||||
} else if (today == "이번달") {
|
||||
document.getElementById("fr_date").value = "<?php echo date('Y-m-01', G5_SERVER_TIME); ?>";
|
||||
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME); ?>";
|
||||
} else if (today == "지난주") {
|
||||
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('last Monday', G5_SERVER_TIME - (86400 * 7))); ?>";
|
||||
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('last Monday', G5_SERVER_TIME)); ?>";
|
||||
document.getElementById("to_date").value = "<?php echo date('Y-m-d', strtotime('last Sunday', G5_SERVER_TIME)); ?>";
|
||||
} else if (today == "지난달") {
|
||||
document.getElementById("fr_date").value = "<?php echo date('Y-m-01', strtotime('-1 Month', G5_SERVER_TIME)); ?>";
|
||||
|
||||
@ -5,7 +5,7 @@ include_once('./_common.php');
|
||||
//print_r2($_POST); exit;
|
||||
|
||||
// 상품옵션별재고 또는 상품재고에 더하기
|
||||
function add_io_stock($it_id, $ct_qty, $io_id="", $io_type="")
|
||||
function add_io_stock($it_id, $ct_qty, $io_id="", $io_type=0)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
@ -25,7 +25,7 @@ function add_io_stock($it_id, $ct_qty, $io_id="", $io_type="")
|
||||
|
||||
|
||||
// 상품옵션별재고 또는 상품재고에서 빼기
|
||||
function subtract_io_stock($it_id, $ct_qty, $io_id="", $io_type="")
|
||||
function subtract_io_stock($it_id, $ct_qty, $io_id="", $io_type=0)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
@ -58,7 +58,7 @@ function change_status($od_id, $current_status, $change_status)
|
||||
|
||||
|
||||
// 주문서에 입금시 update
|
||||
function order_update_receipt($od_id)
|
||||
function order_update_receipt($od_id)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
@ -78,17 +78,17 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
|
||||
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 재고를 이미 사용했거나 재고에서 이미 뺐다면
|
||||
$stock_use = $row['ct_stock_use'];
|
||||
|
||||
|
||||
if ($row['ct_stock_use'])
|
||||
{
|
||||
if ($change_status == '주문' ||
|
||||
$change_status == '취소' ||
|
||||
$change_status == '반품' ||
|
||||
$change_status == '품절')
|
||||
if ($change_status == '주문' ||
|
||||
$change_status == '취소' ||
|
||||
$change_status == '반품' ||
|
||||
$change_status == '품절')
|
||||
{
|
||||
// 재고에 다시 더한다.
|
||||
add_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
|
||||
@ -98,7 +98,7 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
|
||||
else
|
||||
{
|
||||
// 재고 오류로 인한 수정
|
||||
if ($change_status == '배송' ||
|
||||
if ($change_status == '배송' ||
|
||||
$change_status == '완료')
|
||||
{
|
||||
// 재고에서 뺀다.
|
||||
@ -108,7 +108,7 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
|
||||
}
|
||||
|
||||
$point_use = $row['ct_point_use'];
|
||||
|
||||
|
||||
// 회원이면서 포인트가 0보다 크거나 이미 포인트를 부여했다면 뺀다.
|
||||
if ($mb_id && $row['ct_point'] && $row['ct_point_use'])
|
||||
{
|
||||
@ -141,14 +141,14 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
|
||||
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if (!$od) continue;
|
||||
|
||||
|
||||
//change_order_status($od['od_status'], $_POST['od_status'], $od);
|
||||
//echo $od_id . "<br>";
|
||||
|
||||
$current_status = $od['od_status'];
|
||||
$change_status = $_POST['od_status'];
|
||||
|
||||
switch ($current_status)
|
||||
switch ($current_status)
|
||||
{
|
||||
case '주문' :
|
||||
if ($change_status != '입금') continue;
|
||||
@ -173,7 +173,7 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
order_update_delivery($od_id, $od['mb_id'], $change_status, $delivery);
|
||||
|
||||
/*
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_delivery_company = '$delivery_company',
|
||||
od_invoice = '$invoice',
|
||||
od_invoice_time = '$invoice_time'
|
||||
@ -183,11 +183,11 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 재고를 이미 사용했거나 재고에서 이미 뺐다면
|
||||
$stock_use = $row['ct_stock_use'];
|
||||
|
||||
|
||||
if ($row['ct_stock_use'])
|
||||
{
|
||||
if ($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절')
|
||||
@ -209,7 +209,7 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
}
|
||||
|
||||
$point_use = $row['ct_point_use'];
|
||||
|
||||
|
||||
// 회원이면서 포인트가 0보다 크거나 이미 포인트를 부여했다면 뺀다.
|
||||
if ($od['mb_id'] && $row['ct_point'] && $row['ct_point_use'])
|
||||
{
|
||||
@ -233,7 +233,7 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
change_status($od_id, '배송', '완료');
|
||||
break;
|
||||
|
||||
} // switch end
|
||||
} // switch end
|
||||
|
||||
|
||||
// 주문정보
|
||||
|
||||
@ -95,6 +95,7 @@ if (file_exists($dbconfig_file)) {
|
||||
$connect_db = sql_connect(G5_MYSQL_HOST, G5_MYSQL_USER, G5_MYSQL_PASSWORD) or die('MySQL Connect Error!!!');
|
||||
$select_db = sql_select_db(G5_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!');
|
||||
@mysql_query(" set names utf8 ");
|
||||
if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) @mysql_query("SET SESSION sql_mode = ''");
|
||||
if (defined(G5_TIMEZONE)) @mysql_query(" set time_zone = '".G5_TIMEZONE."'");
|
||||
} else {
|
||||
?>
|
||||
|
||||
@ -26,7 +26,6 @@ $g5_install = $_POST['g5_install'];
|
||||
$g5_shop_prefix = $_POST['g5_shop_prefix'];
|
||||
$g5_shop_install= $_POST['g5_shop_install'];
|
||||
|
||||
@mysql_query('set names utf8');
|
||||
$dblink = @mysql_connect($mysql_host, $mysql_user, $mysql_pass);
|
||||
if (!$dblink) {
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL;
|
||||
@ -35,7 +34,6 @@ if (!$dblink) {
|
||||
exit;
|
||||
}
|
||||
|
||||
@mysql_query('set names utf8');
|
||||
$select_db = @mysql_select_db($mysql_db, $dblink);
|
||||
if (!$select_db) {
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL;
|
||||
@ -43,6 +41,13 @@ if (!$select_db) {
|
||||
echo '<div><a href="./install_config.php">뒤로가기</a></div>'.PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
|
||||
$mysql_set_mode = 'false';
|
||||
@mysql_query('set names utf8');
|
||||
if(version_compare(mysql_get_server_info(), '5.6.6', '>=') == 1) {
|
||||
@mysql_query("SET SESSION sql_mode = ''");
|
||||
$mysql_set_mode = 'true';
|
||||
}
|
||||
?>
|
||||
|
||||
<h2><?php echo G5_VERSION ?> 설치가 시작되었습니다.</h2>
|
||||
@ -441,7 +446,8 @@ fwrite($f, "if (!defined('_GNUBOARD_')) exit;\n");
|
||||
fwrite($f, "define('G5_MYSQL_HOST', '{$mysql_host}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_USER', '{$mysql_user}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_PASSWORD', '{$mysql_pass}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_DB', '{$mysql_db}');\n\n");
|
||||
fwrite($f, "define('G5_MYSQL_DB', '{$mysql_db}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_SET_MODE', {$mysql_set_mode});\n\n");
|
||||
fwrite($f, "define('G5_TABLE_PREFIX', '{$table_prefix}');\n\n");
|
||||
fwrite($f, "\$g5['write_prefix'] = G5_TABLE_PREFIX.'write_'; // 게시판 테이블명 접두사\n\n");
|
||||
fwrite($f, "\$g5['auth_table'] = G5_TABLE_PREFIX.'auth'; // 관리권한 설정 테이블\n");
|
||||
|
||||
@ -269,12 +269,12 @@ if ($od_temp_point)
|
||||
|
||||
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
|
||||
|
||||
$od_status = '주문';
|
||||
if ($od_settle_case == "무통장")
|
||||
{
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_price = 0;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '주문';
|
||||
}
|
||||
else if ($od_settle_case == "계좌이체")
|
||||
{
|
||||
@ -290,7 +290,8 @@ else if ($od_settle_case == "계좌이체")
|
||||
$od_bank_account = $bank_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else if ($od_settle_case == "가상계좌")
|
||||
{
|
||||
@ -305,7 +306,6 @@ else if ($od_settle_case == "가상계좌")
|
||||
$od_deposit_name = $od_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '주문';
|
||||
}
|
||||
else if ($od_settle_case == "휴대폰")
|
||||
{
|
||||
@ -318,7 +318,8 @@ else if ($od_settle_case == "휴대폰")
|
||||
$od_bank_account = $commid.' '.$mobile_no;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else if ($od_settle_case == "신용카드")
|
||||
{
|
||||
@ -333,7 +334,8 @@ else if ($od_settle_case == "신용카드")
|
||||
$od_bank_account = $card_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -437,15 +439,16 @@ if(!$result) {
|
||||
die_utf8('<p>고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.</p><p>KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
|
||||
}
|
||||
|
||||
// 장바구니 쇼핑에서 주문으로
|
||||
// 장바구니 상태변경
|
||||
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
|
||||
$cart_status = $od_status;
|
||||
$sql_card_point = "";
|
||||
if ($od_receipt_price > 0 && !$default['de_card_point']) {
|
||||
$sql_card_point = " , ct_point = '0' ";
|
||||
}
|
||||
$sql = "update {$g5['g5_shop_cart_table']}
|
||||
set od_id = '$od_id',
|
||||
ct_status = '주문'
|
||||
ct_status = '$cart_status'
|
||||
$sql_card_point
|
||||
where od_id = '$tmp_cart_id'
|
||||
and ct_select = '1' ";
|
||||
|
||||
@ -194,6 +194,9 @@ function fboardlist_submit(f) {
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
|
||||
f.removeAttribute("target");
|
||||
f.action = "./board_list_update.php";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -218,6 +218,9 @@ function fboardlist_submit(f) {
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
|
||||
f.removeAttribute("target");
|
||||
f.action = "./board_list_update.php";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -264,12 +264,12 @@ if ($od_temp_point)
|
||||
|
||||
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
|
||||
|
||||
$od_status = '주문';
|
||||
if ($od_settle_case == "무통장")
|
||||
{
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_price = 0;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '주문';
|
||||
}
|
||||
else if ($od_settle_case == "계좌이체")
|
||||
{
|
||||
@ -285,7 +285,8 @@ else if ($od_settle_case == "계좌이체")
|
||||
$od_bank_account = $bank_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else if ($od_settle_case == "가상계좌")
|
||||
{
|
||||
@ -300,7 +301,6 @@ else if ($od_settle_case == "가상계좌")
|
||||
$od_deposit_name = $depositor;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '주문';
|
||||
}
|
||||
else if ($od_settle_case == "휴대폰")
|
||||
{
|
||||
@ -313,7 +313,8 @@ else if ($od_settle_case == "휴대폰")
|
||||
$od_bank_account = $commid.' '.$mobile_no;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else if ($od_settle_case == "신용카드")
|
||||
{
|
||||
@ -328,7 +329,8 @@ else if ($od_settle_case == "신용카드")
|
||||
$od_bank_account = $card_name;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
$od_status = '입금';
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -431,15 +433,16 @@ if(!$result) {
|
||||
die_utf8('<p>고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.</p><p>KCP를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.');
|
||||
}
|
||||
|
||||
// 장바구니 쇼핑에서 주문으로
|
||||
// 장바구니 상태변경
|
||||
// 신용카드로 주문하면서 신용카드 포인트 사용하지 않는다면 포인트 부여하지 않음
|
||||
$cart_status = $od_status;
|
||||
$sql_card_point = "";
|
||||
if ($od_receipt_price > 0 && !$default['de_card_point']) {
|
||||
$sql_card_point = " , ct_point = '0' ";
|
||||
}
|
||||
$sql = "update {$g5['g5_shop_cart_table']}
|
||||
set od_id = '$od_id',
|
||||
ct_status = '주문'
|
||||
ct_status = '$cart_status'
|
||||
$sql_card_point
|
||||
where od_id = '$tmp_cart_id'
|
||||
and ct_select = '1' ";
|
||||
|
||||
@ -223,6 +223,9 @@ function fboardlist_submit(f) {
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
|
||||
f.removeAttribute("target");
|
||||
f.action = "./board_list_update.php";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -217,6 +217,9 @@ function fboardlist_submit(f) {
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
|
||||
f.removeAttribute("target");
|
||||
f.action = "./board_list_update.php";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user