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

Conflicts:
	shop/item.php
	shop/itemqa.php
	shop/itemqaform.php
	shop/itemqaformupdate.php
This commit is contained in:
gnuboard
2013-06-18 11:03:20 +09:00
61 changed files with 1010 additions and 780 deletions

View File

@ -58,7 +58,7 @@ include_once('./admin.head.php');
if ($w=='') if ($w=='')
echo '영문자, 숫자, _ 만 가능 (공백없이)'; echo '영문자, 숫자, _ 만 가능 (공백없이)';
else else
echo '<a href="'.G4_BBS_URL.'/group.php?gr_id='.$group['gr_id'].'">게시판그룹 바로가기</a>'; echo '<a href="'.G4_BBS_URL.'/group.php?gr_id='.$group['gr_id'].'" class="btn_frmline">게시판그룹 바로가기</a>';
?> ?>
</td> </td>
</tr> </tr>
@ -68,7 +68,7 @@ include_once('./admin.head.php');
<input type="text" name="gr_subject" value="<?php echo get_text($group['gr_subject']) ?>" id="gr_subject" required class="required frm_input" size="80"> <input type="text" name="gr_subject" value="<?php echo get_text($group['gr_subject']) ?>" id="gr_subject" required class="required frm_input" size="80">
<?php <?php
if ($w == 'u') if ($w == 'u')
echo '<a href="./board_form.php?gr_id='.$gr_id.'">게시판생성</a>'; echo '<a href="./board_form.php?gr_id='.$gr_id.'" class="btn_frmline">게시판생성</a>';
?> ?>
</td> </td>
</tr> </tr>

View File

@ -1,243 +0,0 @@
<?
$sub_menu = "300300";
include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w");
$html_title = "다이얼로그";
if ($w == "u")
{
$html_title .= " 수정";
$sql = " select * from $g4[dialog_table] where di_id = '$di_id' ";
$di = sql_fetch($sql);
if (!$di[di_id]) alert("등록된 자료가 없습니다.");
}
else
{
$html_title .= " 입력";
$di[di_disable_hours] = 24;
$di[di_speeds] = 0;
$di[di_width] = 0;
$di[di_height] = 0;
$di[di_draggable] = true;
$di[di_escape] = true;
}
$g4[title] = $html_title;
include_once ("$g4[admin_path]/admin.head.php");
?>
<?=subtitle($html_title)?>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('di_content', '100%', '350');?>
<form name=fdialog method=post action="#" onsubmit="return fdialog_check(this);" style="margin:0px;">
<input type=hidden name=w value='<? echo $w ?>'>
<input type=hidden name=di_id value='<? echo $di_id ?>'>
<table cellpadding=0 cellspacing=0 width=100%>
<colgroup width=15%>
<colgroup width=35% bgcolor=#ffffff>
<colgroup width=15%>
<colgroup width=35% bgcolor=#ffffff>
<tr><td colspan=4 height=2 bgcolor=#0E87F9></td></tr>
<tr class=ht>
<td>테마</td>
<td colspan=3>
<select name=di_ui_theme>
<option value='base'>기본</option>
<option value='black-tie'>black-tie</option>
<option value='blitzer'>blitzer</option>
<option value='cupertino'>cupertino</option>
<option value='dark-hive'>dark-hive</option>
<option value='dot-luv'>dot-luv</option>
<option value='eggplant'>eggplant</option>
<option value='excite-bike'>excite-bike</option>
<option value='flick'>flick</option>
<option value='hot-sneaks'>hot-sneaks</option>
<option value='humanity'>humanity</option>
<option value='le-frog'>le-frog</option>
<option value='mint-choc'>mint-choc</option>
<option value='overcast'>overcast</option>
<option value='pepper-grinder'>pepper-grinder</option>
<option value='redmond'>redmond</option>
<option value='smoothness'>smoothness</option>
<option value='south-street'>south-street</option>
<option value='start'>start</option>
<option value='sunny'>sunny</option>
<option value='swanky-purse'>swanky-purse</option>
<option value='trontastic'>trontastic</option>
<option value='ui-darkness'>ui-darkness</option>
<option value='ui-lightness'>ui-lightness</option>
<option value='vader'>vader</option>
</select>
<script> document.fdialog.di_ui_theme.value = "<?=$di[di_ui_theme]?>"; </script>
<a href="http://jqueryui.com/themeroller/" target="_blank">http://jqueryui.com/themeroller/</a> 의 Gallery 참고
</td>
</tr>
<tr class=ht>
<td>시간</td>
<td colspan=3>
<input type=text name=di_disable_hours class=ed value="<?=$di[di_disable_hours]?>" size=5> 동안 창을 다시 띄우지 않음
</td>
</tr>
<tr class=ht>
<td>시작일시</td>
<td>
<input type=text class=ed name=di_begin_time size=21 maxlength=19 value='<? echo $di[di_begin_time] ?>' required itemname="시작일시">
<input type=checkbox name=di_begin_chk value="<? echo date("Y-m-d 00:00:00", $g4[server_time]); ?>" onclick="if (this.checked == true) this.form.di_begin_time.value=this.form.di_begin_chk.value; else this.form.di_begin_time.value = this.form.di_begin_time.defaultValue;">오늘
<td>종료일시</td>
<td>
<input type=text class=ed name=di_end_time size=21 maxlength=19 value='<? echo $di[di_end_time] ?>' required itemname="종료일시">
<input type=checkbox name=di_end_chk value="<? echo date("Y-m-d 23:59:59", $g4[server_time]+(60*60*24*7)); ?>" onclick="if (this.checked == true) this.form.di_end_time.value=this.form.di_end_chk.value; else this.form.di_end_time.value = this.form.di_end_time.defaultValue;">오늘+7일
</tr>
<tr class=ht>
<td>출력 스피드</td>
<td colspan=3>
<input type=text class=ed name=di_speeds size=5 value='<?=$di[di_speeds]?>'>
<?=help("0 이 가장 빠르고 숫자가 높으면 창의 출력 및 닫기 속도가 느려짐");?>
예) 1000
</td>
</tr>
<tr class=ht>
<td>창위치</td>
<td>
<select name=di_position_sel>
<option value="">직접입력</option>
<option value="['top']">top</option>
<option value="['left']">left</option>
<option value="['center']">center</option>
<option value="['right']">right</option>
<option value="['bottom']">bottom</option>
</select>
<input type=text name=di_position class=ed value="<?=$di[di_position]?>">
<?=help("입력이 없으면 중앙에 출력합니다.<br><br>왼쪽, 상단을 [100,50] 과 같이 입력하거나, ['right','top'] 과 같이 입력할 수 있습니다.");?>
</td>
<td>창 드래그</td>
<td>
<input type=checkbox name=di_draggable value='1' <?=($di[di_draggable]?"checked":"");?>> 가능
<?=help("창을 드래그 할 수 있음");?>
</td>
</tr>
<tr class=ht>
<td>창크기 폭</td>
<td>
<input type=text class=ed name=di_width size=5 value='<? echo $di[di_width] ?>' required itemname="창크기폭"> px
<?=help("0 으로 설정하면 폭을 자동으로 맞춥니다.");?>
</td>
<td>창크기 높이</td>
<td>
<input type=text class=ed name=di_height size=5 value='<? echo $di[di_height] ?>' required itemname="창크기높이"> px
<?=help("0 으로 설정하면 높이를 자동으로 맞춥니다.");?>
</td>
</tr>
<tr class=ht>
<td>modal</td>
<td>
<input type=checkbox name=di_modal value='1' <?=($di[di_modal]?"checked":"");?>> 사용
<?=help("창을 닫기전에는 부모창을 선택할 수 없음");?>
</td>
<td>사이즈 조절 가능</td>
<td>
<input type=checkbox name=di_resizable value='1' <?=($di[di_resizable]?"checked":"");?>> 사용
<?=help("창의 리사이즈가 가능하게 할때 사용합니다.");?>
</td>
</tr>
<tr class=ht>
<td>show</td>
<td>
<!-- http://docs.jquery.com/UI/Effects/ -->
<select name=di_show>
<option value=''>기본</option>
<option value='blind'>blind</option>
<option value='clip'>clip</option>
<option value='drop'>drop</option>
<option value='explode'>explode</option>
<option value='fade'>fade</option>
<option value='fold'>fold</option>
<option value='puff'>puff</option>
<option value='slide'>slide</option>
<option value='scale'>scale</option>
<option value='bounce'>bounce</option>
<option value='highlight'>highlight</option>
<option value='pulsate'>pulsate</option>
<option value='shake'>shake</option>
<option value='size'>size</option>
<option value='transfer'>transfer</option>
</select>
<script> document.fdialog.di_show.value = "<?=$di[di_show]?>"; </script>
<?=help("창이 보여지는 효과");?>
</td>
<td>hide</td>
<td>
<select name=di_hide>
<option value=''>기본</option>
<option value='blind'>blind</option>
<option value='clip'>clip</option>
<option value='drop'>drop</option>
<option value='explode'>explode</option>
<option value='fade'>fade</option>
<option value='fold'>fold</option>
<option value='puff'>puff</option>
<option value='slide'>slide</option>
<option value='scale'>scale</option>
<option value='bounce'>bounce</option>
<option value='highlight'>highlight</option>
<option value='pulsate'>pulsate</option>
</select>
<script> document.fdialog.di_hide.value = "<?=$di[di_hide]?>"; </script>
<?=help("창이 가려지는 효과");?>
</td>
</tr>
<tr class=ht>
<td>ESC</td>
<td>
<input type=checkbox name=di_escape value='1' <?=($di[di_escape]?"checked":"");?>> 사용
<?=help("ESC 키를 누르면 창이 닫힙니다.");?>
</td>
<td>zIndex</td>
<td>
<input type=text name=di_zindex class=ed value="<?=$di[di_zindex]?>" size=10>
<?=help("창이 출력되는 순서. 숫자가 높을수록 우선 출력됨.");?>
</td>
</tr>
<tr class=ht>
<td>창제목</td>
<td colspan=3><input type=text class=ed name=di_subject style="width:99%;" value='<? echo stripslashes($di[di_subject]) ?>' required itemname="제목"></td>
</tr>
<tr>
<td>내용</td>
<td colspan=3 style='padding-top:5px; padding-bottom:5px;'><?=cheditor2('di_content', $di[di_content]);?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=CCCCCC></td></tr>
</table>
<p align=center>
<input type=submit class=btn1 accesskey='s' value=' 확 인 '>&nbsp;
<input type=button class=btn1 accesskey='l' value=' 목 록 ' onclick="document.location.href='./dialog_list.php';">
</form>
<script type="text/javascript">
function fdialog_check(f)
{
<?=cheditor3('di_content');?>
f.action = "./dialog_form_update.php";
return true;
}
document.fdialog.di_subject.focus();
$(function() {
$("[name=di_position_sel]").bind("change", function() {
if ($(this).val()) {
$("[name='di_position']").val( $(this).val() );
}
});
});
</script>
<?
include_once ("$g4[admin_path]/admin.tail.php");
?>

View File

@ -1,61 +0,0 @@
<?
$sub_menu = "300300";
include_once("./_common.php");
if ($w == "u" || $w == "d")
check_demo();
if ($W == 'd')
auth_check($auth[$sub_menu], "d");
else
auth_check($auth[$sub_menu], "w");
$sql_common = " di_ui_theme = '$di_ui_theme',
di_begin_time = '$di_begin_time',
di_end_time = '$di_end_time',
di_subject = '".addslashes($di_subject)."',
di_content = '".addslashes($di_content)."',
di_speeds = '$di_speeds',
di_disable_hours = '$di_disable_hours',
di_position = '$di_position',
di_draggable = '$di_draggable',
di_height = '$di_height',
di_width = '$di_width',
di_modal = '$di_modal',
di_resizable = '$di_resizable',
di_show = '$di_show',
di_hide = '$di_hide',
di_escape = '$di_escape',
di_zindex = '$di_zindex'
";
if($w == "")
{
$sql = " alter table $g4[dialog_table] auto_increment=1 ";
sql_query($sql);
$sql = " insert $g4[dialog_table] set $sql_common ";
sql_query($sql);
$di_id = mysql_insert_id();
}
else if ($w == "u")
{
$sql = " update $g4[dialog_table] set $sql_common where di_id = '$di_id' ";
sql_query($sql);
}
else if ($w == "d")
{
$sql = " delete from $g4[dialog_table] where di_id = '$di_id' ";
sql_query($sql);
}
if ($w == "d")
{
goto_url("./dialog_list.php");
}
else
{
goto_url("./dialog_form.php?w=u&di_id=$di_id");
}
?>

View File

