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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 136 | |
| 134 | |
| 131 | |
| 127 | |
| 122 | |
| 119 | |
| 118 | |
| 114 | |
| 110 | |
| 106 | |
| 102 | |
| 97 | |
| 96 | |
| 91 | |
| 85 | |
| 77 | |
| 74 | |
| 69 | |
| 63 | |
| 62 | |
| 57 | |
| 51 | |
| 37 | |
| 33 | |
| 32 | |
| 31 | |
| 25 | |
| 24 | |
| 23 | |
| 22 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기