리스트에서 이미지 클릭시 원본 새창으로 뜨게 하는법 어떻게 하나요? ㅠ

리스트에서 이미지 클릭시 원본 새창으로 뜨게 하는법 어떻게 하나요? ㅠ

QA

리스트에서 이미지 클릭시 원본 새창으로 뜨게 하는법 어떻게 하나요? ㅠ

본문

view 스킨에서는 이미지를 클릭시 원본 사진이 확대되어 새창으로 열리는데요..

 

list 페이지에서 이미지를 클릭시 나오게 하고 싶어서요 ㅠㅠ 도와주십시오.

 

현재 list페이지의 이미지를 불러오는 소스가 이거인것 같습니다.

어떻게 바꿔야 할까요..?

 


<li>
                <div class="gall_chk">
                    <?php if ($is_checkbox) { ?>
                        <label for="chk_wr_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject'] ?></label>
                        <input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
                    <?php } ?>
                    <span class="sound_only">
                        <?php
                        if ($wr_id == $list[$i]['wr_id'])
                            echo "<span class=\"bo_current\">열람중</span>";
                        else
                            echo $list[$i]['num'];
                         ?>
                    </span>
                </div>
                <!-- <a href="<?php echo $list[$i]['href'] ?>"> -->
                <?php
                if ($list[$i]['is_notice']) { // 공지사항  ?>
                    <span class="is_notice">공지</span>
                <?php } else {
                    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
                    if($thumb['src']) {
                        $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
                    } else {
                        $img_content = '<span class="no_image">no image</span>';
                    }
                    echo $img_content;
                }
                ?>
                <!-- </a> -->
            </li>

이 질문에 댓글 쓰기 :

답변 1

아래 소스를 참고해보세요.

 


<?php
        $sql = " select * from {$g5['board_file_table']} where bo_table = '". $bo_table. "' and wr_id = '". $list[$i][wr_id] ."' order by bf_no ";
        $result = sql_query($sql);
        while ($row = sql_fetch_array($result))
        {
            $down_link = "view_image.php?bo_table={$bo_table}&fn={$row['bf_file']}";
        }
        ?>
        <a href="<?php echo $down_link;  ?>" target="_blank">
        <?php
        $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 {
            $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
        }
        echo $img_content;
        ?>
        </a>
답변을 작성하시기 전에 로그인 해주세요.
전체 123,530 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT