Merge branch 'master' of github.com:gnuboard/yc5
This commit is contained in:
@ -1427,6 +1427,13 @@ $(function(){
|
||||
<?php echo $it['it_time']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">수정일시</th>
|
||||
<td colspan="2">
|
||||
<?php echo help("상품을 최종 수정한 시간입니다."); ?>
|
||||
<?php echo $it['it_update_time']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -300,7 +300,6 @@ $sql_common = " ca_id = '$ca_id',
|
||||
it_tail_html = '$it_tail_html',
|
||||
it_mobile_head_html = '$it_mobile_head_html',
|
||||
it_mobile_tail_html = '$it_mobile_tail_html',
|
||||
it_time = '".G5_TIME_YMDHIS."',
|
||||
it_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
it_order = '$it_order',
|
||||
it_tel_inq = '$it_tel_inq',
|
||||
@ -350,6 +349,8 @@ if ($w == "")
|
||||
if($t_it_id)
|
||||
alert('상품 코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.');
|
||||
|
||||
$sql_common .= " , it_time = '".G5_TIME_YMDHIS."' ";
|
||||
$sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' ";
|
||||
$sql = " insert {$g5['g5_shop_item_table']}
|
||||
set it_id = '$it_id',
|
||||
$sql_common ";
|
||||
@ -357,6 +358,7 @@ if ($w == "")
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
$sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' ";
|
||||
$sql = " update {$g5['g5_shop_item_table']}
|
||||
set $sql_common
|
||||
where it_id = '$it_id' ";
|
||||
|
||||
@ -26,7 +26,8 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
it_point = '{$_POST['it_point'][$k]}',
|
||||
it_stock_qty = '{$_POST['it_stock_qty'][$k]}',
|
||||
it_use = '{$_POST['it_use'][$k]}',
|
||||
it_order = '{$_POST['it_order'][$k]}'
|
||||
it_order = '{$_POST['it_order'][$k]}',
|
||||
it_update_time = '".G5_TIME_YMDHIS."'
|
||||
where it_id = '{$_POST['it_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
@ -52,8 +52,8 @@ $qstr = 'page='.$page.'&sort1='.$sort1.'&sort2='.$sort2;
|
||||
<td><?php echo $name; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">점수</th>
|
||||
<td><?php echo stripslashes($is['is_score']); ?> 점</td>
|
||||
<th scope="row">평점</th>
|
||||
<td><img src="<?php echo G5_URL; ?>/shop/img/s_star<?php echo $is['is_score']; ?>.png"> (<?php echo $is['is_score']; ?>점)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="is_subject">제목</label></th>
|
||||
|
||||
@ -112,7 +112,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<th scope="col"><?php echo subject_sort_link("it_name"); ?>상품명</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link("mb_name"); ?>이름</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link("is_subject"); ?>제목</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link("is_score"); ?>점수</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link("is_score"); ?>평점</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link("is_confirm"); ?>확인</a></th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
@ -143,7 +143,15 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<?php echo $is_content; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_num"><?php echo $row['is_score']; ?></td>
|
||||
<td class="td_num">
|
||||
<select name="is_score[<?php echo $i; ?>]">
|
||||
<option value="5" <?php echo get_selected($row['is_score'], "5"); ?>>매우만족</option>
|
||||
<option value="4" <?php echo get_selected($row['is_score'], "4"); ?>>만족</option>
|
||||
<option value="3" <?php echo get_selected($row['is_score'], "3"); ?>>보통</option>
|
||||
<option value="2" <?php echo get_selected($row['is_score'], "2"); ?>>불만</option>
|
||||
<option value="1" <?php echo get_selected($row['is_score'], "1"); ?>>매우불만</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_chk"><input type="checkbox" name="is_confirm[<?php echo $i; ?>]" <?php echo ($row['is_confirm'] ? 'checked' : ''); ?> value="1"></td>
|
||||
<td class="td_mngsmall">
|
||||
<a href="./itemuseform.php?w=u&is_id=<?php echo $row['is_id']; ?>&<?php echo $qstr; ?>"><span class="sound_only"><?php echo $row['is_subject']; ?> </span>수정</a>
|
||||
|
||||
@ -23,7 +23,8 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
if ($_POST['act_button'] == "선택수정")
|
||||
{
|
||||
$sql = "update {$g5['g5_shop_item_use_table']}
|
||||
set is_confirm = '{$_POST['is_confirm'][$k]}'
|
||||
set is_score = '{$_POST['is_score'][$k]}',
|
||||
is_confirm = '{$_POST['is_confirm'][$k]}'
|
||||
where is_id = '{$_POST['is_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
@ -34,6 +35,7 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
}
|
||||
|
||||
update_use_cnt($_POST['it_id'][$k]);
|
||||
update_use_avg($_POST['it_id'][$k]);
|
||||
}
|
||||
|
||||
goto_url("./itemuselist.php?sca=$sca&sst=$sst&sod=$sod&sfl=$sfl&stx=$stx&page=$page");
|
||||
|
||||
@ -824,12 +824,9 @@ function display_category($no, $list_mod, $list_row, $img_width, $img_height, $c
|
||||
// 별
|
||||
function get_star($score)
|
||||
{
|
||||
if ($score > 8) $star = 5;
|
||||
else if ($score > 6) $star = 4;
|
||||
else if ($score > 4) $star = 3;
|
||||
else if ($score > 2) $star = 2;
|
||||
else if ($score > 0) $star = 1;
|
||||
else $star = 5;
|
||||
$star = round($score);
|
||||
if ($star > 5) $star = 5;
|
||||
else if ($star < 0) $star = 0;
|
||||
|
||||
return $star;
|
||||
}
|
||||
@ -1805,6 +1802,16 @@ function update_use_cnt($it_id)
|
||||
}
|
||||
|
||||
|
||||
// 사용후기의 선호도(별) 평균을 상품테이블에 저장합니다.
|
||||
function update_use_avg($it_id)
|
||||
{
|
||||
global $g5;
|
||||
$row = sql_fetch(" select count(*) as cnt, sum(is_score) as total from {$g5['g5_shop_item_use_table']} where it_id = '{$it_id}' ");
|
||||
$average = ($row['total'] && $row['cnt']) ? $row['total'] / $row['cnt'] : 0;
|
||||
return sql_query(" update {$g5['g5_shop_item_table']} set it_use_avg = '$average' where it_id = '{$it_id}' ");
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 주문포인트를 적립한다.
|
||||
// 설정일이 지난 포인트 부여되지 않은 배송완료된 장바구니 자료에 포인트 부여
|
||||
|
||||
@ -8,8 +8,12 @@ if (!$is_member) {
|
||||
// 사용후기 작성 설정에 따른 체크
|
||||
check_itemuse_write();
|
||||
|
||||
$is_subject = trim($_REQUEST['is_subject']);
|
||||
$is_content = trim($_REQUEST['is_content']);
|
||||
$it_id = escape_trim($_POST['it_id']);
|
||||
$is_subject = escape_trim($_POST['is_subject']);
|
||||
$is_content = escape_trim($_POST['is_content']);
|
||||
$is_name = escape_trim($_POST['is_name']);
|
||||
$is_password = escape_trim($_POST['is_password']);
|
||||
$is_score = (int)$_POST['is_score'] > 5 ? 0 : (int)$_POST['is_score'];
|
||||
|
||||
if ($w == "" || $w == "u") {
|
||||
$is_name = $member['mb_name'];
|
||||
@ -49,9 +53,9 @@ if ($w == "")
|
||||
sql_query($sql);
|
||||
|
||||
if ($default['de_item_use_use']) {
|
||||
alert_opener("평가하신 글은 관리자가 확인한 후에 출력됩니다.", $url);
|
||||
$alert_msg = "평가하신 글은 관리자가 확인한 후에 출력됩니다.";
|
||||
} else {
|
||||
alert_opener("사용후기가 등록 되었습니다.", $url);
|
||||
$alert_msg = "사용후기가 등록 되었습니다.";
|
||||
}
|
||||
}
|
||||
else if ($w == "u")
|
||||
@ -68,7 +72,7 @@ else if ($w == "u")
|
||||
where is_id = '$is_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert_opener("사용후기가 수정 되었습니다.", $url);
|
||||
$alert_msg = "사용후기가 수정 되었습니다.";
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
@ -102,6 +106,10 @@ else if ($w == "d")
|
||||
$sql = " delete from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert("사용후기를 삭제 하였습니다.", $url);
|
||||
$alert_msg = "사용후기를 삭제 하였습니다.";
|
||||
}
|
||||
|
||||
update_use_avg($it_id);
|
||||
|
||||
alert_opener($alert_msg, $url);
|
||||
?>
|
||||
@ -76,8 +76,12 @@ if ($qfrom || $qto)
|
||||
$sql_where = " where " . implode(" and ", $where);
|
||||
|
||||
// 상품 출력순서가 있다면
|
||||
$qsort = strtolower($qsort);
|
||||
$qorder = strtolower($qorder);
|
||||
$order_by = "";
|
||||
if ($qsort != "") {
|
||||
// 아래의 $qsort 필드만 정렬이 가능하게 하여 다른 필드로 하여금 유추해 볼수 없게함
|
||||
if (($qsort == "it_sum_qty" || $qsort == "it_price" || $qsort == "it_use_avg" || $qsort == "it_use_cnt" || $qsort == "it_update_time") &&
|
||||
($qorder == "asc" || $qorder == "desc")) {
|
||||
$order_by = ' order by ' . $qsort . ' ' . $qorder . ' , it_order, it_id desc';
|
||||
}
|
||||
|
||||
@ -124,21 +128,13 @@ $total_page = ceil($total_count / $items); // 전체 페이지 계산
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function set_sort(qsort, qorder)
|
||||
{
|
||||
var f = document.frmdetailsearch;
|
||||
f.qsort.value = qsort;
|
||||
f.qorder.value = qorder;
|
||||
f.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<ul id="ssch_sort">
|
||||
<li><a href="#" class="btn01" onclick="set_sort('it_sum_qty', 'desc'); return false;">판매량 많은순</a></li>
|
||||
<li><a href="#" class="btn01">선호도 높은순</a></li>
|
||||
<li><a href="#" class="btn01" onclick="set_sort('it_price', 'asc'); return false;">가격 낮은순</a></li>
|
||||
<li><a href="#" class="btn01" onclick="set_sort('it_price', 'desc'); return false;">가격 높은순</a></li>
|
||||
<li><a href="#" class="btn01" onclick="set_sort('it_use_avg', 'desc'); return false;">평점 높은순</a></li>
|
||||
<li><a href="#" class="btn01" onclick="set_sort('it_use_cnt', 'desc'); return false;">사용후기 많은순</a></li>
|
||||
<li><a href="#" class="btn01">최근 등록순</a></li>
|
||||
<li><a href="#" class="btn01" onclick="set_sort('it_update_time', 'desc'); return false;">최근 등록순</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="ssch_ov">
|
||||
@ -196,6 +192,16 @@ function set_sort(qsort, qorder)
|
||||
</div>
|
||||
<!-- } 검색결과 끝 -->
|
||||
|
||||
<script>
|
||||
function set_sort(qsort, qorder)
|
||||
{
|
||||
var f = document.frmdetailsearch;
|
||||
f.qsort.value = qsort;
|
||||
f.qorder.value = qorder;
|
||||
f.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
|
||||
@ -67,7 +67,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
</p>
|
||||
<?php if ($star_score) { ?>
|
||||
<div id="sit_star_sns">
|
||||
고객선호도 <span>별<?php echo $star_score?>개</span>
|
||||
고객평점 <span>별<?php echo $star_score?>개</span>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $star_score?>.png" alt="" class="sit_star">
|
||||
<?php echo $sns_share_links; ?>
|
||||
</div>
|
||||
|
||||
@ -34,7 +34,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
<dd><?php echo $is_name; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo $is_time; ?></dd>
|
||||
<dt>선호도<dt>
|
||||
<dt>평점<dt>
|
||||
<dd class="sit_use_star"><img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $is_star; ?>.png" alt="별<?php echo $is_star; ?>개"></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -29,32 +29,32 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
<td><?php echo editor_html('is_content', get_text($use['is_content'])); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">평가</th>
|
||||
<th scope="row">평점</th>
|
||||
<td>
|
||||
<ul id="sit_use_write_star">
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="10" id="is_score10" <?php echo ($is_score==10)?'checked="checked"':''; ?>>
|
||||
<label for="is_score10">매우만족</label>
|
||||
<input type="radio" name="is_score" value="5" id="is_score5" <?php echo ($is_score==10)?'checked="checked"':''; ?>>
|
||||
<label for="is_score5">매우만족</label>
|
||||
<img src="<?php echo G5_URL; ?>/shop/img/s_star5.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="8" id="is_score8" <?php echo ($is_score==8)?'checked="checked"':''; ?>>
|
||||
<label for="is_score8">만족</label>
|
||||
<input type="radio" name="is_score" value="4" id="is_score4" <?php echo ($is_score==8)?'checked="checked"':''; ?>>
|
||||
<label for="is_score4">만족</label>
|
||||
<img src="<?php echo G5_URL; ?>/shop/img/s_star4.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="6" id="is_score6" <?php echo ($is_score==6)?'checked="checked"':''; ?>>
|
||||
<label for="is_score6">보통</label>
|
||||
<input type="radio" name="is_score" value="3" id="is_score3" <?php echo ($is_score==6)?'checked="checked"':''; ?>>
|
||||
<label for="is_score3">보통</label>
|
||||
<img src="<?php echo G5_URL; ?>/shop/img/s_star3.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="4" id="is_score4" <?php echo ($is_score==4)?'checked="checked"':''; ?>>
|
||||
<label for="is_score4">불만</label>
|
||||
<input type="radio" name="is_score" value="2" id="is_score2" <?php echo ($is_score==4)?'checked="checked"':''; ?>>
|
||||
<label for="is_score2">불만</label>
|
||||
<img src="<?php echo G5_URL; ?>/shop/img/s_star2.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="2" id="is_score2" <?php echo ($is_score==2)?'checked="checked"':''; ?>>
|
||||
<label for="is_score2">매우불만</label>
|
||||
<input type="radio" name="is_score" value="1" id="is_score1" <?php echo ($is_score==2)?'checked="checked"':''; ?>>
|
||||
<label for="is_score1">매우불만</label>
|
||||
<img src="<?php echo G5_URL; ?>/shop/img/s_star1.png">
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user