오늘 글썼나 확인 가능한가요? 정보
오늘 글썼나 확인 가능한가요?본문
포인트받기 게시판이 있습니다.
다른 게시판에 글 또는 댓글을 작성했을때만 포인트받기 게시판에 글등록이 되면서 적립이 되지요.
물론 양심껏 하도록 하고 있으며 다른게시판에 작성한 글주소를 함께 입력받습니다.
그런데 일일이 확인 할 수 없잖아요.
다른게시판에 글 또는 댓글을 작성했다면,
포인트받기 게시판 글등록이 되고,
다른게시판에 글도 안썼으면서 포인트받기 게시판에 글등록을 시도한다면
안되도록하고 싶은데
간단히 말해서, 다른게시판의 글등록 여부를 확인가능한가요?
다른 게시판에 글 또는 댓글을 작성했을때만 포인트받기 게시판에 글등록이 되면서 적립이 되지요.
물론 양심껏 하도록 하고 있으며 다른게시판에 작성한 글주소를 함께 입력받습니다.
그런데 일일이 확인 할 수 없잖아요.
다른게시판에 글 또는 댓글을 작성했다면,
포인트받기 게시판 글등록이 되고,
다른게시판에 글도 안썼으면서 포인트받기 게시판에 글등록을 시도한다면
안되도록하고 싶은데
간단히 말해서, 다른게시판의 글등록 여부를 확인가능한가요?
댓글 전체
SQL 써야하나요?
오늘 등록한 글의 수가 1개 이상일때 글작성 가능....
이런식으로 될것 같은데
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=17580
이 활용팁이 도움이 될듯도 하고....
오늘 등록한 글의 수가 1개 이상일때 글작성 가능....
이런식으로 될것 같은데
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=17580
이 활용팁이 도움이 될듯도 하고....
가능은 합니다. g4_board_new 테이블을 잘활용한다면요
죄송하지만 소스 좀 주실수 있나요? 간단하다면요....
전 짤수가 없어서 말이죠 ㅎㅎ;;
만들어서
write_update.head.skin.php 여기에 넣으면 될려나요....
누가 좀 만들어 주실분....^^;
bbs/new.php에 있는
$sql_common = " from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1' ";
이걸 이용하면 될려나....ㅠ.ㅠ
전 짤수가 없어서 말이죠 ㅎㅎ;;
만들어서
write_update.head.skin.php 여기에 넣으면 될려나요....
누가 좀 만들어 주실분....^^;
bbs/new.php에 있는
$sql_common = " from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1' ";
이걸 이용하면 될려나....ㅠ.ㅠ
/bbs/write_update.php 를 다음과 같이 바꾸새요..^^
// 새글 INSERT
//sql_query(" insert into $g4[board_new_table] ( bo_table, wr_id, wr_parent, bn_datetime ) values ( '$bo_table', '$wr_id', '$wr_id', '$g4[time_ymdhis]' ) ");
sql_query(" insert into $g4[board_new_table] ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '$bo_table', '$wr_id', '$wr_id', '$g4[time_ymdhis]', '$member[mb_id]' ) ");
// 게시글 1 증가
sql_query("update $g4[board_table] set bo_count_write = bo_count_write + 1 where bo_table = '$bo_table'");
//다른글에 쓴글이 있을때 포인트 주기
//$bo_table 에는 포인트 주는 게시판 명..넣어 그 게시판만 제외..
$row2=sql_fetch("select count(*) as cnt from $g4[board_new_table] where bo_table !='$bo_table' and mb_id='$member[mb_id]'");
if ($row2[cnt]>0) {
// 쓰기 포인트 부여
if ($w == '')
{
if ($notice)
{
$bo_notice = $wr_id . "\n" . $board[bo_notice];
sql_query(" update $g4[board_table] set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");
}
insert_point($member[mb_id], $board[bo_write_point], "$board[bo_subject] $wr_id 글쓰기", $bo_table, $wr_id, '쓰기');
}
else
{
// 답변은 코멘트 포인트를 부여함
// 답변 포인트가 많은 경우 코멘트 대신 답변을 하는 경우가 많음
insert_point($member[mb_id], $board[bo_comment_point], "$board[bo_subject] $wr_id 글답변", $bo_table, $wr_id, '쓰기');
}
}
// 새글 INSERT
//sql_query(" insert into $g4[board_new_table] ( bo_table, wr_id, wr_parent, bn_datetime ) values ( '$bo_table', '$wr_id', '$wr_id', '$g4[time_ymdhis]' ) ");
sql_query(" insert into $g4[board_new_table] ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '$bo_table', '$wr_id', '$wr_id', '$g4[time_ymdhis]', '$member[mb_id]' ) ");
// 게시글 1 증가
sql_query("update $g4[board_table] set bo_count_write = bo_count_write + 1 where bo_table = '$bo_table'");
//다른글에 쓴글이 있을때 포인트 주기
//$bo_table 에는 포인트 주는 게시판 명..넣어 그 게시판만 제외..
$row2=sql_fetch("select count(*) as cnt from $g4[board_new_table] where bo_table !='$bo_table' and mb_id='$member[mb_id]'");
if ($row2[cnt]>0) {
// 쓰기 포인트 부여
if ($w == '')
{
if ($notice)
{
$bo_notice = $wr_id . "\n" . $board[bo_notice];
sql_query(" update $g4[board_table] set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");
}
insert_point($member[mb_id], $board[bo_write_point], "$board[bo_subject] $wr_id 글쓰기", $bo_table, $wr_id, '쓰기');
}
else
{
// 답변은 코멘트 포인트를 부여함
// 답변 포인트가 많은 경우 코멘트 대신 답변을 하는 경우가 많음
insert_point($member[mb_id], $board[bo_comment_point], "$board[bo_subject] $wr_id 글답변", $bo_table, $wr_id, '쓰기');
}
}
$row2=sql_fetch("select count(*) as cnt from $g4[board_new_table] where bo_table !='$bo_table' and mb_id='$member[mb_id]' and left(bn_datetime,10) = '".date("Y-m-d")."' ");
echo $row2[cnt]; //오늘 글 쓴수
으로 바꾸어야 곘네요..
echo $row2[cnt]; //오늘 글 쓴수
으로 바꾸어야 곘네요..