고수님들 도움을 요청합니다. 정보
고수님들 도움을 요청합니다.첨부파일
본문
댓글 전체

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '70'; //썸네일 가로길이
$img_height = '60'; //썸네일 세로길이
$img_quality = '90'; //퀼리티 100이하로 설정
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb105'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<? for ($i=0; $i<count($list); $i++) {
$img="$g4[path]/data/file/$bo_table/thumb/{$list[$i][wr_id]}";
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
?>
<td height="100" align="left" valign="middle"><table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="105" height="100" align="left" valign="top"><table width="307" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td width="120" align="left" valign="middle"><table border="0" cellpadding="2" cellspacing="0" width="120" style="border-width:1; border-color:rgb(237,237,237); border-style:solid;">
<tr>
<td width="116" height="80" align="center" style="border-bottom-width:1; border-bottom-color:rgb(237,237,237); border-bottom-style:solid;"><?
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td>
<a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');">
<img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' title='이미지 없음'></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr></table>";
$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;
$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]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td align='center'>
<a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');"><img src='$thumb' width='$img_width' height='$img_height' border='0'></a>
</td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr></table>";
}
//날짜표시
$date = explode("-", $date1);
$year = $date[0];
$month = $date[1];
$day = $date[2];
$latest_date = $year."-".$month."-".$day."";
echo $list[$i]['icon_reply'] . " ";
echo $img;
//if ($list[$i]['comment_cnt'])
// echo " <a href=\"{$list[$i]['comment_href']}\" style='font-size:9px; color:#EE5A00; vertical-align:1px;'>{$list[$i]['comment_cnt']}</a>";
//echo " " . $list[$i]['icon_new'];
//echo " " . $list[$i]['icon_hot'];
//echo " " . $list[$i]['icon_file'];
//echo " " . $list[$i]['icon_link'];
//echo " " . $list[$i]['icon_secret'];
//echo "</td><td width=36 align=right>";
//echo "<font color=#bababa class=small>{$list[$i][datetime2]}</font>";
?> </td>
</tr>
</table></td>
<td width="180" align="left" valign="middle"><table width="180" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16" height="13"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td height="2" style="border-bottom-width:1; border-bottom-color:rgb(237,237,237); border-bottom-style:solid;"><a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');">
<?=$list[$i][subject]?>
</a>
<?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td width="16" height="12"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td><?=$list[$i][wr_3]?></td>
</tr>
<tr>
<td height="12"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td><?=$list[$i][wr_4]?></td>
</tr>
<tr>
<td height="12"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td><a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');"><img src="<?=$latest_skin_path?>/img/view.gif" width="44" height="13" vspace="3" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<? } ?>
</tr>
</table>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '70'; //썸네일 가로길이
$img_height = '60'; //썸네일 세로길이
$img_quality = '90'; //퀼리티 100이하로 설정
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb105'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<? for ($i=0; $i<count($list); $i++) {
$img="$g4[path]/data/file/$bo_table/thumb/{$list[$i][wr_id]}";
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
?>
<td height="100" align="left" valign="middle"><table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="105" height="100" align="left" valign="top"><table width="307" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td width="120" align="left" valign="middle"><table border="0" cellpadding="2" cellspacing="0" width="120" style="border-width:1; border-color:rgb(237,237,237); border-style:solid;">
<tr>
<td width="116" height="80" align="center" style="border-bottom-width:1; border-bottom-color:rgb(237,237,237); border-bottom-style:solid;"><?
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td>
<a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');">
<img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' title='이미지 없음'></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr></table>";
$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;
$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]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td align='center'>
<a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');"><img src='$thumb' width='$img_width' height='$img_height' border='0'></a>
</td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr></table>";
}
//날짜표시
$date = explode("-", $date1);
$year = $date[0];
$month = $date[1];
$day = $date[2];
$latest_date = $year."-".$month."-".$day."";
echo $list[$i]['icon_reply'] . " ";
echo $img;
//if ($list[$i]['comment_cnt'])
// echo " <a href=\"{$list[$i]['comment_href']}\" style='font-size:9px; color:#EE5A00; vertical-align:1px;'>{$list[$i]['comment_cnt']}</a>";
//echo " " . $list[$i]['icon_new'];
//echo " " . $list[$i]['icon_hot'];
//echo " " . $list[$i]['icon_file'];
//echo " " . $list[$i]['icon_link'];
//echo " " . $list[$i]['icon_secret'];
//echo "</td><td width=36 align=right>";
//echo "<font color=#bababa class=small>{$list[$i][datetime2]}</font>";
?> </td>
</tr>
</table></td>
<td width="180" align="left" valign="middle"><table width="180" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16" height="13"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td height="2" style="border-bottom-width:1; border-bottom-color:rgb(237,237,237); border-bottom-style:solid;"><a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');">
<?=$list[$i][subject]?>
</a>
<?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td width="16" height="12"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td><?=$list[$i][wr_3]?></td>
</tr>
<tr>
<td height="12"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td><?=$list[$i][wr_4]?></td>
</tr>
<tr>
<td height="12"><img src="<?=$latest_skin_path?>/img/arr.gif" width="13" height="11" vspace="3" /></td>
<td><a href="javascript://" onclick="window.open('<?=$g4[path]?>/skin/board/n_movie/movie.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=100,width=741,height=472');"><img src="<?=$latest_skin_path?>/img/view.gif" width="44" height="13" vspace="3" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<? } ?>
</tr>
</table>

올리신 스킨 다운후 노이미지일경우와 썸네일이 생성됬을경우의 링크경로만 수정해서 올려드셨습니다.
긁어서 올려보세요.
중간에 불필요한 코드가 들어가있는듯 한데 그냥 무시하고^^; 이미지 링크만 잡아드렸습니다.
긁어서 올려보세요.
중간에 불필요한 코드가 들어가있는듯 한데 그냥 무시하고^^; 이미지 링크만 잡아드렸습니다.
짱구아빠님 소스복사해서 바꾸웠는데 안되는데여 함확인좀 부탁드려도 될까요,,,
에러납니다
에러납니다