테스트 사이트 - 개발 중인 베타 버전입니다

갤러리 최신글 불러오기 latest 질문!!

웹토키 11년 전 조회 4,140

index페이지에 갤러리 게시판에서 최신글을 불러왔습니다.

불러온 해당 이미지를 클릭하면 갤러리게시판이 있는 페이지 내의 해당 글로 이동하게끔 하고 싶은데..

잘안되네요..ㅠ_ㅠ

갤러리게시판 목록으로만 이동됩니다.

아래쪽에

  • " target="_blank" rel="noopener noreferrer">http://hansolcst.co.kr/sub3_1.html'>

    이 부분의 경로설정이 문제 인것 같은데..

    어떻게 하면 되는지 좀 알려주세요.

     

    부탁드립니다!!!^^

    </p>
    <p>
    </p>
    <p>
    </p>
    <p><?
    if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 </p>
    <p>$img_width = 130;
    $img_height = 110;
    $img_quality = 100;</p>
    <p>if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");</p>
    <p>$data_path = $g4[path]."/data/file/$bo_table";
    $thumb_path = $data_path.'/thumb';
    $ym = date("ym", $g4[server_time]);</p>
    <p>@mkdir($thumb_path, 0707);
    @chmod($thumb_path, 0707);</p>
    <p>//코멘트와 리플글은 제외
    $sql = " select * from $tmp_write_table
    where wr_comment = '' and wr_reply = ''
    order by wr_id DESC LIMIT 0, 1 ";
    $result = sql_query($sql);
    $last_con = sql_fetch_array($result); </p>
    <p>
    </p>
    <p>?> 
    <style type="text/css">
    #t { width: 620px;}
    .img_list { width: 620px; overflow:hidden; padding: 20px 0px 0 0px; margin: 0 auto;  }
    .img_list li { display:inline; list-style:none; float:left; padding: 0 20px 0 0;  }
    .img_list li a {color:#333; text-decoration:none; }
    .img_list li a:hover { text-decoration:none; color:#FF4500; }
    .img_list li img {display:block; border:none; border: 1px solid #cccccc; }
    .img_list2 { width: 620px; overflow:hidden; padding: 8px 0px 0 2px; margin: 0 auto; }
    .img_list2 li { display:inline; font:11px 돋움, Dotum; color: #333333;  text-align:left; list-style:none; float:left; width:152px; }
    .img_list2 li a { color:#333333; text-decoration:none; }
    .img_list2 li a:hover { text-decoration:none; color:#111111;}
    </style></p>
    <p>
    </p>
    <p><div id="t">
    <ul class="img_list">
    <? for ($i=0; $i<count($list); $i++) { 
    //썸네일 생성
    $thumfile = "";
        $thumb = $thumb_path.'/'.$list[$i][wr_id];
        // 썸네일 이미지가 존재하지 않는다면
        if (!file_exists($thumb)) {
            $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
            // 업로드된 파일이 이미지라면
            if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
                $size = getimagesize($file);
                if ($size[2] == 1)
                    $src = imagecreatefromgif($file);
                else if ($size[2] == 2)
                    $src = imagecreatefromjpeg($file);
                else if ($size[2] == 3) 
                    $src = imagecreatefrompng($file); 
                else
                    break;</p>
    <p>            $rate = $img_width / $size[0];
                $height = (int)($size[1] * $rate);</p>
    <p>            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
                if ($height < $img_height)
                    // 계산된 이미지 높이로 복사본 이미지 생성
                    $dst = imagecreatetruecolor($img_width, $height);
                else
                    // 설정된 이미지 높이로 복사본 이미지 생성
                    $dst = imagecreatetruecolor($img_width, $img_height);
                imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
                imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
                chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
            } else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
       $edit_img = $list[$i]['wr_content'];
       if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
        $file = './' . $tmp[0]; // 파일명
        $size = getimagesize($file);
        if ($size[2] == 1)
         $src = imagecreatefromgif($file);
        else if ($size[2] == 2)
         $src = imagecreatefromjpeg($file);
        else if ($size[2] == 3) 
         $src = imagecreatefrompng($file); 
        else
         break;</p>
    <p>    $rate = $img_width / $size[0];
        $height = (int)($size[1] * $rate);</p>
    <p>    // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
        if ($height < $img_height)
         // 계산된 이미지 높이로 복사본 이미지 생성
         $dst = imagecreatetruecolor($img_width, $height);
        else
         // 설정된 이미지 높이로 복사본 이미지 생성
         $dst = imagecreatetruecolor($img_width, $img_height);
        imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
        imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
        chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
       }
         }
     }</p>
    <p>    if (file_exists($thumb))
            $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0'></a>";
      else
      //이미지가 없으면
      $thumfile="<img src='$latest_skin_path/img/no_images.gif' width='{$img_width}' height='{$img_height}'></a>";
      //이미지가 아니네
            if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
           { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }
    ?></p>
    <p><li><a href='<a href="http://hansolcst.co.kr/sub3_1.html'><?=$thumfile?></a></li>" target="_blank" rel="noopener noreferrer">http://hansolcst.co.kr/sub3_1.html'><?=$thumfile?></a></li></a></p>
    <p><? 
    } 
    ?>
    </ul>
    <ul class="img_list2">
    <? for ($i=0; $i<count($list); $i++) { ?>
    <li><a href='<a href="http://hansolcst.co.kr/sub3_1.html'><?=$list[$i]['subject']?></a></li>" target="_blank" rel="noopener noreferrer">http://hansolcst.co.kr/sub3_1.html'><?=$list[$i]['subject']?></a></li></a>
    <? 
    } 
    ?>
    </ul></p>
    <p></div></p>
    <p>
    </p>
    <p>
    </p>
    <p>

    댓글을 작성하려면 로그인이 필요합니다.

    답변 2개

    7년 전

    많은 도움이 되었습니다. 감사합니다.

    로그인 후 평가할 수 있습니다

    댓글을 작성하려면 로그인이 필요합니다.

    f
    11년 전
    </span></font></div><code class="plain" style="line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: #f8f8f8; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important"><li><a href="</code><code class="string" style="line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: blue !important; background-image: none !important; background-attachment: initial !important; background-color: #f8f8f8; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important"><a href="<a href="http://hansolcst.co.kr/sub3_1.html" target="_blank" rel="noopener noreferrer">http://hansolcst.co.kr/sub3_1.html</a>" style="color: blue !important"><?=$list[$i][href]?></a>"</code><code class="plain" style="line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: #f8f8f8; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important">><?=</code><code class="variable" style="line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #aa7700 !important; background-image: none !important; background-attachment: initial !important; background-color: #f8f8f8; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important">$thumfile</code><code class="plain" style="line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: #f8f8f8; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important">?></a></li></code>
    <div><font face="Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace"><span style="line-height: 23.54400062561035px; background-color: #f8f8f8">
    로그인 후 평가할 수 있습니다

    답변에 대한 댓글 1개

    웹토키
    11년 전
    답변감사합니다.

    그런데 'http://hansolcst.co.kr/sub3_1.html' 페이지 내에서 해당글로 이동하게끔 하고 싶습니다.
    알려주신대로 수정하니, 해당글만 전체 페이지로 보여집니다.

    다시한번 알려주세용!! 부탁드려요~!

    댓글을 작성하려면 로그인이 필요합니다.

    답변을 작성하려면 로그인이 필요합니다.

    로그인