하루 글쓰기 수 제한 정보
하루 글쓰기 수 제한본문
질문 게시판에 너무 도배하시는분들이 잇어서
질문게시판에 하루 글쓰기 수를 3개로 하려는데
뭐 방법이없을까요?~
댓글 전체
http://www.sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=2100
헐램이님이 공개하신 팁 참고해보세요..
헐램이님이 공개하신 팁 참고해보세요..
관리자님이 만드신 스킨중에 아래 소스가 있던데 참고하세요.
// 하루 최대 등록 글수
$max_cnt = $g4[max_line_ad]; // config.php 에 있음
if (!$max_cnt)
$max_cnt = 3;
if ($w == "")
{
$sql = " select count(*) as cnt from $write_table
where wr_is_comment = 0
and mb_id = '$member[mb_id]'
and substring(wr_datetime,1,10) = '$g4[time_ymd]' ";
$row = sql_fetch($sql);
if ($row[cnt])
alert("오늘 이미 등록하셨습니다. 내일 다시 등록하여 주십시오.");
$sql = " select count(*) as cnt from $write_table where wr_is_comment = 0 and substring(wr_datetime,1,10) = '$g4[time_ymd]' ";
$row = sql_fetch($sql);
if ($row[cnt] >= $max_cnt)
alert("하루에 최대 {$max_cnt}건만 등록할 수 있습니다. 내일 다시 등록하여 주십시오.");
}
// 하루 최대 등록 글수
$max_cnt = $g4[max_line_ad]; // config.php 에 있음
if (!$max_cnt)
$max_cnt = 3;
if ($w == "")
{
$sql = " select count(*) as cnt from $write_table
where wr_is_comment = 0
and mb_id = '$member[mb_id]'
and substring(wr_datetime,1,10) = '$g4[time_ymd]' ";
$row = sql_fetch($sql);
if ($row[cnt])
alert("오늘 이미 등록하셨습니다. 내일 다시 등록하여 주십시오.");
$sql = " select count(*) as cnt from $write_table where wr_is_comment = 0 and substring(wr_datetime,1,10) = '$g4[time_ymd]' ";
$row = sql_fetch($sql);
if ($row[cnt] >= $max_cnt)
alert("하루에 최대 {$max_cnt}건만 등록할 수 있습니다. 내일 다시 등록하여 주십시오.");
}
답변감사드립니다 ^ ^많은 도움되엇습니다