사용후기에 관리자의 답변 달기 추가

This commit is contained in:
thisgun
2017-03-20 14:43:02 +09:00
parent 4cdd64ba33
commit 393ed70b79
22 changed files with 263 additions and 6 deletions

View File

@ -11,9 +11,19 @@ $sql = " select *
left join {$g5['g5_shop_item_table']} c on (a.it_id = c.it_id)
where is_id = '$is_id' ";
$is = sql_fetch($sql);
if (!$is['is_id'])
alert('등록된 자료가 없습니다.');
// 사용후기 의 답변 필드 추가
if (!isset($is['is_reply_subject'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_use_table']}`
ADD COLUMN `is_reply_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `is_confirm`,
ADD COLUMN `is_reply_content` TEXT NOT NULL AFTER `is_reply_subject`,
ADD COLUMN `is_reply_name` VARCHAR(25) NOT NULL DEFAULT '' AFTER `is_reply_content`
", true);
}
$name = get_sideview($is['mb_id'], get_text($is['is_name']), $is['mb_email'], $is['mb_homepage']);
// 확인
@ -67,6 +77,15 @@ $qstr .= ($qstr ? '&' : '').'sca='.$sca;
<th scope="row">내용</th>
<td><?php echo editor_html('is_content', get_text($is['is_content'], 0)); ?></td>
</tr>
<tr>
<th scope="row"><label for="is_reply_subject">답변 제목</label></th>
<td><input type="text" name="is_reply_subject" required class="required frm_input" id="is_reply_subject" size="100"
value="<?php echo get_text($is['is_reply_subject']); ?>"></td>
</tr>
<tr>
<th scope="row">답변 내용</th>
<td><?php echo editor_html('is_reply_content', get_text($is['is_reply_content'], 0)); ?></td>
</tr>
<tr>
<th scope="row">확인</th>
<td>
@ -90,7 +109,7 @@ $qstr .= ($qstr ? '&amp;' : '').'sca='.$sca;
function fitemuseform_submit(f)
{
<?php echo get_editor_js('is_content'); ?>
<?php echo get_editor_js('is_reply_content'); ?>
return true;
}
</script>

View File

@ -16,7 +16,10 @@ if ($w == "u")
$sql = "update {$g5['g5_shop_item_use_table']}
set is_subject = '$is_subject',
is_content = '$is_content',
is_confirm = '$is_confirm'
is_confirm = '$is_confirm',
is_reply_subject = '$is_reply_subject',
is_reply_content = '$is_reply_content',
is_reply_name = '".$member['mb_nick']."'
where is_id = '$is_id' ";
sql_query($sql);

View File

@ -159,11 +159,14 @@ ul,li{list-style:none;padding:0;margin:0;}
#sps dd img {position:relative;top:-2px}
.sps_section {margin-left:80px;display:block;}
.sps_section .is_use_reply{background:url('../mobile/shop/img/use_reply.png') no-repeat;text-indent:30px;line-height:1.5em}
.sps_section p {padding:0;width:100%}
.sps_con_full {padding:0;height:auto !important}
.sps_con_btn {margin:5px 0 0;text-align:right}
.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff}
.sps_reply .sps_img {text-align:right;width:70px}
/* 상품문의 모음 */
#sqa_sch {margin:10px 10px}
#sqa_sch #sfl{height:24px}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -22,6 +22,9 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
$is_subject = conv_subject($row['is_subject'],50,"…");
//$is_content = ($row['wr_content']);
$is_content = get_view_thumbnail(conv_content($row['is_content'], 1), $thumbnail_width);
$is_reply_name = !empty($row['is_reply_name']) ? get_text($row['is_reply_name']) : '';
$is_reply_subject = !empty($row['is_reply_subject']) ? conv_subject($row['is_reply_subject'],50,"…") : '';
$is_reply_content = !empty($row['is_reply_content']) ? get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width) : '';
$is_time = substr($row['is_time'], 2, 8);
$is_href = './itemuselist.php?bo_table=itemuse&amp;wr_id='.$row['wr_id'];
@ -52,6 +55,21 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
<a href="<?php echo $itemuse_formupdate."&amp;is_id={$row['is_id']}&amp;w=d&amp;hash={$hash}"; ?>" class="itemuse_delete btn01">삭제</a>
</div>
<?php } ?>
<?php if( $is_reply_subject ){ // 사용후기 답변 내용이 있다면 ?>
<div class="sit_use_reply">
<div class="use_reply_icon">답변</div>
<div class="use_reply_tit">
<?php echo $is_reply_subject; // 답변 제목 ?>
</div>
<div class="use_reply_name">
<?php echo $is_reply_name; // 답변자 이름 ?>
</div>
<div class="use_reply_p">
<?php echo $is_reply_content; // 답변 내용 ?>
</div>
</div>
<?php } //end if ?>
</div>
</li>

View File

@ -75,6 +75,37 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
</section>
</li>
<?php
if( !empty($row['is_reply_subject']) ){ //사용후기 답변이 있다면
$is_reply_content = get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width);
?>
<li class="sps_reply">
<div class="sps_img">
<a href="<?php echo $it_href; ?>">
<?php echo get_itemuselist_thumbnail($row['it_id'], $row['is_reply_content'], 50, 50); ?>
<span><?php echo $row2['it_name']; ?></span>
</a>
</div>
<section class="sps_section">
<h2 class="is_use_reply"><?php echo get_text($row['is_reply_subject']); ?></h2>
<dl class="sps_dl">
<dt>작성자</dt>
<dd><?php echo $row['is_reply_name']; ?></dd>
</dl>
<div id="sps_con_<?php echo $i; ?>_reply" style="display:none;">
<?php echo $is_reply_content; // 사용후기 답변 내용 ?>
</div>
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>_reply">보기</button></div>
</section>
</li>
<?php } //end if ?>
<?php }
if ($i > 0) echo '</ol>';
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';

View File

@ -264,6 +264,13 @@
#sit_use_write li label {display:inline-block;width:80px}
#sit_use_write_star {margin:0;padding:0;list-style:none}
.sit_use_reply{position:relative;border-top:1px dotted #bbb;margin:10px 0 0 ;padding:10px 0 0 40px}
.use_reply_icon{position:absolute;top:10px;left:5px;background:url('./img/use_reply.png') no-repeat 0 0; width:28px;height:17px;text-indent:-999px;overflow:hidden;}
.use_reply_tit{font-weight:bold;line-height:1.5em}
.use_reply_name{font-size:0.92em;color:#777;margin:5px 0}
.use_reply_p{padding:10px;background:#f2f2f2;line-height:1.5em}
.use_reply_p img{max-width:100%}
/* 상품 상세보기 - 상품문의 */
#sit_qa {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9}
#sit_qa_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -21,6 +21,9 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
$is_name = get_text($row['is_name']);
$is_subject = conv_subject($row['is_subject'],50,"…");
$is_content = get_view_thumbnail(conv_content($row['is_content'], 1), $thumbnail_width);
$is_reply_name = !empty($row['is_reply_name']) ? get_text($row['is_reply_name']) : '';
$is_reply_subject = !empty($row['is_reply_subject']) ? conv_subject($row['is_reply_subject'],50,"…") : '';
$is_reply_content = !empty($row['is_reply_content']) ? get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width) : '';
$is_time = substr($row['is_time'], 2, 8);
$is_href = './itemuselist.php?bo_table=itemuse&amp;wr_id='.$row['wr_id'];
@ -43,6 +46,7 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
<div id="sit_use_con_<?php echo $i; ?>" class="sit_use_con">
<div class="sit_use_p">
<?php echo $is_content; // 사용후기 내용 ?>
</div>
<?php if ($is_admin || $row['mb_id'] == $member['mb_id']) { ?>
@ -51,6 +55,21 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
<a href="<?php echo $itemuse_formupdate."&amp;is_id={$row['is_id']}&amp;w=d&amp;hash={$hash}"; ?>" class="itemuse_delete btn01">삭제</a>
</div>
<?php } ?>
<?php if( $is_reply_subject ){ // 사용후기 답변 내용이 있다면 ?>
<div class="sit_use_reply">
<div class="use_reply_icon">답변</div>
<div class="use_reply_tit">
<?php echo $is_reply_subject; // 답변 제목 ?>
</div>
<div class="use_reply_name">
<?php echo $is_reply_name; // 답변자 이름 ?>
</div>
<div class="use_reply_p">
<?php echo $is_reply_content; // 답변 내용 ?>
</div>
</div>
<?php } //end if ?>
</div>
</li>

View File

@ -75,6 +75,37 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
</section>
</li>
<?php
if( !empty($row['is_reply_subject']) ){ //사용후기 답변이 있다면
$is_reply_content = get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width);
?>
<li class="sps_reply">
<div class="sps_img">
<a href="<?php echo $it_href; ?>">
<?php echo get_itemuselist_thumbnail($row['it_id'], $row['is_reply_content'], 50, 50); ?>
<span><?php echo $row2['it_name']; ?></span>
</a>
</div>
<section class="sps_section">
<h2 class="is_use_reply"><?php echo get_text($row['is_reply_subject']); ?></h2>
<dl class="sps_dl">
<dt>작성자</dt>
<dd><?php echo $row['is_reply_name']; ?></dd>
</dl>
<div id="sps_con_<?php echo $i; ?>_reply" style="display:none;">
<?php echo $is_reply_content; // 사용후기 답변 내용 ?>
</div>
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>_reply">보기</button></div>
</section>
</li>
<?php } //end if ?>
<?php }
if ($i > 0) echo '</ol>';
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';

View File

@ -442,6 +442,12 @@
.sit_use_p {margin:0 0 10px;padding:10px;border:1px solid #e9e9e9;background:#fff}
.sit_use_cmd {text-align:right}
.sit_use_reply{position:relative;border-top:1px dotted #bbb;margin:10px 0 0 ;padding:10px 0 0 40px}
.use_reply_icon{position:absolute;top:10px;left:5px;background:url('./img/use_reply.png') no-repeat 0 0; width:28px;height:17px;text-indent:-999px;overflow:hidden;}
.use_reply_tit{font-weight:bold;line-height:1.5em}
.use_reply_name{font-size:0.92em;color:#777;margin:5px 0}
.use_reply_p{padding:10px;border:1px solid #e9e9e9;background:#fff;line-height:1.5em}
#sit_use_wbtn {margin:0 0 5px;text-align:right}
#sit_use_write {}
@ -506,16 +512,19 @@
#sps li {position:relative;padding:10px;border-bottom:1px solid #e9e9e9}
#sps li:after {display:block;visibility:hidden;clear:both;content:""}
.sps_img {float:left;margin:0 10px 0 0;width:80px}
.sps_img {float:left;margin:0 10px 0 0;width:70px}
.sps_img span {position:absolute;font-size:0;line-height:0;overflow:hidden}
.sps_reply .sps_img {text-align:right;width:70px;}
.sps_reply .sps_section h2{background:url('./img/use_reply.png') no-repeat 0 0;text-indent:30px;line-height:1.5em;}
#sps dl {margin:5px 0 10px;zoom:1}
#sps dl:after {display:block;visibility:hidden;clear:both;content:""}
#sps dt {float:left}
#sps dd {float:left;margin:0 20px 0 5px}
#sps dd img {position:relative;top:-2px}
.sps_section {float:left;width:630px}
.sps_section {float:left;width:640px}
.sps_section p {padding:0;width:100%}
.sps_con_full {padding:0;height:auto !important}
.sps_con_btn {margin:5px 0 0;text-align:right}

View File

@ -158,11 +158,14 @@ ul,li{list-style:none;padding:0;margin:0;}
#sps dd img {position:relative;top:-2px}
.sps_section {margin-left:80px;display:block;}
.sps_section .is_use_reply{background:url('../mobile/shop/img/use_reply.png') no-repeat;text-indent:30px;line-height:1.5em}
.sps_section p {padding:0;width:100%}
.sps_con_full {padding:0;height:auto !important}
.sps_con_btn {margin:5px 0 0;text-align:right}
.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff}
.sps_reply .sps_img {text-align:right;width:70px}
/* 상품문의 모음 */
#sqa_sch {margin:10px 10px}
#sqa_sch #sfl{height:24px}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -22,6 +22,9 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
$is_subject = conv_subject($row['is_subject'],50,"…");
//$is_content = ($row['wr_content']);
$is_content = get_view_thumbnail(conv_content($row['is_content'], 1), $thumbnail_width);
$is_reply_name = !empty($row['is_reply_name']) ? get_text($row['is_reply_name']) : '';
$is_reply_subject = !empty($row['is_reply_subject']) ? conv_subject($row['is_reply_subject'],50,"…") : '';
$is_reply_content = !empty($row['is_reply_content']) ? get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width) : '';
$is_time = substr($row['is_time'], 2, 8);
$is_href = './itemuselist.php?bo_table=itemuse&amp;wr_id='.$row['wr_id'];
@ -52,6 +55,21 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
<a href="<?php echo $itemuse_formupdate."&amp;is_id={$row['is_id']}&amp;w=d&amp;hash={$hash}"; ?>" class="itemuse_delete btn01">삭제</a>
</div>
<?php } ?>
<?php if( $is_reply_subject ){ // 사용후기 답변 내용이 있다면 ?>
<div class="sit_use_reply">
<div class="use_reply_icon">답변</div>
<div class="use_reply_tit">
<?php echo $is_reply_subject; // 답변 제목 ?>
</div>
<div class="use_reply_name">
<?php echo $is_reply_name; // 답변자 이름 ?>
</div>
<div class="use_reply_p">
<?php echo $is_reply_content; // 답변 내용 ?>
</div>
</div>
<?php } //end if ?>
</div>
</li>

View File

@ -75,6 +75,37 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
</section>
</li>
<?php
if( !empty($row['is_reply_subject']) ){ //사용후기 답변이 있다면
$is_reply_content = get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width);
?>
<li class="sps_reply">
<div class="sps_img">
<a href="<?php echo $it_href; ?>">
<?php echo get_itemuselist_thumbnail($row['it_id'], $row['is_reply_content'], 50, 50); ?>
<span><?php echo $row2['it_name']; ?></span>
</a>
</div>
<section class="sps_section">
<h2 class="is_use_reply"><?php echo get_text($row['is_reply_subject']); ?></h2>
<dl class="sps_dl">
<dt>작성자</dt>
<dd><?php echo $row['is_reply_name']; ?></dd>
</dl>
<div id="sps_con_<?php echo $i; ?>_reply" style="display:none;">
<?php echo $is_reply_content; // 사용후기 답변 내용 ?>
</div>
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>_reply">보기</button></div>
</section>
</li>
<?php } //end if ?>
<?php }
if ($i > 0) echo '</ol>';
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';

View File

@ -264,6 +264,12 @@
#sit_use_write li label {display:inline-block;width:80px}
#sit_use_write_star {margin:0;padding:0;list-style:none}
.sit_use_reply{position:relative;border-top:1px dotted #bbb;margin:10px 0 0 ;padding:10px 0 0 40px}
.use_reply_icon{position:absolute;top:10px;left:5px;background:url('./img/use_reply.png') no-repeat 0 0; width:28px;height:17px;text-indent:-999px;overflow:hidden;}
.use_reply_tit{font-weight:bold;line-height:1.5em}
.use_reply_name{font-size:0.92em;color:#777;margin:5px 0}
.use_reply_p{padding:10px;background:#f2f2f2;line-height:1.5em}
/* 상품 상세보기 - 상품문의 */
#sit_qa {margin:0 0 10px;padding:10px 10px 20px;border-bottom:1px solid #e9e9e9}
#sit_qa_ol {margin:0 0 5px;padding:0;border-top:1px solid #e9e9e9;list-style:none}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -21,6 +21,9 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
$is_name = get_text($row['is_name']);
$is_subject = conv_subject($row['is_subject'],50,"…");
$is_content = get_view_thumbnail(conv_content($row['is_content'], 1), $thumbnail_width);
$is_reply_name = !empty($row['is_reply_name']) ? get_text($row['is_reply_name']) : '';
$is_reply_subject = !empty($row['is_reply_subject']) ? conv_subject($row['is_reply_subject'],50,"…") : '';
$is_reply_content = !empty($row['is_reply_content']) ? get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width) : '';
$is_time = substr($row['is_time'], 2, 8);
$is_href = './itemuselist.php?bo_table=itemuse&amp;wr_id='.$row['wr_id'];
@ -43,6 +46,7 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
<div id="sit_use_con_<?php echo $i; ?>" class="sit_use_con">
<div class="sit_use_p">
<?php echo $is_content; // 사용후기 내용 ?>
</div>
<?php if ($is_admin || $row['mb_id'] == $member['mb_id']) { ?>
@ -51,6 +55,21 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
<a href="<?php echo $itemuse_formupdate."&amp;is_id={$row['is_id']}&amp;w=d&amp;hash={$hash}"; ?>" class="itemuse_delete btn01">삭제</a>
</div>
<?php } ?>
<?php if( $is_reply_subject ){ // 사용후기 답변 내용이 있다면 ?>
<div class="sit_use_reply">
<div class="use_reply_icon">답변</div>
<div class="use_reply_tit">
<?php echo $is_reply_subject; // 답변 제목 ?>
</div>
<div class="use_reply_name">
<?php echo $is_reply_name; // 답변자 이름 ?>
</div>
<div class="use_reply_p">
<?php echo $is_reply_content; // 답변 내용 ?>
</div>
</div>
<?php } //end if ?>
</div>
</li>

View File

@ -75,6 +75,37 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
</section>
</li>
<?php
if( !empty($row['is_reply_subject']) ){ //사용후기 답변이 있다면
$is_reply_content = get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width);
?>
<li class="sps_reply">
<div class="sps_img">
<a href="<?php echo $it_href; ?>">
<?php echo get_itemuselist_thumbnail($row['it_id'], $row['is_reply_content'], 50, 50); ?>
<span><?php echo $row2['it_name']; ?></span>
</a>
</div>
<section class="sps_section">
<h2 class="is_use_reply"><?php echo get_text($row['is_reply_subject']); ?></h2>
<dl class="sps_dl">
<dt>작성자</dt>
<dd><?php echo $row['is_reply_name']; ?></dd>
</dl>
<div id="sps_con_<?php echo $i; ?>_reply" style="display:none;">
<?php echo $is_reply_content; // 사용후기 답변 내용 ?>
</div>
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>_reply">보기</button></div>
</section>
</li>
<?php } //end if ?>
<?php }
if ($i > 0) echo '</ol>';
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';

View File

@ -442,6 +442,12 @@
.sit_use_p {margin:0 0 10px;padding:10px;border:1px solid #e9e9e9;background:#fff}
.sit_use_cmd {text-align:right}
.sit_use_reply{position:relative;border-top:1px dotted #bbb;margin:10px 0 0 ;padding:10px 0 0 40px}
.use_reply_icon{position:absolute;top:10px;left:5px;background:url('./img/use_reply.png') no-repeat 0 0; width:28px;height:17px;text-indent:-999px;overflow:hidden;}
.use_reply_tit{font-weight:bold;line-height:1.5em}
.use_reply_name{font-size:0.92em;color:#777;margin:5px 0}
.use_reply_p{padding:10px;border:1px solid #e9e9e9;background:#fff;line-height:1.5em}
#sit_use_wbtn {margin:0 0 5px;text-align:right}
#sit_use_write {}
@ -506,16 +512,19 @@
#sps li {position:relative;padding:10px;border-bottom:1px solid #e9e9e9}
#sps li:after {display:block;visibility:hidden;clear:both;content:""}
.sps_img {float:left;margin:0 10px 0 0;width:80px}
.sps_img {float:left;margin:0 10px 0 0;width:70px}
.sps_img span {position:absolute;font-size:0;line-height:0;overflow:hidden}
.sps_reply .sps_img {text-align:right;width:70px;}
.sps_reply .sps_section h2{background:url('./img/use_reply.png') no-repeat 0 0;text-indent:30px;line-height:1.5em;}
#sps dl {margin:5px 0 10px;zoom:1}
#sps dl:after {display:block;visibility:hidden;clear:both;content:""}
#sps dt {float:left}
#sps dd {float:left;margin:0 20px 0 5px}
#sps dd img {position:relative;top:-2px}
.sps_section {float:left;width:630px}
.sps_section {float:left;width:640px}
.sps_section p {padding:0;width:100%}
.sps_con_full {padding:0;height:auto !important}
.sps_con_btn {margin:5px 0 0;text-align:right}