게시판 제목불러오기 채택완료
function ask_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;
}
}
}
ask_write_check($bo_table, array('job'));
검색해서 찾아서 유용하게 사용중입니다..
여기서 제가 도움을 얻고자 하는것은 하루작성 alert 메세지에 write_count 하루작성횟수 불러오는것처럼
게시판 제목을 불러올수 있게 추가해야하는 소스좀 부탁드립니다..
테이블명 말고 게시판 제목입니다.. ^^
답변 1개
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("{$board['bo_subject']} 게시판은 하루에 {$write_count}개의 게시물만 작성 가능합니다."); return; }else{ return; } } } ask_write_check($bo_table, array('job'));
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인