갤러리 게시판 링크문의
본문
안녕하세요~
갤러리 게시판인데요~
관리자로 로그인했을때만 이미지를 클릭할수 있게 하고 싶어요. 어찌해야 하나요?
<a href="<?php echo $list[$i]['href'] ?>">
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
} else {
$noimg = $board_skin_path.'/img/no_img.gif';
$img_content = '<span style="text-align:center">'.get_noimage_thumbnail($bo_table, $noimg, $board['bo_gallery_width'], $board['bo_gallery_height'], $class='no_img').'</span>';
}
echo $img_content;
}
?>
</a>
답변 1
A 태그 부분에 조건문을 줘서 출력하거나 클릭 시 이동되는 링크를 관리자만 게시글 링크로 보내고 나머지는 # 처리하면 되지 않을까요?
<?php echo ($is_admin?$list[$i]['href']:"#"; ?>
답변을 작성하시기 전에 로그인 해주세요.