하루 포인트 제한
본문
하루 포인트를 2000점이상 안올라가게 제한을 하고 싶은데요...
다른분이 질문한답변에 알려주신 방법으로 했는데..
제한이 되지않고 계속 포인트가 쌓여요...
어떡해해야하는지 알려주시면 감사하겠습니다....
/bbs/write_update.php// 쓰기 포인트 부여
if ($w == '') {
if ($notice) {
$bo_notice = $wr_id.",".$board['bo_notice'];
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
}
//일단 오늘 모은 포인트가 천점이 넘은지를 검색해야 겠지요
$sql_point = " SELECT sum(po_point) AS todayPoint FROM ".$g5['point_table']." WHERE po_datetime > curdate( ) AND mb_id = '".$member['mb_id']."' ";
$row_point = sql_fetch($sql_point);
if($row['todayPoint'] < 2000)
insert_point($member['mb_id'], $board['bo_write_point'], "{$board['bo_subject']} {$wr_id} 글쓰기", $bo_table, $wr_id, '쓰기');
} else {
// 답변은 코멘트 포인트를 부여함
// 답변 포인트가 많은 경우 코멘트 대신 답변을 하는 경우가 많음
//일단 오늘 모은 포인트가 천점이 넘은지를 검색해야 겠지요
$sql_point = " SELECT sum(po_point) AS todayPoint FROM ".$g5['point_table']." WHERE po_datetime > curdate( ) AND mb_id = '".$member['mb_id']."' ";
$row_point = sql_fetch($sql_point);
if($row['todayPoint'] < 2000)
insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id} 글답변", $bo_table, $wr_id, '쓰기');
}
답변을 작성하시기 전에 로그인 해주세요.