테스트 사이트 - 개발 중인 베타 버전입니다

회원전체게시물에 비밀댓글에 답변 비밀댓글은 노출된데요;;

· 14년 전 · 1435 · 1
잘 지내시는지요?~^^
아래는 사용중인 new.php 입니다.
게시물의 비밀댓글은 안가져오도록 한 것인데..
문제는 비밀댓글에 답글로 단 비밀댓글은 버젓히 보여서 비밀댓글이 안된다고 합니다.
어딜 고쳐야 하는지 통..
고수님들 좀 도와주세요~
==================================================================================
$list = array();
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$tmp_write_table = $g4[write_prefix] . $row[bo_table];

if ($row[wr_id] == $row[wr_parent]) // 원글
{
$comment = "";
$comment_link = "";
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_id]' ");
$list[$i] = $row2;

$name = get_sideview($row2[mb_id], cut_str($row2[wr_name], $config[cf_cut_name]), $row2[wr_email], $row2[wr_homepage]);
// 당일인 경우 시간으로 표시함
$datetime = substr($row2[wr_datetime],0,10);
$datetime2 = $row2[wr_datetime];
if ($datetime == $g4[time_ymd])
$datetime2 = substr($datetime2,11,5);
else
$datetime2 = substr($datetime2,5,5);

}

else // 코멘트
{
$comment = "[코] ";
$comment_link = "#c_{$row[wr_id]}";
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_parent]' ");
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime, wr_content from $tmp_write_table where wr_id = '$row[wr_id]' and wr_option!='secret' ");
$list[$i] = $row2;
$list[$i][mb_id] = $row3[mb_id];
$list[$i][wr_name] = $row3[wr_name];
$list[$i][wr_email] = $row3[wr_email];
$list[$i][wr_homepage] = $row3[wr_homepage];

$list[$i][wr_content] = $row3[wr_content];
if (!strstr($row[wr_option], "secret") || $is_admin || ($row[mb_id]==$member[mb_id] && $member[mb_id])) {
$comment[$num][content1] = cut_str($row[wr_content], $subject_len);
}


$name = get_sideview($row3[mb_id], cut_str($row3[wr_name], $config[cf_cut_name]), $row3[wr_email], $row3[wr_homepage]);
// 당일인 경우 시간으로 표시함
$datetime = substr($row3[wr_datetime],0,10);
$datetime2 = $row3[wr_datetime];
if ($datetime == $g4[time_ymd])
$datetime2 = substr($datetime2,11,5);
else
$datetime2 = substr($datetime2,5,5);
}

$list[$i][gr_id] = $row[gr_id];
$list[$i][bo_table] = $row[bo_table];
$list[$i][name] = $name;
$list[$i][comment] = $comment;
$list[$i][href] = "./board.php?bo_table=$row[bo_table]&wr_id=$row2[wr_id]{$comment_link}";
$list[$i][datetime] = $datetime;
$list[$i][datetime2] = $datetime2;

$list[$i][gr_subject] = $row[gr_subject];
$list[$i][bo_subject] = $row[bo_subject];
$list[$i][wr_subject] = $row2[wr_subject];
}

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 1개

14년 전
그거야 만들기 나름이죠...
비밀글인지 체크하는 if문을 넣으면 되겠죠

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440