24시간내 글만 불러오기

아래는 마퀴되는 최신글 소스입니다.
불러올때 24시간내에 올려진 것만 불러올려면 가능할련지요.
가능하다면 추가소스좀 부탁드립니다.
늘 신세만지다보니 쑥 스럽습니다.

<?
/********************************************/
// 허접 스킨 사용해 주셔서 감사합니다..^^
// 시간 나시면 저희 사이트에 놀러오세요..^^
// http://www.smile4u.co.kr
/********************************************/

// marquee 방향 및 속도 세팅

$mq_direction = "left"; // 방향 up, down , left, right
$mq_scroll = "3" ; // 속도
$smile4u_news_array ="";

for ($i=0; $i<count($list); $i++) {
// 카테고리 사용여부 확인
if ($bo[bo_use_category]) {
// 카테고리와 카테고리 직접링크
$category_name = get_category_name($cfg[write_table_prefix].$bo_table, $list[$i][ca_id]);
$category_link = "<a href=./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&sselect=ca_id&stext=".$list[$i][ca_id].">[$category_name]</a> ";

}else {
$category_link="";
}
// 코멘트 숫자 사용시 추가 : $list[$i][commentcnt]
// 작성자 이름 사용시 추가 : $list[$i][name]
// 최신글 아이콘 사용시 추가 : $list[$i][icon_new]

$smile4u_news_array .= "* $category_link <a href='./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>".$list[$i][subject].$list[$i][commentcnt]."</a>";

if ($mq_direction =="up" or $mq_direction=="down") {
$smile4u_news_array .="<br>";
}else {
$smile4u_news_array .="&nbsp;&nbsp;&nbsp;";
}

}
?>
<? if (count($list) == 0) { $smile4u_news_array="\"자료가 없습니다\""; } ?>

<?/*****************실제 테이타 뿌려주는 부분 시작 *************************/?>

<table width=100% cellpadding=1 cellspacing=1 align=center height=13 bgcolor=dddddd>
<tr>
<!--
<td valign=center align=left bgcolor=eeeeee width=30>&nbsp;
<b>
<a href='<?="./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table"?>'><?=$bo_subject?></a></b>
</td>
-->
<td height=13 bgcolor=dadada >

<script language='javascript'>
<!--
var Toggle =1;

function mq_stop_<?=$bo_table?>(chk) {
Toggle = 0;
switch(chk) {
case 1: mq_<?=$bo_table?>.stop(); break;
case 2: mq_<?=$bo_table?>.stop(); break;
}
}

function mq_start_<?=$bo_table?>(chk) {
Toggle = 1;
switch(chk) {
case 1: mq_<?=$bo_table?>.start(); break;
case 2: mq_<?=$bo_table?>.start(); break;
}
}
-->
</script>
<MARQUEE height=100% ID=mq_<?=$bo_table?> direction='<?=$mq_direction?>' scrollamount='<?=$mq_scroll?>' onmouseover='mq_stop_<?=$bo_table?>(1)' onmouseout='mq_start_<?=$bo_table?>(1)'>
<SPAN style='LINE-HEIGHT: 180%'>
<?=$smile4u_news_array?>
</SPAN>
</marquee>

</td>
</tr>
</table>

<?/*****************실제 테이타 뿌려주는 부분 끝 *************************/?>
|

댓글 2개

번번이 감사합니다.
위 소스는 최신글 마퀴 소스입니다.
리스트인지 최신글인지 잘 모르겠군요.
혹이나 $list[$i][icon_new] 를 이용하는 것은 어떻한지요?
$list[$i][icon_new] 가 24으로 맞춰졌다면...

if ($list[$i][icon_new]) {
echo "오늘 올라온 글";
} else {
echo "새글이 없습니다.";
}
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누3질답

+
제목 글쓴이 날짜 조회
20년 전 조회 432
aasuka
20년 전 조회 481
20년 전 조회 458
20년 전 조회 511
20년 전 조회 606
20년 전 조회 488
20년 전 조회 408
20년 전 조회 489
20년 전 조회 403
20년 전 조회 434
20년 전 조회 612
20년 전 조회 429
20년 전 조회 831
20년 전 조회 482
20년 전 조회 462
20년 전 조회 301
20년 전 조회 482
20년 전 조회 380
새롭자
20년 전 조회 430
20년 전 조회 459
🐛 버그신고