새로운 글이 올라오면 뉴 아이콘이 나타나는데 코멘트는 빼고는 어떻게 수정을 해야 하나요 ?
Copy
<? // 소메뉴 new 표시$smalls = mw_get_small_menus($mw_mmenus[$i][mm_id]); $smalls_count = count($smalls); for ($j=0; $j<$smalls_count; $j++) { $new_datetime = date("Y-m-d H:i:s", $g4[server_time] - (60*60)); // 한시간 $new_datetime = date("Y-m-d H:i:s", $g4[server_time] - (60*60*24)); // 24시간 if ($smalls[$j][bo_table]) { $sql = "select count(wr_id) as cnt from $g4[write_prefix]{$smalls[$j][bo_table]} where wr_is_comment > -1 and ca_name = '{$smalls[$j][ca_name]}' and wr_datetime > '$new_datetime'"; $row = sql_fetch($sql); } if ($row[cnt]) { $icon_new = "<img src='$g4[path]/bbs/img/comsub//com_new.gif'>"; // new 아이콘 } else { $icon_new = ""; }// new 끝 ?>
|
답변 2개 / 댓글 2개
채택된 답변
+20 포인트
11년 전
$sql = "select count(wr_id) as cnt from $g4[write_prefix]{$smalls[$j][bo_table]} where wr_is_comment <> '1' and ca_name = '{$smalls[$j][ca_name]}' and wr_datetime > '$new_datetime'";
답변에 대한 댓글 1개
11년 전
11년 전
$sql = "select count(wr_id) as cnt from $g4[write_prefix]{$smalls[$j][bo_table]} where wr_is_comment > -1 and ca_name = '{$smalls[$j][ca_name]}' and wr_datetime > '$new_datetime'";
여기에 and wr_is_comment = 0
을 추가하시면 될것 같습니다.
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
Parse error: syntax error, unexpected T_VARIABLE in /home/hosting_users/maxtestpage/www/skin/mw.builder/mw.basic.3/com_menu.php on line 66