사용후기 건수 반영후 검색에서 사용후기 많은순으로 기능 추가
This commit is contained in:
@ -194,7 +194,7 @@ $pg_anchor ='<ul class="anchor">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it['it_id']; ?>">
|
||||
<span class="frm_ca_id"><?php echo $it['it_id']; ?></span>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/item.php?it_id=<?php echo $it_id; ?>" class="btn_frmline">상품확인</a>
|
||||
<a href="<?php echo G5_ADMIN_URL; ?>/shop_admin/itemuselist.php?sel_field=a.it_id&search=<?php echo $it_id; ?>" class="btn_frmline">사용후기</a>
|
||||
<a href="<?php echo G5_ADMIN_URL; ?>/shop_admin/itemuselist.php?sfl=a.it_id&stx=<?php echo $it_id; ?>" class="btn_frmline">사용후기</a>
|
||||
<a href="<?php echo G5_ADMIN_URL; ?>/shop_admin/itemqalist.php?sel_field=a.it_id&search=<?php echo $it_id; ?>" class="btn_frmline">상품문의</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
@ -29,6 +29,7 @@ $qstr = 'page='.$page.'&sort1='.$sort1.'&sort2='.$sort2;
|
||||
<form name="fitemuseform" method="post" action="./itemuseformupdate.php" onsubmit="return fitemuseform_submit(this);">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="is_id" value="<?php echo $is_id; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $is['is_id']; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||
|
||||
@ -20,6 +20,8 @@ if ($w == "u")
|
||||
where is_id = '$is_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
update_use_cnt($_POST['it_id']);
|
||||
|
||||
goto_url("./itemuseform.php?w=$w&is_id=$is_id&$qstr");
|
||||
}
|
||||
else
|
||||
|
||||
@ -133,6 +133,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['is_subject']) ?> 사용후기</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
|
||||
<input type="hidden" name="is_id[<?php echo $i; ?>]" value="<?php echo $row['is_id']; ?>">
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
</td>
|
||||
<td><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?><?php echo cut_str($row['it_name'],30); ?></a></td>
|
||||
<td class="td_name"><?php echo $name; ?></td>
|
||||
|
||||
@ -9,30 +9,31 @@ if (!count($_POST['chk'])) {
|
||||
}
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
} else {
|
||||
alert("선택수정이나 선택삭제 작업이 아닙니다.");
|
||||
}
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
$k = $_POST['chk'][$i]; // 실제 번호를 넘김
|
||||
|
||||
if ($_POST['act_button'] == "선택수정")
|
||||
{
|
||||
$sql = "update {$g5['g5_shop_item_use_table']}
|
||||
set is_confirm = '{$_POST['is_confirm'][$k]}'
|
||||
where is_id = '{$_POST['is_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
}
|
||||
else if ($_POST['act_button'] == "선택삭제")
|
||||
{
|
||||
$sql = "delete from {$g5['g5_shop_item_use_table']} where is_id = '{$_POST['is_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
update_use_cnt($_POST['it_id'][$k]);
|
||||
}
|
||||
|
||||
goto_url("./itemuselist.php?sca=$sca&sst=$sst&sod=$sod&sfl=$sfl&stx=$stx&page=$page");
|
||||
|
||||
@ -241,14 +241,11 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
change_status($od_id, '배송', '완료');
|
||||
|
||||
// 완료인 경우에만 상품구입 합계수량을 상품테이블에 저장한다.
|
||||
$sql2 = " select ct_id, ct_qty from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
|
||||
$sql2 = " select it_id, sum(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where od_id = '$od_id' and ct_status = '완료' group by it_id ";
|
||||
$result2 = sql_query($sql2);
|
||||
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$sql3 = " select it_id, sum(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where ct_id = '{$row2['ct_id']}' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
$sql4 = " update {$g5['g5_shop_item_table']} set it_sum_qty = '{$row3['sum_qty']}' where it_id = '{$row3['it_id']}' ";
|
||||
sql_query($sql4);
|
||||
$sql3 = " update {$g5['g5_shop_item_table']} set it_sum_qty = '{$row3['sum_qty']}' where it_id = '{$row3['it_id']}' ";
|
||||
sql_query($sql3);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user