최신글 추출 에서 이미지 출력 정보
최신글 추출 에서 이미지 출력본문
아래와 같은 최신글 스킨을 쓰고있습니다.
빨강색으로 표시한 부분에 이미지를 출력하고싶습니다.
이미지 나오는 스킨을 다운받아 적용하니 에러만나고 안나오네요
아시는분 답변 부탁드립니다.
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding:10px 20px 10px 10px; border:1px solid #000000;">
<? for ($k=0; $k<count($list); $k++) { ?>
<? if ($k==0){?>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="150" rowspan="3" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding:10px 20px 10px 10px; border:1px solid #000000;">
<? for ($k=0; $k<count($list); $k++) { ?>
<? if ($k==0){?>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="150" rowspan="3" align="center">
<!-- 이미지 -->
이미지<br>
130x150
<br>
<!-- end 이미지 --></td>
<td height="20"> <?
echo $list[$k][icon_reply] . " ";
echo "<a href='{$list[$k][href]}'>";
if ($list[$k][is_notice])
echo "<font style='font-family:µ¸¿ò; font-size:13pt; color:#000000;'><strong>{$list[$k][subject]}</strong></font>";
else
echo "<font style='font-family:µ¸¿ò; font-size:13pt; color:#000000;'><strong>{$list[$k][subject]}</strong></font>";
echo "</a>";
?>
<?=$list[$k][wr_1]?>
</td>
<td align="right"><a href='<?=$list[$k][href]?>' class='txtlightgray12'> <img src="<?=$latest_skin_path?>/img/bl_allow_gray.gif" width="15" height="9" border="0" align="absmiddle">전체기사보기</a></td>
</tr>
<tr>
<td height="1" colspan="2" background="img/line_dot.gif"></td>
</tr>
<tr>
<td height="100" colspan="2" valign="top"><?=$list[$k][wr_2]?></td>
</tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table></td>
</tr>
</table>
이미지<br>
130x150
<br>
<!-- end 이미지 --></td>
<td height="20"> <?
echo $list[$k][icon_reply] . " ";
echo "<a href='{$list[$k][href]}'>";
if ($list[$k][is_notice])
echo "<font style='font-family:µ¸¿ò; font-size:13pt; color:#000000;'><strong>{$list[$k][subject]}</strong></font>";
else
echo "<font style='font-family:µ¸¿ò; font-size:13pt; color:#000000;'><strong>{$list[$k][subject]}</strong></font>";
echo "</a>";
?>
<?=$list[$k][wr_1]?>
</td>
<td align="right"><a href='<?=$list[$k][href]?>' class='txtlightgray12'> <img src="<?=$latest_skin_path?>/img/bl_allow_gray.gif" width="15" height="9" border="0" align="absmiddle">전체기사보기</a></td>
</tr>
<tr>
<td height="1" colspan="2" background="img/line_dot.gif"></td>
</tr>
<tr>
<td height="100" colspan="2" valign="top"><?=$list[$k][wr_2]?></td>
</tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table></td>
</tr>
</table>
댓글 전체

빨간색 부분에 밑에 소스를 적용해 보세요?
그리고 이미지 사이즈 조절은 width='100' height='80' 이 부분입니다.
<? $image = urlencode($list[$k][file][0][file]);
if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
echo "<a href='{$list[$i][href]}'><img src='$g4[path]/data/file/$bo_table/$image' width='100' height='80' border='0'></a>";
} else {
echo "<a href='{$list[$i][href]}'><img src='$latest_skin_path/img/no_image.gif' width='100' height='80' border='0'></a>";
} ?>
그리고 이미지 사이즈 조절은 width='100' height='80' 이 부분입니다.
<? $image = urlencode($list[$k][file][0][file]);
if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
echo "<a href='{$list[$i][href]}'><img src='$g4[path]/data/file/$bo_table/$image' width='100' height='80' border='0'></a>";
} else {
echo "<a href='{$list[$i][href]}'><img src='$latest_skin_path/img/no_image.gif' width='100' height='80' border='0'></a>";
} ?>
답변주셔서 감사합니다.