@ -1,114 +0,0 @@
<?
$sub_menu = "300300";
include_once("./_common.php");
auth_check($auth[$sub_menu], "r");
$g4[title] = "다이얼로그관리";
include_once ("$g4[admin_path]/admin.head.php");
$sql_common = " from $g4[dialog_table] ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql, false);
if (!$row) {
sql_query("
CREATE TABLE IF NOT EXISTS `$g4[dialog_table]` (
`di_id` int(11) NOT NULL auto_increment,
`di_ui_theme` varchar(255) NOT NULL,
`di_begin_time` datetime NOT NULL,
`di_end_time` datetime NOT NULL,
`di_subject` varchar(255) NOT NULL,
`di_content` text NOT NULL,
`di_speeds` int(11) NOT NULL,
`di_position` varchar(255) NOT NULL,
`di_draggable` tinyint(4) NOT NULL,
`di_width` smallint(6) NOT NULL,
`di_height` smallint(6) NOT NULL,
`di_modal` tinyint(4) NOT NULL,
`di_resizable` tinyint(4) NOT NULL,
`di_disable_hours` tinyint(4) NOT NULL,
`di_show` varchar(255) NOT NULL,
`di_hide` varchar(255) NOT NULL,
`di_escape` tinyint(4) NOT NULL,
`di_zindex` int(11) NOT NULL,
PRIMARY KEY (`di_id`)
)");
}
$total_count = $row[cnt];
$sql = "select * $sql_common order by di_id desc ";
$result = sql_query($sql);
?>
<table width=100%>
<tr>
<td width=20%>&nbsp;</td>
<td width=60% align=center>&nbsp;</td>
<td width=20% align=right>건수 : <? echo $total_count ?>&nbsp;</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 width=100% border=0>
<colgroup width=40>
<colgroup width=100>
<colgroup width=100>
<colgroup width=40>
<colgroup width=50>
<colgroup width=50>
<colgroup width=50>
<colgroup width=50>
<colgroup width=''>
<colgroup width=100>
<tr><td colspan=10 height=2 bgcolor=#0E87F9></td></tr>
<tr align=center class=ht>
<td>번호</td>
<td>시작일시</td>
<td>종료일시</td>
<td>modal</td>
<td>ESC</td>
<td>위치</td>
<td>Height</td>
<td>Width</td>
<td>제목</td>
<td><a href='./dialog_form.php'><img src='<?=$g4[admin_path]?>/img/icon_insert.gif' border=0></a></td>
</tr>
<tr><td colspan=10 height=1 bgcolor=#CCCCCC></td></tr>
<?
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$s_mod = icon("수정", "./dialog_form.php?w=u&di_id=$row[di_id]");
$s_del = icon("삭제", "javascript:del('./dialog_form_update.php?w=d&di_id=$row[di_id]');");
$s_vie = icon("보기", "./dialog_view.php?di_id=$row[di_id]");
$list = $i%2;
echo "
<tr class='list$list center ht'>
<td>$row[di_id]</td>
<td>".substr($row['di_begin_time'],2,14)."</td>
<td>".substr($row['di_end_time'],2,14)."</td>
<td>$row[di_modal]</td>
<td>$row[di_escape]</td>
<td align=left>$row[di_position]</td>
<td>$row[di_height]</td>
<td>$row[di_width]</td>
<td align=left>$row[di_subject]</td>
<td>$s_mod $s_del $s_vie</td>
</tr>";
}
if ($i == 0) {
echo "<tr><td colspan=10 align=center height=100 bgcolor=#ffffff><span class=point>자료가 한건도 없습니다.</span></td></tr>\n";
}
?>
<tr><td colspan=10 height=1 bgcolor=CCCCCC></td></tr>
</table>
<p>* 같은 페이지에 다이얼로그 창이 2개 이상 뜨는 경우 나중에 설정한 테마가 적용됩니다.</p>
<?
include_once ("$g4[admin_path]/admin.tail.php");
?>

View File

@ -1,16 +0,0 @@
<?
$sub_menu = "300300";
include_once("./_common.php");
auth_check($auth[$sub_menu], "r");
$g4[title] = "다이얼로그관리";
include_once ("$g4[admin_path]/admin.head.php");
$dialog_id = "dialog_".$di_id;
$_COOKIE[$dialog_id] = "";
echo g4_dialog((int)$_GET[di_id]);
include_once ("$g4[admin_path]/admin.tail.php");
?>

View File

@ -101,7 +101,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
</section> </section>
<p><?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?></p> <p><?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?></p>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -188,7 +188,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
</form> </form>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section> </section>

View File

@ -803,6 +803,13 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_guest_cart_use" value="1" id="de_guest_cart_use"<?php echo $default['de_guest_cart_use']?' checked':''; ?>> 사용 <input type="checkbox" name="de_guest_cart_use" value="1" id="de_guest_cart_use"<?php echo $default['de_guest_cart_use']?' checked':''; ?>> 사용
</td> </td>
</tr> </tr>
<tr>
<th scope="row"><label for="de_tax_flag_use">복합과세 결제</label></th>
<td>
<?php echo help("복합과세(과세, 비과세) 결제를 사용하려면 체크하십시오.\n복합과세 결제를 사용하기 전 KCP에 결제 신청을 해주셔야 합니다."); ?>
<input type="checkbox" name="de_tax_flag_use" value="1" id="de_tax_flag_use"<?php echo $default['de_tax_flag_use']?' checked':''; ?>> 사용
</td>
</tr>
<tr> <tr>
<th scope="row">비회원에 대한<br/>개인정보수집 내용</th> <th scope="row">비회원에 대한<br/>개인정보수집 내용</th>
<td><?php echo editor_html('de_guest_privacy', $default['de_guest_privacy']); ?></td> <td><?php echo editor_html('de_guest_privacy', $default['de_guest_privacy']); ?></td>

View File

@ -133,7 +133,7 @@ $sql = " update {$g4['shop_default_table']}
de_sms_use4 = '$de_sms_use4', de_sms_use4 = '$de_sms_use4',
de_sms_use5 = '$de_sms_use5', de_sms_use5 = '$de_sms_use5',
de_sms_hp = '$de_sms_hp', de_sms_hp = '$de_sms_hp',
de_item_use_use = '$de_item_use_use', de_item_use_use = '$de_item_use_use',
de_code_dup_use = '$de_code_dup_use', de_code_dup_use = '$de_code_dup_use',
de_cart_keep_term = '$de_cart_keep_term', de_cart_keep_term = '$de_cart_keep_term',
de_guest_cart_use = '$de_guest_cart_use', de_guest_cart_use = '$de_guest_cart_use',
@ -149,7 +149,8 @@ $sql = " update {$g4['shop_default_table']}
de_taxsave_use = '$de_taxsave_use', de_taxsave_use = '$de_taxsave_use',
de_guest_privacy = '$de_guest_privacy', de_guest_privacy = '$de_guest_privacy',
de_hp_use = '$de_hp_use', de_hp_use = '$de_hp_use',
de_escrow_use = '$de_escrow_use' de_escrow_use = '$de_escrow_use',
de_tax_flag_use = '$de_tax_flag_use'
"; ";
sql_query($sql); sql_query($sql);

View File

@ -61,7 +61,7 @@ $result = sql_query($sql);
</table> </table>
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -77,7 +77,7 @@ $result = sql_query($sql);
</table> </table>
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -134,7 +134,7 @@ $pg_anchor = '<ul class="anchor">
</tr> </tr>
<?php <?php
} }
if ($i == 0) echo '<tr><td colspan="5">자료가 없습니다.</td></tr>'; if ($i == 0) echo '<tr><td colspan="5" class="empty_table">자료가 없습니다.</td></tr>';
?> ?>
</tbody> </tbody>
</table> </table>

View File

@ -203,7 +203,7 @@ if (isset($ev_set)) {
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<script> <script>
function fitemeventlistupdatecheck(f) function fitemeventlistupdatecheck(f)

View File

@ -286,7 +286,7 @@ $pg_anchor ='<ul class="anchor">
<label for="chk_all_it_origin">전체적용</label> <label for="chk_all_it_origin">전체적용</label>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="it_brand">브랜드</label></th> <th scope="row"><label for="it_brand">브랜드</label></th>
<td> <td>
<?php echo help("입력하지 않으면 상품상세페이지에 출력하지 않습니다."); ?> <?php echo help("입력하지 않으면 상품상세페이지에 출력하지 않습니다."); ?>
@ -299,7 +299,7 @@ $pg_anchor ='<ul class="anchor">
<label for="chk_all_it_brand">전체적용</label> <label for="chk_all_it_brand">전체적용</label>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="it_model">모델</label></th> <th scope="row"><label for="it_model">모델</label></th>
<td> <td>
<?php echo help("입력하지 않으면 상품상세페이지에 출력하지 않습니다."); ?> <?php echo help("입력하지 않으면 상품상세페이지에 출력하지 않습니다."); ?>
@ -312,6 +312,22 @@ $pg_anchor ='<ul class="anchor">
<label for="chk_all_it_model">전체적용</label> <label for="chk_all_it_model">전체적용</label>
</td> </td>
</tr> </tr>
<tr>
<th scope="row"><label for="it_notax">상품과세 유형</label></th>
<td>
<?php echo help("상품의 과세유형(과세, 비과세)을 설정합니다."); ?>
<select name="it_notax" id="it_notax">
<option value="0"<?php echo get_selected('0', $it['it_notax']); ?>>과세</option>
<option value="1"<?php echo get_selected('1', $it['it_notax']); ?>>비과세</option>
</select>
</td>
<td class="group_setting">
<input type="checkbox" name="chk_ca_it_notax" value="1" id="chk_ca_it_notax">
<label for="chk_ca_it_notax">분류적용</label>
<input type="checkbox" name="chk_all_it_notax" value="1" id="chk_all_it_notax">
<label for="chk_all_it_notax">전체적용</label>
</td>
</tr>
<?php <?php
$opt_subject = explode(',', $it['it_option_subject']); $opt_subject = explode(',', $it['it_option_subject']);
?> ?>

View File

@ -283,6 +283,7 @@ $sql_common = " ca_id = '$ca_id',
it_price = '$it_price', it_price = '$it_price',
it_point = '$it_point', it_point = '$it_point',
it_point_type = '$it_point_type', it_point_type = '$it_point_type',
it_notax = '$it_notax',
it_sell_email = '$it_sell_email', it_sell_email = '$it_sell_email',
it_use = '$it_use', it_use = '$it_use',
it_stock_qty = '$it_stock_qty', it_stock_qty = '$it_stock_qty',

View File

@ -238,7 +238,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<script> <script>
function fitemlist_submit(f) function fitemlist_submit(f)

View File

@ -152,7 +152,7 @@ if ($sfl || $stx) // 검색 결과일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -169,7 +169,7 @@ if ($fr_date || $to_date) // 검색렬일 때만 처음 버튼을 보여줌
</table> </table>
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr1&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr1&amp;page="); ?>
<?php <?php

View File

@ -184,7 +184,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -195,7 +195,7 @@ if ($stx) // 검색 결과일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -183,7 +183,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<script> <script>
function fitemuselist_submit(f) function fitemuselist_submit(f)

View File

@ -217,7 +217,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -128,7 +128,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -243,8 +243,8 @@ $pg_anchor = '<ul class="anchor">
<?php echo $pg_anchor; ?> <?php echo $pg_anchor; ?>
<?php <?php
// 주문금액 = 상품구입금액 + 배송비 // 주문금액 = 상품구입금액 + 배송비 + 추가배송비
$amount['정상'] = $t_ct_amount['정상'] + $od['od_send_cost']; $amount['정상'] = $t_ct_amount['정상'] + $od['od_send_cost'] + $od['od_send_cost2'];
// 입금액 = 결제금액 + 포인트 // 입금액 = 결제금액 + 포인트
$amount['입금'] = $od['od_receipt_amount'] + $od['od_receipt_point']; $amount['입금'] = $od['od_receipt_amount'] + $od['od_receipt_point'];
@ -430,6 +430,12 @@ $pg_anchor = '<ul class="anchor">
<input type="text" name="od_send_cost" value="<?php echo $od['od_send_cost']; ?>" id="od_send_cost" class="frm_input" size="10"> 원 <input type="text" name="od_send_cost" value="<?php echo $od['od_send_cost']; ?>" id="od_send_cost" class="frm_input" size="10"> 원
</td> </td>
</tr> </tr>
<tr>
<th scope="row"><label for="od_send_cost2">추가배송비</label></th>
<td>
<input type="text" name="od_send_cost2" value="<?php echo $od['od_send_cost2']; ?>" id="od_send_cost2" class="frm_input" size="10"> 원
</td>
</tr>
<?php <?php
if ($amount['미수'] == 0) { if ($amount['미수'] == 0) {
if ($od['od_receipt_amount'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체')) { if ($od['od_receipt_amount'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체')) {

View File

@ -245,7 +245,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</table> </table>
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -312,7 +312,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</table> </table>
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -26,6 +26,8 @@ $sql = " update {$g4['shop_order_table']}
od_invoice_time = '$od_invoice_time' "; od_invoice_time = '$od_invoice_time' ";
if (isset($od_send_cost)) if (isset($od_send_cost))
$sql .= " , od_send_cost = '$od_send_cost' "; $sql .= " , od_send_cost = '$od_send_cost' ";
if (isset($od_send_cost2))
$sql .= " , od_send_cost2 = '$od_send_cost2' ";
$sql .= " where od_id = '$od_id' "; $sql .= " where od_id = '$od_id' ";
sql_query($sql); sql_query($sql);

View File

@ -207,7 +207,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</section> </section>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<?php <?php
include_once (G4_ADMIN_PATH.'/admin.tail.php'); include_once (G4_ADMIN_PATH.'/admin.tail.php');

View File

@ -63,8 +63,8 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="1" title="내역선택"> <input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="1" title="내역선택">
</td> </td>
<td><?php echo $row['sc_name']; ?></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 class="td_bigpostal"><?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> <td class="td_sendcost_add"><?php echo number_format($row['sc_amount']); ?></td>
</tr> </tr>
<?php <?php
} }
@ -84,7 +84,7 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<section id="point_mng" class="cbox"> <section id="sendcost_postal" class="cbox">
<h2>추가배송비 등록</h2> <h2>추가배송비 등록</h2>
<form name="fsendcost2" method="post" id="fsendcost2" action="./sendcostupdate.php" autocomplete="off"> <form name="fsendcost2" method="post" id="fsendcost2" action="./sendcostupdate.php" autocomplete="off">
@ -104,14 +104,14 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<th scope="row"><label for="sc_zip1">우편번호 시작<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="sc_zip1">우편번호 시작<strong class="sound_only">필수</strong></label></th>
<td> <td>
<input type="text" name="sc_zip1" id="sc_zip1" required class="required frm_input" size="10"> <input type="text" name="sc_zip1" id="sc_zip1" required class="required frm_input" size="10">
<button type="button" class="sch_zipcode">우편번호검색</button> <button type="button" class="sch_zipcode btn_frmline">우편번호검색</button>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="sc_zip2">우편번호 끝<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="sc_zip2">우편번호 끝<strong class="sound_only">필수</strong></label></th>
<td> <td>
<input type="text" name="sc_zip2" id="sc_zip2" required class="required frm_input" size="10"> <input type="text" name="sc_zip2" id="sc_zip2" required class="required frm_input" size="10">
<button type="button" class="sch_zipcode">우편번호검색</button> <button type="button" class="sch_zipcode btn_frmline">우편번호검색</button>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -39,7 +39,7 @@ if($addr) {
foreach($list as $value) { foreach($list as $value) {
$code = substr($value, 0, 7); $code = substr($value, 0, 7);
$result[] = '<input type="hidden" name="code[]" value="'.$code.'">'.$value.' <button type="button" class="select_btn">선택</button>'.PHP_EOL; $result[] = '<input type="hidden" name="code[]" value="'.$code.'">'.$value.' <button type="button" class="select_btn btn_frmline">선택</button>'.PHP_EOL;
} }
} }
} }
@ -49,46 +49,39 @@ include_once(G4_PATH.'/head.sub.php');
?> ?>
<div> <div id="sendcost_postal_win" class="new_win">
<form name="fzipcode" id="fzipcode" method="get"> <h1 id="new_win_title"><?php echo $g4['title']; ?></h1>
<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) { <form name="fzipcode" id="fzipcode" method="get">
?> <input type="hidden" name="no" value="<?php echo $no; ?>">
<p>검색결과<p>
<ul> <p class="new_win_desc">주소지의 시/군을 입력하세요.</p>
<?php
for($i=0; $i<$search_count; $i++) { <fieldset>
?> <label for="addr">주소</label>
<li><?php echo $result[$i]; ?></li> <input type="text" name="addr" value="<?php echo stripslashes($addr); ?>" id="addr" class="frm_input" size="20">
<?php <input type="submit" value=" 검색 " class="btn_frmline">
} </fieldset>
?>
</ul> </form>
<?php
} else { <?php if($search_count) { ?>
?> <strong class="new_win_desc">검색결과</strong>
<p>검색된 결과가 없습니다.</p> <ul>
<?php <?php
} for($i=0; $i<$search_count; $i++) {
?> ?>
<li><?php echo $result[$i]; ?></li>
<?php } ?>
</ul>
<?php } else { ?>
<p class="new_win_desc">검색된 결과가 없습니다.</p>
<?php } ?>
<div class="btn_win">
<a href="javascript:window.close();">창닫기</a>
</div>
</div> </div>
<script> <script>

