관리자만 a href 태그가 작동하게 하고 싶습니다. > 그누4 질문답변

그누4 질문답변

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

관리자만 a href 태그가 작동하게 하고 싶습니다. 정보

관리자만 a href 태그가 작동하게 하고 싶습니다.

본문


   <tr> 
            <td width="20" align="right"><img src="<?=$connect_skin_path?>/img/icon.gif" width="14" height="14"></td>
            <td width="170">&nbsp;&nbsp;<a href='<?=$g4['bbs_path']?>/current_connect.php'><strong>동접</strong>: <?=$row['total_cnt']?>명</a></td>
        </tr>


해당 소스코드에서 a href = current_connect.php 를 관리자일 경우만 되게 하고싶습니다. 관리자가 아니라면 그냥 동접만 표시하게요..
  • 복사

댓글 전체

모조키님 답변이 맞습니다. 바로 붙여넣으실려면

<tr>
<td width="20" align="right"><img src="<?=$connect_skin_path?>/img/icon.gif" width="14" height="14"></td>
<td width="170">&nbsp;&nbsp;
<? if($is_admin == 'super'){ ?>
<a href='<?=$g4['bbs_path']?>/current_connect.php'>
<? } else {?>
<strong>동접</strong>: <?=$row['total_cnt']?>명</a></td>
</tr>
<? } ?>

이렇게 되나...^^
위에서 링크가 빠졌네요.

<? if($is_admin == 'super'){ ?>
<a href='<?=$g4['bbs_path']?>/current_connect.php'><strong>동접</strong>: <?=$row['total_cnt']?>명</a>
<? } else {?>
<strong>동접</strong>: <?=$row['total_cnt']?>명</a></td>
</tr>
<? } ?>
© SIRSOFT
현재 페이지 제일 처음으로