Merge branch 'master' of github.com:gnuboard/yc4s
This commit is contained in:
@ -482,7 +482,15 @@ if ($ii) {
|
||||
<script>
|
||||
function search_relation(fld) {
|
||||
if (fld.value) {
|
||||
window.open('itemformrelation.php?it_id=<?=$it_id?>&ca_id='+fld.value, 'hiddenframe', '');
|
||||
$.post(
|
||||
'./itemformrelation.php',
|
||||
{ it_id: '<?=$it_id?>', ca_id: fld.value },
|
||||
function(data) {
|
||||
if(data) {
|
||||
$("#relation").html(data);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -527,16 +535,18 @@ if ($ii) {
|
||||
// 김선용 2006.10
|
||||
function relation_img(name, id)
|
||||
{
|
||||
item_image_dir = "<?=G4_DATA_URL?>/item";
|
||||
if(!name) return;
|
||||
var item_image_url = "";
|
||||
if(!name) return;
|
||||
temp = name.split("/");
|
||||
if(temp[1] == ''){
|
||||
temp[1] = "no_image.gif";
|
||||
var item_image_dir = "<?=G4_SHOP_URL?>/img";
|
||||
}
|
||||
item_image_url = "<?=G4_SHOP_URL?>/img";
|
||||
} else {
|
||||
item_image_url = "<?=G4_DATA_URL?>/item";
|
||||
}
|
||||
view_span = document.getElementById(id);
|
||||
item_price = number_format(String(temp[2]));
|
||||
view_span.innerHTML = "<img src='"+item_image_dir+"/"+temp[1]+"' width=100 height=80 border=1 style='border-color:#333333; cursor:pointer' onclick=\"popup_window('"+g4_path+"/shop/item.php?it_id="+temp[0]+"', '', '')\" title='새창으로 상품보기' alt='새창으로 상품보기'><br>"+item_price+" 원";
|
||||
view_span.innerHTML = "<a href=\"<?=G4_SHOP_URL?>/item.php?it_id="+temp[0]+"\" target=\"_blank\"><img src=\""+item_image_url+"/"+temp[1]+"\"width=\"100\" height=\"80\" border=\"1\" style=\"border-color:#333333;\" title=\"상품 새창으로 보기\"></a><br>"+item_price+" 원";
|
||||
}
|
||||
|
||||
function relation_add(fld)
|
||||
@ -795,7 +805,7 @@ function codedupcheck(id)
|
||||
return false;
|
||||
} else {
|
||||
alert("'"+data.code+"' 은(는) 등록된 코드가 없으므로 사용하실 수 있습니다.");
|
||||
document.fcategoryform.codedup.value = '';
|
||||
document.fitemform.codedup.value = '';
|
||||
}
|
||||
}, "json"
|
||||
);
|
||||
|
||||
@ -11,12 +11,7 @@ $sql = " select ca_id, it_id, it_name, it_amount
|
||||
and it_id <> '$it_id'
|
||||
order by ca_id, it_name ";
|
||||
$result = sql_query($sql);
|
||||
$num = @mysql_num_rows($result);
|
||||
?>
|
||||
<script>
|
||||
parent.document.getElementById('relation').length = <?=$num?>;
|
||||
<?
|
||||
$cnt = 0;
|
||||
|
||||
for($i=0;$row=sql_fetch_array($result);$i++) {
|
||||
//$sql2 = " select count(*) as cnt from $g4[yc4_item_relation_table] where it_id = '$row[it_id]' ";
|
||||
$sql2 = " select count(*) as cnt from {$g4['yc4_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' ";
|
||||
@ -33,14 +28,9 @@ for($i=0;$row=sql_fetch_array($result);$i++) {
|
||||
$it_image = "{$row['it_id']}_s";
|
||||
else
|
||||
$it_image = "";
|
||||
//echo "parent.document.getElementById('relation').length++;";
|
||||
echo "parent.document.getElementById('relation').options[$cnt].text = '$ca_name : $it_name';\n";
|
||||
echo "parent.document.getElementById('relation').options[$cnt].value = '$row[it_id]/$it_image/{$row['it_amount']}';\n";
|
||||
$cnt++;
|
||||
|
||||
$options .= "<option value=\"".$row['it_id']."/".$it_image."/".$row['it_amount']."\">$ca_name : $it_name</option>\n";
|
||||
}
|
||||
?>
|
||||
parent.document.getElementById('relation').length = <?=$cnt?>;
|
||||
</script>
|
||||
<?
|
||||
include_once (G4_PATH.'/tail.sub.php');
|
||||
|
||||
echo $options;
|
||||
?>
|
||||
Reference in New Issue
Block a user