안녕하세요 답변 감사합니다.
adm/ point.list.php 의
87 <option value="mb_id"<?php echo get_selected($sfl, "mb_id"); ?>>회원아이디</option>
112 <th scope="col"><?php echo subject_sort_link('mb_id') ?>회원아이디</a></th>
203
<tr>
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" class="required frm_input" required></td>
</tr>
의 mb_id => mb_nick 변경,
common.lib.php
// 포인트 부여
function insert_point($mb_id, $point, $content='', $rel_table='', $rel_id='', $rel_action='', $expire=0)
{ global $config;
global $g5;
global $is_admin;
// 포인트 사용을 하지 않는다면 return
if (!$config['cf_use_point']) { return 0; }
// 포인트가 없다면 업데이트 할 필요 없음
if ($point == 0) { return 0; }
// 회원아이디가 없다면 업데이트 할 필요 없음
if ($mb_id == '') { return 0; }
$mb = sql_fetch(" select mb_id from {$g5['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)
{
$sql = " select count(*) as cnt from {$g5['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['cnt'])
return -1;
}
// 포인트 건별 생성
$po_expire_date = '9999-12-31';
if($config['cf_point_term'] > 0) {
if($expire > 0)
$po_expire_date = date('Y-m-d', strtotime('+'.($expire - 1).' days', G5_SERVER_TIME));
else
$po_expire_date = date('Y-m-d', strtotime('+'.($config['cf_point_term'] - 1).' days', G5_SERVER_TIME));
}
$po_expired = 0;
if($point < 0) {
$po_expired = 1;
$po_expire_date = G5_TIME_YMD;
}
$po_mb_point = $mb_point + $point;
$sql = " insert into {$g5['point_table']}
set mb_id = '$mb_id',
po_datetime = '".G5_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);
}
// 포인트 UPDATE
$sql = " update {$g5['member_table']} set mb_point = '$po_mb_point' where mb_id = '$mb_id' ";
sql_query($sql);
return 1;
}
insert_point2 변경후 모든 mb_id => mb_nick변경
point_update
22 insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id'].'-'.uniqid(''), $expire);
의 insert_point => insert_point2 로 변경후 mb_id => mb_nick 으로 변경
맞나요??