관련상품이미지 출력 코드 수정 및 관련상품 정렬순서 필드 추가

This commit is contained in:
chicpro
2013-05-16 16:26:03 +09:00
parent 60a5d6dc58
commit a6701d1f95
5 changed files with 44 additions and 31 deletions

View File

@ -0,0 +1,23 @@
<?php
$sub_menu = '400300';
include_once('./_common.php');
$it_id = $_POST['it_id'];
$width = $_POST['width'];
$height = $_POST['height'];
$sql = " select it_id, it_price from {$g4['shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
if(!$row['it_id']) {
echo '상품 정보가 존재하지 않습니다.';
exit;
}
$img = get_it_image($row['it_id'], $width, $height);
if(!$img)
$img = '<img src="'.G4_SHOP_URL.'/img/no_image.gif" width="'.$width.'" height="'.$height.'" alt="">';
echo '<a href="'.G4_SHOP_URL.'/item.php?it_id='.$row['it_id'].'" target="_blank">'.$img.'</a><br>'.display_price($row['it_price']);
?>