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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 507 | |
| 504 | |
| 502 | |
| 499 | |
| 495 | |
| 492 | |
| 485 | |
| 484 | |
| 481 | |
| 480 | |
| 478 | |
| 476 | |
| 467 | |
| 462 | |
| 459 | |
| 458 | |
| 457 | |
| 452 | |
| 444 | |
| 438 | |
| 437 | |
| 425 | |
| 423 | |
| 420 | |
| 417 | |
| 416 | |
| 415 | |
| 410 | |
| 407 | |
| 405 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기