다시 한번 질문 합니다....ㅜㅜ 채택완료
둘째삼식
11년 전
조회 5,511
질문답변 게시판 리스트에서, 아래 소스처럼 하여 관리자가 답변을 하면 "답변*건"이라고 출력이 되는데,
이것을 관리자뿐만 아니라, 일반회원 혹은 특정레벨이상의 회원이 답변했을 경우 모두 "답변*건"이라고 출력하고
싶습니다. 고수님들 소스로 알려주시면 감사하겠습니다.ㅜㅜ
아래 소스:
<?
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개
채택된 답변
+20 포인트
11년 전
$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]' ";
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
둘째삼식
11년 전
�
시누이
11년 전
아.. 글 작성자를 말씀하시는거네요.
list.skin.php 파일에서 사용하신다면..
$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and mb_id != '{$list[$i][mb_id]}' ";
list.skin.php 파일에서 사용하신다면..
$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and mb_id != '{$list[$i][mb_id]}' ";
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
11년 전
$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' ";
로 변경해보세요.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
둘째삼식
11년 전
시누이 님,,,,
댓글 감사합니다. 알려주신 대로 변경을 하니 문제없이 답변수가 출력이 됩니다.
그런데, 제가 위에서 설명하지 않아서 죄송한데요.
더 가능 하다면, 본인의 코멘트는 제외를 한 답변수만 출력하고 싶습니다.
댓글 감사합니다. 알려주신 대로 변경을 하니 문제없이 답변수가 출력이 됩니다.
그런데, 제가 위에서 설명하지 않아서 죄송한데요.
더 가능 하다면, 본인의 코멘트는 제외를 한 답변수만 출력하고 싶습니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
그런데 뭔가 제대로 인식을 못하는것 같네요.^^
아래는 사이트 주소인데, 시간 나시면 한번 봐주십시오...ㅜㅜ
http://jeongbo-partner.com/board/bbs/board.php?bo_table=question&sfl=&page=2&page=1