diff --git a/adm/shop_admin/categoryform.php b/adm/shop_admin/categoryform.php index 7c0f7afda..d71239c2a 100644 --- a/adm/shop_admin/categoryform.php +++ b/adm/shop_admin/categoryform.php @@ -52,9 +52,9 @@ if ($w == "") $html_title = "1단계분류추가"; $ca['ca_use'] = 1; $ca['ca_explan_html'] = 1; - $ca['ca_img_width'] = $default['de_simg_width']; - $ca['ca_img_height'] = $default['de_simg_height']; - $ca['ca_list_mod'] = 4; + $ca['ca_img_width'] = $default['de_mimg_width']; + $ca['ca_img_height'] = $default['de_mimg_height']; + $ca['ca_list_mod'] = 3; $ca['ca_list_row'] = 5; $ca['ca_stock_qty'] = 99999; } @@ -145,14 +145,14 @@ $pg_anchor .= ''; - + 픽셀 - + 픽셀 diff --git a/css/default_shop.css b/css/default_shop.css index 1f59963eb..060b96002 100644 --- a/css/default_shop.css +++ b/css/default_shop.css @@ -307,6 +307,9 @@ input.required:focus {padding:3px 3px 4px;border:0;background:#21272e !important #sidx_img {margin:0 0 20px} /* 상품 목록 */ +#sct {} +.sct_admin {text-align:right} + /* 공통 */ .sct_wrap {margin:0 0 30px;zoom:1} .sct_wrap:after {display:block;visibility:hidden;clear:both;content:''} @@ -324,9 +327,10 @@ input.required:focus {padding:3px 3px 4px;border:0;background:#21272e !important .sct_10 .sct_li {float:left;margin:0 25px 0 0;width:230px} .sct_10 .sct_last {margin:0 !important} .sct_13 .sct_clear {clear:both} -.sct_10 .sct_a {display:block;position:relative;font-weight:bold;text-decoration:none} +.sct_10 .sct_a {display:block;position:relative;text-decoration:none} .sct_10 .sct_img {display:block;margin:0 0 15px} .sct_10 b {display:block;margin:0 0 8px;font-weight:normal} +.sct_10 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} .sct_10 .sct_icon {position:absolute;top:10px;left:-5px;margin:0 !important} .sct_10 .sct_icon img {display:block} .sct_10 .sct_sns {position:absolute;top:190px;right:20px} @@ -335,10 +339,10 @@ input.required:focus {padding:3px 3px 4px;border:0;background:#21272e !important .sct_11 .sct_li {float:left;margin:0 25px 0 0;width:230px} .sct_11 .sct_last {margin:0 !important} .sct_13 .sct_clear {clear:both} -.sct_11 .sct_a {display:block;position:relative;padding:0 0 5px;background:#f7f7f7;font-weight:bold;text-decoration:none} +.sct_11 .sct_a {display:block;position:relative;padding:0 0 5px;background:#f7f7f7;text-decoration:none} .sct_11 .sct_img {display:block;margin:0 0 15px} .sct_11 b {display:block;margin:0 0 8px;padding:0 5px;font-weight:normal} -.sct_11 .sct_cost {display:block;margin:0 0 10px;padding:0 5px} +.sct_11 .sct_cost {display:block;margin:0 0 10px;padding:0 5px;font-weight:bold} .sct_11 .sct_icon {position:absolute;top:10px;left:-5px;margin:0 !important} .sct_11 .sct_icon img {display:block} .sct_11 .sct_sns {position:absolute;bottom:10px;right:10px} diff --git a/shop/list.php b/shop/list.php index 84e60693a..b201f4edb 100644 --- a/shop/list.php +++ b/shop/list.php @@ -7,9 +7,9 @@ $sql = " select * and ca_use = '1' "; $ca = sql_fetch($sql); if (!$ca['ca_id']) - alert("등록된 분류가 없습니다."); + alert('등록된 분류가 없습니다.'); -$g4['title'] = $ca['ca_name'] . " 상품리스트"; +$g4['title'] = $ca['ca_name'].' 상품리스트'; if ($ca['ca_include_head']) @include_once($ca['ca_include_head']); @@ -19,102 +19,92 @@ else // 스킨을 지정했다면 지정한 스킨을 사용함 (스킨의 다양화) //if ($skin) $ca[ca_skin] = $skin; -$nav_ca_id = $ca_id; -include G4_SHOP_PATH.'/navigation1.inc.php'; - -$himg = G4_DATA_URL."/category/{$ca_id}_h"; -if (file_exists($himg)) { - echo "
"; -} - -// 상단 HTML -echo stripslashes($ca['ca_head_html']); - if ($is_admin) - echo "

"; - -include G4_SHOP_PATH.'/listcategory2.inc.php'; + echo '
분류 관리
'; ?> - - - - -
+
-
'; + } -// 하위분류 포함 -// 판매가능한 상품만 -$sql_common = " from {$g4['shop_item_table']} - where (ca_id like '{$ca_id}%' - or ca_id2 like '{$ca_id}%' - or ca_id3 like '{$ca_id}%') - and it_use = '1' "; + // 상단 HTML + echo '
'.stripslashes($ca['ca_head_html']).'
'; -$error = ""; + include G4_SHOP_PATH.'/listcategory2.inc.php'; -// 리스트 유형별로 출력 -$list_file = G4_SHOP_PATH.'/'.$ca['ca_skin']; -if (file_exists($list_file)) { + // 상품 출력순서가 있다면 + if ($sort != "") { + $order_by = $sort . " , "; + } - //display_type(2, "maintype10.inc.php", 4, 2, 100, 100, $ca[ca_id]); + // 상품 (하위 분류의 상품을 모두 포함한다.) + $sql_list1 = " select * "; + $sql_list2 = " order by $order_by it_order, it_id desc "; - $list_mod = $ca['ca_list_mod']; - $list_row = $ca['ca_list_row']; - $img_width = $ca['ca_img_width']; - $img_height = $ca['ca_img_height']; + // 하위분류 포함 + // 판매가능한 상품만 + $sql_common = " from {$g4['shop_item_table']} + where (ca_id like '{$ca_id}%' + or ca_id2 like '{$ca_id}%' + or ca_id3 like '{$ca_id}%') + and it_use = '1' "; - include G4_SHOP_PATH.'/list.sub.php'; - include G4_SHOP_PATH.'/list.sort.php'; + $error = '

등록된 상품이 없습니다.

'; - $sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items "; - $result = sql_query($sql); + // 리스트 유형별로 출력 + $list_file = G4_SHOP_PATH.'/'.$ca['ca_skin']; + if (file_exists($list_file)) { + //display_type(2, "maintype10.inc.php", 4, 2, 100, 100, $ca[ca_id]); + $list_mod = $ca['ca_list_mod']; + $list_row = $ca['ca_list_row']; + $img_width = $ca['ca_img_width']; + $img_height = $ca['ca_img_height']; + + include G4_SHOP_PATH.'/list.sub.php'; + include G4_SHOP_PATH.'/list.sort.php'; + + $sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items "; + $result = sql_query($sql); + + echo '
'; include $list_file; + echo '
'; -} -else -{ + } + else + { + $i = 0; + $error = '

'.$ca['ca_skin'].' 파일을 찾을 수 없습니다.
관리자에게 알려주시면 감사하겠습니다.

'; + } - $i = 0; - $error = "

{$ca['ca_skin']} 파일을 찾을 수 없습니다.

관리자에게 알려주시면 감사하겠습니다."; + if ($i==0) + { + echo '

'.$error.'
'; + } -} + $qstr1 .= 'ca_id='.$ca_id.'&skin='.$skin.'&ev_id='.$ev_id.'&sort='.$sort; + echo get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&page='); + ?> -if ($i==0) -{ - echo "
"; - echo "
$error
"; -} + '.stripslashes($ca['ca_tail_html']).''; + + $timg = G4_DATA_PATH.'/category/'.$ca_id.'_t'; + if (file_exists($timg)) + echo '
'; ?> +
-
- -
-
- -

- -"; - + - -0) && (($i%$list_mod)==0) ) - { - echo "\n\n"; - echo "\n\n"; - echo "\n"; + $href = G4_SHOP_URL.'/item.php?it_id='.$row['it_id']; + if ($list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막 + else if ($i%$list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = 'sct_clear'; } - - echo " - "; -} - -// 나머지 td 를 채운다. -if (($cnt = $i%$list_mod) != 0) - for ($k=$cnt; $k<$list_mod; $k++) - echo " \n"; + if ($i == 1) echo ''; ?> - -
-
- - - "; - - if ($row['it_cust_amount'] && !$row['it_gallery']) - echo ""; - - echo "
".get_it_image($row['it_id']."_s", $img_width , $img_height, $row['it_id'])."
".it_name_icon($row)."
".display_amount($row['it_cust_amount'])."
"; - - if (!$row['it_gallery']) - echo "".display_amount(get_amount($row), $row['it_tel_inq']).""; - - echo "