View File

@ -126,7 +126,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
?> ?>
</tbody> </tbody>
</table> </table>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?> <?php echo get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section> </section>
<?php <?php

View File

@ -43,7 +43,7 @@ h2 {font-size:1.2em}
/* gnb js off */ /* gnb js off */
#gnb {z-index:12;background:#383a3f} #gnb {z-index:12;background:#383a3f}
#gnb h2 {margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden} #gnb h2 {margin:0;padding:0;font-size:0;line-height:0;overflow:hidden}
#gnb_1dul {margin:0 auto;padding:0;width:1000px;zoom:1} #gnb_1dul {margin:0 auto;padding:0;width:1000px;zoom:1}
#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""} #gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1dli {z-index:13;clear:both;zoom:1} .gnb_1dli {z-index:13;clear:both;zoom:1}
@ -61,10 +61,10 @@ h2 {font-size:1.2em}
.gnb_js .gnb_1dli a {color:#fff;text-align:center} .gnb_js .gnb_1dli a {color:#fff;text-align:center}
.gnb_js .gnb_1dli_air a {float:none;background:#f5f6fa;color:#000} .gnb_js .gnb_1dli_air a {float:none;background:#f5f6fa;color:#000}
.gnb_js .gnb_1dli_on a {float:none;background:#fff;color:#000} .gnb_js .gnb_1dli_on a {float:none;background:#fff;color:#000}
.gnb_js .gnb_2dul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden} .gnb_js .gnb_2dul {display:none;position:absolute;top:35px}
.gnb_js .gnb_2dli a {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left} .gnb_js .gnb_2dli a {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
.gnb_1dli_over .gnb_2dul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff} .gnb_1dli_over .gnb_2dul {display:block;left:-1px;width:181px;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_1dli_over2 .gnb_2dul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff} .gnb_1dli_over2 .gnb_2dul {display:block;right:-1px;width:181px;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_js .gnb_grp_style {background:#f7f7f7 !important} .gnb_js .gnb_grp_style {background:#f7f7f7 !important}
.gnb_js .gnb_grp_div {border-top:1px solid #eee} .gnb_js .gnb_grp_div {border-top:1px solid #eee}
@ -494,6 +494,13 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
#anc_bo_extra .group_setting input {margin:0} #anc_bo_extra .group_setting input {margin:0}
#anc_bo_extra label {display:inline-block;width:100px} #anc_bo_extra label {display:inline-block;width:100px}
#anc_bo_extra input {margin-right:10px} #anc_bo_extra input {margin-right:10px}
/* 추가배송비 관리 */
#sendcost_postal {margin-top:50px}
#sendcost_postal_win {}
#sendcost_postal_win fieldset {text-align:center}
#sendcost_postal_win ul {margin:10px auto;padding:5px 10px;width:87%;border-right:1px solid #eee;border-bottom:1px solid #eee;background:#fff;list-style:none}
#sendcost_postal_win li {position:relative;padding:8px 0 6px;border-bottom:1px solid #eee}
#sendcost_postal_win button {position:absolute;top:4px;right:0}
/* 게시판그룹관리 목록 */ /* 게시판그룹관리 목록 */
.tbl_gr_list td {text-align:center} .tbl_gr_list td {text-align:center}
@ -509,6 +516,7 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
.td_category {width:120px;text-align:center} .td_category {width:120px;text-align:center}
.visit_bar {position:relative} .visit_bar {position:relative}
.visit_bar span {position:absolute;top:-8px;left:0;height:15px;background:#ddd} .visit_bar span {position:absolute;top:-8px;left:0;height:15px;background:#ddd}
/* 공통 */ /* 공통 */
.tr_bg {background:#f5f6fa} .tr_bg {background:#f5f6fa}
@ -525,7 +533,10 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
.td_boolean {width:50px;text-align:center} .td_boolean {width:50px;text-align:center}
.td_pt {text-align:right !important} .td_pt {text-align:right !important}
.td_sendcost_by {width:50px;text-align:center} .td_sendcost_by {width:50px;text-align:center}
.td_sendcost_add {width:100px;text-align:center}
.td_payby {width:80px;text-align:center} .td_payby {width:80px;text-align:center}
.td_postal {width:60px;text-align:center}
.td_bigpostal {width:140px;text-align:center}
.td_tdiv {border-bottom:1px solid #c9c9c9 !important} .td_tdiv {border-bottom:1px solid #c9c9c9 !important}
.txt_true {color:#e8180c} .txt_true {color:#e8180c}
@ -552,7 +563,7 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
.new_win_ul:after {display:block;visibility:hidden;clear:both;content:""} .new_win_ul:after {display:block;visibility:hidden;clear:both;content:""}
.new_win_ul li {float:left;margin-left:-1px} .new_win_ul li {float:left;margin-left:-1px}
.new_win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #595959;border-left:1px solid #595959;color:#fff;font-family:"dotum";font-weight:bold;text-decoration:none} .new_win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #595959;border-left:1px solid #595959;color:#fff;font-family:"dotum";font-weight:bold;text-decoration:none}
.new_win_desc {margin:0 auto;width:93%} .new_win_desc {display:block;margin:0 auto;width:93%}
/* 자바스크립트 alert 대안 */ /* 자바스크립트 alert 대안 */
#validation_check {margin:100px auto;width:500px} #validation_check {margin:100px auto;width:500px}

View File

@ -41,7 +41,7 @@ a:active {color:#000;text-decoration:underline}
/* gnb js off */ /* gnb js off */
#gnb {position:relative;margin:-1px 0 0;border-bottom:1px solid #c3c7c5;background:#f0f4f8} #gnb {position:relative;margin:-1px 0 0;border-bottom:1px solid #c3c7c5;background:#f0f4f8}
#gnb h2 {position:absolute;margin:0;padding:0;font-size:0;line-height:0;overflow:hidden} #gnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#gnb_1dul {margin:0 auto;padding:0;width:980px;zoom:1} #gnb_1dul {margin:0 auto;padding:0;width:980px;zoom:1}
#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""} #gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1dli {z-index:10;clear:both;zoom:1} .gnb_1dli {z-index:10;clear:both;zoom:1}
@ -60,10 +60,10 @@ a:active {color:#000;text-decoration:underline}
.gnb_js .gnb_1da {text-align:center} .gnb_js .gnb_1da {text-align:center}
.gnb_js .gnb_1dli_air a {float:none;background:#333;color:#fff} .gnb_js .gnb_1dli_air a {float:none;background:#333;color:#fff}
.gnb_js .gnb_1dli_on a {float:none;background:#333;color:#fff} .gnb_js .gnb_1dli_on a {float:none;background:#333;color:#fff}
.gnb_js .gnb_2dul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden} .gnb_js .gnb_2dul {display:none;position:absolute;top:35px}
.gnb_js .gnb_2da {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left} .gnb_js .gnb_2da {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
.gnb_1dli_over .gnb_2dul {left:0;width:180px;height:auto;background:#fff} .gnb_1dli_over .gnb_2dul {display:block;left:0;background:#fff}
.gnb_1dli_over2 .gnb_2dul {right:0;width:180px;height:auto;background:#fff} .gnb_1dli_over2 .gnb_2dul {display:block;right:0;width:180px;background:#fff}
.gnb_empty {width:100%;height:35px;text-align:center;line-height:2.95em} .gnb_empty {width:100%;height:35px;text-align:center;line-height:2.95em}
@ -125,7 +125,7 @@ a:active {color:#000;text-decoration:underline}
/* 버튼 */ /* 버튼 */
.btn01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc;background:#fafafa;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} .btn01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc;background:#fafafa;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn01:focus, .btn01:hover {text-decoration:none !important} .btn01:focus, .btn01:hover {text-decoration:none !important}
.btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #333;background:#333;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} .btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #000;background:#333;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn02:focus, .btn02:hover {text-decoration:none !important} .btn02:focus, .btn02:hover {text-decoration:none !important}
.btn_confirm {text-align:center} /* 서식단계 진행 */ .btn_confirm {text-align:center} /* 서식단계 진행 */
.btn_submit {padding:0 10px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer} .btn_submit {padding:0 10px;height:24px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
@ -145,7 +145,7 @@ button.btn_frmline {font-size:1em}
/* 게시판용 버튼 */ /* 게시판용 버튼 */
.btn_b01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #d9ded9;background:#f5f6fa;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} .btn_b01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #d9ded9;background:#f5f6fa;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn_b01:focus, .btn_b01:hover {text-decoration:none !important} .btn_b01:focus, .btn_b01:hover {text-decoration:none !important}
.btn_b02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #eee;background:#333;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} .btn_b02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #000;background:#333;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle}
.btn_b02:focus, .btn_b02:hover {text-decoration:none !important} .btn_b02:focus, .btn_b02:hover {text-decoration:none !important}
.btn_admin {display:inline-block;padding:0 10px;height:23px;border:1px solid #e8180c;background:#e8180c;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} /* 관리자 전용 버튼 */ .btn_admin {display:inline-block;padding:0 10px;height:23px;border:1px solid #e8180c;background:#e8180c;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} /* 관리자 전용 버튼 */
.btn_admin:focus, .btn_admin:hover {text-decoration:none !important} .btn_admin:focus, .btn_admin:hover {text-decoration:none !important}

View File

@ -632,7 +632,7 @@ td.empty_table {padding:85px 0;text-align:center}
.sod_option_btn .mod_options {margin:0;padding:3px 0;width:100%;border:0;background:#333;color:#fff} .sod_option_btn .mod_options {margin:0;padding:3px 0;width:100%;border:0;background:#333;color:#fff}
#sod_bsk_list {position:relative} #sod_bsk_list {position:relative}
#sod_bsk_list #mod_option_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f5f6fa;overflow-y:scroll} #sod_bsk_list #mod_option_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f5f6fa;overflow-y:scroll;overflow-x:none}
#sod_bsk_tot {margin:0;padding:10px;border:1px solid #e9e9e9;background:#f5f6fa;zoom:1} #sod_bsk_tot {margin:0;padding:10px;border:1px solid #e9e9e9;background:#f5f6fa;zoom:1}
#sod_bsk_tot:after {display:block;visibility:hidden;clear:both;content:""} #sod_bsk_tot:after {display:block;visibility:hidden;clear:both;content:""}
@ -655,7 +655,7 @@ td.empty_table {padding:85px 0;text-align:center}
#sod_frm h2 {margin:0 0 10px} #sod_frm h2 {margin:0 0 10px}
#sod_list {position:relative} #sod_list {position:relative}
#sod_list #it_coupon_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f5f6fa;overflow-y:scroll} #sod_list #it_coupon_frm {z-index:10000;position:absolute;top:0;left:99px;padding:20px;width:500px;height:auto !important;height:500px;max-height:500px;border:1px solid #000;background:#f5f6fa;overflow-y:scroll;overflow-x:none}
#sod_frm_orderer {margin:20px 0 40px} #sod_frm_orderer {margin:20px 0 40px}

View File

@ -32,13 +32,13 @@ if (G4_HTTPS_DOMAIN) {
define(_MISU_QUERY_, " define(_MISU_QUERY_, "
count(distinct a.od_id) as ordercount, /* 주문서건수 */ count(distinct a.od_id) as ordercount, /* 주문서건수 */
count(b.ct_id) as itemcount, /* 상품건수 */ count(b.ct_id) as itemcount, /* 상품건수 */
(SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost) as orderamount, /* 주문합계 */ (SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost + a.od_send_cost2) as orderamount, /* 주문합계 */
(SUM(b.cp_amount) + a.od_coupon) as couponamount, /* 쿠폰합계*/ (SUM(b.cp_amount) + a.od_coupon) as couponamount, /* 쿠폰합계*/
(SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', (IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)), 0))) as ordercancel, /* 주문취소 */ (SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', (IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)), 0))) as ordercancel, /* 주문취소 */
(a.od_receipt_amount + a.od_receipt_point) as receiptamount, /* 입금합계 */ (a.od_receipt_amount + a.od_receipt_point) as receiptamount, /* 입금합계 */
(a.od_refund_amount + a.od_cancel_card) as receiptcancel, /* 입금취소 */ (a.od_refund_amount + a.od_cancel_card) as receiptcancel, /* 입금취소 */
( (
(SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost) - (SUM(IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)) + a.od_send_cost + a.od_send_cost2) -
(SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', (IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)), 0))) - (SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', (IF(b.io_type = 1, b.io_price * b.ct_qty, (b.ct_price + b.io_price) * b.ct_qty)), 0))) -
a.od_dc_amount - a.od_dc_amount -
(a.od_receipt_amount + a.od_receipt_point) + (a.od_receipt_amount + a.od_receipt_point) +

View File

@ -326,6 +326,24 @@ if(!$result) {
PRIMARY KEY (`sc_id`), PRIMARY KEY (`sc_id`),
KEY `sc_zip1` (`sc_zip1`), KEY `sc_zip1` (`sc_zip1`),
KEY `sc_zip2` (`sc_zip2`) KEY `sc_zip2` (`sc_zip2`)
)", true); )", false);
}
// od_send_cost2 추가
$sql = " select od_send_cost2 from {$g4['shop_order_table']} limit 1 ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g4['shop_order_table']}`
ADD `od_send_cost2` INT(11) NOT NULL DEFAULT '0' AFTER `od_send_coupon` ", false);
}
// 복합과세 필드 추가
$sql = " select de_tax_flag_use from {$g4['shop_default_table']} ";
$result = sql_query($sql, false);
if(!$result) {
sql_query(" ALTER TABLE `{$g4['shop_default_table']}`
ADD `de_tax_flag_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `de_escrow_use` ", false);
sql_query(" ALTER TABLE `{$g4['shop_item_table']}`
ADD `it_notax` TINYINT(4) NOT NULL DEFAULT '0' AFTER `it_point_type` ", false);
} }
?> ?>

View File

@ -284,7 +284,7 @@ if($shop_install) {
de_simg_height = '$simg_height', de_simg_height = '$simg_height',
de_mimg_width = '$mimg_width', de_mimg_width = '$mimg_width',
de_mimg_height = '$mimg_height', de_mimg_height = '$mimg_height',
de_item_ps_use = '1', de_item_use_use = '1',
de_level_sell = '1', de_level_sell = '1',
de_code_dup_use = '1', de_code_dup_use = '1',
de_sms_cont1 = '{이름}님의 회원가입을 축하드립니다.\nID:{회원아이디}\n{회사명}', de_sms_cont1 = '{이름}님의 회원가입을 축하드립니다.\nID:{회원아이디}\n{회사명}',

View File

@ -280,7 +280,7 @@ CREATE TABLE IF NOT EXISTS `shop_default` (
`de_sms_hp` varchar(255) NOT NULL DEFAULT '', `de_sms_hp` varchar(255) NOT NULL DEFAULT '',
`de_kcp_mid` varchar(255) NOT NULL DEFAULT '', `de_kcp_mid` varchar(255) NOT NULL DEFAULT '',
`de_iche_use` tinyint(4) NOT NULL DEFAULT '0', `de_iche_use` tinyint(4) NOT NULL DEFAULT '0',
`de_item_ps_use` tinyint(4) NOT NULL DEFAULT '0', `de_item_use_use` tinyint(4) NOT NULL DEFAULT '0',
`de_code_dup_use` tinyint(4) NOT NULL DEFAULT '0', `de_code_dup_use` tinyint(4) NOT NULL DEFAULT '0',
`de_cart_keep_term` int(11) NOT NULL DEFAULT '0', `de_cart_keep_term` int(11) NOT NULL DEFAULT '0',
`de_guest_cart_use` tinyint(4) NOT NULL DEFAULT '0', `de_guest_cart_use` tinyint(4) NOT NULL DEFAULT '0',
@ -296,7 +296,8 @@ CREATE TABLE IF NOT EXISTS `shop_default` (
`de_taxsave_use` tinyint(4) NOT NULL, `de_taxsave_use` tinyint(4) NOT NULL,
`de_guest_privacy` text NOT NULL, `de_guest_privacy` text NOT NULL,
`de_hp_use` tinyint(4) NOT NULL DEFAULT '0', `de_hp_use` tinyint(4) NOT NULL DEFAULT '0',
`de_escrow_use` tinyint(4) NOT NULL DEFAULT '0' `de_escrow_use` tinyint(4) NOT NULL DEFAULT '0',
`de_tax_flag_use` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -418,6 +419,7 @@ CREATE TABLE IF NOT EXISTS `shop_item` (
`it_price` int(11) NOT NULL DEFAULT '0', `it_price` int(11) NOT NULL DEFAULT '0',
`it_point` int(11) NOT NULL DEFAULT '0', `it_point` int(11) NOT NULL DEFAULT '0',
`it_point_type` tinyint(4) NOT NULL DEFAULT '0', `it_point_type` tinyint(4) NOT NULL DEFAULT '0',
`it_notax` tinyint(4) NOT NULL DEFAULT '0',
`it_sell_email` varchar(255) NOT NULL DEFAULT '', `it_sell_email` varchar(255) NOT NULL DEFAULT '',
`it_use` tinyint(4) NOT NULL DEFAULT '0', `it_use` tinyint(4) NOT NULL DEFAULT '0',
`it_stock_qty` int(11) NOT NULL DEFAULT '0', `it_stock_qty` int(11) NOT NULL DEFAULT '0',
@ -598,6 +600,7 @@ CREATE TABLE IF NOT EXISTS `shop_order` (
`od_memo` text NOT NULL, `od_memo` text NOT NULL,
`od_send_cost` int(11) NOT NULL DEFAULT '0', `od_send_cost` int(11) NOT NULL DEFAULT '0',
`od_send_coupon` int(11) NOT NULL DEFAULT '0', `od_send_coupon` int(11) NOT NULL DEFAULT '0',
`od_send_cost2` int(11) NOT NULL DEFAULT '0',
`od_temp_amount` int(11) NOT NULL DEFAULT '0', `od_temp_amount` int(11) NOT NULL DEFAULT '0',
`od_temp_point` int(11) NOT NULL DEFAULT '0', `od_temp_point` int(11) NOT NULL DEFAULT '0',
`od_receipt_amount` int(11) NOT NULL DEFAULT '0', `od_receipt_amount` int(11) NOT NULL DEFAULT '0',

View File

@ -884,8 +884,8 @@ function alert_opener($msg='', $url='')
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.'; if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset={$g4['charset']}\">"; echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
echo "<script type='text/javascript'>"; echo "<script>";
echo "alert(\"$msg\");"; echo "alert(\"$msg\");";
echo "opener.location.href=\"$url\";"; echo "opener.location.href=\"$url\";";
echo "self.close();"; echo "self.close();";

View File

@ -582,10 +582,12 @@ else
<h2>상품문의</h2> <h2>상품문의</h2>
<?php echo pg_anchor_m('qa'); ?> <?php echo pg_anchor_m('qa'); ?>
<?php <div id="itemqa"></div>
$qa_page_rows = 10; // 페이지당 목록수 <script>
include_once(G4_MSHOP_PATH.'/itemqa.inc.php'); $(function(){
?> $("#itemqa").load("./itemqa.php", {it_id:"<?php echo $it_id; ?>"});
});
</script>
</section> </section>

View File

@ -1,217 +0,0 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G4_LIB_PATH.'/thumb.lib.php');
?>
<table id="sit_ps_tbl">
<thead>
<tr>
<th>번호</th>
<th>제목</th>
<th>작성자</th>
<th>작성일</th>
<th>평점</th>
</tr>
</thead>
<?php
$sql_common = " from {$g4['shop_item_use_table']} where it_id = '{$it['it_id']}' and is_confirm = '1' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$use_total_count = $row['cnt'];
$use_total_page = ceil($use_total_count / $use_page_rows); // 전체 페이지 계산
if ($use_page == "") $use_page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$use_from_record = ($use_page - 1) * $use_page_rows; // 시작 레코드 구함
$sql = "select * $sql_common order by is_id desc limit $use_from_record, $use_page_rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$num = $use_total_count - ($use_page - 1) * $use_page_rows - $i;
$star = get_star($row['is_score']);
$is_name = get_text($row['is_name']);
$is_subject = conv_subject($row['is_subject'],50,"…");
//$is_content = conv_content($row[is_content],0);
$is_content = $row['is_content'];
//$is_content = preg_replace_callback("#<img[^>]+>#iS", "g4_thumb", $is_content);
$thumb = new g4_thumb(G4_DATA_PATH.'/itemuse', 500);
$is_content = $thumb->run($is_content);
$is_time = substr($row['is_time'], 2, 14);
?>
<li class="sit_ps_li">
<button type="button" class="sit_ps_li_title" onclick="javascript:qa_menu('sit_ps_con_<?php echo $i; ?>')"><?php echo $num; ?>. <?php echo $iq_subject; ?></button>
<dl class="sit_ps_dl">
<dt>작성자</dt>
<dd><?php echo $iq_name; ?></dd>
<dt>작성일</dt>
<dd><?php echo $iq_time; ?></dd>
<dt>상태</dt>
<dd><?php echo $iq_stats; ?></dd>
</dl>
<div id="sit_ps_con_<?php echo $i; ?>" class="sit_ps_con">
<p class="sit_ps_qaq">
<strong>문의내용</strong><br>
<?php echo $iq_question; // 상품 문의 내용 ?>
</p>
<p class="sit_ps_qaa">
<strong>답변</strong><br>
<?php echo $iq_answer; ?>
</p>
<textarea id="tmp_iq_id<?php echo $i; ?>"><?php echo $row['iq_id']; ?></textarea>
<textarea id="tmp_iq_name<?php echo $i; ?>"><?php echo $row['iq_name']; ?></textarea>
<textarea id="tmp_iq_subject<?php echo $i; ?>"><?php echo $row['iq_subject']; ?></textarea>
<textarea id="tmp_iq_question<?php echo $i; ?>"><?php echo $row['iq_question']; ?></textarea>
<?php if ($row['mb_id'] == $member['mb_id'] && $iq_answer == 0) { ?>
<div class="sit_ps_cmd">
<button onclick="javascript:itemqa_update(<?php echo $i; ?>);" class="btn01">수정</button>
<button onclick="javascript:itemqa_delete(fitemqa_password<?php echo $i; ?>, <?php echo $i; ?>);" class="btn01">삭제</button>
</div>
<?php } ?>
</div>
</li>
<tr>
<td><?php echo $num; ?><span class="sound_only">번</span></td>
<td>
<a href="javascript:;" onclick="use_menu('is<?php echo $i; ?>')"><?php echo $is_subject; ?></a>
<div>
<div>
<?php echo $is_content; ?>
</div>
<textarea id="tmp_is_id<?php echo $i; ?>"><?php echo $row['is_id']; ?></textarea>
<textarea id="tmp_is_name<?php echo $i; ?>"><?php echo $row['is_name']; ?></textarea>
<textarea id="tmp_is_subject<?php echo $i; ?>"><?php echo $row['is_subject']; ?></textarea>
<textarea id="tmp_is_content<?php echo $i; ?>"><?php echo $row['is_content']; ?></textarea>
<?php if ($row[mb_id] == $member[mb_id]) { ?>
<a href="javascript:itemusewin('is_id=<?php echo $row['is_id']; ?>&amp;w=u');">수정</a>
<a href="javascript:itemuse_delete(fitemuse_password<?php echo $i; ?>, <?php echo $i; ?>);">삭제</a>
<?php } ?>
<div id="is<?php echo $i; ?>">
<!-- 사용후기 삭제 패스워드 입력 폼 -->
<form name="fitemuse_password<?php echo $i; ?>" method="post" action="./itemuseupdate.php" autocomplete="off">
<input type="hidden" name="w" value="">
<input type="hidden" name="is_id" value="">
<input type="hidden" name="it_id" value="<?php echo $it['it_id']; ?>">
<label for="is_password_<?php echo $i; ?>">패스워드</label>
<input type="password" name="is_password" id="is_password_<?php echo $i; ?>" required>
<input type="submit" value="확인">
</form>
</div>
</div>
</td>
<td><?php echo $is_name; ?></td>
<td><?php echo $is_time; ?></td>
<td><img src="<?php echo G4_URL; ?>/img/shop/s_star<?php echo $star; ?>.png" alt="별<?php echo $star; ?>개"></td>
</tr>
<?
}
if (!$i)
{
echo '<tr><td class="empty_class">등록된 사용후기가 없습니다.</td></tr>';
}
?>
</table>
<?php
if ($use_pages) {
$use_pages = get_paging(10, $use_page, $use_total_page, "./item.php?it_id=$it_id&amp;$qstr&amp;use_page=", "#use");
}
?>
<a href="javascript:itemusewin('it_id=<?php echo $it_id; ?>');">사용후기 쓰기<span class="sound_only"> 새 창</span></a>
<script>
function itemusewin(query_string)
{
window.open("./itemusewin.php?"+query_string, "itemusewin", "width=800,height=700");
}
function fitemuse_submit(f)
{
if (!check_kcaptcha(f.is_key)) {
return false;
}
f.action = "itemuseupdate.php"
return true;
}
function itemuse_insert()
{
/*
if (!g4_is_member) {
alert("로그인 하시기 바랍니다.");
return;
}
*/
var f = document.fitemuse;
var id = document.getElementById('itemuse');
id.style.display = 'block';
f.w.value = '';
f.is_id.value = '';
if (!g4_is_member)
{
f.is_name.value = '';
f.is_name.readOnly = false;
f.is_password.value = '';
}
f.is_subject.value = '';
f.is_content.value = '';
}
function itemuse_update(idx)
{
var f = document.fitemuse;
var id = document.getElementById('itemuse');
id.style.display = 'block';
f.w.value = 'u';
f.is_id.value = document.getElementById('tmp_is_id'+idx).value;
if (!g4_is_member)
{
f.is_name.value = document.getElementById('tmp_is_name'+idx).value;
f.is_name.readOnly = true;
}
f.is_subject.value = document.getElementById('tmp_is_subject'+idx).value;
f.is_content.value = document.getElementById('tmp_is_content'+idx).value;
}
function itemuse_delete(f, idx)
{
var id = document.getElementById('itemuse');
f.w.value = 'd';
f.is_id.value = document.getElementById('tmp_is_id'+idx).value;
if (g4_is_member)
{
if (confirm("삭제하시겠습니까?"))
f.submit();
}
else
{
id.style.display = 'none';
document.getElementById('itemuse_password'+idx).style.display = 'block';
}
}
</script>

104
mobile/shop/itemuseform.php Normal file
View File

@ -0,0 +1,104 @@
<?php
include_once('./_common.php');
// 사용후기의 내용에 쓸수 있는 최대 글자수 (한글은 영문3자)
$is_content_max_length = 10000;
$w = escape_trim($_REQUEST['w']);
$it_id = escape_trim($_REQUEST['it_id']);
$is_id = escape_trim($_REQUEST['is_id']);
if (!$is_member) {
alert("사용후기는 회원만 평가가 가능합니다.", G4_BBS_URL."/login.php");
}
if ($w == "") {
$is_score = 10;
} else if ($w == "u") {
$use = sql_fetch(" select * from {$g4['shop_item_use_table']} where is_id = '$is_id' ");
if (!$use) {
alert_close("사용후기 정보가 없습니다.");
}
$it_id = $use['it_id'];
$is_score = $use['is_score'];
if (!$is_admin && $use['mb_id'] != $member['mb_id']) {
alert_close("자신의 사용후기만 수정이 가능합니다.");
}
}
include_once(G4_PATH.'/head.sub.php');
?>
<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" action="./itemuseformupdate.php" 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" maxlength="250" required itemname="제목" value="<?php echo get_text($use['is_subject']); ?>">
</li>
<li>
<label for="is_content" style="width:200px;">내용</label>
<textarea name="is_content" id="is_content"><?php echo $$use['is_content']; ?></textarea>
</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>
</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 > 1000) {
alert('내용은 1000글자 까지만 입력해 주세요.');
ed_is_content.returnFalse();
return false;
}
}
*/
if (is_content_editor_data.length > <?php echo $is_content_max_length; ?>) {
alert("내용은 <?php echo $is_content_max_length; ?> 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+is_content_editor_data.length+" 글자");
CKEDITOR.instances.is_content.focus();
return false;
}
return true;
}
$(function() {
$("#is_subject").focus();
});
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
?>

153
mobile/shop/itemuselist.php Normal file
View File

@ -0,0 +1,153 @@
<?php
include_once('./_common.php');
include_once(G4_LIB_PATH.'/thumb.lib.php');
$sfl = escape_trim($_REQUEST['sfl']);
$stx = escape_trim($_REQUEST['stx']);
$g4['title'] = '사용후기';
include_once(G4_MSHOP_PATH.'/_head.php');
$sql_common = " from `{$g4['shop_item_use_table']}` a join `{$g4['shop_item_table']}` b on (a.it_id=b.it_id) ";
$sql_search = " where a.is_confirm = '1' ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "a.it_id" :
$sql_search .= " ($sfl like '$stx%') ";
break;
case "a.is_name" :
case "a.mb_id" :
$sql_search .= " ($sfl = '$stx') ";
break;
default :
$sql_search .= " ($sfl like '%$stx%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "a.is_id";
$sod = "desc";
}
$sql_order = " order by $sst $sod ";
/*
$sql_common = " from {$g4['shop_item_use_table']} where is_confirm = '1' ";
$sql_order = " order by is_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; // 시작 열을 구함
?>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<select name="sfl" required title="검색항목선택">
<option value="">선택</option>
<option value="b.it_name" <?php echo get_selected($_GET['sfl'], "b.it_name", true); ?>>상품명</option>
<option value="a.it_id" <?php echo get_selected($_GET['sfl'], "a.it_id"); ?>>상품코드</option>
<option value="a.is_subject"<?php echo get_selected($_GET['sfl'], "a.is_subject"); ?>>후기제목</option>
<option value="a.is_content">후기제목</option>
<option value="a.is_name">작성자명</option>
<option value="a.mb_id">작성자아이디</option>
</select>
<input type="text" name="stx" required title="검색어" value="<?php echo $stx; ?>">
<input type="submit" value="검색">
</form>
<div id="sps">
<!-- <p><?php echo $config['cf_title']; ?> 전체 사용후기 목록입니다.</p> -->
<?php
$sql = " select *
$sql_common
$sql_search
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$num = $total_count - ($page - 1) * $rows - $i;
$star = get_star($row['is_score']);
$is_content = get_view_thumbnail($row['is_content'], 500);
$is_time = substr($row['is_time'], 2, 14);
$small_image = $row['it_id'];
$row2 = sql_fetch(" select it_name from {$g4['shop_item_table']} where it_id = '{$row['it_id']}' ");
$it_href = G4_SHOP_URL."/item.php?it_id={$row['it_id']}";
if ($i == 0) echo '<ol>';
?>
<li>
<div class="sps_img">
<a href="<?php echo $it_href; ?>">
<?php echo get_it_image($small_image, 70, 70); ?>
<span><?php echo $row2['it_name']; ?></span>
</a>
</div>
<section class="sps_section">
<h2><?php echo $row['is_subject']; ?></h2>
<dl class="sps_dl">
<dt>작성자</dt>
<dd><?php echo $row['is_name']; ?></dd>
<dt>작성일</dt>
<dd><?php echo substr($row['is_time'],0,10); ?></dd>
<dt>평가점수</dt>
<dd><img src="<?php echo G4_URL; ?>/img/shop/s_star<?php echo $star; ?>.png" alt="별<?php echo $star; ?>개"></dd>
</dl>
<div id="sps_con_<?php echo $i; ?>" style="display:none;">
<?php echo $is_content; // 상품 문의 내용 ?>
</div>
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>">보기</button></div>
</section>
</li>
<?php }
if ($i > 0) echo '</ol>';
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';
?>
</div>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<script>
$(function(){
// 사용후기 더보기
$(".sps_con_btn button").click(function(){
var sps_con_no = $(this).attr("class");
$("#"+sps_con_no).is(":hidden") ? $("#"+sps_con_no).show() : $("#"+sps_con_no).hide();
});
$(".sps_con_btn button").toggle(function(){
$(this).text("닫기");
}, function(){
$(this).text("보기");
});
});
</script>
<?php
include_once(G4_MSHOP_PATH.'/_tail.php');
?>

View File

@ -106,7 +106,7 @@ $qstr1 .= 'ca_id='.$ca_id;
if($skin) if($skin)
$qstr1 .= '&amp;skin='.$skin; $qstr1 .= '&amp;skin='.$skin;
$qstr1 .='&amp;ev_id='.$ev_id.'&amp;sort='.$sort.'&amp;sortodr='.$sortodr; $qstr1 .='&amp;ev_id='.$ev_id.'&amp;sort='.$sort.'&amp;sortodr='.$sortodr;
echo get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&amp;page='); echo get_paging($config['cf_mobile_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&amp;page=');
?> ?>
<?php <?php

View File

@ -294,6 +294,8 @@ ob_end_clean();
<input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>"> <input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>">
<input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>"> <input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>">
<input type="hidden" name="org_send_cost" value="<?php echo $send_cost; ?>"> <input type="hidden" name="org_send_cost" value="<?php echo $send_cost; ?>">
<input type="hidden" name="od_send_cost2" value="0">
<input type="hidden" name="item_coupon" value="0">
<?php echo $content; ?> <?php echo $content; ?>
@ -478,6 +480,10 @@ ob_end_clean();
<tr> <tr>
<th>총 주문금액</th> <th>총 주문금액</th>
<td><span id="od_tot_amount"><?php echo number_format($tot_amount); ?></span>원</td> <td><span id="od_tot_amount"><?php echo number_format($tot_amount); ?></span>원</td>
</tr>
<tr>
<th>추가배송비</th>
<td><span id="od_send_cost2">0</span>원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -701,6 +707,7 @@ ob_end_clean();
$(function() { $(function() {
var $cp_btn_el; var $cp_btn_el;
var $cp_row_el; var $cp_row_el;
var zipcode = "";
$(".it_coupon_btn").click(function() { $(".it_coupon_btn").click(function() {
$cp_btn_el = $(this); $cp_btn_el = $(this);
@ -802,6 +809,7 @@ $(function() {
var subj = $el.find("input[name='o_cp_subj[]']").val(); var subj = $el.find("input[name='o_cp_subj[]']").val();
var od_amount = parseInt($("input[name=org_od_amount]").val()); var od_amount = parseInt($("input[name=org_od_amount]").val());
var send_cost = $("input[name=org_send_cost]").val(); var send_cost = $("input[name=org_send_cost]").val();
var item_coupon = parseInt($("input[name=item_coupon]").val());
if(parseInt(amount) == 0) { if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) { if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
@ -811,8 +819,10 @@ $(function() {
$("input[name=od_send_cost]").val(send_cost); $("input[name=od_send_cost]").val(send_cost);
$("input[name=sc_cp_id]").val(""); $("input[name=sc_cp_id]").val("");
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
$("input[name=od_amount]").val(od_amount - amount); $("input[name=od_amount]").val(od_amount - item_coupon - amount);
$("input[name=od_cp_id]").val(cp_id); $("input[name=od_cp_id]").val(cp_id);
calculate_order_amount(); calculate_order_amount();
$("#od_coupon_frm").remove(); $("#od_coupon_frm").remove();
@ -828,11 +838,16 @@ $(function() {
$("#od_coupon_cancel").live("click", function() { $("#od_coupon_cancel").live("click", function() {
var org_amount = $("input[name=org_od_amount]").val(); var org_amount = $("input[name=org_od_amount]").val();
$("input[name=od_amount]").val(org_amount); var item_coupon = parseInt($("input[name=item_coupon]").val());
$("input[name=od_amount]").val(org_amount - item_coupon);
$("input[name=od_send_cost]").val($("input[name=org_send_cost]").val());
$("input[name=sc_cp_id]").val("");
calculate_order_amount(); calculate_order_amount();
$("#od_coupon_frm").remove(); $("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰적용").focus(); $("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove(); $(this).remove();
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
}); });
$("#sc_coupon_btn").click(function() { $("#sc_coupon_btn").click(function() {
@ -885,6 +900,21 @@ $(function() {
$(this).remove(); $(this).remove();
}); });
$("#od_b_addr2").focus(function() {
var zip1 = $("#od_b_zip1").val().replace(/[^0-9]/g, "");
var zip2 = $("#od_b_zip2").val().replace(/[^0-9]/g, "");
if(zip1 == "" || zip2 == "")
return false;
var code = String(zip1) + String(zip2);
if(zipcode == code)
return false;
zipcode = code;
calculate_sendcost(code);
});
$("#od_settle_bank").bind("click", function() { $("#od_settle_bank").bind("click", function() {
$("[name=od_deposit_name]").val( $("[name=od_b_name]").val() ); $("[name=od_deposit_name]").val( $("[name=od_b_name]").val() );
$("#settle_bank").show(); $("#settle_bank").show();
@ -931,14 +961,22 @@ function calculate_total_amount()
$("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원"); $("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원");
$("input[name=good_mny]").val(tot_sell_amount); $("input[name=good_mny]").val(tot_sell_amount);
$("input[name=od_amount]").val(sell_amount); $("input[name=od_amount]").val(sell_amount - tot_cp_amount);
$("input[name=org_od_amount]").val(sell_amount);
$("input[name=od_send_cost]").val(send_cost); $("input[name=od_send_cost]").val(send_cost);
<?php if($od_cnt > 0) { ?> $("input[name=item_coupon]").val(tot_cp_amount);
<?php if($oc_cnt > 0) { ?>
$("input[name=od_cp_id]").val(""); $("input[name=od_cp_id]").val("");
if($("#od_coupon_cancel").size()) {
$("#od_coupon_btn").text("쿠폰적용");
$("#od_coupon_cancel").remove();
}
<?php } ?> <?php } ?>
<?php if($sc_cnt > 0) { ?> <?php if($sc_cnt > 0) { ?>
$("input[name=sc_cp_id]").val(""); $("input[name=sc_cp_id]").val("");
if($("#sc_coupon_cancel").size()) {
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
}
<?php } ?> <?php } ?>
$("input[name=od_temp_point]").val(0); $("input[name=od_temp_point]").val(0);
<?php if($temp_point > 0 && $is_member) { ?> <?php if($temp_point > 0 && $is_member) { ?>
@ -951,7 +989,8 @@ function calculate_order_amount()
{ {
var sell_amount = parseInt($("input[name=od_amount]").val()); var sell_amount = parseInt($("input[name=od_amount]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val()); var send_cost = parseInt($("input[name=od_send_cost]").val());
var tot_amount = sell_amount + send_cost; var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
var tot_amount = sell_amount + send_cost + send_cost2;
$("form[name=sm_form] input[name=good_mny]").val(tot_amount); $("form[name=sm_form] input[name=good_mny]").val(tot_amount);
$("#od_tot_amount").text(number_format(String(tot_amount))); $("#od_tot_amount").text(number_format(String(tot_amount)));
@ -982,6 +1021,20 @@ function calculate_temp_point()
$("input[name=max_temp_point]").val(temp_point); $("input[name=max_temp_point]").val(temp_point);
} }
function calculate_sendcost(code)
{
$.post(
"./ordersendcost.php",
{ zipcode: code },
function(data) {
$("input[name=od_send_cost2]").val(data);
$("#od_send_cost2").text(number_format(String(data)));
calculate_order_amount();
}
);
}
/* 결제방법에 따른 처리 후 결제등록요청 실행 */ /* 결제방법에 따른 처리 후 결제등록요청 실행 */
function kcp_approval() function kcp_approval()
{ {
@ -1255,6 +1308,8 @@ function gumae2baesong(f)
f.od_b_zip2.value = f.od_zip2.value; f.od_b_zip2.value = f.od_zip2.value;
f.od_b_addr1.value = f.od_addr1.value; f.od_b_addr1.value = f.od_addr1.value;
f.od_b_addr2.value = f.od_addr2.value; f.od_b_addr2.value = f.od_addr2.value;
calculate_sendcost(String(f.od_b_zip1.value) + String(f.od_b_zip2.value));
} }
</script> </script>

View File

@ -64,6 +64,7 @@ if ($error != "")
$i_amount = (int)$_POST['od_amount']; $i_amount = (int)$_POST['od_amount'];
$i_send_cost = (int)$_POST['od_send_cost']; $i_send_cost = (int)$_POST['od_send_cost'];
$i_send_cost2 = (int)$_POST['od_send_cost2'];
$i_temp_point = (int)$_POST['od_temp_point']; $i_temp_point = (int)$_POST['od_temp_point'];
@ -251,6 +252,17 @@ if ((int)($send_cost - $tot_sc_cp_amount) !== $i_send_cost) {
die("Error.."); die("Error..");
} }
// 추가배송비가 상이함
$zipcode = $od_b_zip1 . $od_b_zip2;
$sql = " select sc_id, sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$tmp = sql_fetch($sql);
if(!$tmp['sc_id'])
$send_cost2 = 0;
else
$send_cost2 = (int)$tmp['sc_amount'];
if($send_cost2 !== $i_send_cost2)
die("Error...");
// 결제포인트가 상이함 // 결제포인트가 상이함
$tot_amount = $tot_sell_amount + $send_cost; $tot_amount = $tot_sell_amount + $send_cost;
// 회원이면서 포인트사용이면 // 회원이면서 포인트사용이면
@ -271,7 +283,7 @@ if($default['de_mileage_use']) {
} }
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0)) if (($i_temp_point > (int)$temp_point || $i_temp_point < 0))
die("Error..."); die("Error....");
if ($od_temp_point) if ($od_temp_point)
{ {
@ -294,7 +306,7 @@ if($default['de_mileage_use']) {
} }
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point']) if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point'])
die("Error..."); die("Error....");
if ($od_temp_point) if ($od_temp_point)
{ {
@ -303,7 +315,7 @@ if($default['de_mileage_use']) {
} }
} }
$i_amount = $i_amount + $i_send_cost - $i_temp_point; $i_amount = $i_amount + $i_send_cost + $i_send_cost2 - $i_temp_point;
if ($od_settle_case == "무통장") if ($od_settle_case == "무통장")
{ {
@ -425,6 +437,7 @@ $sql = " insert {$g4['shop_order_table']}
od_memo = '$od_memo', od_memo = '$od_memo',
od_send_cost = '$od_send_cost', od_send_cost = '$od_send_cost',
od_send_coupon = '$tot_sc_cp_amount', od_send_coupon = '$tot_sc_cp_amount',
od_send_cost2 = '$od_send_cost2',
od_coupon = '$tot_od_cp_amount', od_coupon = '$tot_od_cp_amount',
od_temp_amount = '$od_temp_amount', od_temp_amount = '$od_temp_amount',
od_temp_point = '$od_temp_point', od_temp_point = '$od_temp_point',

View File

@ -116,6 +116,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
} }
$send_cost = $od['od_send_cost']; $send_cost = $od['od_send_cost'];
$send_cost2 = $od['od_send_cost2'];
$send_coupon = $od['od_send_coupon']; $send_coupon = $od['od_send_coupon'];
$org_send_cost = $send_cost + $send_coupon; $org_send_cost = $send_cost + $send_coupon;
?> ?>
@ -124,7 +125,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<?php <?php
// 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 // 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인
$od_coupon = $od['od_coupon']; $od_coupon = $od['od_coupon'];
$tot_amount = $tot_sell_amount + $send_cost - $tot_cp_amount - $od_coupon; $tot_amount = $tot_sell_amount + $send_cost + $send_cost2 - $tot_cp_amount - $od_coupon;
?> ?>
<dl id="sod_bsk_tot"> <dl id="sod_bsk_tot">
@ -151,6 +152,11 @@ include_once(G4_MSHOP_PATH.'/_head.php');
<dd class="sod_bsk_dvr"><strong><?php echo number_format($send_coupon); ?> 원</strong></dd> <dd class="sod_bsk_dvr"><strong><?php echo number_format($send_coupon); ?> 원</strong></dd>
<?php } ?> <?php } ?>
<?php if ($org_send_cost2 > 0) { ?>
<dt class="sod_bsk_dvr">추가배송비</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($org_send_cost2); ?> 원</strong></dd>
<?php } ?>
<dt class="sod_bsk_cnt">총계</dt> <dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원</strong></dd> <dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원</strong></dd>

View File

@ -7,9 +7,6 @@ if (G4_IS_MOBILE) {
} }
include_once(G4_LIB_PATH.'/iteminfo.lib.php'); include_once(G4_LIB_PATH.'/iteminfo.lib.php');
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
$captcha_html = captcha_html();
// 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함 // 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함
$token = md5(uniqid(rand(), true)); $token = md5(uniqid(rand(), true));
@ -603,6 +600,7 @@ else
$("#itemqa").load("./itemqa.php", {it_id:"<?php echo $it_id; ?>"}); $("#itemqa").load("./itemqa.php", {it_id:"<?php echo $it_id; ?>"});
}); });
</script> </script>
<<<<<<< HEAD
<?php <?php
/* /*
@ -610,6 +608,8 @@ else
include_once('./itemqa.inc.php'); include_once('./itemqa.inc.php');
*/ */
?> ?>
=======
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
</section> </section>
<?php if ($default['de_baesong_content']) { // 배송정보 내용이 있다면 ?> <?php if ($default['de_baesong_content']) { // 배송정보 내용이 있다면 ?>

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
include_once(G4_LIB_PATH.'/thumbnail.lib.php'); include_once(G4_LIB_PATH.'/thumbnail.lib.php');
@ -195,4 +196,214 @@ $(function(){
<?php <?php
include_once(G4_PATH.'/tail.sub.php'); include_once(G4_PATH.'/tail.sub.php');
?> ?>
=======
<?php
include_once('./_common.php');
$it_id = $_REQUEST['it_id'];
?>
<section id="sit_qa_list">
<h3>등록된 상품문의</h3>
<?php
$sql_common = " from {$g4['shop_item_qa_table']} where it_id = '$it_id' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = 5;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 레코드 구함
$sql = "select *
$sql_common
order by iq_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$num = $total_count - ($page - 1) * $rows - $i;
$iq_name = get_text($row['iq_name']);
$iq_subject = conv_subject($row['iq_subject'],50, '…');
$iq_question = conv_content($row['iq_question'],0);
$iq_answer = conv_content($row['iq_answer'],0);
$iq_time = substr($row['iq_time'], 2, 14);
//$qa = "<img src='$g4[shop_img_path]/icon_poll_q.gif' border=0>";
//if ($row[iq_answer]) $qa .= "<img src='$g4[shop_img_path]/icon_answer.gif' border=0>";
//$qa = "$qa";
$iq_stats = '';
$iq_answer = '';
$iq_flag = 0;
if ($row['iq_answer'])
{
$iq_answer = conv_content($row['iq_answer'],0);
$iq_stats = '답변완료';
} else {
$iq_stats = '답변전';
$iq_answer = '답변이 등록되지 않았습니다.';
$iq_flag = 1;
}
if ($i == 0) echo '<ol id="sit_qa_ol">';
?>
<li class="sit_qa_li">
<button type="button" class="sit_qa_li_title" onclick="javascript:qa_menu('sit_qa_con_<?php echo $i; ?>')"><b><?php echo $num; ?>.</b> <?php echo $iq_subject; ?></button>
<dl class="sit_qa_dl">
<dt>작성자</dt>
<dd><?php echo $iq_name; ?></dd>
<dt>작성일</dt>
<dd><?php echo $iq_time; ?></dd>
<dt>상태</dt>
<dd><?php echo $iq_stats; ?></dd>
</dl>
<div id="sit_qa_con_<?php echo $i; ?>" class="sit_qa_con">
<p class="sit_qa_qaq">
<strong>문의내용</strong><br>
<?php echo $iq_question; // 상품 문의 내용 ?>
</p>
<p class="sit_qa_qaa">
<strong>답변</strong><br>
<?php echo $iq_answer; ?>
</p>
<textarea id="tmp_iq_id<?php echo $i; ?>"><?php echo $row['iq_id']; ?></textarea>
<textarea id="tmp_iq_name<?php echo $i; ?>"><?php echo $row['iq_name']; ?></textarea>
<textarea id="tmp_iq_subject<?php echo $i; ?>"><?php echo $row['iq_subject']; ?></textarea>
<textarea id="tmp_iq_question<?php echo $i; ?>"><?php echo $row['iq_question']; ?></textarea>
<?php if ($row['mb_id'] == $member['mb_id'] && $iq_answer == 0) { ?>
<div class="sit_qa_cmd">
<a href="./itemqaform.php?w=u&amp;it_id=<?php echo $it_id; ?>&amp;iq_id=<?php echo $row['iq_id']; ?>" class="itemqa_mod btn01">수정</a>
<a href="./itemqaformupdate.php?w=d&amp;it_id=<?php echo $it_id; ?>&amp;iq_id=<?php echo $row['iq_id']; ?>" class="itemqa_del btn01">삭제</a>
</div>
<?php } ?>
</div>
</li>
<?php }
if ($i >= 0) echo '</ol>';
if (!$i) echo '<p class="sit_empty">상품문의가 없습니다.</p>';
?>
</section>
<?php
// 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL
function itemqa_page($write_pages, $cur_page, $total_page, $url, $add="")
{
$url = preg_replace('#&amp;page=[0-9]*(&amp;page=)$#', '$1', $url);
$str = '';
if ($cur_page > 1) {
$str .= '<a href="'.$url.'1'.$add.'" class="qa_page qa_start" onclick="return false;">처음</a>'.PHP_EOL;
}
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
$end_page = $start_page + $write_pages - 1;
if ($end_page >= $total_page) $end_page = $total_page;
if ($start_page > 1) $str .= '<a href="'.$url.($start_page-1).$add.'" class="qa_page qa_prev" onclick="return false;">이전</a>'.PHP_EOL;
if ($total_page > 1) {
for ($k=$start_page;$k<=$end_page;$k++) {
if ($cur_page != $k)
$str .= '<a href="'.$url.$k.$add.'" class="qa_page" onclick="return false;">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
else
$str .= '<span class="sound_only">열린</span><strong class="qa_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
}
}
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="qa_page qa_next">다음</a>'.PHP_EOL;
if ($cur_page < $total_page) {
$str .= '<a href="'.$url.$total_page.$add.'" class="qa_page qa_end" onclick="return false;">맨끝</a>'.PHP_EOL;
}
if ($str)
return "<nav class=\"qa_wrap\"><span class=\"qa\">{$str}</span></nav>";
else
return "";
}
echo itemqa_page($config['cf_write_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&amp;page=", "");
?>
<div id="sit_qa_wbtn">
<a href="./itemqaform.php?it_id=<?php echo $it_id; ?>" id="itemqa_form" class="btn02">상품문의 쓰기</a>
</div>
<script>
$(function(){
$("#itemqa_form").click(function(){
window.open(this.href, "itemqa_form", "width=800,height=550");
return false;
});
$(".itemqa_mod").live("click", function() {
window.open(this.href, "itemqa_form", "width=800,height=550");
return false;
});
$(".itemqa_del").live("click", function() {
if(!confirm("상품문의를 삭제하시겠습니까?"))
return false;
<?php if($is_member) { ?>
document.location.href = this.href;
<?php } else { ?>
var iq_pass_frm = "<div id=\"iq_password_frm\">";
iq_pass_frm += "<form name=\"fitemqapass\" method=\"post\" action=\""+this.href+"\">";
iq_pass_frm += "<label for=\"iq_password\">비밀번호</label>";
iq_pass_frm += "<input type=\"password\" name=\"iq_password\" id=\"iq_password\" size=\"20\">";
iq_pass_frm += "<input type=\"submit\" value=\"확인\">";
iq_pass_frm += "</form>";
iq_pass_frm += "</div>";
$("#iq_password_frm").remove();
$(this).after(iq_pass_frm);
return false;
<?php } ?>
});
$("form[name=fitemqapass]").live("submit", function() {
var pass = trim($("input[name=iq_password]").val());
if(pass == "") {
alert("비밀번호를 입력해 주십시오.");
return false;
}
return true;
});
$(".qa_href").click(function(){
var $content = $("#qa_div"+$(this).attr("target"));
$(".qa_div").each(function(index, value){
if ($(this).get(0) == $content.get(0)) { // 객체의 비교시 .get(0) 를 사용한다.
$(this).is(":hidden") ? $(this).show() : $(this).hide();
} else {
$(this).hide();
}
});
});
$(".qa_page").click(function(){
//alert($(this).attr("href"));
$(top.document).find('#itemqa').load($(this).attr("href"));
});
});
</script>
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
<?php <?php
include_once("./_common.php"); include_once("./_common.php");
include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php'); include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
@ -79,4 +80,79 @@ $(function() {
<?php <?php
include_once(G4_PATH.'/tail.sub.php'); include_once(G4_PATH.'/tail.sub.php');
=======
<?php
include_once('./_common.php');
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
$captcha_html = captcha_html();
$w = escape_trim($_REQUEST['w']);
$it_id = escape_trim($_REQUEST['it_id']);
$iq_id = escape_trim($_REQUEST['iq_id']);
if($w == 'u') {
$sql = " select * from {$g4['shop_item_qa_table']} where it_id = '$it_id' and iq_id = '$iq_id' ";
$qa = sql_fetch($sql);
}
include_once(G4_PATH.'/head.sub.php');
?>
<div>
<form name="fitemqa" method="post" action="./itemqaformupdate.php" onsubmit="return fitemqa_submit(this);" autocomplete="off">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="iq_id" value="<?php echo $iq_id; ?>">
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
<table class="frm_tbl">
<colgroup>
<col class="grid_3">
<col>
</colgroup>
<tbody>
<?php if (!$is_member) { ?>
<tr>
<th scope="row"><label for="iq_name">이름</label></th>
<td><input type="text" name="iq_name" id="iq_name" value="<?php echo $qa['iq_name']; ?>" required class="frm_input" maxlength="20" minlength="2"></td>
</tr>
<tr>
<th scope="row"><label for="iq_password">패스워드</label></th>
<td>
<span class="frm_info">패스워드는 최소 3글자 이상 입력하십시오.</span>
<input type="password" name="iq_password" id="iq_password" required class="frm_input" maxlength="20" minlength="3">
</td>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="iq_subject">제목</label></th>
<td><input type="text" name="iq_subject" id="iq_subject" value="<?php echo $qa['iq_subject']; ?>" required class="frm_input" size="71" maxlength="100"></td>
</tr>
<tr>
<th scope="row"><label for="iq_question">내용</label></th>
<td><textarea name="iq_question" id="iq_question" required><?php echo $qa['iq_question']; ?></textarea></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td><?php echo $captcha_html; ?></td>
</tr>
</tbody>
</table>
<div class="btn_confirm">
<input type="submit" value="작성완료" class="btn_submit">
</div>
</form>
</div>
<script>
function fitemqa_submit(f)
{
<?php echo chk_captcha_js(); ?>
return true;
}
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
?> ?>

View File

@ -1,5 +1,6 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
<<<<<<< HEAD
if (!$is_member) { if (!$is_member) {
alert_close("상품문의는 회원만 작성이 가능합니다."); alert_close("상품문의는 회원만 작성이 가능합니다.");
@ -17,12 +18,53 @@ if ($w == "" || $w == "u") {
if (!$iq_subject) alert("제목을 입력하여 주십시오."); if (!$iq_subject) alert("제목을 입력하여 주십시오.");
if (!$iq_question) alert("질문을 입력하여 주십시오."); if (!$iq_question) alert("질문을 입력하여 주십시오.");
=======
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
if ($w == '' || $w == 'u')
{
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
if (!$is_member)
{
if (!trim($_POST['iq_name'])) alert('이름을 입력하여 주십시오.');
if (!trim($_POST['iq_password'])) alert('패스워드를 입력하여 주십시오.');
}
else
{
$iq_name = $member['mb_name'];
$iq_password = $member['mb_password'];
}
$iq_password = sql_password($iq_password);
if (!trim($_POST['iq_subject'])) alert('제목을 입력하여 주십시오.');
if (!trim($_POST['iq_question'])) alert('내용을 입력하여 주십시오.');
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
} }
$url = "./item.php?it_id=$it_id"; $url = "./item.php?it_id=$it_id";
<<<<<<< HEAD
if ($w == "") if ($w == "")
{ {
=======
if ($w == '')
{
$sql = " select max(iq_id) as max_iq_id from {$g4['shop_item_qa_table']} ";
$row = sql_fetch($sql);
$max_iq_id = $row['max_iq_id'];
$sql = " select max(iq_id) as max_iq_id from {$g4['shop_item_qa_table']}
where it_id = '$it_id'
and mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if ($row['max_iq_id'] && $row['max_iq_id'] == $max_iq_id)
alert('같은 상품에 대하여 계속해서 질문 하실 수 없습니다.');
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
$sql = "insert {$g4['shop_item_qa_table']} $sql = "insert {$g4['shop_item_qa_table']}
set it_id = '$it_id', set it_id = '$it_id',
mb_id = '{$member['mb_id']}', mb_id = '{$member['mb_id']}',
@ -34,14 +76,24 @@ if ($w == "")
iq_ip = '$REMOTE_ADDR' "; iq_ip = '$REMOTE_ADDR' ";
sql_query($sql); sql_query($sql);
<<<<<<< HEAD
alert_opener("상품문의가 등록 되었습니다.", $url); alert_opener("상품문의가 등록 되었습니다.", $url);
} }
else if ($w == "u") else if ($w == "u")
=======
alert_opener('상품문의가 등록되었습니다.', $url);
}
else if ($w == 'u')
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
{ {
$sql = " select iq_password from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' "; $sql = " select iq_password from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
if ($row['iq_password'] != $iq_password) if ($row['iq_password'] != $iq_password)
<<<<<<< HEAD
alert("패스워드가 틀리므로 수정하실 수 없습니다."); alert("패스워드가 틀리므로 수정하실 수 없습니다.");
=======
alert('패스워드가 틀리므로 수정하실 수 없습니다.');
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
$sql = " update {$g4['shop_item_qa_table']} $sql = " update {$g4['shop_item_qa_table']}
set iq_subject = '$iq_subject', set iq_subject = '$iq_subject',
@ -49,15 +101,24 @@ else if ($w == "u")
where iq_id = '$iq_id' "; where iq_id = '$iq_id' ";
sql_query($sql); sql_query($sql);
<<<<<<< HEAD
alert_opener("상품문의가 수정 되었습니다.", $url); alert_opener("상품문의가 수정 되었습니다.", $url);
} }
else if ($w == "d") else if ($w == "d")
{ {
if (!$is_admin) if (!$is_admin)
=======
alert_opener('상품문의가 수정되었습니다.', $url);
}
else if ($w == 'd')
{
if ($is_member)
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
{ {
$sql = " select count(*) as cnt from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; $sql = " select count(*) as cnt from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
if (!$row['cnt']) if (!$row['cnt'])
<<<<<<< HEAD
alert("자신의 상품문의만 삭제하실 수 있습니다."); alert("자신의 상품문의만 삭제하실 수 있습니다.");
} }
@ -66,5 +127,23 @@ else if ($w == "d")
sql_query($sql); sql_query($sql);
alert("상품문의가 삭제 되었습니다.", $url); alert("상품문의가 삭제 되었습니다.", $url);
=======
die('자신의 상품문의만 삭제하실 수 있습니다.');
}
else
{
$iq_password = sql_password($iq_password);
$sql = " select iq_password from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' ";
$row = sql_fetch($sql);
if ($row['iq_password'] != $iq_password)
die('패스워드가 틀리므로 삭제하실 수 없습니다.');
}
$sql = " delete from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
sql_query($sql);
goto_url($url);
>>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
} }
?> ?>

View File

@ -7,7 +7,7 @@ $it_id = $_REQUEST['it_id'];
$itemuse_form = "./itemuseform.php?it_id=".$it_id; $itemuse_form = "./itemuseform.php?it_id=".$it_id;
$itemuse_list = "./itemuselist.php"; $itemuse_list = "./itemuselist.php";
include_once(G4_PATH.'/head.sub.php'); //include_once(G4_PATH.'/head.sub.php');
?> ?>
<section id="sit_use_list"> <section id="sit_use_list">
@ -15,7 +15,7 @@ include_once(G4_PATH.'/head.sub.php');
<?php <?php
/* /*
여분필드 용도 여분필드 용도
wr_1 : 상품코드 wr_1 : 상품코드
wr_2 : 상품명 wr_2 : 상품명
wr_3 : 평점 1~5 wr_3 : 평점 1~5
@ -118,19 +118,20 @@ function itemuse_page($write_pages, $cur_page, $total_page, $url, $add="")
return ""; return "";
} }
echo itemuse_page(10, $page, $total_page, "./itemuse.php?it_id=$it_id&amp;page=", ""); echo itemuse_page($config['cf_write_pages'], $page, $total_page, "./itemuse.php?it_id=$it_id&amp;page=", "");
?> ?>
<div id="sit_use_wbtn"> <div id="sit_use_wbtn">
<!-- <a href="javascript:itemusewin('it_id=<?php echo $it_id; ?>');">사용후기 쓰기<span class="sound_only"> 새 창</span></a> --> <!-- <a href="javascript:itemusewin('it_id=<?php echo $it_id; ?>');">사용후기 쓰기<span class="sound_only"> 새 창</span></a> -->
<a href="<?php echo $itemuse_form; ?>" id="itemuse_form" onclick="return false;" class="btn02">사용후기 쓰기<span class="sound_only"> 새 창</span></a> <a href="<?php echo $itemuse_form; ?>" id="itemuse_form" class="btn02">사용후기 쓰기<span class="sound_only"> 새 창</span></a>
<a href="<?php echo $itemuse_list; ?>" id="itemuse_list" class="btn01">더보기</a> <a href="<?php echo $itemuse_list; ?>" id="itemuse_list" class="btn01">더보기</a>
</div> </div>
<script> <script>
$(function(){ $(function(){
$("#itemuse_form").click(function(){ $("#itemuse_form").click(function(){
window.open(this.href, "itemuse_form", "width=800,height=550"); window.open(this.href, "itemuse_form", "width=800,height=550");
return false;
}); });
$(".use_href").click(function(){ $(".use_href").click(function(){
@ -152,5 +153,5 @@ $(function(){
</script> </script>
<?php <?php
include_once(G4_PATH.'/tail.sub.php'); //include_once(G4_PATH.'/tail.sub.php');
?> ?>

View File

@ -1,5 +1,11 @@
<?php <?php
include_once("./_common.php"); include_once('./_common.php');
if (G4_IS_MOBILE) {
include_once(G4_MSHOP_PATH.'/itemuseform.php');
return;
}
include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php'); include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
// 사용후기의 내용에 쓸수 있는 최대 글자수 (한글은 영문3자) // 사용후기의 내용에 쓸수 있는 최대 글자수 (한글은 영문3자)
@ -90,7 +96,7 @@ function fitemuse_submit(f)
if (is_content_editor_data.length > <?php echo $is_content_max_length; ?>) { if (is_content_editor_data.length > <?php echo $is_content_max_length; ?>) {
alert("내용은 <?php echo $is_content_max_length; ?> 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+is_content_editor_data.length+" 글자"); alert("내용은 <?php echo $is_content_max_length; ?> 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+is_content_editor_data.length+" 글자");
CKEDITOR.instances.is_content.focus(); CKEDITOR.instances.is_content.focus();
return false; return false;
} }

View File

@ -1,5 +1,11 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (G4_IS_MOBILE) {
include_once(G4_MSHOP_PATH.'/itemuselist.php');
return;
}
include_once(G4_LIB_PATH.'/thumb.lib.php'); include_once(G4_LIB_PATH.'/thumb.lib.php');
$sfl = escape_trim($_REQUEST['sfl']); $sfl = escape_trim($_REQUEST['sfl']);

View File

@ -65,6 +65,13 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr> </tr>
<?php } ?> <?php } ?>
<?php if ($od_send_cost2 > 0) { // 추가배송비가 있다면 ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">추가배송비</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_send_cost2); ?></td>
</tr>
<?php } ?>
<tr> <tr>
<th scope="row" style="<?php echo $th_st; ?>">주문합계</th> <th scope="row" style="<?php echo $th_st; ?>">주문합계</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_amount); ?></td> <td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_amount); ?></td>

View File

@ -65,6 +65,13 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
</tr> </tr>
<?php } ?> <?php } ?>
<?php if ($od_send_cost2 > 0) { // 추가배송비가 있다면 ?>
<tr>
<th scope="row" style="<?php echo $th_st; ?>">추가배송비</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($od_send_cost2); ?></td>
</tr>
<?php } ?>
<tr> <tr>
<th scope="row" style="<?php echo $th_st; ?>">주문합계</th> <th scope="row" style="<?php echo $th_st; ?>">주문합계</th>
<td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_amount); ?></td> <td style="<?php echo $td_st; ?>"><?php echo display_price($ttotal_amount); ?></td>

View File

@ -299,6 +299,8 @@ setTimeout("init_pay_button();",300);
<input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>"> <input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>">
<input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>"> <input type="hidden" name="od_send_cost" value="<?php echo $send_cost; ?>">
<input type="hidden" name="org_send_cost" value="<?php echo $send_cost; ?>"> <input type="hidden" name="org_send_cost" value="<?php echo $send_cost; ?>">
<input type="hidden" name="od_send_cost2" value="0">
<input type="hidden" name="item_coupon" value="0">
<?php <?php
/* ============================================================================== */ /* ============================================================================== */
@ -699,6 +701,10 @@ setTimeout("init_pay_button();",300);
<th>총 주문금액</th> <th>총 주문금액</th>
<td><span id="od_tot_amount"><?php echo number_format($tot_amount); ?></span>원</td> <td><span id="od_tot_amount"><?php echo number_format($tot_amount); ?></span>원</td>
</tr> </tr>
<tr>
<th>추가배송비</th>
<td><span id="od_send_cost2">0</span>원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)</td>
</tr>
</tbody> </tbody>
</table> </table>
@ -905,6 +911,7 @@ setTimeout("init_pay_button();",300);
$(function() { $(function() {
var $cp_btn_el; var $cp_btn_el;
var $cp_row_el; var $cp_row_el;
var zipcode = "";
$(".it_coupon_btn").click(function() { $(".it_coupon_btn").click(function() {
$cp_btn_el = $(this); $cp_btn_el = $(this);
@ -1006,6 +1013,7 @@ $(function() {
var subj = $el.find("input[name='o_cp_subj[]']").val(); var subj = $el.find("input[name='o_cp_subj[]']").val();
var od_amount = parseInt($("input[name=org_od_amount]").val()); var od_amount = parseInt($("input[name=org_od_amount]").val());
var send_cost = $("input[name=org_send_cost]").val(); var send_cost = $("input[name=org_send_cost]").val();
var item_coupon = parseInt($("input[name=item_coupon]").val());
if(parseInt(amount) == 0) { if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) { if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
@ -1015,8 +1023,10 @@ $(function() {
$("input[name=od_send_cost]").val(send_cost); $("input[name=od_send_cost]").val(send_cost);
$("input[name=sc_cp_id]").val(""); $("input[name=sc_cp_id]").val("");
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
$("input[name=od_amount]").val(od_amount - amount); $("input[name=od_amount]").val(od_amount - item_coupon - amount);
$("input[name=od_cp_id]").val(cp_id); $("input[name=od_cp_id]").val(cp_id);
calculate_order_amount(); calculate_order_amount();
$("#od_coupon_frm").remove(); $("#od_coupon_frm").remove();
@ -1032,11 +1042,16 @@ $(function() {
$("#od_coupon_cancel").live("click", function() { $("#od_coupon_cancel").live("click", function() {
var org_amount = $("input[name=org_od_amount]").val(); var org_amount = $("input[name=org_od_amount]").val();
$("input[name=od_amount]").val(org_amount); var item_coupon = parseInt($("input[name=item_coupon]").val());
$("input[name=od_amount]").val(org_amount - item_coupon);
$("input[name=od_send_cost]").val($("input[name=org_send_cost]").val());
$("input[name=sc_cp_id]").val("");
calculate_order_amount(); calculate_order_amount();
$("#od_coupon_frm").remove(); $("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰적용").focus(); $("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove(); $(this).remove();
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
}); });
$("#sc_coupon_btn").click(function() { $("#sc_coupon_btn").click(function() {
@ -1089,6 +1104,21 @@ $(function() {
$(this).remove(); $(this).remove();
}); });
$("#od_b_addr2").focus(function() {
var zip1 = $("#od_b_zip1").val().replace(/[^0-9]/g, "");
var zip2 = $("#od_b_zip2").val().replace(/[^0-9]/g, "");
if(zip1 == "" || zip2 == "")
return false;
var code = String(zip1) + String(zip2);
if(zipcode == code)
return false;
zipcode = code;
calculate_sendcost(code);
});
$("#od_settle_bank").bind("click", function() { $("#od_settle_bank").bind("click", function() {
$("[name=od_deposit_name]").val( $("[name=od_b_name]").val() ); $("[name=od_deposit_name]").val( $("[name=od_b_name]").val() );
$("#settle_bank").show(); $("#settle_bank").show();
@ -1131,14 +1161,22 @@ function calculate_total_amount()
$("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원"); $("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원");
$("input[name=good_mny]").val(tot_sell_amount); $("input[name=good_mny]").val(tot_sell_amount);
$("input[name=od_amount]").val(sell_amount); $("input[name=od_amount]").val(sell_amount - tot_cp_amount);
$("input[name=org_od_amount]").val(sell_amount);
$("input[name=od_send_cost]").val(send_cost); $("input[name=od_send_cost]").val(send_cost);
<?php if($od_cnt > 0) { ?> $("input[name=item_coupon]").val(tot_cp_amount);
<?php if($oc_cnt > 0) { ?>
$("input[name=od_cp_id]").val(""); $("input[name=od_cp_id]").val("");
if($("#od_coupon_cancel").size()) {
$("#od_coupon_btn").text("쿠폰적용");
$("#od_coupon_cancel").remove();
}
<?php } ?> <?php } ?>
<?php if($sc_cnt > 0) { ?> <?php if($sc_cnt > 0) { ?>
$("input[name=sc_cp_id]").val(""); $("input[name=sc_cp_id]").val("");
if($("#sc_coupon_cancel").size()) {
$("#sc_coupon_btn").text("쿠폰적용");
$("#sc_coupon_cancel").remove();
}
<?php } ?> <?php } ?>
$("input[name=od_temp_point]").val(0); $("input[name=od_temp_point]").val(0);
<?php if($temp_point > 0 && $is_member) { ?> <?php if($temp_point > 0 && $is_member) { ?>
@ -1151,7 +1189,8 @@ function calculate_order_amount()
{ {
var sell_amount = parseInt($("input[name=od_amount]").val()); var sell_amount = parseInt($("input[name=od_amount]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val()); var send_cost = parseInt($("input[name=od_send_cost]").val());
var tot_amount = sell_amount + send_cost; var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
var tot_amount = sell_amount + send_cost + send_cost2;
$("input[name=good_mny]").val(tot_amount); $("input[name=good_mny]").val(tot_amount);
$("#od_tot_amount").text(number_format(String(tot_amount))); $("#od_tot_amount").text(number_format(String(tot_amount)));
@ -1182,6 +1221,20 @@ function calculate_temp_point()
$("input[name=max_temp_point]").val(temp_point); $("input[name=max_temp_point]").val(temp_point);
} }
function calculate_sendcost(code)
{
$.post(
"./ordersendcost.php",
{ zipcode: code },
function(data) {
$("input[name=od_send_cost2]").val(data);
$("#od_send_cost2").text(number_format(String(data)));
calculate_order_amount();
}
);
}
function forderform_check(f) function forderform_check(f)
{ {
errmsg = ""; errmsg = "";
@ -1394,6 +1447,8 @@ function gumae2baesong(f)
f.od_b_zip2.value = f.od_zip2.value; f.od_b_zip2.value = f.od_zip2.value;
f.od_b_addr1.value = f.od_addr1.value; f.od_b_addr1.value = f.od_addr1.value;
f.od_b_addr2.value = f.od_addr2.value; f.od_b_addr2.value = f.od_addr2.value;
calculate_sendcost(String(f.od_b_zip1.value) + String(f.od_b_zip2.value));
} }
</script> </script>

View File

@ -58,6 +58,7 @@ if ($error != "")
$i_amount = (int)$_POST['od_amount']; $i_amount = (int)$_POST['od_amount'];
$i_send_cost = (int)$_POST['od_send_cost']; $i_send_cost = (int)$_POST['od_send_cost'];
$i_send_cost2 = (int)$_POST['od_send_cost2'];
$i_temp_point = (int)$_POST['od_temp_point']; $i_temp_point = (int)$_POST['od_temp_point'];
@ -245,6 +246,17 @@ if ((int)($send_cost - $tot_sc_cp_amount) !== $i_send_cost) {
die("Error.."); die("Error..");
} }
// 추가배송비가 상이함
$zipcode = $od_b_zip1 . $od_b_zip2;
$sql = " select sc_id, sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
$tmp = sql_fetch($sql);
if(!$tmp['sc_id'])
$send_cost2 = 0;
else
$send_cost2 = (int)$tmp['sc_amount'];
if($send_cost2 !== $i_send_cost2)
die("Error...");
// 결제포인트가 상이함 // 결제포인트가 상이함
$tot_amount = $tot_od_amount + ($send_cost - $tot_sc_cp_amount); $tot_amount = $tot_od_amount + ($send_cost - $tot_sc_cp_amount);
// 회원이면서 포인트사용이면 // 회원이면서 포인트사용이면
@ -265,7 +277,7 @@ if($default['de_mileage_use']) {
} }
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0)) if (($i_temp_point > (int)$temp_point || $i_temp_point < 0))
die("Error..."); die("Error....");
if ($od_temp_point) if ($od_temp_point)
{ {
@ -288,7 +300,7 @@ if($default['de_mileage_use']) {
} }
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point']) if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point'])
die("Error..."); die("Error....");
if ($od_temp_point) if ($od_temp_point)
{ {
@ -297,7 +309,7 @@ if($default['de_mileage_use']) {
} }
} }
$i_amount = $i_amount + $i_send_cost - $i_temp_point; $i_amount = $i_amount + $i_send_cost + $i_send_cost2 - $i_temp_point;
if ($od_settle_case == "무통장") if ($od_settle_case == "무통장")
{ {
@ -419,6 +431,7 @@ $sql = " insert {$g4['shop_order_table']}
od_memo = '$od_memo', od_memo = '$od_memo',
od_send_cost = '$od_send_cost', od_send_cost = '$od_send_cost',
od_send_coupon = '$tot_sc_cp_amount', od_send_coupon = '$tot_sc_cp_amount',
od_send_cost2 = '$od_send_cost2',
od_coupon = '$tot_od_cp_amount', od_coupon = '$tot_od_cp_amount',
od_temp_amount = '$od_temp_amount', od_temp_amount = '$od_temp_amount',
od_temp_point = '$od_temp_point', od_temp_point = '$od_temp_point',

View File

@ -128,6 +128,7 @@ if(openwin != null) {
} }
$send_cost = $od['od_send_cost']; $send_cost = $od['od_send_cost'];
$send_cost2 = $od['od_send_cost2'];
$send_coupon = $od['od_send_coupon']; $send_coupon = $od['od_send_coupon'];
$org_send_cost = $send_cost + $send_coupon; $org_send_cost = $send_cost + $send_coupon;
?> ?>
@ -136,7 +137,7 @@ if(openwin != null) {
<?php <?php
// 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 // 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인
$od_coupon = $od['od_coupon']; $od_coupon = $od['od_coupon'];
$tot_amount = $tot_sell_amount + $send_cost - $tot_cp_amount - $od_coupon; $tot_amount = $tot_sell_amount + $send_cost + $send_cost2 - $tot_cp_amount - $od_coupon;
?> ?>
<dl id="sod_bsk_tot"> <dl id="sod_bsk_tot">
@ -163,6 +164,11 @@ if(openwin != null) {
<dd class="sod_bsk_dvr"><strong><?php echo number_format($send_coupon); ?> 원</strong></dd> <dd class="sod_bsk_dvr"><strong><?php echo number_format($send_coupon); ?> 원</strong></dd>
<?php } ?> <?php } ?>
<?php if ($send_cost2 > 0) { ?>
<dt class="sod_bsk_dvr">추가배송비</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($send_cost2); ?> 원</strong></dd>
<?php } ?>
<dt class="sod_bsk_cnt">총계</dt> <dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원</strong></dd> <dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_amount); ?> 원</strong></dd>

View File

@ -71,4 +71,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 배송비가 있다면 총계에 더한다 // 배송비가 있다면 총계에 더한다
if ($od_send_cost) if ($od_send_cost)
$ttotal_amount += $od_send_cost; $ttotal_amount += $od_send_cost;
// 추가배송비가 있다면 총계에 더한다
if ($od_send_cost2)
$ttotal_amount += $od_send_cost2;
?> ?>

19
shop/ordersendcost.php Normal file
View File

@ -0,0 +1,19 @@
<?php
include_once('./_common.php');
$code = $_POST['zipcode'];
if(!$code)
die('0');
$sql = " select sc_id, sc_amount
from {$g4['shop_sendcost_table']}
where sc_zip1 <= $code
and sc_zip2 >= $code ";
$row = sql_fetch($sql);
if(!$row['sc_id'])
die('0');
die($row['sc_amount']);
?>