최신글에서 날짜가 다 똑같이 나옵니다. 정보
최신글에서 날짜가 다 똑같이 나옵니다.관련링크
http://www.hbv.co.kr
112회 연결
본문
여태 몰랐는데
좀전에 보니까 최신글에 날짜가 전부 같은 날짜로 출력이 되네요.ㅜㅜ
글내용 (view.skin.php)에는 정상적으로 출력이 되는데 말입니다.
스킨에 상관없이 모두 그런 현상이 나타납니다.
첫글을 쓴 날짜로 통일이 되는것 같습니다.
스킨문제는 아닌것 같은데요..
어떻게 해야 하는지요?
질답에도 이런 증상은 없는것 같은데요.
스킨도 문제는 없어보입니다.
도움을 부탁드립니다.
-----스킨소스-----------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
<!--
.line {
line-height: 93%;
}
-->
</style>
<? for ($i=0; $i<count($list); $i++)
{
$ryear_all = substr($list[$i][wr_datetime],0,4);
$ryear = substr($list[$i][wr_datetime],2,2);
$rmonth = substr($list[$i][wr_datetime],5,2);
$rday = substr($list[$i][wr_datetime],8,2);
$rhour = substr($list[$i][wr_datetime],11,2);
$rmini = substr($list[$i][wr_datetime],14,5);
$rsec = substr($list[$i][wr_datetime],17,2);
$rdate = mktime($rhour,$rmini,$rsec,$rmonth,$rday,$ryear);
$rdate_all = mktime($rhour,$rmini,$rsec,$rmonth,$rday,$ryear_all);
}
?>
<table width=308 border="0" cellpadding=0 cellspacing=0 >
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td >
<table width=302 border=0 cellpadding=3 cellspacing=0 >
<tr>
<td height=26>
<font class=textred >[<?= cut_str ($list[$i]['bo_subject'],16,"") ?>]</font>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}' class=black>";
if ($list[$i]['is_notice'])
echo "";//공지방지를 위해 지웠음.
else
echo " ";
echo "{$list[$i]['subject']}";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#F2733B;'>{$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_link'];
echo " " . $list[$i]['icon_hot'];
echo " " . $list[$i]['icon_secret'];
?></td>
</td>
<td width="22" align="right"><font style='font-family:돋움; font-size:8pt; color:#4F4F4F;'> <?=$rmonth?> .<?=$rday?></font></td>
</tr>
</table>
<div align="right"></div>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=3 height=50 align=center><font color=#565656>게시물이 없습니다.</a></td>
</tr><? } ?>
</table>
좀전에 보니까 최신글에 날짜가 전부 같은 날짜로 출력이 되네요.ㅜㅜ
글내용 (view.skin.php)에는 정상적으로 출력이 되는데 말입니다.
스킨에 상관없이 모두 그런 현상이 나타납니다.
첫글을 쓴 날짜로 통일이 되는것 같습니다.
스킨문제는 아닌것 같은데요..
어떻게 해야 하는지요?
질답에도 이런 증상은 없는것 같은데요.
스킨도 문제는 없어보입니다.
도움을 부탁드립니다.
-----스킨소스-----------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
<!--
.line {
line-height: 93%;
}
-->
</style>
<? for ($i=0; $i<count($list); $i++)
{
$ryear_all = substr($list[$i][wr_datetime],0,4);
$ryear = substr($list[$i][wr_datetime],2,2);
$rmonth = substr($list[$i][wr_datetime],5,2);
$rday = substr($list[$i][wr_datetime],8,2);
$rhour = substr($list[$i][wr_datetime],11,2);
$rmini = substr($list[$i][wr_datetime],14,5);
$rsec = substr($list[$i][wr_datetime],17,2);
$rdate = mktime($rhour,$rmini,$rsec,$rmonth,$rday,$ryear);
$rdate_all = mktime($rhour,$rmini,$rsec,$rmonth,$rday,$ryear_all);
}
?>
<table width=308 border="0" cellpadding=0 cellspacing=0 >
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td >
<table width=302 border=0 cellpadding=3 cellspacing=0 >
<tr>
<td height=26>
<font class=textred >[<?= cut_str ($list[$i]['bo_subject'],16,"") ?>]</font>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}' class=black>";
if ($list[$i]['is_notice'])
echo "";//공지방지를 위해 지웠음.
else
echo " ";
echo "{$list[$i]['subject']}";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#F2733B;'>{$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_link'];
echo " " . $list[$i]['icon_hot'];
echo " " . $list[$i]['icon_secret'];
?></td>
</td>
<td width="22" align="right"><font style='font-family:돋움; font-size:8pt; color:#4F4F4F;'> <?=$rmonth?> .<?=$rday?></font></td>
</tr>
</table>
<div align="right"></div>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=3 height=50 align=center><font color=#565656>게시물이 없습니다.</a></td>
</tr><? } ?>
</table>
댓글 전체
위쪽에 for 문을 지우시고, <?=$rmonth?> .<?=$rday?> 부분을 아래와 같이 수정해보세요.
<?=date("m.d", strtotime($list['wr_datetime']))?>
<?=date("m.d", strtotime($list['wr_datetime']))?>
유아원님
그렇게 하니까 전부 오늘날짜로 바뀌어 버립니다.ㅜㅜ
며칠전에 쓴글도 3.28일로 나오는데요..
그렇게 하니까 전부 오늘날짜로 바뀌어 버립니다.ㅜㅜ
며칠전에 쓴글도 3.28일로 나오는데요..
감사합니다.
유아원님
음..for문을 아래에 있는 for문안으로 넣어봤는데 되네요.
친절한 답변 너무 고맙습니다.
좋은 주말 되세요.
유아원님
음..for문을 아래에 있는 for문안으로 넣어봤는데 되네요.
친절한 답변 너무 고맙습니다.
좋은 주말 되세요.