쇼핑몰: #151 사용후기 모음 표준화 및 스타일 완료
This commit is contained in:
@ -570,6 +570,28 @@ input.required:focus {border:1px solid #b8c9c2;background:#21272e !important;col
|
||||
#sit_rel {margin:0 0 10px;padding:10px 10px 0}
|
||||
#sit_rel h2 {margin:0 0 10px}
|
||||
|
||||
/* 사용후기 모음 */
|
||||
#sps {zoom:1}
|
||||
#sps ol {margin:0;padding:0;border-top:1px solid #e9e9e9;list-style:none}
|
||||
#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 span {position:absolute;font-size:0;line-height:0}
|
||||
|
||||
.sps_section {float:left;width:630px}
|
||||
|
||||
#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 p {padding:0;width:100%;height:20px;overflow:hidden}
|
||||
.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}
|
||||
|
||||
/* 마이페이지 */
|
||||
#smb_my {}
|
||||
|
||||
|
||||
@ -21,85 +21,85 @@ if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 제목을 클릭하면 내용을 가지고 옴
|
||||
$(".is_subject").click(function(){
|
||||
var $is_content = $(this).parents().next(".is_content");
|
||||
if ($is_content.is(":visible")) {
|
||||
$is_content.hide();
|
||||
} else {
|
||||
$is_content.show();
|
||||
}
|
||||
}).css("cursor","pointer").attr("title","클릭하시면 후기내용을 볼수 있습니다.");
|
||||
});
|
||||
</script>
|
||||
<div id="sps">
|
||||
|
||||
<br>
|
||||
<table width=100% align=center cellpadding=0 cellspacing=0>
|
||||
<colgroup width=50></colgroup>
|
||||
<colgroup width=''></colgroup>
|
||||
<colgroup width=100></colgroup>
|
||||
<colgroup width=100></colgroup>
|
||||
<colgroup width=100></colgroup>
|
||||
<tr><td colspan="5" height="2" bgcolor="#ededed"></td></tr>
|
||||
<tr height=30 bgcolor="#f7f7f7" align=center>
|
||||
<td>번호</td>
|
||||
<td>상품후기</td>
|
||||
<td>작성자</td>
|
||||
<td>작성일</td>
|
||||
<td>평가점수</td>
|
||||
</tr>
|
||||
<tr><td colspan="5" height="1" bgcolor="#ededed"></td></tr>
|
||||
<?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']);
|
||||
<?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']);
|
||||
|
||||
$thumb = new g4_thumb(G4_DATA_PATH.'/itemuse', 500);
|
||||
$is_content = $thumb->run($row['is_content']);
|
||||
$is_time = substr($row['is_time'], 2, 14);
|
||||
$small_image = $row['it_id']."_s";
|
||||
$thumb = new g4_thumb(G4_DATA_PATH.'/itemuse', 500);
|
||||
$is_content = $thumb->run($row['is_content']);
|
||||
$is_time = substr($row['is_time'], 2, 14);
|
||||
$small_image = $row['it_id']."_s";
|
||||
|
||||
$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']}";
|
||||
$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>
|
||||
|
||||
<p id="sps_con_<?php echo $i; ?>">
|
||||
<?php echo $is_content; // 상품 문의 내용 ?>
|
||||
</p>
|
||||
|
||||
<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>
|
||||
|
||||
echo "
|
||||
<tr height=30>
|
||||
<td align=center>$num</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td width='120' align='center' valign='top'><a href='$it_href'>".get_it_image($small_image, 100, 100)."</a></td>
|
||||
<td valign='top'>
|
||||
<div style='padding:5px 0;'><a href='$it_href'>{$row2['it_name']}</a></div>
|
||||
<div class='is_subject'>{$row['is_subject']}</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td align=center>{$row['is_name']}</td>
|
||||
<td align=center>".substr($row['is_time'],0,10)."</td>
|
||||
<td align=center><img src='".G4_SHOP_URL."/img/star{$star}.gif' border=0></td>
|
||||
</tr>
|
||||
<tr class='is_content' style='display:none;'><td colspan='5' style='padding:10px;' class='lh'><div style='padding:20px;border:1px solid #ccc;'>$is_content</div></td></tr>
|
||||
<tr><td colspan='5' height='1' bgcolor='#ededed'></td></tr>
|
||||
";
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=5 align=center height=100>자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</table>
|
||||
<br><br>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 더보기
|
||||
$('.sps_con_btn button').click(function(){
|
||||
$this = $(this);
|
||||
sps_con_no = $this.attr('class');
|
||||
$('#'+sps_con_no).toggleClass('sps_con_full');
|
||||
});
|
||||
$('.sps_con_btn button').toggle(function(){
|
||||
$this.text('닫기');
|
||||
}, function(){
|
||||
$this.text('더보기');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user