다중파일 등록관련 문의드립니다.

웹미소님의 업체소개 게시판을 활용하려 합니다.

링크 보시면 아실겁니다.

원본소스는 15개의 파일을 업로드 합니다.
(저는 11개로 수정해서 사용하려 합니다.)

write 스킨을 보면..업로드 하는부분이 case 문으로 되어 있습니다.

일반 basic 게시판처럼 파일첨부 추가 버튼이있는것이 아니라...파일 업로드 10개면
10개의 업로드 공간이 각각 보여집니다.(링크참조)


문의드리고자 하는것은..
파일 등록수가 총 11개라고 가정할때..
11번째에 등록하는 이미지파일만 다른 위치에 보여지게 하고자 합니다.
(링크보시는바와 같이..등록하는 파일은 모두 한곳에 작은사진으로 순서대로 나열됩니다.)


참고하실수 있도록 view 페이지의 해당 파일을 올립니다.

===========================================================
<tr align="center">
<?
$end = count($view[file]) - 1;
for($i=0; $i<$end; $i++) {
if ($i%5==0 && $i!=0) echo "</tr><tr align=center>";
$thumb = $thumb_path.'/'.$view[wr_id].'_'.$i;
if (!file_exists($thumb))
{
$file = $view[file][$i][path] .'/'. $view[file][$i][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 = 78 / $size[0];
$height = (int)($size[1] * $rate);

$dst = imagecreatetruecolor(78, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, 56, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$view[wr_id].'_'.$i, 78);
chmod($thumb_path.'/'.$view[wr_id].'_'.$i, 0606);
}
}
?>
<td width="82" height="82">
<table width="80" height="80" border="0" cellpadding="1" cellspacing="0" background="img/pic_bg.gif">
<tr>
<td align="center"><img src="<?=$thumb?>" width="78" height="78" onClick="ImageUp('<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$view[file][$i][file]?>')" style="cursor:hand" ></td>
</tr>
</table>
</td>
<?
}
?>
</tr>
</table>
</td>
<td width="50"></td>
<td>
<table width="210" height="162" border="0" cellpadding="0" cellspacing="0" background="<?=$board_skin_path?>/img/9000.jpg">
<tr>
<td valign="middle"><div align="center">
<table><tr><td style='padding-left:63px'>*******11번째 파일을 이곳에 넣으려고 합니다*****</td></tr></table>
</td>
</tr>
</table>
</td></tr>
==========================================================


위의 소스에서 **** 부분에 해당 파일만 불러오게 하려면 어떻게 해야 하나요?

고수님들의 도움 부탁드립니다.
|

댓글 2개

<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$view[file][11][file]?>'>

요렇게하면 나올껄요^^
아...-2를 하고 [10]을 불러오니 원하는 데로 적용 됩니다.

조언 감사합니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
17년 전 조회 1,743
17년 전 조회 1,620
17년 전 조회 1,593
17년 전 조회 1,568
17년 전 조회 2,213
17년 전 조회 1,432
17년 전 조회 1,514
17년 전 조회 1,518
17년 전 조회 2,159
17년 전 조회 1,522
17년 전 조회 1,797
17년 전 조회 1,955
17년 전 조회 1,702
17년 전 조회 2,330
17년 전 조회 1,913
17년 전 조회 1,658
17년 전 조회 1,821
17년 전 조회 1,888
17년 전 조회 1,582
17년 전 조회 2,189