$list_i = $list[$i][wr_id];
$down_count = sql_fetch(" select unix_timestamp(MAX(po_datetime)) as cnt_out from $g4[point_table] where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$list_i' ");
$down_count_out = $down_count[cnt_out];
$down_s = 120; $down_limit = $down_count_out + $down_s;
if($g4[server_time] > $down_limit) {
// 게시물당 한번만 차감하도록 수정
// insert_point($member[mb_id], $board[bo_download_point], "$board[bo_subject] $wr_id" , $bo_table, $wr_id, $g4[server_time])
}
어제도 적었습니다만...
이렇게 하면 분명히 120초가 지나기 전까지는 포인트가 차감 안되야하는데 계속 차감 됩니다..
도데체 왜일까요....으아아아아아아앙ㅇㅇㅇㅇ
$down_count = sql_fetch(" select unix_timestamp(MAX(po_datetime)) as cnt_out from $g4[point_table] where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$list_i' ");
$down_count_out = $down_count[cnt_out];
$down_s = 120; $down_limit = $down_count_out + $down_s;
if($g4[server_time] > $down_limit) {
// 게시물당 한번만 차감하도록 수정
// insert_point($member[mb_id], $board[bo_download_point], "$board[bo_subject] $wr_id" , $bo_table, $wr_id, $g4[server_time])
}
어제도 적었습니다만...
이렇게 하면 분명히 120초가 지나기 전까지는 포인트가 차감 안되야하는데 계속 차감 됩니다..
도데체 왜일까요....으아아아아아아앙ㅇㅇㅇㅇ
댓글 7개
유닉스타임 처리가 안맞나 봅니다.
아래코드로 테스트 해보십시오
$list_i = $list[$i][wr_id];
//$down_count = sql_fetch(" select unix_timestamp(MAX(po_datetime)) as cnt_out from $g4[point_table] where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$list_i' ");
$down_count = sql_fetch(" select MAX(po_datetime) as cnt_out from $g4[point_table] where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$list_i' ");
//$down_count_out = $down_count['cnt_out'];
//$down_s = 120;
//$down_limit = $down_count_out + $down_s;
$down_limit = date("{$down_count['cnt_out']}", strtotime("+120 seconds"))
//if($g4[server_time] > $down_limit) {
if($g4['time_ymdhis'] > $down_limit) {
// 게시물당 한번만 차감하도록 수정
// insert_point($member[mb_id], $board[bo_download_point], "$board[bo_subject] $wr_id" , $bo_table, $wr_id, $g4[server_time])
}
아래코드로 테스트 해보십시오
$list_i = $list[$i][wr_id];
//$down_count = sql_fetch(" select unix_timestamp(MAX(po_datetime)) as cnt_out from $g4[point_table] where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$list_i' ");
$down_count = sql_fetch(" select MAX(po_datetime) as cnt_out from $g4[point_table] where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$list_i' ");
//$down_count_out = $down_count['cnt_out'];
//$down_s = 120;
//$down_limit = $down_count_out + $down_s;
$down_limit = date("{$down_count['cnt_out']}", strtotime("+120 seconds"))
//if($g4[server_time] > $down_limit) {
if($g4['time_ymdhis'] > $down_limit) {
// 게시물당 한번만 차감하도록 수정
// insert_point($member[mb_id], $board[bo_download_point], "$board[bo_subject] $wr_id" , $bo_table, $wr_id, $g4[server_time])
}
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기