From 18da974e7f0c433b081cb10790bb73be7fd4e907 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 22 Jul 2013 16:43:01 +0900 Subject: [PATCH 01/18] =?UTF-8?q?=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=9C=A0?= =?UTF-8?q?=ED=9A=A8=EA=B8=B0=EA=B0=84=20=EC=84=A4=EC=A0=95=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 19 +++++++- adm/config_form_update.php | 1 + adm/point_list.php | 16 ++++++- adm/point_list_delete.php | 4 +- adm/point_update.php | 3 +- install/gnuboard4s.sql | 4 ++ lib/common.lib.php | 93 +++++++++++++++++++++++++++++++++----- 7 files changed, 122 insertions(+), 18 deletions(-) diff --git a/adm/config_form.php b/adm/config_form.php index 21e00865b..c0e5f9510 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -65,7 +65,7 @@ if(!isset($config['cf_mobile_pages'])) { if(!isset($config['cf_facebook_appid'])) { sql_query(" ALTER TABLE `{$g4['config_table']}` - ADD `cf_facebook_appid` VARCHAR(255) NOT NULL AFTER `cf_kcpcert_use`, + ADD `cf_facebook_appid` VARCHAR(255) NOT NULL AFTER `cf_kcpcert_use`, ADD `cf_facebook_secret` VARCHAR(255) NOT NULL AFTER `cf_facebook_appid`, ADD `cf_twitter_key` VARCHAR(255) NOT NULL AFTER `cf_facebook_secret`, ADD `cf_twitter_secret` VARCHAR(255) NOT NULL AFTER `cf_twitter_key`, @@ -101,6 +101,16 @@ if(!sql_query(" DESC {$g4['autosave_table']} ", false)) { ) ", false); } +// 포인트유효기간 필드추가 +if(!sql_query(" select cf_point_term from {$g4['config_table']} ", false)) { + sql_query(" ALTER TABLE `{$g4['config_table']}` + ADD `cf_point_term` int(11) NOT NULL DEFAULT '0' AFTER `cf_use_point` ", false); + sql_query(" ALTER TABLE `{$g4['point_table']}` + ADD `po_use_point` int(11) NOT NULL DEFAULT '0' AFTER `po_point`, + ADD `po_expired` tinyint(4) NOT NULL DEFAULT '0' AFTER `po_use_point`, + ADD `po_expire_date` date NOT NULL DEFAULT '0000-00-00' AFTER `po_expired` ", false); +} + $g4['title'] = '환경설정'; include_once ('./admin.head.php'); @@ -333,6 +343,13 @@ $pg_anchor = ' +
+ + + + + + + + @@ -144,6 +156,12 @@ function point_clear() ?> + @@ -162,6 +180,12 @@ function point_clear() ?>
+ + + 회원아이디 이름 별명
+ + + + +
+ +
+ +
+ +
@@ -212,6 +236,24 @@ function point_clear() + + diff --git a/adm/point_list_delete.php b/adm/point_list_delete.php new file mode 100644 index 000000000..e09bafd48 --- /dev/null +++ b/adm/point_list_delete.php @@ -0,0 +1,32 @@ + From ef60fd161c5572119b13e503ed0a539e9bd19a94 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 29 Jul 2013 17:45:15 +0900 Subject: [PATCH 12/18] =?UTF-8?q?=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=9C=A0?= =?UTF-8?q?=ED=9A=A8=EA=B8=B0=EA=B0=84=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20?= =?UTF-8?q?=EB=82=B4=EC=97=AD=20=EC=82=AD=EC=A0=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 11 --- adm/point_list_delete.php | 39 ++++++++-- bbs/delete.php | 6 +- bbs/delete_all.php | 6 +- bbs/delete_comment.php | 5 +- bbs/point.php | 13 ---- install/gnuboard4s.sql | 3 +- lib/common.lib.php | 153 +++++++++++++++++++++++++++++++++----- 8 files changed, 179 insertions(+), 57 deletions(-) diff --git a/adm/config_form.php b/adm/config_form.php index fc061c043..a1f041388 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -101,17 +101,6 @@ if(!sql_query(" DESC {$g4['autosave_table']} ", false)) { ) ", false); } -// 포인트유효기간 필드추가 -if(!sql_query(" select cf_point_term from {$g4['config_table']} ", false)) { - sql_query(" ALTER TABLE `{$g4['config_table']}` - ADD `cf_point_term` int(11) NOT NULL DEFAULT '0' AFTER `cf_use_point` ", false); - sql_query(" ALTER TABLE `{$g4['point_table']}` - ADD `po_use_point` int(11) NOT NULL DEFAULT '0' AFTER `po_point`, - ADD `po_expired` tinyint(4) NOT NULL DEFAULT '0' AFTER `po_use_point`, - ADD `po_expire_date` date NOT NULL DEFAULT '0000-00-00' AFTER `po_expired` - ADD `po_mb_point` int(11) NOT NULL DEFAULT '0' AFTER `po_expire_date` ", false); -} - $g4['title'] = '환경설정'; include_once ('./admin.head.php'); diff --git a/adm/point_list_delete.php b/adm/point_list_delete.php index e09bafd48..32cc13681 100644 --- a/adm/point_list_delete.php +++ b/adm/point_list_delete.php @@ -1,5 +1,5 @@ 0) { + insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']); + } + } + + // 포인트 내역삭제 $sql = " delete from {$g4['point_table']} where po_id = '{$_POST['po_id'][$k]}' "; sql_query($sql); - $sql = " select sum(po_point) as sum_po_point from {$g4['point_table']} where mb_id = '{$_POST['mb_id'][$k]}' "; - $row = sql_fetch($sql); - $sum_point = $row['sum_po_point']; + // po_mb_point에 반영 + $sql = " update {$g4['point_table']} + set po_mb_point = po_mb_point - '{$row['po_point']}' + where mb_id = '$mb_id' + and po_id > '{$row['po_id']}' "; + sql_query($sql); - $sql= " update {$g4['member_table']} set mb_point = '{$sum_point}' where mb_id = '{$_POST['mb_id'][$k]}' "; + $sum_point = get_point_sum($_POST['mb_id'][$k]); + $sql= " update {$g4['member_table']} set mb_point = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' "; sql_query($sql); } goto_url('./point_list.php?'.$qstr); -?> +?> \ No newline at end of file diff --git a/bbs/delete.php b/bbs/delete.php index 973813b5f..e3b03a3f9 100644 --- a/bbs/delete.php +++ b/bbs/delete.php @@ -73,7 +73,8 @@ while ($row = sql_fetch_array($result)) if (!$row['wr_is_comment']) { // 원글 포인트 삭제 - insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글삭제"); + if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '쓰기')) + insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글삭제"); // 업로드된 파일이 있다면 파일삭제 $sql2 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "; @@ -100,7 +101,8 @@ while ($row = sql_fetch_array($result)) else { // 코멘트 포인트 삭제 - insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 코멘트삭제"); + if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '댓글')) + insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 댓글삭제"); $count_comment++; } diff --git a/bbs/delete_all.php b/bbs/delete_all.php index 1c6bfbbf0..4e91bf319 100644 --- a/bbs/delete_all.php +++ b/bbs/delete_all.php @@ -84,7 +84,8 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) if (!$row['wr_is_comment']) { // 원글 포인트 삭제 - insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글 삭제"); + if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '쓰기')) + insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글 삭제"); // 업로드된 파일이 있다면 $sql2 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "; @@ -113,7 +114,8 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) else { // 코멘트 포인트 삭제 - insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 코멘트삭제"); + if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '댓글')) + insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 댓글삭제"); $count_comment++; } diff --git a/bbs/delete_comment.php b/bbs/delete_comment.php index ca4c99421..7a0a7f855 100644 --- a/bbs/delete_comment.php +++ b/bbs/delete_comment.php @@ -58,8 +58,9 @@ $row = sql_fetch($sql); if ($row['cnt'] && !$is_admin) alert('이 코멘트와 관련된 답변코멘트가 존재하므로 삭제 할 수 없습니다.'); -// 코멘트 삭제 -insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제"); +// 코멘트 포인트 삭제 +if (!delete_point($write['mb_id'], $bo_table, $comment_id, '댓글')) + insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 댓글삭제"); // 코멘트 삭제 sql_query(" delete from {$write_table} where wr_id = '{$comment_id}' "); diff --git a/bbs/point.php b/bbs/point.php index eafce2aaf..ebfdc9c56 100644 --- a/bbs/point.php +++ b/bbs/point.php @@ -55,13 +55,6 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함 } $po_content = $row['po_content']; - - // 소멸포인트 - if($row['po_point'] >= 0 && $row['po_expired'] == 1) { - $sum_point3 += $row['po_point']; - $po_content = ''.$po_content.''; - } - ?> @@ -87,12 +80,6 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함 - - - 소멸포인트 - - - 보유포인트 diff --git a/install/gnuboard4s.sql b/install/gnuboard4s.sql index 48af2f8d5..d08ad879d 100644 --- a/install/gnuboard4s.sql +++ b/install/gnuboard4s.sql @@ -501,7 +501,8 @@ CREATE TABLE IF NOT EXISTS `g4s_point` ( `po_rel_id` varchar(20) NOT NULL default '', `po_rel_action` varchar(255) NOT NULL default '', PRIMARY KEY (`po_id`), - KEY `index1` (`mb_id`,`po_rel_table`,`po_rel_id`,`po_rel_action`) + KEY `index1` (`mb_id`,`po_rel_table`,`po_rel_id`,`po_rel_action`), + KEY `index2` (`po_expire_date`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- diff --git a/lib/common.lib.php b/lib/common.lib.php index 3af0f16ee..9f82afe3e 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -868,6 +868,9 @@ function insert_point($mb_id, $point, $content='', $rel_table='', $rel_id='', $r $mb = sql_fetch(" select mb_id from {$g4['member_table']} where mb_id = '$mb_id' "); if (!$mb['mb_id']) { return 0; } + // 회원포인트 + $mb_point = get_point_sum($mb_id); + // 이미 등록된 내역이라면 건너뜀 if ($rel_table || $rel_id || $rel_action) { @@ -895,6 +898,7 @@ function insert_point($mb_id, $point, $content='', $rel_table='', $rel_id='', $r $po_expired = 1; $po_expire_date = G4_TIME_YMD; } + $po_mb_point = $mb_point + $point; $sql = " insert into {$g4['point_table']} set mb_id = '$mb_id', @@ -902,29 +906,21 @@ function insert_point($mb_id, $point, $content='', $rel_table='', $rel_id='', $r po_content = '".addslashes($content)."', po_point = '$point', po_use_point = '0', + po_mb_point = '$po_mb_point', po_expired = '$po_expired', po_expire_date = '$po_expire_date', po_rel_table = '$rel_table', po_rel_id = '$rel_id', po_rel_action = '$rel_action' "; sql_query($sql); - $po_id = mysql_insert_id(); // 포인트를 사용한 경우 포인트 내역에 사용금액 기록 if($point < 0) { insert_use_point($mb_id, $point); } - // 회원포인트 - $sum_mb_point = get_point_sum($mb_id); - // 포인트 UPDATE - $sql = " update {$g4['member_table']} set mb_point = '$sum_mb_point' where mb_id = '$mb_id' "; - sql_query($sql); - - $sql = " update {$g4['point_table']} - set po_mb_point = '$sum_mb_point' - where po_id = '$po_id' "; + $sql = " update {$g4['member_table']} set mb_point = '$po_mb_point' where mb_id = '$mb_id' "; sql_query($sql); return 1; @@ -953,7 +949,7 @@ function insert_use_point($mb_id, $point, $po_id='') $point2 = $row['po_point']; $point3 = $row['po_use_point']; - if(($point2 - $point3) >= $point1) { + if(($point2 - $point3) > $point1) { $sql = " update {$g4['point_table']} set po_use_point = po_use_point + '$point1' where po_id = '{$row['po_id']}' "; @@ -971,6 +967,49 @@ function insert_use_point($mb_id, $point, $po_id='') } } +// 사용포인트 삭제 +function delete_use_point($mb_id, $point) +{ + global $g4, $config; + + if($config['cf_point_term']) + $sql_order = " order by po_expire_date desc, po_id desc "; + else + $sql_order = " order by po_id desc "; + + $point1 = abs($point); + $sql = " select po_id, po_use_point, po_expired, po_expire_date + from {$g4['point_table']} + where mb_id = '$mb_id' + and po_use_point > 0 + $sql_order "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + $point2 = $row['po_use_point']; + + $po_expired = $row['po_expired']; + if($row['po_expired'] == 100 && ($row['po_expire_date'] == '9999-12-31' || $row['po_expire_date'] >= G4_TIME_YMD)) + $po_expired = 0; + + if($point2 > $point1) { + $sql = " update {$g4['point_table']} + set po_use_point = po_use_point - '$point1', + po_expired = '$po_expired' + where po_id = '{$row['po_id']}' "; + sql_query($sql); + break; + } else { + $sql = " update {$g4['point_table']} + set po_use_point = '0', + po_expired = '$po_expired' + where po_id = '{$row['po_id']}' "; + sql_query($sql); + + $point1 -= $point2; + } + } +} + // 포인트 내역 합계 function get_point_sum($mb_id) { @@ -980,7 +1019,34 @@ function get_point_sum($mb_id) // 소멸포인트가 있으면 내역 추가 $expire_point = get_expire_point($mb_id); if($expire_point > 0) { - insert_point($mb_id, -1*$expire_point, '포인트 소멸', '@expire', $mb_id, 'expire'.'-'.uniqid('')); + $mb = get_member($mb_id, 'mb_point'); + $content = '포인트 소멸'; + $rel_table = '@expire'; + $rel_id = $mb_id; + $rel_action = 'expire'.'-'.uniqid(''); + $point = $expire_point * (-1); + $po_mb_point = $mb['mb_point'] + $point; + $po_expire_date = G4_TIME_YMD; + $po_expired = 1; + + $sql = " insert into {$g4['point_table']} + set mb_id = '$mb_id', + po_datetime = '".G4_TIME_YMDHIS."', + po_content = '".addslashes($content)."', + po_point = '$point', + po_use_point = '0', + po_mb_point = '$po_mb_point', + po_expired = '$po_expired', + po_expire_date = '$po_expire_date', + po_rel_table = '$rel_table', + po_rel_id = '$rel_id', + po_rel_action = '$rel_action' "; + sql_query($sql); + + // 포인트를 사용한 경우 포인트 내역에 사용금액 기록 + if($point < 0) { + insert_use_point($mb_id, $point); + } } // 유효기간이 있을 때 기간이 지난 포인트 expired 체크 @@ -994,16 +1060,12 @@ function get_point_sum($mb_id) } // 포인트합 - $sql = " select sum(po_point - po_use_point) as sum_po_point + $sql = " select sum(po_point) as sum_po_point from {$g4['point_table']} - where mb_id = '$mb_id' - and po_expired = '0' "; + where mb_id = '$mb_id' "; $row = sql_fetch($sql); - if($row['sum_po_point'] < 0) - return 0; - else - return $row['sum_po_point']; + return $row['sum_po_point']; } // 소멸 포인트 @@ -1025,6 +1087,59 @@ function get_expire_point($mb_id) return $row['sum_point']; } +// 포인트 삭제 +function delete_point($mb_id, $rel_table, $rel_id, $rel_action) +{ + global $g4; + + $result = false; + if ($rel_table || $rel_id || $rel_action) + { + // 포인트 내역정보 + $sql = " select * from {$g4['point_table']} + where mb_id = '$mb_id' + and po_rel_table = '$rel_table' + and po_rel_id = '$rel_id' + and po_rel_action = '$rel_action' "; + $row = sql_fetch($sql); + + if($row['po_point'] < 0) { + if($row['po_rel_table'] != '@expire') { + $mb_id = $row['mb_id']; + $po_point = abs($row['po_point']); + + delete_use_point($mb_id, $po_point); + } + } else { + if($row['po_expired'] != 1 && $row['po_use_point'] > 0) { + insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']); + } + } + + $result = sql_query(" delete from {$g4['point_table']} + where mb_id = '$mb_id' + and po_rel_table = '$rel_table' + and po_rel_id = '$rel_id' + and po_rel_action = '$rel_action' ", false); + + // po_mb_point에 반영 + $sql = " update {$g4['point_table']} + set po_mb_point = po_mb_point - '{$row['po_point']}' + where mb_id = '$mb_id' + and po_id > '{$row['po_id']}' "; + sql_query($sql); + + // 포인트 내역의 합을 구하고 + $sum_point = get_point_sum($mb_id); + + // 포인트 UPDATE + $sql = " update {$g4['member_table']} set mb_point = '$sum_point' where mb_id = '$mb_id' "; + $result = sql_query($sql); + } + + return $result; +} + // 회원 레이어 function get_sideview($mb_id, $name='', $email='', $homepage='') { From 470698c149aebd398cc800f5ffb74eefcbf0a418 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 30 Jul 2013 14:38:42 +0900 Subject: [PATCH 13/18] =?UTF-8?q?=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=86=8C?= =?UTF-8?q?=EB=A9=B8=EB=82=B4=EC=97=AD=20=EC=82=AD=EC=A0=9C=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/point_list_delete.php | 16 ++++++------ lib/common.lib.php | 53 ++++++++++++++++++++++++++++++++++----- 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/adm/point_list_delete.php b/adm/point_list_delete.php index 32cc13681..f9cc2c8cd 100644 --- a/adm/point_list_delete.php +++ b/adm/point_list_delete.php @@ -25,14 +25,15 @@ for ($i=0; $i<$count; $i++) continue; if($row['po_point'] < 0) { - if($row['po_rel_table'] != '@expire') { - $mb_id = $row['mb_id']; - $po_point = abs($row['po_point']); + $mb_id = $row['mb_id']; + $po_point = abs($row['po_point']); + if($row['po_rel_table'] == '@expire') + delete_expire_point($mb_id, $po_point); + else delete_use_point($mb_id, $po_point); - } } else { - if($row['po_expired'] != 1 && $row['po_use_point'] > 0) { + if($row['po_use_point'] > 0) { insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']); } } @@ -44,10 +45,11 @@ for ($i=0; $i<$count; $i++) // po_mb_point에 반영 $sql = " update {$g4['point_table']} set po_mb_point = po_mb_point - '{$row['po_point']}' - where mb_id = '$mb_id' - and po_id > '{$row['po_id']}' "; + where mb_id = '{$_POST['mb_id'][$k]}' + and po_id > '{$_POST['po_id'][$k]}' "; sql_query($sql); + // 포인트 UPDATE $sum_point = get_point_sum($_POST['mb_id'][$k]); $sql= " update {$g4['member_table']} set mb_point = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' "; sql_query($sql); diff --git a/lib/common.lib.php b/lib/common.lib.php index 9f82afe3e..b9aa44fb4 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -981,6 +981,7 @@ function delete_use_point($mb_id, $point) $sql = " select po_id, po_use_point, po_expired, po_expire_date from {$g4['point_table']} where mb_id = '$mb_id' + and po_expired <> '1' and po_use_point > 0 $sql_order "; $result = sql_query($sql); @@ -1010,6 +1011,48 @@ function delete_use_point($mb_id, $point) } } +// 소멸포인트 삭제 +function delete_expire_point($mb_id, $point) +{ + global $g4, $config; + + $point1 = abs($point); + $sql = " select po_id, po_use_point, po_expired, po_expire_date + from {$g4['point_table']} + where mb_id = '$mb_id' + and po_expired = '1' + and po_point >= 0 + and po_use_point > 0 + order by po_expire_date desc, po_id desc "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + $point2 = $row['po_use_point']; + $po_expired = '0'; + $po_expire_date = '9999-12-31'; + if($config['cf_point_term'] > 0) + $po_expire_date = date('Y-m-d', strtotime('+'.($config['cf_point_term'] - 1).' days', G4_SERVER_TIME)); + + if($point2 > $point1) { + $sql = " update {$g4['point_table']} + set po_use_point = po_use_point - '$point1', + po_expired = '$po_expired', + po_expire_date = '$po_expire_date' + where po_id = '{$row['po_id']}' "; + sql_query($sql); + break; + } else { + $sql = " update {$g4['point_table']} + set po_use_point = '0', + po_expired = '$po_expired', + po_expire_date = '$po_expire_date' + where po_id = '{$row['po_id']}' "; + sql_query($sql); + + $point1 -= $point2; + } + } +} + // 포인트 내역 합계 function get_point_sum($mb_id) { @@ -1104,14 +1147,12 @@ function delete_point($mb_id, $rel_table, $rel_id, $rel_action) $row = sql_fetch($sql); if($row['po_point'] < 0) { - if($row['po_rel_table'] != '@expire') { - $mb_id = $row['mb_id']; - $po_point = abs($row['po_point']); + $mb_id = $row['mb_id']; + $po_point = abs($row['po_point']); - delete_use_point($mb_id, $po_point); - } + delete_use_point($mb_id, $po_point); } else { - if($row['po_expired'] != 1 && $row['po_use_point'] > 0) { + if($row['po_use_point'] > 0) { insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']); } } From 9748ae279a6111095e7194a54b04d62aa0b65de5 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 30 Jul 2013 16:05:04 +0900 Subject: [PATCH 14/18] =?UTF-8?q?=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=ED=95=84=EB=93=9C=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=9A=A9=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upgrade.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 upgrade.php diff --git a/upgrade.php b/upgrade.php new file mode 100644 index 000000000..3a1a708af --- /dev/null +++ b/upgrade.php @@ -0,0 +1,19 @@ + \ No newline at end of file From 8e890d718e95fab8a9237775c07f36e947b2e2e7 Mon Sep 17 00:00:00 2001 From: whitedot Date: Tue, 30 Jul 2013 16:48:49 +0900 Subject: [PATCH 15/18] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90:=20#485=20?= =?UTF-8?q?=ED=8F=AC=EC=9D=B8=ED=8A=B8=EA=B4=80=EB=A6=AC=20=EB=A7=8C?= =?UTF-8?q?=EB=A3=8C=EC=9D=BC=20=EB=A7=88=ED=81=AC=EC=97=85=20=EB=B0=8F=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/point_list.php | 4 ++-- css/admin.css | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/adm/point_list.php b/adm/point_list.php index 00dbb3e07..17b27524a 100644 --- a/adm/point_list.php +++ b/adm/point_list.php @@ -168,8 +168,8 @@ function point_clear() - - + + Date: Wed, 31 Jul 2013 09:46:58 +0900 Subject: [PATCH 16/18] =?UTF-8?q?=EB=A7=8C=EB=A3=8C=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=20class=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/point_list.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/adm/point_list.php b/adm/point_list.php index 17b27524a..2b0bc81fd 100644 --- a/adm/point_list.php +++ b/adm/point_list.php @@ -65,6 +65,11 @@ $po_expire_term = ''; if($config['cf_point_term'] > 0) { $po_expire_term = $config['cf_point_term']; } + +if (strstr($sfl, "mb_id")) + $mb_id = $stx; +else + $mb_id = ""; ?>