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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 852 | |
| 842 | |
| 838 | |
| 835 | |
| 829 | |
| 826 | |
| 820 | |
| 816 | |
| 811 | |
| 806 | |
| 784 | |
| 781 | |
| 778 | |
| 773 | |
| 771 | |
| 768 | |
| 766 | |
| 754 | |
| 749 | |
| 740 | |
| 737 | |
| 723 | |
| 714 | |
| 704 | |
| 698 | |
| 697 | |
| 696 | |
| 689 | |
| 688 | |
| 687 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기