도대체 전혀 모르겠습니다..으아아아..3일째 고전중..간단한 소스 적었습니다. 정보
도대체 전혀 모르겠습니다..으아아아..3일째 고전중..간단한 소스 적었습니다.본문
$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초가 지나기 전까지는 포인트가 차감 안되야하는데 계속 차감 됩니다..
도데체 왜일까요....으아아,
댓글 전체
그냥 iframe써버 히든처리 하시는게;;; -ㅅ-...
아님 자바 스크립트... -ㅅ-
아님 자바 스크립트... -ㅅ-
위 코드가 어느 화일에 들어가느냐가 문제인 것 같습니다
희망대로 작동 되지않는 이유는 $list_i = $list[$i][wr_id]; 값이 없으므로해서
$down_count[cnt_out] 값이 없고 따라서
$down_limit = $down_count_out + $down_s; <---이 값이 $down_s 값이 되어버린 것 같군요
뷰페이지라면 $list_i=$wr_id 가 되어야 할테니까요
insert_point 에서는 wr_id가 들어가네요
if($g4[server_time] > $down_limit) { 이 줄 바로 위에
die( $down_limit.'//'. $g4[server_time] ); 해보면 알 수 있겟습니다
아니면 포인트 테이블에 기록되는 wr_id가 값이 들어가지 않앗거나...
희망대로 작동 되지않는 이유는 $list_i = $list[$i][wr_id]; 값이 없으므로해서
$down_count[cnt_out] 값이 없고 따라서
$down_limit = $down_count_out + $down_s; <---이 값이 $down_s 값이 되어버린 것 같군요
뷰페이지라면 $list_i=$wr_id 가 되어야 할테니까요
insert_point 에서는 wr_id가 들어가네요
if($g4[server_time] > $down_limit) { 이 줄 바로 위에
die( $down_limit.'//'. $g4[server_time] ); 해보면 알 수 있겟습니다
아니면 포인트 테이블에 기록되는 wr_id가 값이 들어가지 않앗거나...