g4s merge 충돌 수정
This commit is contained in:
@ -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`,
|
||||
@ -333,6 +333,13 @@ $pg_anchor = '<ul class="anchor">
|
||||
<input type="checkbox" name="cf_use_copy_log" value="1" id="cf_use_copy_log" <?php echo $config['cf_use_copy_log']?'checked':''; ?>> 남김
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_point_term">포인트 유효기간</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('기간을 0으로 설정시 포인트 유효기간이 적용되지 않습니다.') ?>
|
||||
<input type="text" name="cf_point_term" value="<?php echo $config['cf_point_term']; ?>" id="cf_point_term" required class="required frm_input" size="5"> 일
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
|
||||
<td>
|
||||
|
||||
@ -23,6 +23,7 @@ $sql = " update {$g4['config_table']}
|
||||
cf_include_tail = '{$_POST['cf_include_tail']}',
|
||||
cf_add_script = '{$_POST['cf_add_script']}',
|
||||
cf_use_point = '{$_POST['cf_use_point']}',
|
||||
cf_point_term = '{$_POST['cf_point_term']}',
|
||||
cf_use_norobot = '{$_POST['cf_use_norobot']}',
|
||||
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
|
||||
cf_use_email_certify = '{$_POST['cf_use_email_certify']}',
|
||||
|
||||
@ -9,6 +9,7 @@ $token = get_token();
|
||||
$sql_common = " from {$g4['point_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
@ -58,7 +59,17 @@ if ($sfl == 'mb_id' && $stx)
|
||||
$g4['title'] = '포인트관리';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$colspan = 8;
|
||||
$colspan = 9;
|
||||
|
||||
$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 = "";
|
||||
?>
|
||||
|
||||
<script>
|
||||
@ -125,9 +136,10 @@ function point_clear()
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">별명</th>
|
||||
<th scope="col">일시</th>
|
||||
<th scope="col">포인트 내용</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">일시</th>
|
||||
<th scope="col">만료일</th>
|
||||
<th scope="col">포인트합</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -146,6 +158,10 @@ function point_clear()
|
||||
$link1 = '<a href="'.G4_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
$expr = '';
|
||||
if($row['po_expired'] == 1)
|
||||
$expr = ' txt_expired';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
@ -158,10 +174,15 @@ function point_clear()
|
||||
<td class="td_mbid"><a href="?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||
<td class="td_mbname"><?php echo $row2['mb_name'] ?></td>
|
||||
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||
<td class="td_time"><?php echo $row['po_datetime'] ?></td>
|
||||
<td class="td_pt_log"><?php echo $link1 ?><?php echo $row['po_content'] ?><?php echo $link2 ?></td>
|
||||
<td class="td_num td_pt"><?php echo number_format($row['po_point']) ?></td>
|
||||
<td class="td_bignum td_pt"><?php echo number_format($row2['mb_point']) ?></td>
|
||||
<td class="td_time"><?php echo $row['po_datetime'] ?></td>
|
||||
<td class="td_date<?php echo $expr; ?>">
|
||||
<?php if ($row['po_expired'] == 1) { ?>
|
||||
만료<?php echo date('ymd', strtotime($row['po_expire_date'])); ?>
|
||||
<?php } else echo $row['po_expire_date'] == '9999-12-31' ? ' ' : $row['po_expire_date']; ?>
|
||||
</td>
|
||||
<td class="td_num td_pt"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
@ -211,6 +232,12 @@ function point_clear()
|
||||
<th scope="row"><label for="po_point">포인트<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="po_point" id="po_point" required class="required frm_input"></td>
|
||||
</tr>
|
||||
<?php if($config['cf_point_term'] > 0) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_expire_term">포인트 유효기간</label></th>
|
||||
<td><input type="text" name="po_expire_term" value="<?php echo $po_expire_term; ?>" id="po_expire_term" class="frm_input" size="5"> 일</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "200200";
|
||||
$sub_menu = '200200';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
@ -10,23 +10,50 @@ check_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
if(!$count)
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
// 포인트 내역정보
|
||||
$sql = " select * from {$g4['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['po_id'])
|
||||
continue;
|
||||
|
||||
if($row['po_point'] < 0) {
|
||||
$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_use_point'] > 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 = '{$_POST['mb_id'][$k]}'
|
||||
and po_id > '{$_POST['po_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql= " update {$g4['member_table']} set mb_point = '{$sum_point}' where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||
// 포인트 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);
|
||||
}
|
||||
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
?>
|
||||
?>
|
||||
@ -9,6 +9,7 @@ check_token();
|
||||
$mb_id = $_POST['mb_id'];
|
||||
$po_point = $_POST['po_point'];
|
||||
$po_content = $_POST['po_content'];
|
||||
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
|
||||
@ -18,7 +19,7 @@ if (!$mb['mb_id'])
|
||||
if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point']))
|
||||
alert('포인트를 깎는 경우 현재 포인트보다 작으면 안됩니다.', './point_list.php?'.$qstr);
|
||||
|
||||
insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id']."-".uniqid(""));
|
||||
insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id'].'-'.uniqid(''), $expire);
|
||||
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user