글쓰기제한 채택완료
웅쿵쿵
6년 전
조회 1,908
</p>
<p>function ask_write_check($bo_table, array $board_list){
global $g5, $member, $board;
$write_count = 1;
if(in_array($bo_table, $board_list) && $member && strstr($_SERVER['PHP_SELF'], 'write.php')){
$sql = "select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where mb_id = '{$member['mb_id']}' and date_format(wr_datetime, '%Y-%m-%d') = '" . G5_TIME_YMD . "' ";
$cnt = sql_fetch($sql);
if($cnt['cnt'] >= $write_count){
alert("하루{$write_count}개 작성 가능합니다.");
return;</p>
<p>
위처럼 하루1개 글작성 제한을 적용했는데요.
글쓰기 버튼외에도 수정버튼을 눌러도 alert메세지가 나오면서 제한됩니다.
글수정은 제외하고 싶은데 도움부탁드립니다.
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
답변을 작성하려면 로그인이 필요합니다.
로그인