private function latest_item_assign($where, $cnt = 5, $cut_name = 100, $orderby = '', $width = 120) { global $g5, $eb; if (!$orderby) { $orderby = " it_time desc "; } $sql = "select * from {$g5['g5_shop_item_table']} where {$where} order by {$orderby} limit {$cnt}"; $result = sql_query($sql, false); for ($i = 0; $row = sql_fetch_array($result); $i++) { $list[$i] = $row; $list[$i]['it_name'] = conv_subject($row['it_name'], $cut_name, '…'); $list[$i]['href'] = G5_SHOP_URL . "/item.php?it_id={$row['it_id']}"; $list[$i]['datetime'] = $row['it_time']; $list[$i]['img'] = get_it_image($row['it_id'], $width, 0, true); $list[$i]['star_score'] = get_star_image($row['it_id']); } return $list; }
?> <p id="sit_opt_info"> 상품 선택옵션 <?php echo $option_count; ?> 개, 추가옵션 <?php echo $supply_count; ?> 개 </p> <?php } ?> <div id="sit_star"> <?php if ($score = get_star_image($it['it_id'])) { ?> 고객선호도 <span>별<?php echo $score; ?> 개</span> <img src="<?php echo G5_SHOP_URL; ?> /img/s_star<?php echo $score; ?> .png" alt="" class="sit_star"> <?php } ?>
$prev_href2 = ''; } // 다음 상품보기 $sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '{$it_id}' and SUBSTRING(ca_id,1,4) = '" . substr($it['ca_id'], 0, 4) . "' and it_use = '1' order by it_id desc limit 1 "; $row = sql_fetch($sql); if ($row['it_id']) { $next_title = '다음 상품<span class="sound_only"> ' . $row['it_name'] . '</span>'; $next_href = '<a href="./item.php?it_id=' . $row['it_id'] . '" id="siblings_next">'; $next_href2 = '</a>' . PHP_EOL; } else { $next_title = ''; $next_href = ''; $next_href2 = ''; } // 고객선호도 별점수 $star_score = get_star_image($it['it_id']); // 관리자가 확인한 사용후기의 개수를 얻음 $sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; $row = sql_fetch($sql); $item_use_count = $row['cnt']; // 상품문의의 개수를 얻음 $sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' "; $row = sql_fetch($sql); $item_qa_count = $row['cnt']; // 관련상품의 개수를 얻음 if ($default['de_rel_list_use']) { $sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') where a.it_id = '{$it['it_id']}' "; $row = sql_fetch($sql); $item_relation_count = $row['cnt']; } // 소셜 관련