열

비밀글 기능을 여분필드로 하려고 하는 중에 php 질문입니다...

if (($mb_id && $mb_id == $member[mb_id]) || $is_admin)
;

else if ($wr_2 == 'secret') {
echo "<table border=0 cellpadding=0 cellspacing=0 width=100% height=200>
<tr>
<td height=100% align=center>비밀글입니다.</td>
</tr>
</table>";
}
?>
=========
게시물내용
========-=




위와 같이
자신이 쓴글이나 관리자면 else if 를 넘어가고 wr_2 에 secret 값이 있으면 echo 부분을 보여주는데요...

비밀글입니다는 보여주는데 게시물내용까지 보여주더군요...

"<table border=0 cellpadding=0 cellspacing=0 width=100% height=200>
<tr>
<td height=100% align=center>비밀글입니다.</td>
</tr>
</table>";

위 내용까지만 보여주고 게시물내용부분은 보여주지 안으려면 어떻게 해야하나요?...

댓글 1개

<? if ($write[wr_2] == "secret"){ //비밀글이고
if ($is_admin or $write[mb_id] == $member[mb_id]){ //자신이 쓴글이나 관리자라면 ?>

<table width=100% height=200>
<tr align=center>
<td>
<?=$write[content]?>
</td>
</tr>
</table>

<? } else { //자신이 쓴글이나 관리자가 아니라면 ?>

<table width=100% height=200>
<tr align=center>
<td>비밀글입니다.</td>
</tr>
</table>

<? }} else { //비밀글이 아닐때 ?>

<table width=100% height=200>
<tr align=center>
<td>
<?=$write[content]?>
</td>
</tr>
</table>

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

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
05-09-26 조회 1,504
05-09-26 조회 1,763
05-09-26 조회 1,834
05-09-25 조회 1,746
05-09-25 조회 1,614
05-09-25 조회 1,624
05-09-25 조회 1,780
05-09-25 조회 1,640
05-09-25 조회 1,720
05-09-25 조회 1,642
05-09-25 조회 1,653
05-09-25 조회 1,622
BB-Gril
05-09-25 조회 1,965
05-09-24 조회 1,686
아아꽈
05-09-24 조회 1,827
05-09-24 조회 1,681
05-09-24 조회 1,698
05-09-24 조회 1,743
05-09-24 조회 1,687
샴샴푸걸
05-09-24 조회 1,666