최신글에서 관리자가 아니면 링크 안걸게 하는방법좀..

문의게시판을 만드는중인데요

최신글에서 관리자가 아니면 링크 안걸게 하는방법좀 가르쳐 주시면 감사합니다^^

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=4 align=center>
<table width=100%>
<tr>
<td height=17> -
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
echo "</a>";

if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";

// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

echo " " . $list[$i]['icon_new'];
?></td></tr>
</table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>
|

댓글 3개

링크 태그를 관리자일 경우에만 출력시키면 되는걸요
if($is_admin) echo "<a href='{$list[$i]['href']}'>";
그 아래의 echo "</a>"; 도
if($is_admin) echo "</a>";
ㅁㄴㅇㄻㄴㅇㄹ
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
16년 전 조회 1,624
16년 전 조회 1,009
16년 전 조회 981
16년 전 조회 1,576
16년 전 조회 981
16년 전 조회 949
16년 전 조회 971
16년 전 조회 891
16년 전 조회 877
16년 전 조회 981
16년 전 조회 849
16년 전 조회 972
16년 전 조회 980
16년 전 조회 1,426
16년 전 조회 1,614
16년 전 조회 1,555
16년 전 조회 861
16년 전 조회 1,012
16년 전 조회 3,263
16년 전 조회 990