오늘하루 특정 게시판에 1번 이상은 글쓰기를 못하게 정보
오늘하루 특정 게시판에 1번 이상은 글쓰기를 못하게![](http://sir.kr/data/member_image/kc/kcho07.gif?1231488045)
본문
특정 게시판에 하루에 1번 이상은 글쓰기를 못하게 하는걸 원하시는분이 계시길래....
이방법은 회원 개인별로 체크 하는게 아니고 관리자를 제외한 회원 전체에게 해당이 됩니다.
A 라는 게시판에 24시간안에 새로운글이 등록이 되면 더이상 새글은 못적고
이전글의 수정은 가능하고 코멘트만 달수 있으며 관리자는 도배가 가능합니다.
즉~ 이전글 등록후 24시간이 지나야만 새로운 글을 등록할수가 있게 됩니다.
bbs/write_update.php 의 검사루틴 부분에 추가 하거나
또는 스킨/write.skin.php 의 상단에 추가합니다.
//적용할 게시판명을 넣어 주세요.
$table_names ="forum";
//테이블명을만들고
$bo_table_names ="".$g4[write_prefix]."".$table_names."";
//새글등록후 24시간 전에는 글쓰기를 못하며 시간변경은 (60 * 60 * 24) 부분에서 수정합니다.
$udatatime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));
//지정한 게시판에서 수정은 가능하고 관리자는 제한이 없고 회원일 경우만 체크
if(($member[mb_id] && !$is_admin && $w != "u") && $bo_table == $table_names){
//코멘트 종류와 답글종류는 전부 제외하고 원글만 오늘 올라온글이 있는지
$ab_boards =mysql_fetch_array(mysql_query("select count(*) from $bo_table_names where wr_is_comment ='0' and wr_reply ='' and wr_datetime >= '$udatatime'"));
$rowmembers =$ab_boards[0];
// 오늘올라온 글이 1개라도 존재 한다면
if($rowmembers > 0){
alert("이게시판에 오늘 $rowmembers 개의 글이 등록이 되었으므로 \\n오늘은 글쓰기를 하실수가 없으며 코멘트만 가능합니다.");
}
}
스킨/write.skin.php 에 적용시엔 그냥 사용하면 됩니다만 bbs/write_update.php 에서
적용할경우 아래처럼 해주세요.
alert("에러메세지", "$g4[bbs_path]/board.php?bo_table=$table_names");
이방법은 회원 개인별로 체크 하는게 아니고 관리자를 제외한 회원 전체에게 해당이 됩니다.
A 라는 게시판에 24시간안에 새로운글이 등록이 되면 더이상 새글은 못적고
이전글의 수정은 가능하고 코멘트만 달수 있으며 관리자는 도배가 가능합니다.
즉~ 이전글 등록후 24시간이 지나야만 새로운 글을 등록할수가 있게 됩니다.
bbs/write_update.php 의 검사루틴 부분에 추가 하거나
또는 스킨/write.skin.php 의 상단에 추가합니다.
//적용할 게시판명을 넣어 주세요.
$table_names ="forum";
//테이블명을만들고
$bo_table_names ="".$g4[write_prefix]."".$table_names."";
//새글등록후 24시간 전에는 글쓰기를 못하며 시간변경은 (60 * 60 * 24) 부분에서 수정합니다.
$udatatime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));
//지정한 게시판에서 수정은 가능하고 관리자는 제한이 없고 회원일 경우만 체크
if(($member[mb_id] && !$is_admin && $w != "u") && $bo_table == $table_names){
//코멘트 종류와 답글종류는 전부 제외하고 원글만 오늘 올라온글이 있는지
$ab_boards =mysql_fetch_array(mysql_query("select count(*) from $bo_table_names where wr_is_comment ='0' and wr_reply ='' and wr_datetime >= '$udatatime'"));
$rowmembers =$ab_boards[0];
// 오늘올라온 글이 1개라도 존재 한다면
if($rowmembers > 0){
alert("이게시판에 오늘 $rowmembers 개의 글이 등록이 되었으므로 \\n오늘은 글쓰기를 하실수가 없으며 코멘트만 가능합니다.");
}
}
스킨/write.skin.php 에 적용시엔 그냥 사용하면 됩니다만 bbs/write_update.php 에서
적용할경우 아래처럼 해주세요.
alert("에러메세지", "$g4[bbs_path]/board.php?bo_table=$table_names");
추천
3
3
댓글 21개
![](http://sir.kr/data/member_image/ho/holykhd.gif?1195053022)
허걱..아래 헐랭이님이 글 적은곳에 코멘트를 쓰고 있었는데,
이렇게 좋은 팁을 올려주시니..눈물이 앞을 가리네요..ㅜㅡ
너무너무 감사드립니다.
2006년도에는 2006가지의 행운이 함께하길 바랍니다.^^
이렇게 좋은 팁을 올려주시니..눈물이 앞을 가리네요..ㅜㅡ
너무너무 감사드립니다.
2006년도에는 2006가지의 행운이 함께하길 바랍니다.^^
좋은 팁
감사합니다.
2006년도에는 2006가지의 행운이 함께하길 바랍니다.^^ _2
감사합니다.
2006년도에는 2006가지의 행운이 함께하길 바랍니다.^^ _2
![](http://sir.kr/data/member_image/da/daye.gif?1195892815)
이거 정말 필요한 팁이었는데 ...^^
헐랭이님 정말 감사합니다....^^
헐랭이님 정말 감사합니다....^^
![](http://sir.kr/data/member_image/kc/kcho07.gif?1231488045)
별것도아닌 내용인데 이렇게 칭찬을 해주시니...감사합니다.
사소하고 아주 조그마한 팁이라도 반드시 필요한분이 있다면 그리고 단 1분이라도
유용하게 사용하시는분이 계시다면 오히려 제가 감사드려야죠
사소하고 아주 조그마한 팁이라도 반드시 필요한분이 있다면 그리고 단 1분이라도
유용하게 사용하시는분이 계시다면 오히려 제가 감사드려야죠
![](http://sir.kr/data/member_image/be/beat112.gif?1256192168)
감사합니다.... 끝말잇기에는 적용 할수 없을까요 ??
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<!-- 게시판 목록 시작 -->
<? if ($is_member) { ?>
<?
$sql2 = "select wr_subject from $write_table order by wr_id DESC";
$row2 = sql_fetch($sql2);
$last_word = substr("$row2[wr_subject]",-2,2);
?>
<form name="flistwrite" method=post action="<?=$board_skin_path?>/hangul_check.php" onsubmit="return fwrite_check(this)" style="margin:0px;">
<input type=hidden name=w value="<?=$w?>">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="<?=$wr_id?>">
<input type=hidden name=sfl value="<?=$sfl?>">
<input type=hidden name=stx value="<?=$stx?>">
<input type=hidden name=spt value="<?=$spt?>">
<input type=hidden name=sst value="<?=$sst?>">
<input type=hidden name=sod value="<?=$sod?>">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=before value="<?=$last_word?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11"><img src="<?=$board_skin_path?>/img/box_01.gif" width="11" height="11"></td>
<td background="<?=$board_skin_path?>/img/box_02.gif"><div align="center"><img src="<?=$board_skin_path?>/img/box_02.gif" width="1" height="11"></div></td>
<td width="11"><img src="<?=$board_skin_path?>/img/box_03.gif" width="11" height="11"></td>
</tr>
<tr height=30>
<td background="<?=$board_skin_path?>/img/box_05.gif"><img src="<?=$board_skin_path?>/img/box_05.gif" width="11" height="1"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding-right: 5px; padding-left: 5px;">
'<font color=red><span><b><?=$last_word?></b></span></font>' (으)로 시작하시고 한글만 입력하세요.
</td>
</tr>
<tr><td height="5"></td></tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/win_line.gif"></td></tr>
<tr><td height="5"></td></tr>
<tr>
<td>
<input type=text id=wr_subject name=wr_subject class=ed style='width:80%; IME-MODE: active;' maxlength=200 itemname="내용" required onKeyPress="hangul();" value="<?=$last_word?>">
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/<?=$bo_color?>/btn_write.gif" border=0 accesskey='s' align=absmiddle>
</td>
</tr>
</table>
</td>
<td background="<?=$board_skin_path?>/img/box_07.gif"><img src="<?=$board_skin_path?>/img/box_07.gif" width="11" height="1"></td>
</tr>
<tr>
<td><img src="<?=$board_skin_path?>/img/box_09.gif" width="11" height="11"></td>
<td background="<?=$board_skin_path?>/img/box_10.gif"><div align="center"><img src="<?=$board_skin_path?>/img/box_10.gif" width="1" height="11"></div></td>
<td><img src="<?=$board_skin_path?>/img/box_11.gif" width="11" height="11"></td>
</tr>
</table>
</form><br>
<script language="JavaScript">
function hangul(){
if (event.keyCode != 32)
{
if((event.keyCode < 12592) || (event.keyCode > 12687))
event.returnValue = false
}
}
function hangul_check(){
win_open("<?=$board_skin_path?>/hangul_check.php?wr_subject="+document.getElementById('wr_subject').value, "hiddenframe");
}
function fwrite_check(f){
var after;
after = f.wr_subject.value.substring(0,1);
if(f.before.value != after){
alert("첫글자는 이전 마지막 글자와 같아야 합니다!!");
f.wr_subject.focus();
return false;
}
var pattern = /([^가-힣\x20 ])/i;
if (pattern.test(f.wr_subject.value)){
alert("한글이 아닙니다. (자음, 모음만 있는 한글은 처리하지 않습니다.)");
f.wr_subject.focus();
return false;
}
if (f.wr_subject.value.length < 2){
alert("두글자 이상 입력하세요.");
f.wr_subject.focus();
return false;
}
return true;
}
document.flistwrite.wr_subject.focus();
</script>
<? } ?>
<!-- 제목 -->
<table width="100%" cellspacing="0" cellpadding="0" background="<?=$board_skin_path?>/img/<?=$bo_color?>/<?=$top_bar?>" height='<?=$top_height?>'>
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<tr height=30 align=center>
<td width="50" align="center" valign="middle"><font class='<?=$b_txt?>'><strong>번호</strong></font></td>
<? if ($is_checkbox) { ?><td width=40><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td><?}?>
<td align="left" valign="middle"><font class='<?=$b_txt?>'><strong>제목</strong></font></td>
<td width="100" align="center"><font class='<?=$b_txt?>'><strong>글쓴이</strong></font></td>
<td width=50 align="center"><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></td>
<? if ($is_good) { ?><td width=40 align="center"><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></td><?}?>
<? if ($is_nogood) { ?><td width=40 align="center"><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></td><?}?>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) { ?>
<? include "icon.php"; ?>
<tr height=28 align=center>
<td width=50 align="center">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/notice_icon.gif\" width=30 height=16>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<font color='#2C8CB9'><strong>{$list[$i][num]}</strong>";
else
echo "{$list[$i][num]}";
?>
</td>
<? if ($is_checkbox) { ?><td width=40><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td align=left style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
//echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font color='#FB9606'><strong>{$list[$i][subject]}</strong></font>";
else
{
$style = "";
if ($list[$i][icon_new])
$style = " style='font-weight:bold;' ";
echo "<span $style>{$list[$i][subject]}</span>";
}
//echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
//echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
echo $nobr_end;
?>
</td>
<td width=100 align="center"><?=$list[$i][name]?></td>
<td width=50 align="center"><?=$list[$i][datetime2]?></td>
<? if ($is_good) { ?><td align="center" width=40><?=$list[$i][wr_good]?></td><? } ?>
<? if ($is_nogood) { ?><td align="center" width=40><?=$list[$i][wr_nogood]?></td><? } ?>
</tr>
<!-- 구분선이 직선인지 점선인지 판단하여 보여줌 -->
<?if($bo_line == 0){?>
<tr><td colspan="<?=$colspan?>" height="1" background="<?=$board_skin_path?>/img/win_line.gif"></td></tr>
<?}else{?>
<tr><td colspan="<?=$colspan?>" height="1" background="<?=$board_skin_path?>/img/win_line1.gif"></td></tr>
<?}?>
<?} // 디비출력부분 끝?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</form>
</table>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="35" align="center" background="<?=$board_skin_path?>/img/<?=$bo_color?>/bar_buttom.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=50 height=20 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/go_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/go_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/go_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/go_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font>", $write_pages);
?>
<strong><?=$write_pages?></strong>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/$bo_color/btn_search_next.gif' width=50 height=20 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 버튼 링크 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="40">
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
<? } ?>
</td>
</tr>
</table>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<!-- 게시판 목록 시작 -->
<? if ($is_member) { ?>
<?
$sql2 = "select wr_subject from $write_table order by wr_id DESC";
$row2 = sql_fetch($sql2);
$last_word = substr("$row2[wr_subject]",-2,2);
?>
<form name="flistwrite" method=post action="<?=$board_skin_path?>/hangul_check.php" onsubmit="return fwrite_check(this)" style="margin:0px;">
<input type=hidden name=w value="<?=$w?>">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="<?=$wr_id?>">
<input type=hidden name=sfl value="<?=$sfl?>">
<input type=hidden name=stx value="<?=$stx?>">
<input type=hidden name=spt value="<?=$spt?>">
<input type=hidden name=sst value="<?=$sst?>">
<input type=hidden name=sod value="<?=$sod?>">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=before value="<?=$last_word?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11"><img src="<?=$board_skin_path?>/img/box_01.gif" width="11" height="11"></td>
<td background="<?=$board_skin_path?>/img/box_02.gif"><div align="center"><img src="<?=$board_skin_path?>/img/box_02.gif" width="1" height="11"></div></td>
<td width="11"><img src="<?=$board_skin_path?>/img/box_03.gif" width="11" height="11"></td>
</tr>
<tr height=30>
<td background="<?=$board_skin_path?>/img/box_05.gif"><img src="<?=$board_skin_path?>/img/box_05.gif" width="11" height="1"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding-right: 5px; padding-left: 5px;">
'<font color=red><span><b><?=$last_word?></b></span></font>' (으)로 시작하시고 한글만 입력하세요.
</td>
</tr>
<tr><td height="5"></td></tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/win_line.gif"></td></tr>
<tr><td height="5"></td></tr>
<tr>
<td>
<input type=text id=wr_subject name=wr_subject class=ed style='width:80%; IME-MODE: active;' maxlength=200 itemname="내용" required onKeyPress="hangul();" value="<?=$last_word?>">
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/<?=$bo_color?>/btn_write.gif" border=0 accesskey='s' align=absmiddle>
</td>
</tr>
</table>
</td>
<td background="<?=$board_skin_path?>/img/box_07.gif"><img src="<?=$board_skin_path?>/img/box_07.gif" width="11" height="1"></td>
</tr>
<tr>
<td><img src="<?=$board_skin_path?>/img/box_09.gif" width="11" height="11"></td>
<td background="<?=$board_skin_path?>/img/box_10.gif"><div align="center"><img src="<?=$board_skin_path?>/img/box_10.gif" width="1" height="11"></div></td>
<td><img src="<?=$board_skin_path?>/img/box_11.gif" width="11" height="11"></td>
</tr>
</table>
</form><br>
<script language="JavaScript">
function hangul(){
if (event.keyCode != 32)
{
if((event.keyCode < 12592) || (event.keyCode > 12687))
event.returnValue = false
}
}
function hangul_check(){
win_open("<?=$board_skin_path?>/hangul_check.php?wr_subject="+document.getElementById('wr_subject').value, "hiddenframe");
}
function fwrite_check(f){
var after;
after = f.wr_subject.value.substring(0,1);
if(f.before.value != after){
alert("첫글자는 이전 마지막 글자와 같아야 합니다!!");
f.wr_subject.focus();
return false;
}
var pattern = /([^가-힣\x20 ])/i;
if (pattern.test(f.wr_subject.value)){
alert("한글이 아닙니다. (자음, 모음만 있는 한글은 처리하지 않습니다.)");
f.wr_subject.focus();
return false;
}
if (f.wr_subject.value.length < 2){
alert("두글자 이상 입력하세요.");
f.wr_subject.focus();
return false;
}
return true;
}
document.flistwrite.wr_subject.focus();
</script>
<? } ?>
<!-- 제목 -->
<table width="100%" cellspacing="0" cellpadding="0" background="<?=$board_skin_path?>/img/<?=$bo_color?>/<?=$top_bar?>" height='<?=$top_height?>'>
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<tr height=30 align=center>
<td width="50" align="center" valign="middle"><font class='<?=$b_txt?>'><strong>번호</strong></font></td>
<? if ($is_checkbox) { ?><td width=40><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td><?}?>
<td align="left" valign="middle"><font class='<?=$b_txt?>'><strong>제목</strong></font></td>
<td width="100" align="center"><font class='<?=$b_txt?>'><strong>글쓴이</strong></font></td>
<td width=50 align="center"><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></td>
<? if ($is_good) { ?><td width=40 align="center"><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></td><?}?>
<? if ($is_nogood) { ?><td width=40 align="center"><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></td><?}?>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) { ?>
<? include "icon.php"; ?>
<tr height=28 align=center>
<td width=50 align="center">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/notice_icon.gif\" width=30 height=16>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<font color='#2C8CB9'><strong>{$list[$i][num]}</strong>";
else
echo "{$list[$i][num]}";
?>
</td>
<? if ($is_checkbox) { ?><td width=40><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td align=left style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
//echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font color='#FB9606'><strong>{$list[$i][subject]}</strong></font>";
else
{
$style = "";
if ($list[$i][icon_new])
$style = " style='font-weight:bold;' ";
echo "<span $style>{$list[$i][subject]}</span>";
}
//echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
//echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
echo $nobr_end;
?>
</td>
<td width=100 align="center"><?=$list[$i][name]?></td>
<td width=50 align="center"><?=$list[$i][datetime2]?></td>
<? if ($is_good) { ?><td align="center" width=40><?=$list[$i][wr_good]?></td><? } ?>
<? if ($is_nogood) { ?><td align="center" width=40><?=$list[$i][wr_nogood]?></td><? } ?>
</tr>
<!-- 구분선이 직선인지 점선인지 판단하여 보여줌 -->
<?if($bo_line == 0){?>
<tr><td colspan="<?=$colspan?>" height="1" background="<?=$board_skin_path?>/img/win_line.gif"></td></tr>
<?}else{?>
<tr><td colspan="<?=$colspan?>" height="1" background="<?=$board_skin_path?>/img/win_line1.gif"></td></tr>
<?}?>
<?} // 디비출력부분 끝?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</form>
</table>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="35" align="center" background="<?=$board_skin_path?>/img/<?=$bo_color?>/bar_buttom.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=50 height=20 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/go_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/go_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/go_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/go_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font>", $write_pages);
?>
<strong><?=$write_pages?></strong>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/$bo_color/btn_search_next.gif' width=50 height=20 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 버튼 링크 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="40">
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
<? } ?>
</td>
</tr>
</table>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
하루 시간이 24시간으로 되는건가요?
$udatatime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 23));
이런식으로 작성을 하면 만약 어제 오전 10시에 글을 작성했다면 오늘 오전 10시까지는 글 작성이 안되는건가요??ㅡㅜ
테스트해보니까 글 쓰기가 안되지더라구요..ㅜㅜ
전날 시간을 계산하는것 같은뎅..
00시00분00초가 되면 리셋되게 하고싶은데..
어떻게 하면 될까요?
$udatatime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 23));
이런식으로 작성을 하면 만약 어제 오전 10시에 글을 작성했다면 오늘 오전 10시까지는 글 작성이 안되는건가요??ㅡㅜ
테스트해보니까 글 쓰기가 안되지더라구요..ㅜㅜ
전날 시간을 계산하는것 같은뎅..
00시00분00초가 되면 리셋되게 하고싶은데..
어떻게 하면 될까요?
중고차거래에 적용하면 좋을 내용임
스크랩
헐랭이님의 [사용자의 글 작성수 구하기(하루에 한번만 글작성)]을 그누3으로
꼭 필요한 기능인데 검색해 보니 그누3에는 없더군요...
root님의 오늘하루 특정 게시판에 1번 이상은 글쓰기를 못하게 라는 팁은 있지만
이 기능은 한 회원이 몇 번 이상 글쓰기를 못하는 팁이더라구요^^;
아래와 같이 회원전체에게 게시…
꼭 필요한 기능인데 검색해 보니 그누3에는 없더군요...
root님의 오늘하루 특정 게시판에 1번 이상은 글쓰기를 못하게 라는 팁은 있지만
이 기능은 한 회원이 몇 번 이상 글쓰기를 못하는 팁이더라구요^^;
아래와 같이 회원전체에게 게시…
33
좋은팁 잘봤습니다.!!
유용하게 잘 사용하겠습니다. 감사합니다.
감사합니다
TT
![](http://sir.kr/data/member_image/ky/kyjssm.gif?1346127197)
ㄱ쇽숏교
![](http://sir.kr/data/member_image/ky/kyjssm.gif?1346127197)
ㄱ셔ㅕ격
![](http://sir.kr/data/member_image/ky/kyjssm.gif?1346127197)
ㄱ셕셔겨
![](http://sir.kr/data/member_image/ky/kyjssm.gif?1346127197)
격셔겨
![](http://sir.kr/data/member_image/ky/kyjssm.gif?1346127197)
ㄱ셕셕셔
하루글쓰기 제한
![](http://sir.kr/data/member_image/he/hellpa1987.gif?1480860998)
ㄳ합니다