코멘트 댓글 소스 수정관련 문의(view_comment.php)

코멘트 댓글 소스 수정관련 문의(view_comment.php)

QA

코멘트 댓글 소스 수정관련 문의(view_comment.php)

본문

안녕하세요?

비밀글 게시판에서  코멘트를 단 사용자에게 관리자가 답변을 달면 해당 코멘트 사용자가 답변을 볼수있어야 하는데  비밀글로 나와서 소스를 수정하려고 합니다.

 

view_comment.php 페이지에서

 

// 코멘트 출력
//$sql = " select * from {$write_table} where wr_parent = '{$wr_id}' and wr_is_comment = 1 order by wr_comment desc, wr_comment_reply ";
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $list[$i] = $row;
 
 $t_wr_comment = $row['wr_comment'];


이부분  추가

-----​
 $sql_temp5 = " select mb_id from $write_table where wr_parent = '$wr_id' and wr_is_comment = '1' and wr_comment='$t_wr_comment' and wr_comment_reply='' "
 $result_temp = sql_patch($sql_temp5);

-----
 

 
    //$list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['wr_name'], 20, ''), $row['wr_email'], $row['wr_homepage']);

    $tmp_name = get_text(cut_str($row['wr_name'], $config['cf_cut_name'])); // 설정된 자리수 만큼만 이름 출력
    if ($board['bo_use_sideview'])
        $list[$i]['name'] = get_sideview($row['mb_id'], $tmp_name, $row['wr_email'], $row['wr_homepage']);
    else
        $list[$i]['name'] = '<span class="'.($row['mb_id']?'member':'guest').'">'.$tmp_name.'</span>';

 

    // 공백없이 연속 입력한 문자 자르기 (way 보드 참고. way.co.kr)
    //$list[$i]['content'] = eregi_replace("[^ \n<>]{130}", "\\0\n", $row['wr_content']);

    $list[$i]['content'] = $list[$i]['content1']= '비밀글 입니다.';
    if (!strstr($row['wr_option'], 'secret') ||
        $is_admin ||

        ($result_temp['mb_id']==$member['mb_id'] && $member['mb_id']) ||    <=이부분 추가
        ($write['mb_id']==$member['mb_id'] && $member['mb_id']) ||
        ($row['mb_id']==$member['mb_id'] && $member['mb_id']))  {
        $list[$i]['content1'] = $row['wr_content'];
        $list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
        $list[$i]['content'] = search_font($stx, $list[$i]['content']);
    }

 

 

소스를 이렇게 수정해서 답변 원 코멘트를 쓴 사용자는  비밀글이어도 볼수 있게 수정하려고 하는데

쿼리 부분부터 문제인지   아예 코멘트 전체가 나오지 않습니다.

 

답변 부탁드립니다.
 

이 질문에 댓글 쓰기 :

답변 3

좀 이상하네요. 다른사람이 쓴 비밀글인데 코멘트를 볼수있다구여?

비밀글인데 코멘트는 어떻게 달수있는건가여?

손봐야할곳이 한두군데가 아닌거같고

흔히 하는방식은 아니네요.  

설명이 좀 부족했네요

 

그런게 아니라

 

관리자가 어떤 상품에 대해 글을 올리면

사용자들은 관리자만 볼수 있게 주문내용을 코멘트로 씁니다.

관리자가 필요하면 답을을 달구요

 

이 답글을 해당 사용자만 볼수있게 고치려고 합니다.

 

지금은 관리자가 답변을 달아도 비밀글로 나와서 확인할수가 없어서요 

$sql_temp5 = " select mb_id from $write_table where wr_parent = '$wr_id' and wr_is_comment = '1' and wr_comment='$t_wr_comment' and wr_comment_reply='' "   이부분에   ;  를 안썼네요 ㅠㅠ 

 

 

답변을 작성하시기 전에 로그인 해주세요.
전체 118
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT