최신글 날짜질문..
안녕하세요.. 홈페이지메인에 최신글을 출력했는데
자꾸 오늘날짜로 다 날짜가 바껴서 나오네요 ㅠ 소스입니다....
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 네이버 http://html.nhndesign.com/?mid=ui_pattern_list 참고
// 리메이크: Terrorboy
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/css/style.css" type="text/css" />
<!--ui object -->
<div class="section_ul">
<h2><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><em class="to-bottom"></em><?=$board[bo_subject]?></a></h2>
<ul>
<?
for ($i=0; $i<count($list); $i++) {
// 최근 게시물 시간 정렬 수정
$list[$i]['wr_datetime'] = date("Y.m.d", time($list[$i]['wr_datetime']));
?>
<li>
<span class="bu">›</span>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$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'];
?>
<span class="time"><?=$list[$i]['wr_datetime']?></span>
</li>
<? } ?>
<? if (count($list) == 0) { ?>
<li><div class="none">최근 게시물이 없습니다.</div></li>
<? } ?>
</ul>
<a class="more" href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>">
<span>››</span></a> </div>
<!--//ui object -->
자꾸 오늘날짜로 다 날짜가 바껴서 나오네요 ㅠ 소스입니다....
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 네이버 http://html.nhndesign.com/?mid=ui_pattern_list 참고
// 리메이크: Terrorboy
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/css/style.css" type="text/css" />
<!--ui object -->
<div class="section_ul">
<h2><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><em class="to-bottom"></em><?=$board[bo_subject]?></a></h2>
<ul>
<?
for ($i=0; $i<count($list); $i++) {
// 최근 게시물 시간 정렬 수정
$list[$i]['wr_datetime'] = date("Y.m.d", time($list[$i]['wr_datetime']));
?>
<li>
<span class="bu">›</span>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$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'];
?>
<span class="time"><?=$list[$i]['wr_datetime']?></span>
</li>
<? } ?>
<? if (count($list) == 0) { ?>
<li><div class="none">최근 게시물이 없습니다.</div></li>
<? } ?>
</ul>
<a class="more" href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>">
<span>››</span></a> </div>
<!--//ui object -->
댓글 2개
13년 전
Wr_datetime 의 값을 찍어보세여 time 함수안에 아무런값이 없다면 기본값으로 현재시간이 들어갑니다
13년 전
아무값이나 넣었더니 되네요 감사합니다^^
게시판 목록
그누4 질문답변
그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.
기존 게시물은 열람만 가능합니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 66454 | 11년 전 | 3462 | ||
| 66453 | 11년 전 | 2860 | ||
| 66452 |
jumphu
|
11년 전 | 3168 | |
| 66451 | 11년 전 | 2034 | ||
| 66450 | 11년 전 | 3170 | ||
| 66449 |
겸손1935
|
11년 전 | 3103 | |
| 66448 | 11년 전 | 2891 | ||
| 66447 |
열라뽕똬이
|
11년 전 | 2286 | |
| 66446 | 11년 전 | 3760 | ||
| 66445 | 11년 전 | 2601 | ||
| 66444 | 11년 전 | 3217 | ||
| 66443 | 11년 전 | 2724 | ||
| 66442 |
missGo
|
11년 전 | 3175 | |
| 66441 | 11년 전 | 2725 | ||
| 66440 | 11년 전 | 2753 | ||
| 66439 | 11년 전 | 3047 | ||
| 66438 | 11년 전 | 11576 | ||
| 66437 |
heon2slow
|
11년 전 | 3505 | |
| 66436 | 11년 전 | 2731 | ||
| 66435 | 11년 전 | 2509 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기