Merge branch 'master' of github.com:gnuboard/yc4s

This commit is contained in:
gnuboard
2013-08-07 11:46:49 +09:00
28 changed files with 1041 additions and 256 deletions

View File

@ -37,25 +37,6 @@ if ($skin)
$list_file = G4_SHOP_SKIN_PATH."/{$ev['ev_skin']}";
if (file_exists($list_file))
{
/*
$list_mod = $ev['ev_list_mod'];
$list_row = $ev['ev_list_row'];
$img_width = $ev['ev_img_width'];
$img_height = $ev['ev_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);
include $list_file;
*/
$list_mod = $ev['ev_list_mod'];
$list_row = $ev['ev_list_row'];
include G4_SHOP_PATH.'/list.sub.php';
include G4_SHOP_PATH.'/list.sort.php';
// 총몇개 = 한줄에 몇개 * 몇줄
@ -65,7 +46,7 @@ if (file_exists($list_file))
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
$list = new item_list($ev['ev_skin'], $list_mod, $list_row, $ev['ev_img_width'], $ev['ev_img_height']);
$list = new item_list($ev['ev_skin'], $ev['ev_list_mod'], $ev['ev_list_row'], $ev['ev_img_width'], $ev['ev_img_height']);
$list->set_event($ev['ev_id']);
$list->set_is_page(true);
$list->set_order_by($order_by);

View File

@ -51,7 +51,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=1">히트상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 히트상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(1);
echo $list->run();
@ -65,7 +65,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=2">추천상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 추천상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(2);
echo $list->run();
@ -79,7 +79,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=3">최신상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 최신상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(3);
echo $list->run();
@ -93,7 +93,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=4">인기상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 인기상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(4);
echo $list->run();
@ -107,7 +107,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=5">할인상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 할인상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(5);
echo $list->run();

View File

@ -615,25 +615,11 @@ else
<div class="sct_wrap">
<?php
/*
$list_mod = 3;
$img_width = 230;
$img_height = 230;
*/
$sql = " select b.* from {$g4['shop_item_relation_table']} a left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
$list = new item_list("list.10.skin.php", 3, 1, 150, 0);
$list->set_mobile(true);
$list = new item_list("list.10.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
$list->set_query($sql);
echo $list->run();
/*
if ($num)
include G4_SHOP_PATH.'/maintype10.inc.php';
else
echo '<p class="sit_empty">이 상품과 관련된 상품이 없습니다.</p>';
*/
?>
</div>
</section>

View File

@ -65,42 +65,16 @@ if ($is_admin)
include G4_SHOP_PATH.'/listcategory3.inc.php';
// 상품 출력순서가 있다면
if ($sort != "") {
$order_by = $sort . ' '.$sortodr. ' , ';
}
// 상품 (하위 분류의 상품을 모두 포함한다.)
$sql_list1 = " select * ";
$sql_list2 = " order by $order_by it_order, it_id desc ";
// 하위분류 포함
// 판매가능한 상품만
$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' ";
if ($sort != "")
$order_by = $sort.' '.$sortodr.' , it_order, it_id desc';
$error = '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
// 리스트 유형별로 출력
$list_file = G4_SHOP_SKIN_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 '<div class="sct_wrap">';
include $list_file;
echo '</div>';
*/
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $ca['ca_list_mod'] * $ca['ca_list_row'];
// 페이지가 없으면 첫 페이지 (1 페이지)
@ -109,8 +83,11 @@ if ($is_admin)
$from_record = ($page - 1) * $items;
$list = new item_list($ca['ca_skin'], $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']);
$list->set_category($ca['ca_id']);
$list->set_category($ca['ca_id'], 1);
$list->set_category($ca['ca_id'], 2);
$list->set_category($ca['ca_id'], 3);
$list->set_is_page(true);
$list->set_order_by($order_by);
$list->set_from_record($from_record);
echo $list->run();

View File

@ -10,9 +10,6 @@ $sct_sort_href .= '&amp;ev_id='.$ev_id.'&amp;sort=';
<!-- 상품 정렬 선택 시작 { -->
<section id="sct_sort">
<h2>상품 정렬</h2>
<div>
상품 <b><?php echo number_format($total_count); ?></b>개
</div>
<ul>
<li><a href="<?php echo $sct_sort_href; ?>it_price&amp;sortodr=asc" class="btn01">낮은가격순</a></li>

View File

@ -7,11 +7,11 @@ if (G4_IS_MOBILE) {
}
$type = $_REQUEST['type'];
if ($type == 1) $g4['title'] = "히트상품";
else if ($type == 2) $g4['title'] = "추천상품";
else if ($type == 3) $g4['title'] = "최신상품";
else if ($type == 4) $g4['title'] = "인기상품";
else if ($type == 5) $g4['title'] = "할인상품";
if ($type == 1) $g4['title'] = '히트상품';
else if ($type == 2) $g4['title'] = '추천상품';
else if ($type == 3) $g4['title'] = '최신상품';
else if ($type == 4) $g4['title'] = '인기상품';
else if ($type == 5) $g4['title'] = '할인상품';
else
alert('상품유형이 아닙니다.');
@ -21,43 +21,46 @@ include_once('./_head.php');
$list_mod = 3; // 한줄에 이미지 몇개씩 출력?
$list_row = 5; // 한 페이지에 몇라인씩 출력?
$img_width = 230; // 출력이미지 폭
$img_height = 230; // 출력이미지 높이
$img_width = $default['de_type'.$type.'_img_width']; // 출력이미지 폭
$img_height = $default['de_type'.$type.'_img_height']; // 출력이미지 높이
?>
<?php
// 상품 출력순서가 있다면
if ($sort != "")
$order_by = $sort . " , ";
$order_by = ' it_order, it_id desc ';
if ($sort != '')
$order_by = $sort.' '.$sortodr.' , it_order, it_id desc';
// 상품 (하위 분류의 상품을 모두 포함한다.)
$sql_list1 = " select * ";
$sql_list2 = " order by $order_by it_order, it_id desc ";
$sql_common = " from {$g4['shop_item_table']} where it_type{$type} = '1' and it_use = '1' ";
if ($ca_id) {
$sql_common .= " and ca_id = '$ca_id' ";
}
$error = "<img src='".G4_SHOP_URL."/img/no_item.gif' border=0>";
$error = '<img src="'.G4_SHOP_URL.'/img/no_item.gif">';
if (!$skin)
$skin = "list.skin.10.php";
$td_width = (int)($mod / 100);
$skin = "list.10.skin.php";
// 리스트 유형별로 출력
$list_file = G4_SHOP_PATH.'/'.$skin;
$list_file = G4_SHOP_SKIN_PATH.'/'.$skin;
if (file_exists($list_file)) {
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $list_mod * $list_row;
// 페이지가 없으면 첫 페이지 (1 페이지)
if ($page == "") $page = 1;
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
include G4_SHOP_PATH."/list.sub.php";
//include "$cart_dir/list.sort.php";
$sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items ";
$result = sql_query($sql);
include $list_file;
$list = new item_list();
$list->set_type($type);
$list->set_list_skin('list.10.skin.php');
$list->set_list_mod($list_mod);
$list->set_list_row($list_row);
$list->set_img_size($img_width, $img_height);
$list->set_is_page(true);
$list->set_order_by($order_by);
$list->set_from_record($from_record);
echo $list->run();
// where 된 전체 상품수
$total_count = $list->total_count;
// 전체 페이지 계산
$total_page = ceil($total_count / $items);
}
else
{
@ -77,21 +80,6 @@ $qstr .= '&amp;type='.$type.'&amp;sort='.$sort;
echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
?>
<?php
// 테스트
// 분류를 링크하는 코드
/*
$bar = "";
$sql = " select ca_id from $g4[shop_item_table] where it_type{$type} = '1' and it_use = '1' group by ca_id order by ca_id ";
$result = sql_query($sql);
for($i=0;$row=sql_fetch_array($result);$i++) {
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$row[ca_id]' ");
echo $bar . "<a href='$g4[shop_path]/list.php?ca_id=$row[ca_id]'>$row2[ca_name]</a>";
$bar = " | ";
}
*/
?>
<?php
include_once('./_tail.php');
?>