skin/shop/basic/boxcommunity.skin.php
$aab =new_count($row['bo_table']);
if($aab) $aab = "<img src=\"".G5_SHOP_URL."/img/new.gif\" border=0>";
echo '<li><a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['bo_table'].'">'.$row['bo_subject'].' '.$aab.'</a></li>'.PHP_EOL;
}
lib/common.lib.php
//24시간 이내의 글 수 알아내기 상단에 넣으세요.
function new_count($table_id){
// 오늘을 불러옵니다.
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));
// 여기는 오늘과 글쓴 날짜를 비교합니다.
$tmp_write_table .= "g5_write_$table_id";
$sqlcomm = "SELECT count(*) AS cnt FROM $tmp_write_table WHERE wr_is_comment = '0' and wr_datetime >='$intime'";
$row = sql_fetch($sqlcomm);
$total_count = $row[cnt];
if ($total_count > 0) {
$str_cnt .= $total_count;
return $str_cnt;
}
else {
$str_cnt .= "";
return $str_cnt;
}
}
$aab =new_count($row['bo_table']);
if($aab) $aab = "<img src=\"".G5_SHOP_URL."/img/new.gif\" border=0>";
echo '<li><a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['bo_table'].'">'.$row['bo_subject'].' '.$aab.'</a></li>'.PHP_EOL;
}
lib/common.lib.php
//24시간 이내의 글 수 알아내기 상단에 넣으세요.
function new_count($table_id){
// 오늘을 불러옵니다.
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));
// 여기는 오늘과 글쓴 날짜를 비교합니다.
$tmp_write_table .= "g5_write_$table_id";
$sqlcomm = "SELECT count(*) AS cnt FROM $tmp_write_table WHERE wr_is_comment = '0' and wr_datetime >='$intime'";
$row = sql_fetch($sqlcomm);
$total_count = $row[cnt];
if ($total_count > 0) {
$str_cnt .= $total_count;
return $str_cnt;
}
else {
$str_cnt .= "";
return $str_cnt;
}
}
댓글 4개
게시글 목록
| 번호 | 제목 |
|---|---|
| 670 | |
| 662 | |
| 660 | |
| 653 | |
| 652 | |
| 637 | |
| 623 | |
| 622 | |
| 620 | |
| 619 | |
| 618 | |
| 614 | |
| 599 | |
| 598 | |
| 593 | |
| 586 | |
| 583 | |
| 578 | |
| 575 | |
| 572 | |
| 570 | |
| 568 | |
| 566 | |
| 558 | |
| 552 | |
| 551 | |
| 545 | |
| 543 | |
| 531 | |
| 518 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기