관리자 아이디가 아닌 정해준 회원레벨로 하려면 정보
관리자 아이디가 아닌 정해준 회원레벨로 하려면본문
아래는 질문답변 게시판리스트에서 현재 사용중인데요.
코멘트수와 관계없이 관리자가 댓글을 달면 완료 아이콘이 뜨는 스킨입니다.
제가 하고 싶은건, 관리자 아이디로 말고, 회원레벨을 적용하여 정해준 레벨인 회원이
코멘트를 달면 완료 아이콘이 뜨도록 하고 싶습니다.
[mb_level]>10 머 이런식으로 해봤는데 안되네요...ㅎ
아래 요 관련 소스입니다. 고수님들 잘 봐주세요.
+++++++++++++++++++++++
<?
//관리자 답변시 답변 완료로 됨
$parent = $list[$i][wr_parent];
$sql = " select count(*) as cn from $write_table where wr_is_comment = '1' and wr_parent = '$parent' and mb_id = 'jeongbo'";
//echo $sql;
$row = sql_fetch($sql);
$total_count = $row[cn];
if ($total_count == 0) {
echo "<img src='$board_skin_path/img/icon_standby.gif'>";
} else {
echo "<img src='$board_skin_path/img/icon_select.gif'>";
}
?>
++++++++++++++++++++++++++++++
코멘트수와 관계없이 관리자가 댓글을 달면 완료 아이콘이 뜨는 스킨입니다.
제가 하고 싶은건, 관리자 아이디로 말고, 회원레벨을 적용하여 정해준 레벨인 회원이
코멘트를 달면 완료 아이콘이 뜨도록 하고 싶습니다.
[mb_level]>10 머 이런식으로 해봤는데 안되네요...ㅎ
아래 요 관련 소스입니다. 고수님들 잘 봐주세요.
+++++++++++++++++++++++
<?
//관리자 답변시 답변 완료로 됨
$parent = $list[$i][wr_parent];
$sql = " select count(*) as cn from $write_table where wr_is_comment = '1' and wr_parent = '$parent' and mb_id = 'jeongbo'";
//echo $sql;
$row = sql_fetch($sql);
$total_count = $row[cn];
if ($total_count == 0) {
echo "<img src='$board_skin_path/img/icon_standby.gif'>";
} else {
echo "<img src='$board_skin_path/img/icon_select.gif'>";
}
?>
++++++++++++++++++++++++++++++
댓글 전체
$parent = $list[$i][wr_parent];
$mb = get_member($list[$i][mb_id]);
$icon_lv = $mb[mb_level];
$sql = " select count(*) as cn from $write_table where wr_is_comment = '1' and wr_parent = '$parent' and $icon_lv >= '10'";
$mb = get_member($list[$i][mb_id]);
$icon_lv = $mb[mb_level];
$sql = " select count(*) as cn from $write_table where wr_is_comment = '1' and wr_parent = '$parent' and $icon_lv >= '10'";
댓글 감사합니다..그런데..ㅜㅜ 에러가 나네요..
select count(*) as cn from g4_write_question where wr_is_comment = '1' and wr_parent = '90' and >= '10'
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>= '10'' at line 1
error file : /board/bbs/board.php
select count(*) as cn from g4_write_question where wr_is_comment = '1' and wr_parent = '90' and >= '10'
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>= '10'' at line 1
error file : /board/bbs/board.php