답변 2개
포인트를 지급하는 부분에서 중복이면 건너띄게 됩니다.
bbs/board.php 파일에서 읽기 포인트가 지급되고..
insert_point($member['mb_id'], $board['bo_read_point'], ((G5_IS_MOBILE && $board['bo_mobile_subject']) ? $board['bo_mobile_subject'] : $board['bo_subject']).' '.$wr_id.' 글읽기', $bo_table, $wr_id, '읽기');
lib/common.lib.php 파일에서 insert_point 함수를 살펴보면 이렇게 되어 있죠.
// 포인트 부여
function insert_point($mb_id, $point, $content='', $rel_table='', $rel_id='', $rel_action='', $expire=0)
{
.........................
// 이미 등록된 내역이라면 건너뜀
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;
}
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
글 읽은 사람을 기록해놓고 불러오는게 아니라
그때그때마다 포인트 지급된게 있는지 보고 판단하는거였군요.
감사합니다.