안녕하세요.
영카트에서 item페이지에서..
제품 사진이 나오는데 거기서 클릭하면 새창에서 확대 이미지가 나오죠.
문제는..확대 이미지가 하나 이상일 경우큰 이미지들을 사이즈가 다른걸 올리게 되면..
두번째 이미지는 처음 클릭한 이미지 창사이즈에 맞춰서 그림이 사이즈가 변하게 되는데..
해결 방법이 없을까요?
영카트에서 item페이지에서..
제품 사진이 나오는데 거기서 클릭하면 새창에서 확대 이미지가 나오죠.
문제는..확대 이미지가 하나 이상일 경우큰 이미지들을 사이즈가 다른걸 올리게 되면..
두번째 이미지는 처음 클릭한 이미지 창사이즈에 맞춰서 그림이 사이즈가 변하게 되는데..
해결 방법이 없을까요?
댓글 3개
shop/largeimage.php 를 아래와 같이 수정해 보시기 바랍니다.
<?
include_once("./_common.php");
$sql = " select it_name from $g4[yc4_item_table] where it_id='$it_id' ";
$row = sql_fetch_array(sql_query($sql));
$imagefile = "$g4[path]/data/item/$img";
$size = getimagesize($imagefile);
$g4[title] = "$row[it_name] ($it_id)";
include_once("$g4[path]/head.sub.php");
?>
<script language="JavaScript" src="<?=$g4[path]?>/js/shop.js"></script>
<br>
<div align=center>
<a href='#' onclick='window.close();'><img id='largeimage' src='<?=$imagefile?>' width='<?=$size[0]?>' height='<?=$size[1]?>' alt='<?=$row[it_name]?>' border=0 style='border:1 solid #E4E4E4;'></a>
</div>
<p>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=30% align=center><a href='#' onclick='window.close();'><img src='<? echo "$g4[shop_img_path]/" ?>/btn_close.gif' border=0 alt="창닫기"></a></td>
<td width=70% align=right>
<?
for ($i=1; $i<=5; $i++)
{
if (file_exists("$g4[path]/data/item/{$it_id}_l{$i}"))
echo get_large_image($it_id."_l".$i, $it_id, false);
echo "<img id='large{$i}' src='$g4[path]/data/item/{$it_id}_l{$i}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'>";
echo "</a>";
}
?>
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
?>
<?
include_once("./_common.php");
$sql = " select it_name from $g4[yc4_item_table] where it_id='$it_id' ";
$row = sql_fetch_array(sql_query($sql));
$imagefile = "$g4[path]/data/item/$img";
$size = getimagesize($imagefile);
$g4[title] = "$row[it_name] ($it_id)";
include_once("$g4[path]/head.sub.php");
?>
<script language="JavaScript" src="<?=$g4[path]?>/js/shop.js"></script>
<br>
<div align=center>
<a href='#' onclick='window.close();'><img id='largeimage' src='<?=$imagefile?>' width='<?=$size[0]?>' height='<?=$size[1]?>' alt='<?=$row[it_name]?>' border=0 style='border:1 solid #E4E4E4;'></a>
</div>
<p>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=30% align=center><a href='#' onclick='window.close();'><img src='<? echo "$g4[shop_img_path]/" ?>/btn_close.gif' border=0 alt="창닫기"></a></td>
<td width=70% align=right>
<?
for ($i=1; $i<=5; $i++)
{
if (file_exists("$g4[path]/data/item/{$it_id}_l{$i}"))
echo get_large_image($it_id."_l".$i, $it_id, false);
echo "<img id='large{$i}' src='$g4[path]/data/item/{$it_id}_l{$i}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'>";
echo "</a>";
}
?>
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
?>
if (file_exists("$g4[path]/data/item/{$it_id}_l{$i}"))
echo get_large_image($it_id."_l".$i, $it_id, false);
echo "<img id='large{$i}' src='$g4[path]/data/item/{$it_id}_l{$i}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'>";
echo "</a>";
를
if (file_exists("$g4[path]/data/item/{$it_id}_l{$i}")) {
echo get_large_image($it_id."_l".$i, $it_id, false);
echo "<img id='large{$i}' src='$g4[path]/data/item/{$it_id}_l{$i}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'>";
echo "</a>";
}
위와 같이 수정해 보시기 바랍니다.
echo get_large_image($it_id."_l".$i, $it_id, false);
echo "<img id='large{$i}' src='$g4[path]/data/item/{$it_id}_l{$i}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'>";
echo "</a>";
를
if (file_exists("$g4[path]/data/item/{$it_id}_l{$i}")) {
echo get_large_image($it_id."_l".$i, $it_id, false);
echo "<img id='large{$i}' src='$g4[path]/data/item/{$it_id}_l{$i}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'>";
echo "</a>";
}
위와 같이 수정해 보시기 바랍니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 56073 | |
| 56067 | |
| 56065 | |
| 56060 | |
| 56058 | |
| 56055 | |
| 56051 | |
| 56048 | |
| 56044 | |
| 56043 | |
| 56042 | |
| 56039 | |
| 56035 | |
| 56032 | |
| 56030 | |
| 56028 | |
| 56025 | |
| 56018 | |
| 56012 | |
| 56010 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기