아미나 보드에서 추천수 제한 하는법 질문드립니다.
본문
<?php
$sql = " select count(*) as cnt from $g5[board_good_table] where bo_table = '$bo_table' and mb_id = '$member[mb_id]' and bg_flag = 'good' and bg_datetime >= date_format(now(),'%Y-%m-%d')";
$tm1 = sql_fetch($sql);
if($tm1[cnt] >= '5'){
$good_href = "\"\" onclick=\"alert('추천은 하루에 5회 만 가능')\";return false;";
}
?>
위 코드를 적용해도 작동이 안되는데.
추천수 제한은 혹시 어디쪽에 넣어야될까요?
!-->답변 1
/bbs/good.php 에 추가하거나..
아래와 같이 수정하세요..
그럼 추천 버튼이 안보이게 됩니다.
$sql = " select count(*) as cnt from $g5[board_good_table] where bo_table = '$bo_table' and mb_id = '$member[mb_id]' and bg_flag = 'good' and bg_datetime >= date_format(now(),'%Y-%m-%d')";
$tm1 = sql_fetch($sql);
if($tm1[cnt] > '5'){
$good_href = "";
}
답변을 작성하시기 전에 로그인 해주세요.