갤러리 게시판 링크문의 채택완료
안녕하세요~
갤러리 게시판인데요~
관리자로 로그인했을때만 이미지를 클릭할수 있게 하고 싶어요. 어찌해야 하나요?
Copy
<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개
8년 전
A 태그 부분에 조건문을 줘서 출력하거나 클릭 시 이동되는 링크를 관리자만 게시글 링크로 보내고 나머지는 # 처리하면 되지 않을까요?
<?php echo ($is_admin?$list[$i]['href']:"#"; ?>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인