if ($wr_id == $list[$i]['wr_id']) { // 현재글
$wr_label = '<div class="label-cap bg-blue">Now</div>';
$wr_icon = '<span class="tack-icon bg-blue">현재</span>';
} else if($is_lock) {
$wr_label = '<div class="label-cap bg-red">Lock</div>';
} else if ($list[$i]['icon_hot']) {
$wr_label = '<div class="label-cap bg-orange">Hot</div>';
$wr_icon = '<span class="tack-icon bg-orange">인기</span>';
} else if ($list[$i]['icon_new']) {
$wr_label = '<div class="label-cap bg-green">New</div>';
$wr_icon = '<span class="tack-icon bg-green">새글</span>';
}
여기서 오늘하루에 아무대나 등록을 해도 new 아이콘이 밤12시 되면 사라지게 하고싶은대 어떻게 해야될까요?
관리자 설정에 보면 24시간인대 그건 등록후 24시간이라 ㅠㅠ
답변 2개 / 댓글 13개
/lib/common.lib.php 에서 아래 내용 바꾸시면 어떠신가요?
//date("Y-m-d H:i:s", G5_SERVER_TIME - ($board['bo_new'] * 3600)) 이부분
$list['icon_new'] = '';
if ($board['bo_new'] && $list['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - ($board['bo_new'] * 3600)))
$list['icon_new'] = '<img src="'.$skin_url.'/img/icon_new.gif" alt="새글">';
//date(G5_TIME_YMD." 00:00:00")) 이렇게
$list['icon_new'] = '';
if ($board['bo_new'] && $list['wr_datetime'] >= date(G5_TIME_YMD." 00:00:00"))
$list['icon_new'] = '<img src="'.$skin_url.'/img/icon_new.gif" alt="새글">';
답변에 대한 댓글 13개
게시판리스트에 간장이라는 링크버튼이 생기고 그걸 클릭하면
검색창에 간장으로 검색된 페이지가 나오게 하는걸 뭐라고 할까요 ㅠㅠ
bbs/board.php?bo_table=food&sca=&sfl=wr_2&sop=and&stx=간장
링크정보는 이런식인대 이걸 뭐라고 하나요 ㅠㅠ
sfl=wr_2 <이게 필드고, stx=간장 <이게 값이고 기능은 하신것같은데요.
GET방식? 파라미터??
GET
말고는 무슨 말씀이신지 모르겠어요.
SQL을 물어보시는 거라면, Like문을 쓸것 같고요.
저걸 게시판 태그입력 부분에 말고
여분필드에 입력해서 저렇게 입력한 갯수나오게 할려면
많이 힘든가여?
원래 게시판에 태그 기능을 사용중이라 별도로 여분필드에 태그기능을 추가로 달고 싶어서..
개수는 sql문에 count 쓰시면 돼요.
<? php
$sql = " select distinct wr_2 from {$write_table} order by wr_2 asc";
$result = sql_query($sql);
while ($row=sql_fetch_array($result)) {
$sql2 = " select count(*) as cnt from {$write_table} where wr_2 = '$row[wr_2]";
$row2 = sql_fetch($sql2);
?>
<br>
<a href="<?php echo G5_BBS_URL;?>/board.php?bo_table=<?php echo $bo_table;?>&sfl=wr_2&stx=<?php echo $row['wr_2'];?>"><?php echo $row['wr_2'];?></a>
<?php
if($row2['cnt']){
echo $row2['cnt']."건";
}
?>
<?php } ?>
답변을 작성하려면 로그인이 필요합니다.