Merge branch 'master' into itemuse
Conflicts: adm/shop_admin/index.php
This commit is contained in:
@ -17,6 +17,7 @@ $menu['menu400'] = array (
|
||||
array('400490', '마일리지관리', G4_ADMIN_URL.'/shop_admin/mileagelist.php', 'scf_mileage'),
|
||||
array('400650', '쿠폰관리', G4_ADMIN_URL.'/shop_admin/couponlist.php', 'scf_coupon'),
|
||||
array('400500', '배송일괄처리', G4_ADMIN_URL.'/shop_admin/deliverylist.php', 'scf_deli', 1),
|
||||
array('400740', '배송업체관리', G4_ADMIN_URL.'/shop_admin/deliverycodelist.php', 'scf_deli_co', 1)
|
||||
array('400740', '배송업체관리', G4_ADMIN_URL.'/shop_admin/deliverycodelist.php', 'scf_deli_co', 1),
|
||||
array('400750', '추가배송비관리', G4_ADMIN_URL.'/shop_admin/sendcostlist.php', 'scf_sendcost', 1)
|
||||
);
|
||||
?>
|
||||
@ -178,6 +178,8 @@ $colspan = 8;
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
function fcouponlist_submit(f)
|
||||
{
|
||||
|
||||
@ -221,7 +221,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
|
||||
</section>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
<?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<?php
|
||||
include_once (G4_ADMIN_PATH.'/admin.tail.php');
|
||||
|
||||
@ -57,9 +57,8 @@ $pg_anchor = '<ul class="anchor">
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($row['od_receipt_bank']) $settle_method .= "무통장";
|
||||
if ($row['od_receipt_card']) $settle_method .= "카드";
|
||||
if ($row['od_receipt_point']) $settle_method .= "포인트";
|
||||
$settle_method .= '미입력';
|
||||
if ($row['od_receipt_point']) $settle_method .= '포인트';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
@ -67,7 +66,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<td class="td_name"><?php echo $name; ?></td>
|
||||
<td class="td_bignum"><?php echo display_price($row['receiptamount']); ?></td>
|
||||
<td class="td_payby"><?php echo $settle_method; ?></td>
|
||||
<td class="td_smallmng"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>"><img src="./img/icon_mod.jpg" alt="<?php echo $row['od_id']; ?> 수정"></a></td>
|
||||
<td class="td_smallmng"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>">수정</a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -122,9 +121,8 @@ $pg_anchor = '<ul class="anchor">
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($row['od_temp_bank']) $settle_method .= "무통장";
|
||||
if ($row['od_temp_card']) $settle_method .= "카드";
|
||||
if ($row['od_temp_milage']) $settle_method .= "포인트";
|
||||
$settle_method .= '미입력';
|
||||
if ($row['od_temp_point']) $settle_method .= '포인트';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
@ -132,7 +130,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<td class="td_name"><?php echo $name; ?></td>
|
||||
<td class="td_bignum"><?php echo display_price($row['orderamount']); ?></td>
|
||||
<td class="td_payby"><?php echo $settle_method; ?></td>
|
||||
<td class="td_smallmng"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>"><img src="./img/icon_mod.jpg" alt="<?php echo $row['od_id']; ?> 수정"></a></td>
|
||||
<td class="td_smallmng"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>">수정</a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -160,7 +158,11 @@ $pg_anchor = '<ul class="anchor">
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
<<<<<<< HEAD
|
||||
$sql = " select * from {$g4[shop_item_use_table]}
|
||||
=======
|
||||
$sql = " select * from {$g4['shop_item_ps_table']}
|
||||
>>>>>>> master
|
||||
where is_confirm = 0
|
||||
order by is_id desc
|
||||
limit $max_limit ";
|
||||
@ -175,7 +177,11 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<td class="td_name"><?php echo $name; ?></td>
|
||||
<td><?php echo cut_str($row['is_subject'],40); ?></td>
|
||||
<<<<<<< HEAD
|
||||
<td class="td_smallmng"><a href="./itemuseform.php?w=u&is_id=<?php echo $row['is_id']; ?>"><img src="./img/icon_mod.jpg" alt="<?php cut_str($row['is_subject'],40); ?> 수정"></a></td>
|
||||
=======
|
||||
<td class="td_smallmng"><a href="./itempsform.php?w=u&is_id=<?php echo $row['is_id']; ?>">수정</a></td>
|
||||
>>>>>>> master
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -1,94 +0,0 @@
|
||||
<?php
|
||||
$sub_menu = '400650';
|
||||
include_once('./_common.php');
|
||||
include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$sql = " select *
|
||||
from {$g4['shop_item_ps_table']} a
|
||||
left join {$g4['member_table']} b on (a.mb_id = b.mb_id)
|
||||
left join {$g4['shop_item_table']} c on (a.it_id = c.it_id)
|
||||
where is_id = '$is_id' ";
|
||||
$is = sql_fetch($sql);
|
||||
if (!$is['is_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
|
||||
$name = get_sideview($is['mb_id'], get_text($is['is_name']), $is['mb_email'], $is['mb_homepage']);
|
||||
|
||||
$g4['title'] = '사용후기';
|
||||
include_once (G4_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$qstr = 'page='.$page.'&sort1='.$sort1.'&sort2='.$sort2;
|
||||
?>
|
||||
|
||||
<form name="fitemps" method="post" onsubmit="return fitemps_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="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||
<input type="hidden" name="is_confirm" value="<?php echo $is['is_confirm']; ?>">
|
||||
|
||||
<section class="cbox">
|
||||
<h2>사용후기 수정</h2>
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">상품명</th>
|
||||
<td><a href="<?php echo G4_SHOP_URL; ?>/item.php?it_id=<?php echo $is['it_id']; ?>"><?php echo $is['it_name']; ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">이름</th>
|
||||
<td><?php echo $name; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">점수</th>
|
||||
<td><?php echo stripslashes($is['is_score']); ?> 점</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="is_subject">제목</label></th>
|
||||
<td><input type="text" name="is_subject" required class="required frm_input" id="is_subject" size="100"
|
||||
value='<?php echo conv_subject($is['is_subject'], 120); ?>'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td><?php echo editor_html('is_content', $is['is_content']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">확인</th>
|
||||
<td>
|
||||
<?php if($is['is_confirm']) { ?>
|
||||
<input type="submit" name="btn_no_display" value="사용후기 보이지 않기" class="btn_frmline">
|
||||
<?php } else { ?>
|
||||
<input type="submit" name="btn_confirm" value="사용후기 보이기" class="btn_frmline">
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./itempslist.php?<?php echo $qstr; ?>">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fitemps_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js('is_content'); ?>
|
||||
|
||||
f.action="./itempsformupdate.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G4_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
@ -1,45 +0,0 @@
|
||||
<?php
|
||||
$sub_menu = '400650';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if ($w == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$iv = sql_fetch(" select * from {$g4['shop_item_ps_table']} where is_id = '$is_id' ");
|
||||
if (!$iv['is_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
|
||||
$qstr = "page=$page&sort1=$sort1&sort2=$sort2";
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
if($_POST['btn_no_display'])
|
||||
$is_confirm = 0;
|
||||
else
|
||||
$is_confirm = 1;
|
||||
|
||||
$sql = "update {$g4['shop_item_ps_table']}
|
||||
set is_subject = '$is_subject',
|
||||
is_content = '$is_content',
|
||||
is_confirm = '$is_confirm'
|
||||
where is_id = '$is_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url("./itempsform.php?w=$w&is_id=$is_id&$qstr");
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
$sql = "delete from {$g4['shop_item_ps_table']} where is_id = '$is_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url("./itempslist.php?$qstr");
|
||||
}
|
||||
else
|
||||
{
|
||||
alert();
|
||||
}
|
||||
?>
|
||||
@ -1,168 +0,0 @@
|
||||
<?php
|
||||
$sub_menu = '400650';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g4['title'] = '사용후기';
|
||||
include_once (G4_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$where = " where ";
|
||||
$sql_search = "";
|
||||
if ($stx != "") {
|
||||
if ($sfl != "") {
|
||||
$sql_search .= " $where $sfl like '%$stx%' ";
|
||||
$where = " and ";
|
||||
}
|
||||
if ($save_stx != $stx)
|
||||
$page = 1;
|
||||
}
|
||||
|
||||
if ($sca != "") {
|
||||
$sql_search .= " and ca_id like '$sca%' ";
|
||||
}
|
||||
|
||||
if ($sfl == "") $sfl = "a.it_name";
|
||||
if (!$sst) {
|
||||
$sst = "is_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
|
||||
$sql_common = " from {$g4['shop_item_ps_table']} a
|
||||
left join {$g4['shop_item_table']} b on (a.it_id = b.it_id)
|
||||
left join {$g4['member_table']} c on (a.mb_id = c.mb_id) ";
|
||||
$sql_common .= $sql_search;
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
$sql_common
|
||||
order by $sst $sod, is_id desc
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
//$qstr = 'page='.$page.'&sst='.$sst.'&sod='.$sod.'&stx='.$stx;
|
||||
$qstr = $qstr.'&sca='.$sca.'&save_stx='.$stx;
|
||||
|
||||
$listall = '';
|
||||
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
?>
|
||||
|
||||
<form name="flist">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="save_stx" value="<?php echo $stx; ?>">
|
||||
|
||||
<fieldset>
|
||||
<legend>사용후기 검색</legend>
|
||||
|
||||
<span>
|
||||
<?php echo $listall; ?>
|
||||
전체 문의내역 <?php echo $total_count; ?>건
|
||||
</span>
|
||||
|
||||
<label for="sca" class="sound_only">분류선택</label>
|
||||
<?php // ##### // 웹 접근성 취약 지점 시작 - 지운아빠 2013-04-12 ?>
|
||||
<select name="sca" id="sca">
|
||||
<option value=''>전체분류</option>
|
||||
<?php
|
||||
$sql1 = " select ca_id, ca_name from {$g4['shop_category_table']} order by ca_id ";
|
||||
$result1 = sql_query($sql1);
|
||||
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo "<option value='{$row1['ca_id']}'>$nbsp{$row1['ca_name']}\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?php // ##### // 웹 접근성 취약 지점 끝 ?>
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="it_name" <?php echo get_selected($sfl, 'it_name'); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, 'a.it_id'); ?>>상품코드</option>
|
||||
<option value="is_name" <?php echo get_selected($sfl, 'is_name'); ?>>이름</option>
|
||||
</select>
|
||||
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" required class="frm_input required">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>사용후기 목록</h2>
|
||||
|
||||
<ul class="sort_odr">
|
||||
<li><?php echo subject_sort_link("it_name"); ?>상품명</a></li>
|
||||
<li><?php echo subject_sort_link("mb_name"); ?>이름</a></li>
|
||||
<li><?php echo subject_sort_link("is_subject"); ?>제목</a></li>
|
||||
<li><?php echo subject_sort_link("is_score"); ?>점수</a></li>
|
||||
<li><?php echo subject_sort_link("is_confirm"); ?>확인</a></li>
|
||||
</ul>
|
||||
|
||||
<table class="frm_basic">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">상품명</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">점수</th>
|
||||
<th scope="col">확인</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row['is_subject'] = cut_str($row['is_subject'], 30, "...");
|
||||
|
||||
$href = G4_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
|
||||
$name = get_sideview($row['mb_id'], get_text($row['is_name']), $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$confirm = $row['is_confirm'] ? 'Y' : ' ';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
<td class="sit_ps_subject"><?php echo $row['is_subject']; ?></td>
|
||||
<td class="td_num"><?php echo $row['is_score']; ?></td>
|
||||
<td class="sit_ps_confirm"><?php echo $confirm; ?></td>
|
||||
<td class="td_smallmng">
|
||||
<a href="./itempsform.php?w=u&is_id=<?php echo $row['is_id']; ?>&$qstr"><span class="sound_only"><?php echo $row['is_subject']; ?> </span>수정</a>
|
||||
<a href="./itempsformupdate.php?w=d&is_id=<?php echo $row['is_id']; ?>&<?php echo $qstr; ?>" onclick="return delete_confirm();"><span class="sound_only"><?php echo $row['is_subject']; ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="6" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<?php
|
||||
include_once (G4_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
@ -166,6 +166,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<th scope="col">판매가</th>
|
||||
<th scope="col">소계</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">배송비</th>
|
||||
<th scope="col">포인트반영</th>
|
||||
<th scope="col">재고반영</th>
|
||||
</tr>
|
||||
@ -173,7 +174,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tbody>
|
||||
<?php
|
||||
// 상품의 옵션정보
|
||||
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, ct_stock_use, ct_point_use, io_type, io_price
|
||||
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '{$od['uq_id']}'
|
||||
and it_id = '{$row['it_id']}'
|
||||
@ -204,6 +205,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<td class="td_bignum"><?php echo number_format($opt_price); ?></td>
|
||||
<td class="td_num"><?php echo number_format($ct_amount['소계']); ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($ct_point['소계']); ?></td>
|
||||
<td class="td_sendcost_by"><?php echo $opt['ct_send_cost'] ? '착불' : '선불'; ?></td>
|
||||
<td class="td_smallmng"><?php echo get_yn($opt['ct_point_use']); ?></td>
|
||||
<td class="td_smallmng"><?php echo get_yn($opt['ct_stock_use']); ?></td>
|
||||
</tr>
|
||||
|
||||
@ -217,6 +217,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
<th scope="col">수량</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">소계</th>
|
||||
<th scope="col">배송비</th>
|
||||
<th scope="col">상태</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -239,6 +240,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
|
||||
$sub_amount = $row3['ct_qty'] * $ct_price;
|
||||
$sub_point = $row3['ct_qty'] * $row3['ct_point'];
|
||||
$ct_send_cost = ($row3['ct_send_cost'] ? '착불' : '선불');
|
||||
?>
|
||||
|
||||
<tr>
|
||||
@ -247,6 +249,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
<td class="td_num"><?php echo $row3['ct_qty']; ?></td>
|
||||
<td class="td_num"><?php echo number_format($sub_point); ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($sub_amount); ?></td>
|
||||
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
|
||||
<td class="td_smallmng"><?php echo $row3['ct_status']; ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -45,17 +45,17 @@ if ($od_send_mail)
|
||||
$is_receipt = false;
|
||||
|
||||
// 신용카드 입금
|
||||
if ($od['od_receipt_card'] > 0) {
|
||||
$card_list['od_card_time'] = $od['od_card_time'];
|
||||
$card_list['od_receipt_card'] = display_price($od['od_receipt_card']);
|
||||
if ($od['od_receipt_amount'] > 0 && $od['od_settle_case'] == '신용카드') {
|
||||
$card_list['od_receipt_time'] = $od['od_receipt_time'];
|
||||
$card_list['od_receipt_amount'] = display_price($od['od_receipt_amount']);
|
||||
|
||||
$is_receipt = true;
|
||||
}
|
||||
|
||||
// 무통장 입금
|
||||
if ($od['od_receipt_bank'] > 0) {
|
||||
$bank_list['od_bank_time'] = $od['od_bank_time'];
|
||||
$bank_list['od_receipt_bank'] = display_price($od['od_receipt_bank']);
|
||||
if ($od['od_receipt_amount'] > 0 && $od['od_settle_case'] == '무통장') {
|
||||
$bank_list['od_receipt_time'] = $od['od_receipt_time'];
|
||||
$bank_list['od_receipt_amount'] = display_price($od['od_receipt_amount']);
|
||||
$bank_list['od_deposit_name'] = $od['od_deposit_name'];
|
||||
|
||||
$is_receipt = true;
|
||||
|
||||
@ -39,7 +39,7 @@ if ($csv == 'csv')
|
||||
$to_date = date_conv($to_date);
|
||||
|
||||
|
||||
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option
|
||||
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost
|
||||
FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
|
||||
where a.uq_id = b.uq_id ";
|
||||
if ($case == 1) // 출력기간
|
||||
@ -62,9 +62,11 @@ if ($csv == 'csv')
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
//echo "우편번호,주소,이름,전화1,전화2,상품명,수량,비고,전하실말씀\n";
|
||||
echo "우편번호,주소,이름,전화1,전화2,상품명,수량,선택사항,상품코드,주문번호,운송장번호,전하실말씀\n";
|
||||
echo "우편번호,주소,이름,전화1,전화2,상품명,수량,선택사항,배송비,상품코드,주문번호,운송장번호,전하실말씀\n";
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$ct_send_cost = ($row['ct_send_cost'] ? '착불' : '선불');
|
||||
|
||||
echo '"'.$row['od_b_zip1'].'-'.$row['od_b_zip2'].'"'.',';
|
||||
echo '"'.$row['od_b_addr1'].' '.$row['od_b_addr2'].'"'.',';
|
||||
echo '"'.$row['od_b_name'].'"'.',';
|
||||
@ -75,6 +77,7 @@ if ($csv == 'csv')
|
||||
echo '"'.preg_replace("/\"/", """, $row['it_name']) . '"'.',';
|
||||
echo '"'.$row['ct_qty'].'"'.',';
|
||||
echo '"'.$row['ct_option'].'"'.',';
|
||||
echo '"'.$ct_send_cost.'"'.',';
|
||||
echo '"\''.$row['it_id'].'\'"'.',';
|
||||
echo '"\''.$row['od_id'].'\'"'.',';
|
||||
echo '"'.$row['od_invoice'].'"'.',';
|
||||
@ -95,7 +98,7 @@ if ($csv == 'xls')
|
||||
$to_date = date_conv($to_date);
|
||||
|
||||
|
||||
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option
|
||||
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost
|
||||
FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
|
||||
where a.uq_id = b.uq_id ";
|
||||
if ($case == 1) // 출력기간
|
||||
@ -132,6 +135,7 @@ if ($csv == 'xls')
|
||||
echo '<td>상품명</td>';
|
||||
echo '<td>수량</td>';
|
||||
echo '<td>선택사항</td>';
|
||||
echo '<td>배송비</td>';
|
||||
echo '<td>상품코드</td>';
|
||||
echo '<td>주문번호</td>';
|
||||
echo '<td>운송장번호</td>';
|
||||
@ -140,8 +144,7 @@ if ($csv == 'xls')
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$it_name = stripslashes($row['it_name']) . "<br />";
|
||||
$it_name .= print_item_options($row['it_id'], $row['it_opt1'], $row['it_opt2'], $row['it_opt3'], $row['it_opt4'], $row['it_opt5'], $row['it_opt6']);
|
||||
|
||||
$ct_send_cost = ($row['ct_send_cost'] ? '착불' : '선불');
|
||||
echo '<tr>';
|
||||
echo '<td>'.$row['od_b_zip1'].'-'.$row['od_b_zip2'].'</td>';
|
||||
echo '<td>'.$row['od_b_addr1'].' '.$row['od_b_addr2'].'</td>';
|
||||
@ -151,6 +154,7 @@ if ($csv == 'xls')
|
||||
echo '<td>'.$it_name.'</td>';
|
||||
echo '<td>'.$row['ct_qty'].'</td>';
|
||||
echo '<td>'.$row['ct_option'].'</td>';
|
||||
echo '<td>'.$ct_send_cost.'</td>';
|
||||
echo '<td class="mso_txt">'.$row['it_id'].'</td>';
|
||||
echo '<td class="mso_txt">'. urlencode($row['od_id']).'</td>';
|
||||
echo '<td class="mso_txt">'.$row['od_invoice'].'</td>';
|
||||
@ -272,17 +276,17 @@ if (mysql_num_rows($result) == 0)
|
||||
<th scope="col">판매가</th>
|
||||
<th scope="col">수량</th>
|
||||
<th scope="col">소계</th>
|
||||
<th scope="col">배송비</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql2 = " select a.*
|
||||
from {$g4['shop_cart_table']} a, {$g4['shop_item_table']} b
|
||||
where a.it_id = b.it_id
|
||||
and a.uq_id = '{$row['uq_id']}' ";
|
||||
$sql2 = " select *
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '{$row['uq_id']}' ";
|
||||
if ($ct_status)
|
||||
$sql2 .= " and a.ct_status = '$ct_status' ";
|
||||
$sql2 .= " order by a.ct_id ";
|
||||
$sql2 .= " and ct_status = '$ct_status' ";
|
||||
$sql2 .= " order by ct_id ";
|
||||
|
||||
$res2 = sql_query($sql2);
|
||||
$cnt = $sub_tot_qty = $sub_tot_amount = 0;
|
||||
@ -297,6 +301,7 @@ if (mysql_num_rows($result) == 0)
|
||||
|
||||
$it_name = stripslashes($row2['it_name']);
|
||||
$it_name = "$it_name ({$row2['ct_option']})";
|
||||
$ct_send_cost = ($row2['ct_send_cost'] ? '착불' : '선불');
|
||||
|
||||
$fontqty1 = $fontqty2 = "";
|
||||
if ($row2['ct_qty'] >= 2)
|
||||
@ -311,6 +316,7 @@ if (mysql_num_rows($result) == 0)
|
||||
<td class="td_bignum"><?php echo number_format($row2['ct_price']); ?></td>
|
||||
<td class="td_smallnum"><?php echo $fontqty1; ?><?php echo number_format($row2['ct_qty']); ?><?php echo $fontqty2; ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($row2_tot_amount); ?></td>
|
||||
<td class="td_sendcost_by"><?php echo $ct_send_cost; ?></td>
|
||||
</tr>
|
||||
<?php $cnt++; } ?>
|
||||
</tbody>
|
||||
@ -319,6 +325,7 @@ if (mysql_num_rows($result) == 0)
|
||||
<th scope="row" colspan="2">합계</th>
|
||||
<td><?php echo number_format($sub_tot_qty); ?></td>
|
||||
<td><?php echo number_format($sub_tot_amount); ?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@ -15,7 +15,7 @@ if ($od_receipt_time)
|
||||
$sql = " update {$g4['shop_order_table']}
|
||||
set od_deposit_name = '$od_deposit_name',
|
||||
od_bank_account = '$od_bank_account',
|
||||
od_receipt_time = '$od_bank_time',
|
||||
od_receipt_time = '$od_receipt_time',
|
||||
od_receipt_amount = '$od_receipt_amount',
|
||||
od_receipt_point = '$od_receipt_point',
|
||||
od_cancel_card = '$od_cancel_card',
|
||||
|
||||
@ -7,11 +7,11 @@ $send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); /
|
||||
|
||||
if ($od_sms_ipgum_check)
|
||||
{
|
||||
if ($od_bank_account && $od_receipt_bank && $od_deposit_name)
|
||||
if ($od_bank_account && $od_receipt_amount && $od_deposit_name)
|
||||
{
|
||||
$sms_contents = $default['de_sms_cont4'];
|
||||
$sms_contents = preg_replace("/{이름}/", $od_name, $sms_contents);
|
||||
$sms_contents = preg_replace("/{입금액}/", number_format($od_receipt_bank), $sms_contents);
|
||||
$sms_contents = preg_replace("/{입금액}/", number_format($od_receipt_amount), $sms_contents);
|
||||
$sms_contents = preg_replace("/{주문번호}/", $od_id, $sms_contents);
|
||||
$sms_contents = preg_replace("/{회사명}/", $default['de_admin_company_name'], $sms_contents);
|
||||
|
||||
|
||||
161
adm/shop_admin/sendcostlist.php
Normal file
161
adm/shop_admin/sendcostlist.php
Normal file
@ -0,0 +1,161 @@
|
||||
<?php
|
||||
$sub_menu = '400750';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$sql_common = " from {$g4['shop_sendcost_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
$sql_order = " order by sc_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$g4['title'] = '추가배송비관리';
|
||||
include_once (G4_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<section id="scp_list" class="cbox">
|
||||
<h2>추가배송비 내역</h2>
|
||||
|
||||
<form name="fsendcost" id="fsendcost" method="post" action="./sendcostupdate.php" onsubmit="return fsendcost_submit(this);">
|
||||
<input type="hidden" name="w" value="d">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
<table class="tbl_pt_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">내역 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">지역명</th>
|
||||
<th scope="col">우편번호</th>
|
||||
<th scope="col">추가배송비</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" id="sc_id_<?php echo $i; ?>" name="sc_id[<?php echo $i; ?>]" value="<?php echo $row['sc_id']; ?>">
|
||||
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="1" title="내역선택">
|
||||
</td>
|
||||
<td><?php echo $row['sc_name']; ?></td>
|
||||
<td><?php echo preg_replace('/([0-9]{3})([0-9]{3})/', '\\1-\\2', $row['sc_zip1']).' ~ '.preg_replace('/([0-9]{3})([0-9]{3})/', '\\1-\\2', $row['sc_zip2']); ?></td>
|
||||
<td><?php echo number_format($row['sc_amount']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="4" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<section id="point_mng" class="cbox">
|
||||
<h2>추가배송비 등록</h2>
|
||||
|
||||
<form name="fsendcost2" method="post" id="fsendcost2" action="./sendcostupdate.php" autocomplete="off">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="sc_name">지역명<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="sc_name" value="" id="sc_name" class="required frm_input" size="30" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="sc_zip1">우편번호 시작<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="sc_zip1" id="sc_zip1" required class="required frm_input" size="10">
|
||||
<button type="button" class="sch_zipcode">우편번호검색</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="sc_zip2">우편번호 끝<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="sc_zip2" id="sc_zip2" required class="required frm_input" size="10">
|
||||
<button type="button" class="sch_zipcode">우편번호검색</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="sc_amount">추가배송비<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="sc_amount" id="sc_amount" size="8" required class="required frm_input"> 원</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(".sch_zipcode").click(function() {
|
||||
var idx = $(".sch_zipcode").index($(this));
|
||||
var url = "./sendcostzipcode.php?no="+(idx+1);
|
||||
var opt = "left=50,top=50,width=500,height=400";
|
||||
window.open(url, "win_zipcode", opt);
|
||||
});
|
||||
});
|
||||
|
||||
function fsendcost_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G4_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
45
adm/shop_admin/sendcostupdate.php
Normal file
45
adm/shop_admin/sendcostupdate.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
$sub_menu = '400750';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$w = $_POST['w'];
|
||||
|
||||
if($w == 'd') {
|
||||
if(!count($_POST['chk']))
|
||||
alert('삭제하실 항목을 하나이상 선택해 주십시오.');
|
||||
|
||||
$count = count($_POST['sc_id']);
|
||||
for($i=0; $i<$count; $i++) {
|
||||
if($_POST['chk'][$i]) {
|
||||
$sc_id = $_POST['sc_id'][$i];
|
||||
sql_query(" delete from {$g4['shop_sendcost_table']} where sc_id = '$sc_id' ");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$sc_name = trim($_POST['sc_name']);
|
||||
$sc_zip1 = preg_replace('/[^0-9]/', '', $_POST['sc_zip1']);
|
||||
$sc_zip2 = preg_replace('/[^0-9]/', '', $_POST['sc_zip2']);
|
||||
$sc_amount = preg_replace('/[^0-9]/', '', $_POST['sc_amount']);
|
||||
|
||||
if(!$sc_name)
|
||||
alert('지역명을 입력해 주십시오.');
|
||||
if(!$sc_zip1)
|
||||
alert('우편번호 시작을 입력해 주십시오.');
|
||||
if(!$sc_zip2)
|
||||
alert('우편번호 끝을 입력해 주십시오.');
|
||||
if(!$sc_amount)
|
||||
alert('추가배송비를 입력해 주십시오.');
|
||||
|
||||
$sql = " insert into {$g4['shop_sendcost_table']}
|
||||
( sc_name, sc_zip1, sc_zip2, sc_amount )
|
||||
values
|
||||
( '$sc_name', '$sc_zip1', '$sc_zip2', '$sc_amount' ) ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./sendcostlist.php?page='.$page);
|
||||
?>
|
||||
117
adm/shop_admin/sendcostzipcode.php
Normal file
117
adm/shop_admin/sendcostzipcode.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
$sub_menu = '400750';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$addr = trim($_GET['addr']);
|
||||
$no = trim($_GET['no']);
|
||||
|
||||
if($addr) {
|
||||
$option_list = '';
|
||||
$zipfile = array();
|
||||
$fp = fopen(G4_BBS_PATH."/zip.db", "r");
|
||||
while(!feof($fp)) {
|
||||
$zipfile[] = fgets($fp, 4096);
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
$search_count = 0;
|
||||
|
||||
while ($zipcode = each($zipfile))
|
||||
{
|
||||
if(strstr(substr($zipcode[1],8,512), $addr))
|
||||
{
|
||||
$address = trim($zipcode[1]);
|
||||
|
||||
$list[$search_count] = $address;
|
||||
|
||||
$search_count++;
|
||||
}
|
||||
}
|
||||
|
||||
if($search_count) {
|
||||
natsort($list);
|
||||
if($no == 2)
|
||||
$list = array_reverse($list);
|
||||
|
||||
$result = array();
|
||||
|
||||
foreach($list as $value) {
|
||||
$code = substr($value, 0, 7);
|
||||
$result[] = '<input type="hidden" name="code[]" value="'.$code.'">'.$value.' <button type="button" class="select_btn">선택</button>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$g4['title'] = "우편번호 찾기";
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
|
||||
<div>
|
||||
<form name="fzipcode" id="fzipcode" method="get">
|
||||
<input type="hidden" name="no" value="<?php echo $no; ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td>우편번호 찾기</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>주소지의 시/군을 입력하세요.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="addr">주소</label>
|
||||
<input type="text" id="addr" name="addr" value="<? echo stripslashes($addr); ?>" size="20" />
|
||||
<input type="submit" value=" 검색 " />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if($search_count) {
|
||||
?>
|
||||
<p>검색결과<p>
|
||||
<ul>
|
||||
<?php
|
||||
for($i=0; $i<$search_count; $i++) {
|
||||
?>
|
||||
<li><?php echo $result[$i]; ?></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<p>검색된 결과가 없습니다.</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#fzipcode").submit(function() {
|
||||
if($.trim($("input[name=addr]").val()) == "") {
|
||||
alert("주소를 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
$(".select_btn").click(function() {
|
||||
var code = $(this).closest("li").find("input[name='code[]']").val();
|
||||
var $opener = window.opener;
|
||||
|
||||
$opener.$("input[name=sc_zip<?php echo $no; ?>]").val(code);
|
||||
window.close();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G4_PATH."/tail.sub.php");
|
||||
?>
|
||||
@ -482,7 +482,7 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
|
||||
/* 회원메일발송 목록 */
|
||||
.td_test, .td_send {width:50px;text-align:center}
|
||||
.td_mng {width:100px;text-align:center}
|
||||
.td_smallmng {width:50px;text-align:center}
|
||||
.td_smallmng {width:70px;text-align:center}
|
||||
|
||||
/* 투표관리 목록 */
|
||||
.td_etc {width:80px;text-align:center}
|
||||
@ -524,6 +524,8 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
|
||||
.td_time {width:150px;text-align:center}
|
||||
.td_boolean {width:50px;text-align:center}
|
||||
.td_pt {text-align:right !important}
|
||||
.td_sendcost_by {width:50px;text-align:center}
|
||||
.td_payby {width:80px;text-align:center}
|
||||
|
||||
.td_tdiv {border-bottom:1px solid #c9c9c9 !important}
|
||||
.txt_true {color:#e8180c}
|
||||
|
||||
@ -312,4 +312,20 @@ if(!$result) {
|
||||
ADD `od_receipt_amount` INT(11) NOT NULL DEFAULT '0' AFTER `od_temp_point`,
|
||||
ADD `od_receipt_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `od_bank_account` ", false);
|
||||
}
|
||||
|
||||
// 추가배송비 테이블
|
||||
$sql = " select sc_id from {$g4['shop_sendcost_table']} limit 1 ";
|
||||
$result = sql_query($sql, false);
|
||||
if(!$result) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g4['shop_sendcost_table']}` (
|
||||
`sc_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`sc_name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`sc_zip1` VARCHAR(10) NOT NULL DEFAULT '',
|
||||
`sc_zip2` VARCHAR(10) NOT NULL DEFAULT '',
|
||||
`sc_amount` INT(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`sc_id`),
|
||||
KEY `sc_zip1` (`sc_zip1`),
|
||||
KEY `sc_zip2` (`sc_zip2`)
|
||||
)", true);
|
||||
}
|
||||
?>
|
||||
@ -494,6 +494,7 @@ if($shop_install) {
|
||||
fwrite($f, "\$g4['shop_wish_table'] = SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블\n");
|
||||
fwrite($f, "\$g4['shop_mileage_table'] = SHOP_TABLE_PREFIX.'mileage'; // 마일리지 테이블\n");
|
||||
fwrite($f, "\$g4['shop_coupon_table'] = SHOP_TABLE_PREFIX.'coupon'; // 쿠폰정보 테이블\n");
|
||||
fwrite($f, "\$g4['shop_sendcost_table'] = SHOP_TABLE_PREFIX.'sendcost'; // 추가배송비 테이블\n");
|
||||
fwrite($f, "?>");
|
||||
}
|
||||
|
||||
|
||||
@ -652,6 +652,26 @@ CREATE TABLE IF NOT EXISTS `shop_mileage` (
|
||||
KEY `mb_id` (`mb_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `shop_sendcost`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `shop_sendcost`;
|
||||
CREATE TABLE IF NOT EXISTS `shop_sendcost` (
|
||||
`sc_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`sc_name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`sc_zip1` VARCHAR(10) NOT NULL DEFAULT '',
|
||||
`sc_zip2` VARCHAR(10) NOT NULL DEFAULT '',
|
||||
`sc_amount` INT(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`sc_id`),
|
||||
KEY `sc_zip1` (`sc_zip1`),
|
||||
KEY `sc_zip2` (`sc_zip2`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `shop_wish`
|
||||
--
|
||||
|
||||
@ -352,7 +352,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
// 현금영수증 발급을 사용하는 경우에만
|
||||
if ($default['de_taxsave_use']) {
|
||||
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
|
||||
if ($misu_amount == 0 && $od['od_receipt_bank'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
|
||||
if ($misu_amount == 0 && $od['od_receipt_amount'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
|
||||
if ($default['de_card_pg'] == 'kcp') {
|
||||
?>
|
||||
<tr>
|
||||
|
||||
@ -1,106 +0,0 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
$w = substr($_REQUEST['w'],0,1);
|
||||
$it_id = substr($_REQUEST['it_id'],0,10);
|
||||
$is_id = (int)$_REQUEST['is_id'];
|
||||
|
||||
if (!$is_member) {
|
||||
alert_close("사용후기는 회원만 평가가 가능합니다.");
|
||||
}
|
||||
|
||||
if ($w == "") {
|
||||
$is_score = 10;
|
||||
} else if ($w == "u") {
|
||||
$ps = sql_fetch(" select * from {$g4['shop_item_ps_table']} where is_id = '$is_id' ");
|
||||
if (!$ps) {
|
||||
alert_close("사용후기 정보가 없습니다.");
|
||||
}
|
||||
|
||||
$it_id = $ps['it_id'];
|
||||
$is_score = $ps['is_score'];
|
||||
}
|
||||
|
||||
if ($w == "u") {
|
||||
if (!$is_admin && $ps['mb_id'] != $member['mb_id']) {
|
||||
alert_close("자신의 사용후기만 수정이 가능합니다.");
|
||||
}
|
||||
}
|
||||
|
||||
include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$captcha_html = captcha_html();
|
||||
?>
|
||||
<style>
|
||||
ul {list-style:none;margin:0px;padding:0px;}
|
||||
label {width:130px;vertical-align:top;padding:3px 0;}
|
||||
</style>
|
||||
|
||||
<div style="padding:10px;">
|
||||
<form name="fitemuse" method="post" onsubmit="return fitemuse_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
|
||||
<input type="hidden" name="is_id" value="<?php echo $is_id; ?>">
|
||||
<fieldset style="padding:0 10px 10px;">
|
||||
<legend><strong>사용후기 쓰기</strong></legend>
|
||||
<ul style="padding:10px;">
|
||||
<li>
|
||||
<label for="is_subject">제목</label>
|
||||
<input type='text' id='is_subject' name='is_subject' size='100' class='ed' minlength='2' required itemname='제목' value='<?php echo get_text($ps['is_subject']); ?>'>
|
||||
</li>
|
||||
<li>
|
||||
<label for="" style="width:200px;">내용</label>
|
||||
<?php echo editor_html('is_content', $ps['is_content']); ?>
|
||||
</li>
|
||||
<li>
|
||||
<label>평가</label>
|
||||
<input type=radio name=is_score value='10' <?php echo ($is_score==10)?"checked='checked'":""; ?>><img src='<?php echo G4_SHOP_URL; ?>/img/star5.gif' align=absmiddle>
|
||||
<input type=radio name=is_score value='8' <?php echo ($is_score==8)?"checked='checked'":""; ?>><img src='<?php echo G4_SHOP_URL; ?>/img/star4.gif' align=absmiddle>
|
||||
<input type=radio name=is_score value='6' <?php echo ($is_score==6)?"checked='checked'":""; ?>><img src='<?php echo G4_SHOP_URL; ?>/img/star3.gif' align=absmiddle>
|
||||
<input type=radio name=is_score value='4' <?php echo ($is_score==4)?"checked='checked'":""; ?>><img src='<?php echo G4_SHOP_URL; ?>/img/star2.gif' align=absmiddle>
|
||||
<input type=radio name=is_score value='2' <?php echo ($is_score==2)?"checked='checked'":""; ?>><img src='<?php echo G4_SHOP_URL; ?>/img/star1.gif' align=absmiddle>
|
||||
</li>
|
||||
<li>
|
||||
<label style="vertical-align:middle;"></label>
|
||||
<?php echo $captcha_html; ?>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="submit" value=" 확 인 ">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
self.focus();
|
||||
|
||||
function fitemuse_submit(f)
|
||||
{
|
||||
if (document.getElementById('tx_is_content')) {
|
||||
var len = ed_is_content.inputLength();
|
||||
if (len == 0) {
|
||||
alert('내용을 입력하십시오.');
|
||||
ed_is_content.returnFalse();
|
||||
return false;
|
||||
} else if (len > 5000) {
|
||||
alert('내용은 5000글자 까지만 입력해 주세요.');
|
||||
ed_is_content.returnFalse();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
<?php echo get_editor_js('is_content'); ?>
|
||||
|
||||
<?php echo chk_captcha_js(); ?>
|
||||
|
||||
f.action = "./itemusewinupdate.php";
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#is_subject").focus();
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,73 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
if (!$is_member) {
|
||||
alert_close("사용후기는 회원만 평가가 가능합니다.");
|
||||
}
|
||||
|
||||
$is_subject = trim($_REQUEST['is_subject']);
|
||||
$is_content = trim($_REQUEST['is_content']);
|
||||
|
||||
if ($w == '' || $w == 'u') {
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
$is_name = $member['mb_name'];
|
||||
$is_password = $member['mb_password'];
|
||||
|
||||
if (!$is_subject) alert("제목을 입력하여 주십시오.");
|
||||
if (!$is_content) alert("내용을 입력하여 주십시오.");
|
||||
}
|
||||
|
||||
$url = "./item.php?it_id=$it_id";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
$max_is_id = $row['max_is_id'];
|
||||
|
||||
$sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']} where it_id = '$it_id' and mb_id = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['max_is_id'] && $row['max_is_id'] == $max_is_id)
|
||||
alert("같은 상품에 대하여 계속해서 평가하실 수 없습니다.");
|
||||
|
||||
$sql = "insert {$g4['shop_item_ps_table']}
|
||||
set it_id = '$it_id',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
is_score = '$is_score',
|
||||
is_name = '$is_name',
|
||||
is_password = '$is_password',
|
||||
is_subject = '$is_subject',
|
||||
is_content = '$is_content',
|
||||
is_time = '".G4_TIME_YMDHIS."',
|
||||
is_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
if (!$default['de_item_ps_use'])
|
||||
$sql .= ", is_confirm = '1' ";
|
||||
sql_query($sql);
|
||||
|
||||
if ($default['de_item_ps_use']) {
|
||||
alert_opener("평가하신 글은 관리자가 확인한 후에 표시됩니다.", $url);
|
||||
} else {
|
||||
alert_opener("사용후기가 등록 되었습니다.", $url);
|
||||
}
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " select is_password from {$g4['shop_item_ps_table']} where is_id = '$is_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['is_password'] != $is_password)
|
||||
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
|
||||
|
||||
$sql = " update {$g4['shop_item_ps_table']}
|
||||
set is_subject = '$is_subject',
|
||||
is_content = '$is_content',
|
||||
is_score = '$is_score'
|
||||
where is_id = '$is_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert_opener("사용후기가 수정 되었습니다.", $url);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user