다시 한번 질문 합니다....ㅜㅜ
본문
질문답변 게시판 리스트에서, 아래 소스처럼 하여 관리자가 답변을 하면 "답변*건"이라고 출력이 되는데,
이것을 관리자뿐만 아니라, 일반회원 혹은 특정레벨이상의 회원이 답변했을 경우 모두 "답변*건"이라고 출력하고
싶습니다. 고수님들 소스로 알려주시면 감사하겠습니다.ㅜㅜ
아래 소스:
<?
if (!$list[$i][is_notice]) { // 공지사항
//관리자 답변 코멘트 유무 체크
if (!$list[$i][is_notice]) { // 공지사항
//관리자 답변 코멘트 유무 체크
$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and (mb_id = 'jeongbo') ";
$rowc = sql_fetch($sqlc);
$total_coment = $rowc[cnt];
$rowc = sql_fetch($sqlc);
$total_coment = $rowc[cnt];
if ($total_coment) {
$e_text = array("(",")"); //괄호 표시
$list[$i][comment_cnt] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제
$list[$i][is_ncoment] = "<font class='s11 color_pink2'>답변 <b>".number_format($total_coment)."</b>건</font>"; //관리자 답변이 있을경우
} else {
$list[$i][is_ncoment] = "<font class='s11 color_gray1'>대 기 중</font>";
}
}
$list[$i][comment_cnt]
?>
<td class="good"><?=$list[$i][is_ncoment]?></td>
$e_text = array("(",")"); //괄호 표시
$list[$i][comment_cnt] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제
$list[$i][is_ncoment] = "<font class='s11 color_pink2'>답변 <b>".number_format($total_coment)."</b>건</font>"; //관리자 답변이 있을경우
} else {
$list[$i][is_ncoment] = "<font class='s11 color_gray1'>대 기 중</font>";
}
}
$list[$i][comment_cnt]
?>
<td class="good"><?=$list[$i][is_ncoment]?></td>
답변 5
$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and mb_id != '$member[mb_id]' ";
$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and (mb_id = 'jeongbo') ";
를
$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' ";
로 변경해보세요.
시누이 님,
너무나 감사 합니다. 이제는 문제 없는듯 합니다.
감사합니다. 복 받으실 겁니다....^^
그나저나 저한테 달린 댓글에는 댓글을 달수 없네요. 채택도 안되고,,,ㅎㅎㅎ
많은 도움이 되었습니다. 감사합니다.
답변을 작성하시기 전에 로그인 해주세요.