0 or b.product_price>0) "; }elseif($v_header['pflag']=="T"){ //$where .= " and (a.price>0 or b.product_price>0) "; } //메인페이지 일 경우 if($_SERVER['PHP_SELF']=="/index.php" || ($categoryno==""&&$cate_group==""&&$pname_search=="")){ //메인일때는 //$where .= " and a.mainno <> '0' and a.mainno < '99999' and a.mainno is not null "; //mainno가 설정되어 있지 않으면 출력 안함 if($v_header['stype']=="C"){ //협력사일 경우 main노출 설정된 상품만 노출 $where .= " and b.product_main='T' "; }else{ $where .= " and a.main_flag = 'T' "; //메인노출로 설정된 상품만 출력 } } //echo $where; if($categoryno!=""){ $where .= " and a.category_idx='$categoryno'"; } if($category2no!=""){ $where .= " and category2_idx='$category2no'"; } //지점용 카테고리 if($category_officeno!=""){ $where .= " and a.category_office_idx='$category_officeno'"; } if($pname_search!=""){ $where .= " and (a.name like'%$pname_search%' or a.model like'%$pname_search%')"; } //echo $where; if($cate_group!=""){ $sql = "select cate_list,image2,product_list from cate_group where flag='T' and idx='$cate_group' "; $rsCategory = rs($sql); //echo $sql; $cate_group_list = trim($rsCategory[0][0]); $cate_group_image2 = trim($rsCategory[0][1]); $cate_group_product = trim($rsCategory[0][2]); $cate_group_where = ""; // [SECURITY-I-3] IN 절 sanitize. 빈 값일 때는 '0' 으로 (safeIntList 동작) $cateListSafe = ($cate_group_list === "" || $cate_group_list === "''") ? "0" : safeIntList($cate_group_list); $cateProdSafe = ($cate_group_product === "" || $cate_group_product === "''") ? "0" : safeIntList($cate_group_product); $where .= " and (a.category_idx in ($cateListSafe) or a.idx in ($cateProdSafe))"; //echo $where; } $sql="select count(1) from product a $where "; $rs=rs($sql); //페이징 작업 $totallist=$rs[0][0]; $pagename=$_SERVER['PHP_SELF']; if($nowpage==""){ $nowpage=1;//현재페이지 } $len=1000;//페이지리스트사이즈 $s=$nowpage*$len-$len;//페이지시작번호 $lenblock=10;//블록사이즈 // $sql="select idx, name, price, image from product $where order by name asc limit $s,$len" ; // $rs = rs($sql); $tables = " product a left join product_site b on a.idx=b.product_idx and b.site_idx='$v_header[idx]' left join category2 c on a.category2_idx=c.idx "; if($cate_group!=""){ //$orderby = " order by a.category_idx asc, mainno asc "; $orderby = " order by a.category_idx asc, c.orderby asc, cateno asc "; }elseif($categoryno!=""){ $orderby = " order by category2_orderby asc, cateno asc "; }else{ $orderby = " order by mainno asc "; } $sql = "select a.*,b.product_name,b.product_price,c.orderby as category2_orderby from $tables $where $orderby limit $s,$len" ; $rs = rs($sql); //echo $sql; if($v_header['stype']=="C"){ //echo $sql; } // if($v_header[idx]=="20")echo $sql; $sql="select * from category where idx='$categoryno' "; $rs2 = rs($sql); $v_category = $rs2[0]; //$Rsbanner = $rs2[0][0]; //echo $sql; // 팝업 $sql = "select * from popup WHERE flag='T' and site_idx='$v_header[idx]' order by idx desc"; $rs_popup = rs($sql); ?>
$v){ if($categoryno==""&&$cate_group==""){ //$txtno = $v[mainno]; $txtno++; }else{ //$txtno = $v[cateno]; if($categoryno!=""&& $pre_category2_idx!=$v['category2_idx']){ $txtno=0; //echo "$categoryno , $pre_category2_idx, $v[category2_idx]
"; }elseif($cate_group!=""&& $pre_category_idx!=$v['category_idx']){ //카테고리그룹 진입시 $txtno=0; } $txtno++; } //echo $v[cateno]; if($v['product_name']!="")$v['name'] = $v['product_name']; if($cate_group!=""){ //카테고리 그룹으로 진입시 카테고리 타이틀 출력 //카테고리 그룹용 if($pre_category_idx!=$v['category_idx']){ $sql = "select name from category where idx='$v[category_idx]' "; $rss = rs($sql); if($v_header['prew']!="") $rss[0]['name'] = str_replace("H","J",$rss[0]['name']); // echo "
"; echo "
".$rss[0]['name']."
"; $nomargin_cnt = 0; } //카테고리 그룹용 끝 $pre_category_idx = $v['category_idx']; } //서브카테고리용 //echo $v[category2_idx];exit; if($categoryno!="" ){ $sql = "select name from category2 where idx='$v[category2_idx]' and flag='T' "; $rss = rs($sql); if($rss[0]['name']!="" && $pre_category2_idx!=$v['category2_idx']){ echo "
"; echo "
".$rss[0]['name']."
"; $nomargin_cnt = 0; } } $pre_category2_idx = $v['category2_idx']; //서브카테고리용 끝 if($nomargin_cnt%7==0)$nomargin = "nomargin"; else $nomargin = ""; $nomargin_cnt++; $product_price = $v['price']; if($v['product_price']>0){ $product_price = $v['product_price']; $product_price_txt = number_format($product_price)."원"; }else{ if($product_price>0){ $product_price_txt = number_format($product_price)."원"; }else{ $product_price_txt = "별도문의"; } } ?>
$sv) { $bannerbtnno = $sk + 1; if($sv['link_type']=="j"){ echo ""; }else{ echo ""; } $main_btn_txt .= "
"; $display_txt = "none"; $main_btn_select_txt = "main_main_banner_off"; } ?>
<
>
"; else echo ""; }else{ echo ""; } ?>
제품리스트
0){ // echo "
"; // // foreach($rss as $sk => $sv){ // $nc = ""; // if($sv[idx]==$category2no)$nc = "nc"; // // if($sk>0) echo "  |  "; // // echo "$sv[name]"; // } // echo "
"; // } ?>
$v){ if($categoryno==""&&$cate_group==""){ //$txtno = $v[mainno]; $txtno++; }else{ //$txtno = $v[cateno]; if($categoryno!=""&& $pre_category2_idx!=$v['category2_idx']){ $txtno=0; //echo "$categoryno , $pre_category2_idx, $v[category2_idx]
"; }elseif($cate_group!=""&& $pre_category_idx!=$v['category_idx']){ //카테고리그룹 진입시 $txtno=0; } $txtno++; } //echo $v[cateno]; if($v['product_name']!="")$v['name'] = $v['product_name']; if($cate_group!=""||$categoryno!=""){ //카테고리 그룹으로 진입시 카테고리 타이틀 출력 //카테고리 그룹용 if($pre_category_idx!=$v['category_idx']){ $sql = "select name from category where idx='$v[category_idx]' "; $rss = rs($sql); if($v_header['prew']!="") $rss[0]['name'] = str_replace("H","J",$rss[0]['name']); echo "
"; echo "
".$rss[0]['name']."
"; $nomargin_cnt = 0; } //카테고리 그룹용 끝 $pre_category_idx = $v['category_idx']; } //서브카테고리용 //echo $v[category2_idx];exit; if($categoryno!="" ){ $sql = "select name from category2 where idx='$v[category2_idx]' and flag='T' "; $rss = rs($sql); if($rss[0]['name']!="" && $pre_category2_idx!=$v['category2_idx']){ echo "
"; echo "
".$rss[0]['name']."
"; $nomargin_cnt = 0; } } $pre_category2_idx = $v['category2_idx']; //서브카테고리용 끝 if($nomargin_cnt%7==0)$nomargin = "nomargin"; else $nomargin = ""; $nomargin_cnt++; $product_price = $v['price']; if($v['product_price']>0){ $product_price = $v['product_price']; $product_price_txt = number_format($product_price)."원"; }else{ $product_price_txt = "별도문의"; } ?>
"; if($cate_group!="" && $cate_group_image2!="")echo "
"; ?>