a

관리자일 경우에만 a href가 작동하게..

· 2013-07-28 (일) 17:09:48 · 1680 · 4
[code]
<tr>
<td width="20" align="right"><img src="<?=$connect_skin_path?>/img/icon.gif" width="14" height="14"></td>
<td width="170">  <a href='<?=$g4['bbs_path']?>/current_connect.php'><strong>동접</strong>: <?=$row['total_cnt']?>명</a></td>
</tr>
[/code]
이런 소스코드가 있는데요..

관리자일 경우에만 동접 *명을 누르면 a href태그가 작동하게 하고 싶습니다..

참고로

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

나

[code]
<? 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>
<? } ?>
[/code]

둘다 안됩니다..
|

댓글 4개

안된다는 것이 구체적으로 어떻게 안된다는 말씀인건가요?
링크가 보이지 않는 다는 건지, 링크가 작동하지 않는건지.. 등등
해도 관리자/일반유저/비회원 전부 a href태그가 발생해요
[code]
<?php
if($is_admin == 'super'){
echo "<a href='$g4[bbs_path]/current_connect.php'>";
}
echo "<strong>동접</strong>: $row[total_cnt]명";
if($is_admin == 'super'){
echo "</a>";
}
?>
[/code]
요렇게 해보세요 ㅇㅂㅇ
안되용..
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-07-29 조회 1,690
13-07-29 조회 1,873
13-07-29 조회 2,823
13-07-29 조회 1,733
13-07-29 조회 1,757
13-07-29 조회 1,333
13-07-29 조회 1,826
13-07-29 조회 815
13-07-28 조회 916
13-07-28 조회 1,079
13-07-28 조회 1,101
13-07-28 조회 1,090
13-07-28 조회 1,056
13-07-28 조회 1,681
13-07-28 조회 887
13-07-28 조회 1,834
13-07-28 조회 1,031
13-07-28 조회 847
13-07-28 조회 891
13-07-28 조회 895