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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 404 | |
| 399 | |
| 391 | |
| 386 | |
| 384 | |
| 383 | |
| 382 | |
| 378 | |
| 377 | |
| 373 | |
| 372 | |
| 362 | |
| 361 | |
| 353 | |
| 345 | |
| 334 | |
| 329 | |
| 307 | |
| 304 | |
| 299 | |
| 295 | |
| 292 | |
| 288 | |
| 272 | |
| 270 | |
| 267 | |
| 263 | |
| 261 | |
| 254 | |
| 252 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기