테스트 사이트 - 개발 중인 베타 버전입니다

추천인도 하루 포인트 제한에 포함 시키는 방법이있나요? 채택완료

떳다이장님 7년 전 조회 1,836

포인트 제한은

</p>

<p>    $limit_point = "800";//포인트 제한.

    $sql = "select SUM(po_point) as point FROM `{$g5['point_table']}` WHERE mb_id ='{$mb_id}' and TO_DAYS(po_datetime) = TO_DAYS('" . G5_TIME_YMDHIS . "')";

    $today_point = sql_fetch($sql);</p>

<p>    //100미만인 대상만 포인트 적립

    if ($today_point['point'] < $limit_point) {

        $point = $insert_point;

    } else {

        $point = 0;

    }

    return $point;

}

$board['bo_read_point']= chk_point($member['mb_id'], $board['bo_read_point']);//읽기포인트

$board['bo_write_point']= chk_point($member['mb_id'], $board['bo_write_point']);//쓰기포인트

$board['bo_comment_point']= chk_point($member['mb_id'], $board['bo_comment_point']);//답변 및 댓글포인트

$board['bo_download_point']= chk_point($member['mb_id'], $board['bo_download_point']);//다운로드포인트</p>

<p>

?></p>

<p> </p>

<p>

추천 포인트는  이걸 쓰고있습니다.

</p>

<p>if ($good == "good") { 

  $status = ($txt_good) ? $txt_good : '<strong>추천</strong>';

  insert_point($write['mb_id'], '100', $member['mb_nick']."님이 <strong>추천</strong>", $bo_table, $wr_id, $member['mb_id'].'<strong>추천</strong>');

  insert_point($member['mb_id'], '100', "<strong>추천</strong> 했습니다.", $bo_table, $wr_id, $member['mb_id'].'<strong>추천</strong>하기'); 

} else { 

  $status = ($txt_nogood) ? $txt_nogood : '비<strong>추천</strong>';

} </p>

<p>

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
베원
7년 전

</p>

<p>insert_point($write['mb_id'], '100', $member['mb_nick']."님이 추천", $bo_table, $wr_id, $member['mb_id'].'추천');</p>

<p>insert_point($member['mb_id'], '100', "추천 했습니다.", $bo_table, $wr_id, $member['mb_id'].'추천하기');</p>

<p>

이 코드를

</p>

<p>insert_point($write['mb_id'], chk_point($write['mb_id'], 100), $member['mb_nick']."님이 추천", $bo_table, $wr_id, $member['mb_id'].'추천');</p>

<p>insert_point($member['mb_id'], chk_point($member['mb_id'], 100), "추천 했습니다.", $bo_table, $wr_id, $member['mb_id'].'추천하기');</p>

<p>

이렇게 바꾸시면 될 것 같네요.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

플라이
7년 전

insert_point() 함수안에서 처리하실때 회원마다 현재 적립포인트를 체크후 그 이상 적립한것이라면 적립 안되도록 수정 처리해 주셔야 합니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인