어떤분이 최신글을 올려놧는데 아무리해도 가로세로겟수를 못정하겟네여 > 그누4 질문답변

그누4 질문답변

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

어떤분이 최신글을 올려놧는데 아무리해도 가로세로겟수를 못정하겟네여 정보

어떤분이 최신글을 올려놧는데 아무리해도 가로세로겟수를 못정하겟네여

본문

이 최신글인데 가로세로가 안먹힙니다.
이것땜시 며시간동안헤매엇네요..
고수님들 혹시 가로세로줄좀 먹히게 부탁드립니다.


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

/*  전체 환경설정 */

$all_width = "100%";  // 테이블 폭 정의

$img_width = 260;
$img_height = 170;
$img_quality = 80;

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
include_once("$g4[path]/lib/thumb.lib.php");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_m3';
$ym = date("ym", $g4[server_time]);

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);


$cn = 5;  // 이미지 가로 출력 갯수

?>


<style type="text/css">
ul, li { list-style:none; margin:0; padding:0;}
#ifocusP { width:260px; height:170px; margin:0px; border:0px }
#ifocusP_img { display:inline; position:relative; float:left; width:260px; height:170px; border:0px; overflow:hidden; }
#ifocusP_imglist { position:absolute; }
#ifocusP_imglist li { width:260px; height:170px; overflow:hidden; }
#ifocusP_imglist img { width:260px; height:170px;}
#ifocusP_ico { display:inline; float:center; width:1px;}
#ifocusP_ico li { width:10px; height:46px; cursor:pointer; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=40); }
#ifocusP_ico img { width:260px; height:170px; }
#ifocusP_ico .current { background: url('<?=$latest_skin_path?>/image/ifocus_ico_bg.gif') no-repeat; opacity:1; -moz-opacity:1; filter:alpha(opacity=40); }
#ifocusP_subjbar { position:absolute; left:0; bottom:0; width:260px; height:46px; background:#000; opacity:0.4; -moz-opacity:0.5; filter:alpha(opacity=40); }
#ifocusP_subject { position:absolute; left:8px; bottom:5px; color:#FFFFFF;}
#ifocusP_subject .normal { display:none; }
.date {font-family:Tahoma; font-size:9px; color:#e3c191; padding-bottom:3px;}
</style>




<!---------------dq 엔진 이미지 출력-------->
<table width="100%" border="0" cellpadding=0 cellspacing="0" align="center">
<tr><td height="3"></td></tr>
<tr align="center">

<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) {
$s = $i+1;



  ///////////////////////////////////dq//////////////////////////////////////////
//썸네일 생성
$thumfile = "";
$image = $list[$i][file][0][file];
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb))
$img = "<img src='$thumb' border='0'>";
  {
        $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;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            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;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
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);
}
    }
}

    if (file_exists($thumb))
        $thumfile = "<a href='{$list[$i][href]}'><img src='$thumb' width='{$img_width}' height='{$img_height}' border='0' style='border:0 #eee solid' onmouseover=this.style.filter='alpha(opacity=80)' onmouseout=this.style.filter=''></a>";
else
//이미지가 없으면
$thumfile="<a href='{$list[$i][href]}'><img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'></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>"; }




  ///////////////////////////////////dq//////////////////////////////////////////
if($s%$cn==0 ) echo"</tr><tr><td colspan='$colspan' align=center height=5></tr><tr>";


?>
<div id="ifocusP">
  <div id="ifocusP_img">
 <div id="ifocusP_imglist"> 
<div id="ifocusP_subjbar"></div>
<div id="ifocusP_subject">
 <?=$list[$i]['subject']?><br>
<span class='date'>
<?=$list[$i]['datetime']?>&nbsp;&nbsp;By.<?=$list[$i]['wr_name']?></span>
</div>
<div id="ifocusP_ico">
<a href='<?=$list[$i][href]?>'><?=$thumfile?></a>
</div></div></div></div>

<?
echo "</DIV>";
}

?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</font></td></tr><? } ?>

</table>

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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