get_it_image 함수 수정에 따른 썸네일 생성 코드 수정

This commit is contained in:
chicpro
2013-01-30 11:19:59 +09:00
parent 337399baee
commit ba110f0172
5 changed files with 27 additions and 16 deletions

View File

@ -66,8 +66,8 @@ for ($i=1; $i<=$tv_idx; $i++)
if(file_exists($tv_filepath.'/'.$tv_filename) && $tv_filename != "")
break;
}
$tv_it_img = $tv_it_id.'/'.it_img_thumb($tv_filename, $tv_filepath, $tv_div['img_width'], $tv_div['img_height']);
$img = get_it_image($tv_it_img, $tv_div['img_width'], $tv_div['img_height'], $tv_it_id);
$img = get_it_image($tv_it_id, $tv_filename, $tv_div['img_width'], $tv_div['img_height'], $tv_it_id);
$img = str_replace("\"", "\\\"", $img);
$img = preg_replace("/\<a /", "<a title='$it_name' ", $img);
echo "goods_link[$i] = \"{$img}<br/><span class=small>".cut_str($it_name,10,"")."</span>\";\n";
}

View File

@ -183,14 +183,12 @@ else
break;
}
}
$middle_image = $it['it_id'].'/'.it_img_thumb($filename, $filepath, $default['de_mimg_width'], $default['de_mimg_height']);
?>
<td align=center valign=top>
<table cellpadding=0 cellspacing=0>
<tr><td height=22></td></tr>
<tr><td colspan=3 align=center>
<table cellpadding=1 cellspacing=0 bgcolor=#E4E4E4><tr><td><?=get_large_image($it['it_id'].'/'.$filename, $it['it_id'], false)?><?=get_it_image($middle_image);?></a></td></tr></table></td></tr>
<table cellpadding=1 cellspacing=0 bgcolor=#E4E4E4><tr><td id="middle_image"><?=get_large_image($filename, $it['it_id'], false)?><?=get_it_image($it['it_id'], $filename, $default['de_mimg_width'], $default['de_mimg_height']);?></a></td></tr></table></td></tr>
<tr><td colspan=3 height=10></td></tr>
<tr>
<td colspan=3 align=center>
@ -201,9 +199,8 @@ else
if (file_exists($filepath.'/'.$filename) && $filename != "")
{
echo get_large_image($it['it_id'].'/'.$filename, $it['it_id'], false);
echo "<img id='middle{$i}' src='".G4_DATA_URL."/item/{$it_id}/{$filename}' border=0 width=40 height=40 style='border:1px solid #E4E4E4;' ";
echo " onmouseover=\"document.getElementById('$middle_image').src=document.getElementById('middle{$i}').src;\">";
echo get_large_image($filename, $it['it_id'], false);
echo get_it_image($it['it_id'], $filename, 40, 40, "", "item_view_thumbnail");
echo "</a> &nbsp;";
}
}
@ -1110,6 +1107,12 @@ function explan_resize_image()
<script type="text/javascript">
$(function() {
explan_resize_image();
// middle_image 변경
$(".item_view_thumbnail").mouseover(function() {
var src = "<?=G4_DATA_URL?>/item/<?=$it_id?>/"+$(this).attr("id");
$("#middle_image img").attr("src", src);
});
});
</script>

View File

@ -1,13 +1,14 @@
<?
include_once("./_common.php");
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
$sql = " select it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
from $g4[yc4_item_table]
where it_id='$it_id' ";
$row = sql_fetch_array(sql_query($sql));
$imagefile = G4_DATA_PATH."/item/$img";
$imagefile_url = G4_DATA_URL."/item/$img";
$imagefile = G4_DATA_PATH."/item/$it_id/$img";
$imagefile_url = G4_DATA_URL."/item/$it_id/$img";
$size = getimagesize($imagefile);
$g4['title'] = "{$row['it_name']} ($it_id)";
@ -27,13 +28,22 @@ include_once(G4_PATH.'/head.sub.php');
{
$filename = $row['it_img'.$i];
if (file_exists(G4_DATA_PATH."/item/{$it_id}/{$filename}") && $filename != "")
echo "<img id='large{$i}' src='".G4_DATA_URL."/item/{$it_id}/{$filename}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'
onmouseover=\"document.getElementById('largeimage').src=document.getElementById('large{$i}').src;\"> &nbsp;";
echo get_it_image($it_id, $filename, 50, 50, "", "image_thumbnail")."&nbsp;";
}
?>
&nbsp;</td>
</tr>
</table>
<script>
$(function() {
$(".image_thumbnail").mouseover(function() {
var src = "<?=G4_DATA_URL?>/item/<?=$it_id?>/"+$(this).attr("id");
$("#largeimage").attr("src", src);
});
});
</script>
<?
include_once(G4_PATH.'/tail.sub.php');
?>

View File

@ -23,13 +23,12 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
break;
}
}
$it_img = it_img_thumb($filename, G4_DATA_PATH.'/item/'.$row['it_id'], $img_width, $img_height);
echo "
<td width='{$td_width}%' align=center valign=top>
<br>
<table width=98% cellpadding=2 cellspacing=0>
<tr><td align=center>".get_it_image($row['it_id'].'/'.$it_img, $img_width , $img_height, $row[it_id])."</td></tr>
<tr><td align=center>".get_it_image($row['it_id'], $filename, $img_width , $img_height, $row['it_id'])."</td></tr>
<tr><td align=center>".it_name_icon($row)."</td></tr>";
if ($row[it_cust_amount] && !$row[it_gallery])

View File

@ -21,12 +21,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
break;
}
}
$it_img = it_img_thumb($filename, G4_DATA_PATH.'/item/'.$row['it_id'], $img_width, $img_height);
?>
<td width="<?=$td_width?>%" align=center valign=top>
<table width=98% cellpadding=1 cellspacing=0 border=0>
<tr><td height=5></td></tr>
<tr><td align=center><?=$href?><?=get_it_image($row['it_id'].'/'.$it_img, $img_width, $img_height)?></a></td></tr>
<tr><td align=center><?=$href?><?=get_it_image($row['it_id'], $filename, $img_width, $img_height)?></a></td></tr>
<tr><td align=center><?=$href?><?=stripslashes($row['it_name'])?></a></td></tr>
<!--시중가격<tr><td align=center><strike><?=display_amount($row[it_cust_amount])?></strike></td></tr>-->
<tr><td align=center><span class=amount><?=display_amount(get_amount($row), $row['it_tel_inq'])?></span></td></tr>