일반글
페이지 정보

본문
<?php
// 1일 등록 가능한 게시물 게시판별 제한
function gw_write_check($bo_table, array $board_list){
global $g5, $member;
//하루에 작성 가능한 게시물 수
$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;
}else{
return;
}
}
}
gw_write_check($bo_table, array('게시판1','게시판2'));
?>
extend/user.config.php 파일에 위의 코드를 넣으시면 됩니다.
댓글목록
등록된 댓글이 없습니다.