diff --git a/adm/shop_admin/categorylist.php b/adm/shop_admin/categorylist.php
index d8921393b..c4a7a2813 100644
--- a/adm/shop_admin/categorylist.php
+++ b/adm/shop_admin/categorylist.php
@@ -206,7 +206,7 @@ $listall = '전체목록
자료가 한 건도 없습니다. | \n";
+ if ($i == 0) echo "| 자료가 한 건도 없습니다. |
\n";
?>
diff --git a/adm/shop_admin/orderprintresult.php b/adm/shop_admin/orderprintresult.php
index 3c3cfb450..1d7c1a36b 100644
--- a/adm/shop_admin/orderprintresult.php
+++ b/adm/shop_admin/orderprintresult.php
@@ -289,15 +289,22 @@ if (mysql_num_rows($result) == 0)
$cnt = $sub_tot_qty = $sub_tot_price = 0;
while ($row2 = sql_fetch_array($res2))
{
- if($row2['io_type'])
+ if($row2['io_type']) {
+ $it_price = $row2['io_price'];
$row2_tot_price = $row2['io_price'] * $row2['ct_qty'];
- else
+ } else {
+ $it_price = $row2['ct_price'] + $row2['io_price'];
$row2_tot_price = ($row2['ct_price'] + $row2['io_price']) * $row2['ct_qty'];
+ }
$sub_tot_qty += $row2['ct_qty'];
$sub_tot_price += $row2_tot_price;
$it_name = stripslashes($row2['it_name']);
- $it_name = "$it_name ({$row2['ct_option']})";
+ $price_plus = '';
+ if($row2['io_price'] >= 0)
+ $price_plus = '+';
+
+ $it_name = "$it_name ({$row2['ct_option']} ".$price_plus.display_price($row2['io_price']).")";
$ct_send_cost = ($row2['ct_send_cost'] ? '착불' : '선불');
$fontqty1 = $fontqty2 = "";
@@ -310,18 +317,35 @@ if (mysql_num_rows($result) == 0)
?>
|
- |
+ |
|
|
|
-
+
+
+ | 배송비 |
+ |
+ 1 |
+ |
+ |
+
+
+ | 추가 배송비 |
+ |
+ 1 |
+ |
+ |
+
| 합계 |
- |
- |
+ |
+ |
|
diff --git a/adm/shop_admin/sale1date.php b/adm/shop_admin/sale1date.php
index 46ad4d017..845a74bb0 100644
--- a/adm/shop_admin/sale1date.php
+++ b/adm/shop_admin/sale1date.php
@@ -21,7 +21,10 @@ function print_line($save)
|
|
|
+ |
+ |
|
+ |
|
|
|
@@ -55,8 +58,11 @@ $result = sql_query($sql);
주문수 |
주문합계 |
쿠폰 |
- 계좌입금 |
+ 무통장 |
+ 가상계좌 |
+ 계좌이체 |
카드입금 |
+ 휴대폰 |
포인트입금 |
주문취소 |
미수금 |
@@ -81,8 +87,14 @@ $result = sql_query($sql);
$save['orderprice'] += $row['orderprice'];
$save['ordercancel'] += $row['od_cancel_price'];
$save['ordercoupon'] += $row['couponprice'];
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
+ if($row['od_settle_case'] == '무통장')
$save['receiptbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '가상계좌')
+ $save['receiptvbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '계좌이체')
+ $save['receiptiche'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '휴대폰')
+ $save['receipthp'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$save['receiptcard'] += $row['od_receipt_price'];
$save['receiptpoint'] += $lines[$i]['od_receipt_point'];
@@ -92,8 +104,14 @@ $result = sql_query($sql);
$tot['orderprice'] += $row['orderprice'];
$tot['ordercancel'] += $row['od_cancel_price'];
$tot['ordercoupon'] += $row['couponprice'];
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
+ if($row['od_settle_case'] == '무통장')
$tot['receiptbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '가상계좌')
+ $tot['receiptvbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '계좌이체')
+ $tot['receiptiche'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '휴대폰')
+ $tot['receipthp'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$tot['receiptcard'] += $row['od_receipt_price'];
$tot['receiptpoint '] += $row['od_receipt_point'];
@@ -101,7 +119,7 @@ $result = sql_query($sql);
}
if ($i == 0) {
- echo '| 자료가 없습니다. |
';
+ echo '| 자료가 없습니다. |
';
} else {
print_line($save);
}
@@ -114,7 +132,10 @@ $result = sql_query($sql);
|
|
|
+ |
+ |
|
+ |
|
|
|
diff --git a/adm/shop_admin/sale1month.php b/adm/shop_admin/sale1month.php
index 7c589645d..302e75b29 100644
--- a/adm/shop_admin/sale1month.php
+++ b/adm/shop_admin/sale1month.php
@@ -21,7 +21,10 @@ function print_line($save)
|
|
|
+ |
+ |
|
+ |
|
|
|
@@ -56,8 +59,11 @@ $result = sql_query($sql);
주문수 |
주문합계 |
쿠폰 |
- 계좌입금 |
+ 무통장 |
+ 가상계좌 |
+ 계좌이체 |
카드입금 |
+ 휴대폰 |
포인트입금 |
주문취소 |
미수금 |
@@ -82,8 +88,14 @@ $result = sql_query($sql);
$save['orderprice'] += $row['orderprice'];
$save['ordercancel'] += $row['od_cancel_price'];
$save['ordercoupon'] += $row['couponprice'];
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
+ if($row['od_settle_case'] == '무통장')
$save['receiptbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '가상계좌')
+ $save['receiptvbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '계좌이체')
+ $save['receiptiche'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '휴대폰')
+ $save['receipthp'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$save['receiptcard'] += $row['od_receipt_price'];
$save['receiptpoint'] += $row['od_receipt_point'];
@@ -93,8 +105,14 @@ $result = sql_query($sql);
$tot['orderprice'] += $row['orderprice'];
$tot['ordercancel'] += $row['od_cancel_price'];
$tot['ordercoupon'] += $row['couponprice'];
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
+ if($row['od_settle_case'] == '무통장')
$tot['receiptbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '가상계좌')
+ $tot['receiptvbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '계좌이체')
+ $tot['receiptiche'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '휴대폰')
+ $tot['receipthp'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$tot['receiptcard'] += $row['od_receipt_price'];
$tot['receiptpoint'] += $row['od_receipt_point'];
@@ -102,7 +120,7 @@ $result = sql_query($sql);
}
if ($i == 0) {
- echo '| 자료가 없습니다. |
';
+ echo '| 자료가 없습니다. |
';
} else {
print_line($save);
}
@@ -115,7 +133,10 @@ $result = sql_query($sql);
|
|
|
+ |
+ |
|
+ |
|
|
|
diff --git a/adm/shop_admin/sale1today.php b/adm/shop_admin/sale1today.php
index 219058b4d..1a112f72c 100644
--- a/adm/shop_admin/sale1today.php
+++ b/adm/shop_admin/sale1today.php
@@ -35,8 +35,11 @@ $result = sql_query($sql);
주문자 |
주문합계 |
쿠폰 |
- 계좌입금 |
+ 무통장 |
+ 가상계좌 |
+ 계좌이체 |
카드입금 |
+ 휴대폰 |
포인트입금 |
주문취소 |
미수금 |
@@ -53,9 +56,15 @@ $result = sql_query($sql);
$href = '';
}
- $receipt_bank = $receipt_card = 0;
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
+ $receipt_bank = $receipt_card = $receipt_vbank = $receipt_iche = $receipt_hp = 0;
+ if($row['od_settle_case'] == '무통장')
$receipt_bank = $row['od_receipt_price'];
+ if($row['od_settle_case'] == '가상계좌')
+ $receipt_vbank = $row['od_receipt_price'];
+ if($row['od_settle_case'] == '계좌이체')
+ $receipt_iche = $row['od_receipt_price'];
+ if($row['od_settle_case'] == '휴대폰')
+ $receipt_hp = $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$receipt_card = $row['od_receipt_price'];
@@ -66,7 +75,10 @@ $result = sql_query($sql);
|
|
|
+ |
+ |
|
+ |
|
|
|
@@ -75,16 +87,17 @@ $result = sql_query($sql);
$tot['orderprice'] += $row['orderprice'];
$tot['ordercancel'] += $row['od_cancel_price'];
$tot['coupon'] += $row['couponprice'] ;
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
- $tot['receipt_bank'] += $row['od_receipt_price'];
- if($row['od_settle_case'] == '신용카드')
- $tot['receipt_card'] += $row['od_receipt_price'];
+ $tot['receipt_bank'] += $receipt_bank;
+ $tot['receipt_vbank'] += $receipt_vbank;
+ $tot['receipt_iche'] += $receipt_iche;
+ $tot['receipt_card'] += $receipt_card;
+ $tot['receipt_hp'] += $receipt_hp;
$tot['receipt_point'] += $row['od_receipt_point'];
$tot['misu'] += $row['od_misu'];
}
if ($i == 0) {
- echo '| 자료가 없습니다 |
';
+ echo '| 자료가 없습니다 |
';
}
?>
@@ -94,7 +107,10 @@ $result = sql_query($sql);
|
|
|
+ |
+ |
|
+ |
|
|
|
diff --git a/adm/shop_admin/sale1year.php b/adm/shop_admin/sale1year.php
index 6a76f3e85..d0f08fe8b 100644
--- a/adm/shop_admin/sale1year.php
+++ b/adm/shop_admin/sale1year.php
@@ -16,7 +16,10 @@ function print_line($save)
|
|
|
+ |
+ |
|
+ |
|
|
|
@@ -50,8 +53,11 @@ $result = sql_query($sql);
주문수 |
주문합계 |
쿠폰 |
- 계좌입금 |
+ 무통장 |
+ 가상계좌 |
+ 계좌이체 |
카드입금 |
+ 휴대폰 |
포인트입금 |
주문취소 |
미수금 |
@@ -76,8 +82,14 @@ $result = sql_query($sql);
$save['orderprice'] += $row['orderprice'];
$save['ordercancel'] += $row['od_cancel_price'];
$save['ordercoupon'] += $row['couponprice'];
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
+ if($row['od_settle_case'] == '무통장')
$save['receiptbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '가상계좌')
+ $save['receiptvbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '계좌이체')
+ $save['receiptiche'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '휴대폰')
+ $save['receipthp'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$save['receiptcard'] += $row['od_receipt_price'];
$save['receiptpoint'] += $row['od_receipt_point'];
@@ -87,8 +99,14 @@ $result = sql_query($sql);
$tot['orderprice'] += $row['orderprice'];
$tot['ordercancel'] += $row['od_cancel_price'];
$tot['ordercoupon'] += $row['couponprice'];
- if($row['od_settle_case'] == '무통장' || $row['od_settle_case'] == '가상계좌' || $row['od_settle_case'] == '계좌이체')
+ if($row['od_settle_case'] == '무통장')
$tot['receiptbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '가상계좌')
+ $tot['receiptvbank'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '계좌이체')
+ $tot['receiptiche'] += $row['od_receipt_price'];
+ if($row['od_settle_case'] == '휴대폰')
+ $tot['receipthp'] += $row['od_receipt_price'];
if($row['od_settle_case'] == '신용카드')
$tot['receiptcard'] += $row['od_receipt_price'];
$tot['receiptpoint'] += $row['od_receipt_point'];
@@ -96,7 +114,7 @@ $result = sql_query($sql);
}
if ($i == 0) {
- echo '| 자료가 없습니다. |
';
+ echo '| 자료가 없습니다. |
';
} else {
print_line($save);
}
@@ -109,7 +127,10 @@ $result = sql_query($sql);
|
|
|
+ |
+ |
|
+ |
|
|
|
diff --git a/adm/visit_list.php b/adm/visit_list.php
index 694c449bf..30e407cba 100644
--- a/adm/visit_list.php
+++ b/adm/visit_list.php
@@ -73,7 +73,7 @@ $result = sql_query($sql);
if ($is_admin == 'super')
$ip = $row['vi_ip'];
else
- $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']);
+ $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['vi_ip']);
if ($brow == '기타') { $brow = ''.$brow.''; }
if ($os == '기타') { $os = ''.$os.''; }
diff --git a/adm/visit_search.php b/adm/visit_search.php
index 1c3d6c964..1750956e2 100644
--- a/adm/visit_search.php
+++ b/adm/visit_search.php
@@ -109,7 +109,7 @@ $listall = '처음'; //페이지 처음
if ($is_admin == 'super')
$ip = $row['vi_ip'];
else
- $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']);
+ $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['vi_ip']);
if ($brow == '기타') $brow = ''.$brow.'';
if ($os == '기타') $os = ''.$os.'';
diff --git a/bbs/board.php b/bbs/board.php
index e680eb0ec..24fdaf54c 100644
--- a/bbs/board.php
+++ b/bbs/board.php
@@ -169,7 +169,7 @@ if ($is_admin) {
} else {
// 관리자가 아니라면 IP 주소를 감춘후 보여줍니다.
if (isset($write['wr_ip'])) {
- $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $write['wr_ip']);
+ $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $write['wr_ip']);
}
}
diff --git a/bbs/current_connect.php b/bbs/current_connect.php
index 5370212de..f9331a070 100644
--- a/bbs/current_connect.php
+++ b/bbs/current_connect.php
@@ -20,7 +20,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($is_admin)
$list[$i]['name'] = $row[lo_ip];
else
- $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['lo_ip']);
+ $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']);
}
$list[$i]['num'] = sprintf('%03d',$i+1);
diff --git a/bbs/view_comment.php b/bbs/view_comment.php
index d3f15883b..48feadc5a 100644
--- a/bbs/view_comment.php
+++ b/bbs/view_comment.php
@@ -56,7 +56,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 관리자가 아니라면 중간 IP 주소를 감춘후 보여줍니다.
$list[$i]['ip'] = $row['wr_ip'];
if (!$is_admin)
- $list[$i]['ip'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['wr_ip']);
+ $list[$i]['ip'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['wr_ip']);
$list[$i]['is_reply'] = false;
$list[$i]['is_edit'] = false;
diff --git a/config.php b/config.php
index 27820488d..4739baf1c 100644
--- a/config.php
+++ b/config.php
@@ -159,4 +159,12 @@ define('G5_LINK_COUNT', 2);
// 썸네일 jpg Quality 설정
define('G5_THUMB_JPG_QUALITY', 90);
+
+// ip 숨김방법 설정
+/* 123.456.789.012 ip의 숨김 방법을 변경하는 방법은
+\\1 은 123, \\2는 456, \\3은 789, \\4는 012에 각각 대응되므로
+표시되는 부분은 \\1 과 같이 사용하시면 되고 숨길 부분은 ♡등의
+다른 문자를 적어주시면 됩니다.
+*/
+define('G5_IP_DISPLAY', '\\1.♡.\\3.\\4');
?>
\ No newline at end of file
diff --git a/css/mobile.css b/css/mobile.css
index 9eec37dd1..e298aee26 100644
--- a/css/mobile.css
+++ b/css/mobile.css
@@ -13,7 +13,7 @@ label, input, button, select, img {vertical-align:middle}
input, button {margin:0;padding:0;font-size:1em}
button {cursor:pointer}
input[type=text], input[type=password], input[type=submit], input[type=image], button {border-radius:0;font-size:1em;-webkit-appearance:none}
-textarea, select {font-size:1em}
+textarea, select {font-size:1em;font-family:dotum}
textarea {border-radius:0;-webkit-appearance:none}
select {margin:0}
p {margin:0;padding:0;word-break:break-all}
diff --git a/g4_import.php b/g4_import.php
new file mode 100644
index 000000000..5a86b6444
--- /dev/null
+++ b/g4_import.php
@@ -0,0 +1,44 @@
+
+
+
+
이 프로그램은 그누보드5 설치 후 바로 실행하셔야만 합니다.
+ 만약 그누보드5 사이트를 운영 중에 이 프로그램을 실행하시면 DB 데이터가
+ 망실되거나 데이터의 오류가 발생할 수 있습니다. 또한 중복해서 실행하실
+ 경우에도 DB 데이터의 오류가 발생할 수 있으니 반드시 한번만 실행해 주십시오.
+
+
프로그램을 실행하시려면 그누보드4의 config.php 파일 경로를 입력하신 후 확인을 클릭해 주십시오.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/g4_import_run.php b/g4_import_run.php
new file mode 100644
index 000000000..df0c641cb
--- /dev/null
+++ b/g4_import_run.php
@@ -0,0 +1,387 @@
+
+
+
+$val) {
+ if($key == 'mb_no')
+ continue;
+
+ if(!in_array($key, $columns))
+ continue;
+
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ sql_query(" INSERT INTO {$g5['member_table']} SET $sql_common ");
+}
+
+echo 'member table 복사
'.PHP_EOL;
+unset($columns);
+unset($fiels);
+
+// point table 복사
+$sql = " select * from {$g4['point_table']} ";
+$result = sql_query($sql);
+for($i=0; $row=sql_fetch_array($result); $i++) {
+ if($is_euckr)
+ $row = array_map('iconv_utf8', $row);
+
+ $comma = '';
+ $sql_common = '';
+
+ foreach($row as $key=>$val) {
+ if($key == 'po_id')
+ continue;
+
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ sql_query(" INSERT INTO {$g5['point_table']} SET $sql_common ");
+}
+echo 'point table 복사
'.PHP_EOL;
+
+// login table 복사
+$sql = " select * from {$g4['login_table']} ";
+$result = sql_query($sql);
+for($i=0; $row=sql_fetch_array($result); $i++) {
+ if($is_euckr)
+ $row = array_map('iconv_utf8', $row);
+
+ // 중복체크
+ $sql2 = " select count(*) as cnt from {$g5['login_table']} where lo_ip = '{$row['lo_ip']}' ";
+ $row2 = sql_fetch($sql2);
+ if($row2['cnt'])
+ continue;
+
+ $comma = '';
+ $sql_common = '';
+
+ foreach($row as $key=>$val) {
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ sql_query(" INSERT INTO {$g5['login_table']} SET $sql_common ");
+}
+echo 'login table 복사
'.PHP_EOL;
+
+// visit table 복사
+$sql = " select * from {$g4['visit_table']} ";
+$result = sql_query($sql);
+for($i=0; $row=sql_fetch_array($result); $i++) {
+ if($is_euckr)
+ $row = array_map('iconv_utf8', $row);
+
+ // 중복체크
+ $sql2 = " select count(*) as cnt from {$g5['visit_table']} where vi_ip = '{$row['vi_ip']}' and vi_date = '{$row['vi_date']}' ";
+ $row2 = sql_fetch($sql2);
+ if($row2['cnt'])
+ continue;
+
+ $comma = '';
+ $sql_common = '';
+
+ foreach($row as $key=>$val) {
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ sql_query(" INSERT INTO {$g5['visit_table']} SET $sql_common ");
+}
+echo 'visit table 복사
'.PHP_EOL;
+
+// visit sum table 복사
+$sql = " select * from {$g4['visit_sum_table']} ";
+$result = sql_query($sql);
+for($i=0; $row=sql_fetch_array($result); $i++) {
+ if($is_euckr)
+ $row = array_map('iconv_utf8', $row);
+
+ // 중복체크
+ $sql2 = " select count(*) as cnt from {$g5['visit_sum_table']} where vs_date = '{$row['vs_date']}' ";
+ $row2 = sql_fetch($sql2);
+ if($row2['cnt'])
+ continue;
+
+ $comma = '';
+ $sql_common = '';
+
+ foreach($row as $key=>$val) {
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ sql_query(" INSERT INTO {$g5['visit_sum_table']} SET $sql_common ");
+}
+echo 'visit sum table 복사
'.PHP_EOL;
+
+// group table 복사
+$columns = array();
+$fields = mysql_list_fields(G5_MYSQL_DB, $g5['group_table']);
+$count = mysql_num_fields($fields);
+for ($i = 0; $i < $count; $i++) {
+ $fld = mysql_field_name($fields, $i);
+ $columns[] = $fld;
+}
+
+$sql = " select * from {$g4['group_table']} ";
+$result = sql_query($sql);
+for($i=0; $row=sql_fetch_array($result); $i++) {
+ if($is_euckr)
+ $row = array_map('iconv_utf8', $row);
+
+ // 중복체크
+ $sql2 = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$row['gr_id']}' ";
+ $row2 = sql_fetch($sql2);
+ if($row2['cnt'])
+ continue;
+
+ $comma = '';
+ $sql_common = '';
+
+ foreach($row as $key=>$val) {
+ if(!in_array($key, $columns))
+ continue;
+
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ sql_query(" INSERT INTO {$g5['group_table']} SET $sql_common ");
+}
+
+echo 'group table 복사
'.PHP_EOL;
+unset($columns);
+unset($fiels);
+
+// board 복사
+$columns = array();
+$fields = mysql_list_fields(G5_MYSQL_DB, $g5['board_table']);
+$count = mysql_num_fields($fields);
+for ($i = 0; $i < $count; $i++) {
+ $fld = mysql_field_name($fields, $i);
+ $columns[] = $fld;
+}
+
+$sql = " select * from {$g4['board_table']} ";
+$result = sql_query($sql);
+for($i=0; $row=sql_fetch_array($result); $i++) {
+ if($is_euckr)
+ $row = array_map('iconv_utf8', $row);
+
+ // 중복체크
+ $sql2 = " select count(*) as cnt from {$g5['board_table']} where bo_table = '{$row['bo_table']}' ";
+ $row2 = sql_fetch($sql2);
+ if($row2['cnt'])
+ continue;
+
+ $comma = '';
+ $sql_common = '';
+
+ foreach($row as $key=>$val) {
+ if(!in_array($key, $columns))
+ continue;
+
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ sql_query(" INSERT INTO {$g5['board_table']} SET $sql_common ");
+
+ // 게시판 테이블 생성
+ $bo_table = $row['bo_table'];
+ $file = file(G5_ADMIN_PATH.'/sql_write.sql');
+ $sql = implode($file, "\n");
+
+ $create_table = $g5['write_prefix'] . $bo_table;
+
+ $source = array('/__TABLE_NAME__/', '/;/');
+ $target = array($create_table, '');
+ $sql = preg_replace($source, $target, $sql);
+
+ // 게시글 복사
+ if(sql_query($sql, FALSE)) {
+ $write_table = $g4['write_prefix'].$bo_table;
+ $columns2 = array();
+ $fields2 = mysql_list_fields(G5_MYSQL_DB, $create_table);
+ $count2 = mysql_num_fields($fields2);
+ for ($j = 0; $j < $count2; $j++) {
+ $fld = mysql_field_name($fields2, $j);
+ $columns2[] = $fld;
+ }
+
+ $sql3 = " select * from $write_table ";
+ $result3 = sql_query($sql3);
+
+ for($k=0; $row3=sql_fetch_array($result3); $k++) {
+ if($is_euckr)
+ $row3 = array_map('iconv_utf8', $row3);
+
+ $comma3 = '';
+ $sql_common3 = '';
+
+ foreach($row3 as $key=>$val) {
+ if(!in_array($key, $columns2))
+ continue;
+
+ $sql_common3 .= $comma3 . " $key = '".addslashes($val)."' ";
+
+ $comma3 = ',';
+ }
+
+ // 첨부파일개수
+ $wr_id = $row3['wr_id'];
+ $sql4 = " select count(*) as cnt from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' ";
+ $row4 = sql_fetch($sql4);
+
+ $sql_common3 .= " , wr_file = '{$row4['cnt']}' ";
+
+ sql_query(" INSERT INTO $create_table SET $sql_common3 ");
+ }
+
+ echo ''.str_replace(G5_TABLE_PREFIX.'write_', '', $create_table).' 게시글 복사
';
+ }
+}
+
+unset($columns);
+unset($fiels);
+
+// 그외 테이블 복사
+$tables = array('board_file', 'board_new', 'board_good', 'mail', 'memo', 'group_member', 'auth', 'popular', 'poll', 'poll_etc', 'scrap');
+
+foreach($tables as $table) {
+ $columns = array();
+ $fields = mysql_list_fields(G5_MYSQL_DB, $g5[$table.'_table']);
+ $count = mysql_num_fields($fields);
+ for ($i = 0; $i < $count; $i++) {
+ $fld = mysql_field_name($fields, $i);
+ $columns[] = $fld;
+ }
+
+ $src_table = $g4[$table.'_table'];
+ $dst_table = $g5[$table.'_table'];
+ $sql = " select * from $src_table ";
+ $result = sql_query($sql);
+ for($i=0; $row=sql_fetch_array($result); $i++) {
+ if($is_euckr)
+ $row = array_map('iconv_utf8', $row);
+
+ $comma = '';
+ $sql_common = '';
+
+ foreach($row as $key=>$val) {
+ if(!in_array($key, $columns))
+ continue;
+
+ $sql_common .= $comma . " $key = '".addslashes($val)."' ";
+
+ $comma = ',';
+ }
+
+ $result2 = sql_query(" INSERT INTO $dst_table SET $sql_common ", false);
+
+ if(!$result2)
+ continue;
+ }
+
+ echo ''.$table.' table 복사
'.PHP_EOL;
+}
+
+unset($columns);
+unset($fiels);
+
+echo '
'.PHP_EOL;
+echo '그누보드4 DB 데이터 이전 완료
'.PHP_EOL;
+
+// 실행완료 세션에 기록
+set_session('tables_copied', 'done');
+
+include_once(G5_PATH.'/_tail.php');
+?>
\ No newline at end of file
diff --git a/js/zip.js b/js/zip.js
index 8d110d695..d0ead6c45 100644
--- a/js/zip.js
+++ b/js/zip.js
@@ -35,8 +35,8 @@ sigungu['경기도'] = '가평군,고양시 덕양구,고양시 일산동구,고
sigungu['강원도'] = '강릉시,고성군,동해시,삼척시,속초시,양구군,양양군,영월군,원주시,인제군,정선군,철원군,춘천시,태백시,평창군,홍천군,화천군,횡성군';
sigungu['충청북도'] = '괴산군,단양군,보은군,영동군,옥천군,음성군,제천시,증평군,진천군,청원군,청주시 상당구,청주시 흥덕구,충주시';
sigungu['충청남도'] = '계룡시,공주시,금산군,논산시,당진시,보령시,부여군,서산시,서천군,아산시,예산군,천안시 동남구,천안시 서북구,청양군,태안군,홍성군';
-sigungu['전라북도'] = '전주시 완산구,전주시 덕진구,군산시,익산시,정읍시,남원시,김제시 완주군,진안군,무주군,장수군,임실군,순창군,고창군,부안군';
-sigungu['전라남도'] = '강진군,고흥군,곡성군,광양시,구례군,나주시,담양군,목포시,무안군,보성군,순천시,신안군 여수시,영광군,영암군,완도군,장성군,장흥군,진도군,함평군,해남군,화순군';
+sigungu['전라북도'] = '전주시 완산구,전주시 덕진구,군산시,익산시,정읍시,남원시,김제시,완주군,진안군,무주군,장수군,임실군,순창군,고창군,부안군';
+sigungu['전라남도'] = '강진군,고흥군,곡성군,광양시,구례군,나주시,담양군,목포시,무안군,보성군,순천시,신안군,여수시,영광군,영암군,완도군,장성군,장흥군,진도군,함평군,해남군,화순군';
sigungu['경상북도'] = '경산시,경주시,고령군,구미시,군위군,김천시,문경시,봉화군,상주시,성주군,안동시,영덕군,영양군,영주시,영천시,예천군,울릉군,울진군,의성군,청도군,청송군,칠곡군,포항시 남구,포항시 북구';
sigungu['경상남도'] = '거제시,거창군,고성군,김해시,남해군,밀양시,사천시,산청군,양산시,의령군,진주시,창녕군,창원시 마산합포구,창원시 마산회원구,창원시 성산구,창원시 의창구,창원시 진해구,통영시,하동군,함안군,함양군,합천군';
sigungu['제주특별자치도'] = '서귀포시,제주시';
diff --git a/mobile/skin/member/basic/zip.skin.php b/mobile/skin/member/basic/zip.skin.php
index 9ee906e32..c4fa75a77 100644
--- a/mobile/skin/member/basic/zip.skin.php
+++ b/mobile/skin/member/basic/zip.skin.php
@@ -135,6 +135,8 @@ function put_data(zip1, zip2, addr1, addr3, jibeon)
if(of. !== undefined)
of..value = jibeon;
+ of..focus();
+
window.close();
}
diff --git a/skin/member/basic/zip.skin.php b/skin/member/basic/zip.skin.php
index 0def85725..8586bc4e0 100644
--- a/skin/member/basic/zip.skin.php
+++ b/skin/member/basic/zip.skin.php
@@ -132,6 +132,8 @@ function put_data(zip1, zip2, addr1, addr3, jibeon)
if(of. !== undefined)
of..value = jibeon;
+ of..focus();
+
window.close();
}