한달이 지난 게시물은 못보게 하려고 하는데 안되네요..

· 2007-05-14 (월) 21:09:53 · 3888 · 2
$list[$i][datetime2] = date("Y-m-d", time() - 86400 * 30); // gblist.php 에 추가한부분

// gblist.skin.php 부분
if($list[$i][datetime] >= $list[$i][datetime2]);
echo "o";
else
echo "x";

조건이 맞으면 o 또는 x 가 출력이 되야 하는데 출력이 안되네요.. 날짜는 부등호가 안먹는지요??
|

댓글 2개

2007-05-15 (화) 07:17:15
// gblist.skin.php 부분
if($list[$i][datetime] >= $list[$i][datetime2]) <======= ';' 요거 있으면 안됩니다...
echo "o";
else
echo "x";
gblist.php 아래줄 추가
$list[$i][datetime2] = date("Y-m-d", time());


gblist.skin.php 기간설정추가
<?
// 기간설정날짜 계산
$wrday = strtotime($list[$i][datetime]);
$before = strtotime($list[$i][datetime2]);
$gap = $before - $wrday;
$diffday = (int)($gap / 86400);
$diffdate = 500; //일수 500일
?>
// 출력되고자 하는 부분
<?if($diffday >= $diffdate){?>
o
<?}else{?>
x
<?}?>
요렇게 하니까 되네요.. 500일이 지난 게시물은 읽기가 불가능합니다.
http://jinmoda.com/?doc=bbs/gnuboard.php&bo_table=board&page=5
댓글을 작성하시려면 로그인이 필요합니다.

그누3질답

9,564건
+
제목 글쓴이 날짜 조회
07-05-15 조회 3,809
07-05-14 조회 3,889
07-04-27 조회 4,204
07-04-24 조회 3,664
07-04-17 조회 3,757
07-04-09 조회 3,708
07-04-09 조회 4,010
07-04-05 조회 3,686
07-03-26 조회 4,146
07-03-24 조회 4,016
07-03-20 조회 4,090
07-03-19 조회 3,680
07-03-09 조회 3,703
07-03-04 조회 4,243
07-03-03 조회 3,716
07-03-02 조회 3,882
07-02-27 조회 3,756
07-02-23 조회 4,558
07-02-07 조회 3,875
07-02-05 조회 3,772