최신글스킨등에서 오늘 날짜로 된 게시물만 뽑아볼 수 있습니까? 정보
최신글스킨등에서 오늘 날짜로 된 게시물만 뽑아볼 수 있습니까?본문
최신글 스킨에 특정게시판글을 뽑아온다고 할 때, 오늘 날짜로 된 게시물이 있다면 출력하고 그렇지 않다면 '오늘의 게시글은 없습니다' 라고 하고싶은데 가능할까요.
소스가 있으면 알려주시면 고맙겠습니다.
댓글 전체
basic스킨에 적용했습니다.
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$today = date("Y-m-d"); //★여기가
if ($list[$i]['datetime'] == $today) { //★추가된 부분
?>
/////// 최근글소스/////////
<? } else { //★여기도 ?>
오늘의 게시물이 없습니다.
<? } //★추가된 부분 ?>
<? } ?>
/////////////////////////////////////////////////////
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<colgroup width=14>
<colgroup>
<colgroup width=37>
<colgroup width=14>
<tr>
<td><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$today = date("Y-m-d");
if ($list[$i]['datetime'] == $today) {
?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
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'];
?></td></tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } else { ?>
<tr><td colspan=4 align=center height=50><font color=#6A6A6A>오늘의 게시물이 없습니다.</td></tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</td></tr><? } ?>
</table>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$today = date("Y-m-d"); //★여기가
if ($list[$i]['datetime'] == $today) { //★추가된 부분
?>
/////// 최근글소스/////////
<? } else { //★여기도 ?>
오늘의 게시물이 없습니다.
<? } //★추가된 부분 ?>
<? } ?>
/////////////////////////////////////////////////////
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<colgroup width=14>
<colgroup>
<colgroup width=37>
<colgroup width=14>
<tr>
<td><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$today = date("Y-m-d");
if ($list[$i]['datetime'] == $today) {
?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
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'];
?></td></tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } else { ?>
<tr><td colspan=4 align=center height=50><font color=#6A6A6A>오늘의 게시물이 없습니다.</td></tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</td></tr><? } ?>
</table>
감사합니다.
감사합니다~^^