쇼핑몰: #113 FAQ 표준화 및 스타일 완료
This commit is contained in:
@ -162,48 +162,6 @@ a:active {color:#000;text-decoration:underline}
|
|||||||
#text_size {display:none;position:absolute;top:-31px;left:-1px}
|
#text_size {display:none;position:absolute;top:-31px;left:-1px}
|
||||||
#text_size button {padding:0 10px;height:30px;border:1px solid #cfded8;border-bottom:0;background:#000;color:#fff;cursor:pointer}
|
#text_size button {padding:0 10px;height:30px;border:1px solid #cfded8;border-bottom:0;background:#000;color:#fff;cursor:pointer}
|
||||||
|
|
||||||
/* 인덱스 이미지 출력 */
|
|
||||||
#sidx_img {margin:0 0 20px}
|
|
||||||
|
|
||||||
/* 인덱스 상품 출력 */
|
|
||||||
/* 공통 */
|
|
||||||
.sidx_it_wrap {margin:0 0 30px;zoom:1}
|
|
||||||
.sidx_it_wrap:after {display:block;visibility:hidden;clear:both;content:''}
|
|
||||||
.sidx_it_wrap header {margin:0 0 20px;zoom:1}
|
|
||||||
.sidx_it_wrap header:after {display:block;visibility:hidden;clear:both;content:''}
|
|
||||||
.sidx_it_wrap h2 {float:left;margin:0 20px 0 0;padding:0;line-height:1em}
|
|
||||||
.sidx_it_wrap h2 a {text-decoration:none}
|
|
||||||
.sidx_it_wrap_hdesc {float:left;margin:0;padding:0;color:#777;line-height:1em}
|
|
||||||
|
|
||||||
.sidx_it {margin:0;padding:0;list-style:none;zoom:1}
|
|
||||||
.sidx_it:after {display:block;visibility:hidden;clear:both;content:''}
|
|
||||||
.sidx_it_li {position:relative}
|
|
||||||
|
|
||||||
/* 스킨 10 */
|
|
||||||
.sidx_it_10 .sidx_it_li {float:left;margin:0 25px 0 0;width:230px}
|
|
||||||
.sidx_it_10 .sidx_it_last {margin:0 !important}
|
|
||||||
.sidx_it_10 .sidx_it_a {display:block;font-weight:bold;text-decoration:none}
|
|
||||||
.sidx_it_10 span {display:block;margin:0 0 10px}
|
|
||||||
.sidx_it_10 b {display:block;margin:0 0 5px;font-weight:normal}
|
|
||||||
.sidx_it_10 .sidx_it_sns {position:absolute;top:190px;right:20px}
|
|
||||||
|
|
||||||
/* 공지사항 및 커뮤니티 새글 */
|
|
||||||
#sidx_lat {padding:15px 0 0;border-top:1px solid #ddd}
|
|
||||||
#sidx_lat h2 {text-align:center}
|
|
||||||
|
|
||||||
/* 배너 인덱스 출력 */
|
|
||||||
#sbn_idx {}
|
|
||||||
#sbn_idx h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
|
||||||
#sbn_idx ul {margin:0;padding:0;border:0;list-style:none}
|
|
||||||
#sbn_idx li {margin:0 0 1px}
|
|
||||||
|
|
||||||
/* 내용관리 */
|
|
||||||
#socc {padding:10px;border:1px solid #e9e9e9}
|
|
||||||
#socc header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
|
||||||
#socc_con {padding:10px 0}
|
|
||||||
.socc_admin {text-align:right}
|
|
||||||
.socc_img {text-align:center}
|
|
||||||
|
|
||||||
/* 하단 레이아웃 */
|
/* 하단 레이아웃 */
|
||||||
#ft {clear:both;padding:0 0 40px;border-top:1px solid #e9e9e9}
|
#ft {clear:both;padding:0 0 40px;border-top:1px solid #e9e9e9}
|
||||||
#ft h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
#ft h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
@ -342,4 +300,66 @@ input.required:focus {padding:3px 3px 4px;border:0;background:#21272e !important
|
|||||||
.pg_prev {border-right:1px solid #cfded8}
|
.pg_prev {border-right:1px solid #cfded8}
|
||||||
.pg_end,
|
.pg_end,
|
||||||
.pg_next {border-left:1px solid #cfded8}
|
.pg_next {border-left:1px solid #cfded8}
|
||||||
.pg_current {background:#333;color:#fff;font-weight:bold}
|
.pg_current {background:#333;color:#fff;font-weight:bold}
|
||||||
|
|
||||||
|
/* ########## 쇼핑몰 컨텐츠 ########## */
|
||||||
|
/* 인덱스 이미지 출력 */
|
||||||
|
#sidx_img {margin:0 0 20px}
|
||||||
|
|
||||||
|
/* 인덱스 상품 출력 */
|
||||||
|
/* 공통 */
|
||||||
|
.sidx_it_wrap {margin:0 0 30px;zoom:1}
|
||||||
|
.sidx_it_wrap:after {display:block;visibility:hidden;clear:both;content:''}
|
||||||
|
.sidx_it_wrap header {margin:0 0 20px;zoom:1}
|
||||||
|
.sidx_it_wrap header:after {display:block;visibility:hidden;clear:both;content:''}
|
||||||
|
.sidx_it_wrap h2 {float:left;margin:0 20px 0 0;padding:0;line-height:1em}
|
||||||
|
.sidx_it_wrap h2 a {text-decoration:none}
|
||||||
|
.sidx_it_wrap_hdesc {float:left;margin:0;padding:0;color:#777;line-height:1em}
|
||||||
|
|
||||||
|
.sidx_it {margin:0;padding:0;list-style:none;zoom:1}
|
||||||
|
.sidx_it:after {display:block;visibility:hidden;clear:both;content:''}
|
||||||
|
.sidx_it_li {position:relative}
|
||||||
|
|
||||||
|
/* 스킨 10 */
|
||||||
|
.sidx_it_10 .sidx_it_li {float:left;margin:0 25px 0 0;width:230px}
|
||||||
|
.sidx_it_10 .sidx_it_last {margin:0 !important}
|
||||||
|
.sidx_it_10 .sidx_it_a {display:block;font-weight:bold;text-decoration:none}
|
||||||
|
.sidx_it_10 span {display:block;margin:0 0 10px}
|
||||||
|
.sidx_it_10 b {display:block;margin:0 0 5px;font-weight:normal}
|
||||||
|
.sidx_it_10 .sidx_it_sns {position:absolute;top:190px;right:20px}
|
||||||
|
|
||||||
|
/* 공지사항 및 커뮤니티 새글 */
|
||||||
|
#sidx_lat {padding:15px 0 0;border-top:1px solid #ddd}
|
||||||
|
#sidx_lat h2 {text-align:center}
|
||||||
|
|
||||||
|
/* 배너 인덱스 출력 */
|
||||||
|
#sbn_idx {}
|
||||||
|
#sbn_idx h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
|
#sbn_idx ul {margin:0;padding:0;border:0;list-style:none}
|
||||||
|
#sbn_idx li {margin:0 0 1px}
|
||||||
|
|
||||||
|
/* 내용관리 */
|
||||||
|
#socc {padding:10px;border:1px solid #e9e9e9}
|
||||||
|
#socc header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
|
#socc_con {padding:10px 0}
|
||||||
|
.socc_admin {text-align:right}
|
||||||
|
.socc_img {text-align:center}
|
||||||
|
|
||||||
|
/* FAQ 관리 */
|
||||||
|
#sfaq {}
|
||||||
|
#sfaq header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
|
#sfaq_wrap {padding:10px 0}
|
||||||
|
#sfaq_wrap h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||||
|
#sfaq_wrap ol {margin:0;padding:0;list-style:none}
|
||||||
|
#sfaq_list {margin:0 0 10px;border:1px solid #ccc}
|
||||||
|
#sfaq_list li {border-bottom:1px solid #fff;background:#f7f7f7}
|
||||||
|
#sfaq_list a {display:block;padding:10px;font-weight:bold;text-decoration:none}
|
||||||
|
#sfaq_list a:focus,
|
||||||
|
#sfaq_list a:hover {background:#626870;color:#fff}
|
||||||
|
#sfaq_con {border:1px solid #e9e9e9;border-top:0}
|
||||||
|
#sfaq_con li {padding:0 0 10px}
|
||||||
|
#sfaq_con h3 {padding:10px;background:#f7f7f7;border-top:1px solid #e9e9e9}
|
||||||
|
#sfaq_con p {padding:10px}
|
||||||
|
.sfaq_tolist {padding:0 10px;text-align:right}
|
||||||
|
.sfaq_admin {text-align:right}
|
||||||
|
.sfaq_img {text-align:center}
|
||||||
164
shop/faq.php
164
shop/faq.php
@ -1,71 +1,93 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (!$fm_id) $fm_id = 1;
|
if (!$fm_id) $fm_id = 1;
|
||||||
|
|
||||||
// FAQ MASTER
|
// FAQ MASTER
|
||||||
$sql = " select * from {$g4['shop_faq_master_table']} where fm_id = '$fm_id' ";
|
$sql = " select * from {$g4['shop_faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
$fm = sql_fetch($sql);
|
$fm = sql_fetch($sql);
|
||||||
if (!$fm['fm_id'])
|
if (!$fm['fm_id'])
|
||||||
alert('등록된 내용이 없습니다.');
|
alert('등록된 내용이 없습니다.');
|
||||||
|
|
||||||
$g4['title'] = $fm['fm_subject'];
|
$g4['title'] = $fm['fm_subject'];
|
||||||
include_once('./_head.php');
|
include_once('./_head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<img src="<?php echo G4_SHOP_URL; ?>/img/top_faq.gif" border=0><p>
|
<?php
|
||||||
|
if ($is_admin)
|
||||||
<?php
|
echo '<div class="sfaq_admin"><a href="'.G4_ADMIN_URL.'/shop_admin/faqmasterform.php?w=u&fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
|
||||||
$himg = G4_DATA_PATH."/faq/{$fm_id}_h";
|
?>
|
||||||
if (file_exists($himg))
|
|
||||||
echo "<img src='".G4_DATA_URL."/faq/{$fm_id}_h' border=0><br>";
|
<?php
|
||||||
|
$himg = G4_DATA_PATH.'/faq/'.$fm_id.'_h';
|
||||||
if ($is_admin)
|
if (file_exists($himg))
|
||||||
echo "<p align=center><a href='".G4_ADMIN_URL."/shop_admin/faqmasterform.php?w=u&fm_id=$fm_id'><img src='".G4_SHOP_URL."/img/btn_admin_modify.gif' border=0></a></p>";
|
echo '<div id="sfaq_himg" class="sfaq_img"><img src="'.G4_DATA_URL.'/faq/'.$fm_id.'_h" alt=""></div>';
|
||||||
|
|
||||||
// 상단 HTML
|
// 상단 HTML
|
||||||
echo stripslashes($fm['fm_head_html']);
|
echo '<div id="sfaq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
|
||||||
echo "<br>";
|
?>
|
||||||
|
|
||||||
echo "<table width=95% align=center cellpadding=1 cellspacing=0>\n";
|
<article id="sfaq" class="sfaq_<?=$fm_id?>">
|
||||||
echo "<tr><td class=bg_faq><table width=100% cellpadding=2 cellspacing=1 border=0 bgcolor=#FFFFFF>\n";
|
<header>
|
||||||
|
<h1><?php echo $g4['title']; ?></h1>
|
||||||
$sql = " select * from {$g4['shop_faq_table']}
|
</header>
|
||||||
where fm_id = '$fm_id'
|
|
||||||
order by fa_order , fa_id ";
|
<div id="sfaq_wrap">
|
||||||
$result = sql_query($sql);
|
<?php // FAQ 목차
|
||||||
$str = "";
|
$sql = " select * from {$g4['shop_faq_table']}
|
||||||
for ($i=1; $row=sql_fetch_array($result); $i++)
|
where fm_id = '$fm_id'
|
||||||
{
|
order by fa_order , fa_id ";
|
||||||
echo "<tr>";
|
$result = sql_query($sql);
|
||||||
echo "<td width=20 align=right valign=top>$i.</td>";
|
for ($i=1; $row=sql_fetch_array($result); $i++)
|
||||||
echo "<td valign=top><a href='#faq_{$fm_id}_{$i}' class=faq>" . stripslashes($row['fa_subject']) . "</a></td>";
|
{
|
||||||
echo "</tr>\n";
|
if ($i == 1)
|
||||||
|
{
|
||||||
$str .= "<a name='faq_{$fm_id}_{$i}'><br></a><table cellpadding=2 cellspacing=1 width=100%>";
|
?>
|
||||||
$str .= "<tr>";
|
<section id="sfaq_list">
|
||||||
$str .= "<td width=38 valign=top align=right><img src='".G4_SHOP_URL."/img/icon_poll_q.gif'></td>";
|
<h2>FAQ 목차</h2>
|
||||||
$str .= "<td class=point valign=top>" . stripslashes($row['fa_subject']) . "</td>";
|
<ol>
|
||||||
$str .= "</tr>";
|
<?php } ?>
|
||||||
$str .= "<tr>";
|
<li><a href="#sfaq_<?php echo $fm_id.'_'.$i; ?>"><?php echo stripslashes($row['fa_subject']); ?></a></li>
|
||||||
$str .= "<td valign=top align=right><img src='".G4_SHOP_URL."/img/icon_answer.gif'></td>";
|
<?php }
|
||||||
$str .= "<td class=leading valign=top>" . stripslashes($row['fa_content']) . "</td>";
|
if ($i > 1) echo '</ol></section>';
|
||||||
$str .= "</tr>";
|
?>
|
||||||
$str .= "<tr>";
|
|
||||||
$str .= "<td colspan=2 align=right><a href='#g4_head'><img src='".G4_SHOP_URL."/img/icon_top.gif' border=0></a></td>";
|
<?php // FAQ 내용
|
||||||
$str .= "</tr>";
|
$resultb = sql_query($sql);
|
||||||
$str .= "</table>";
|
for ($i=1; $row=sql_fetch_array($resultb); $i++)
|
||||||
}
|
{
|
||||||
echo "</table></td></tr></table>\n";
|
if ($i == 1)
|
||||||
|
{
|
||||||
echo $str;
|
?>
|
||||||
|
<section id="sfaq_con">
|
||||||
echo "<br>";
|
<h2>FAQ 내용</h2>
|
||||||
echo stripslashes($fm['fm_tail_html']);
|
<ol>
|
||||||
|
<?php } ?>
|
||||||
$timg = G4_DATA_PATH."/faq/{$fm_id}_t";
|
<li id="sfaq_<?php echo $fm_id.'_'.$i; ?>">
|
||||||
if (file_exists($timg))
|
<h3><?php echo stripslashes($row['fa_subject']); ?></h3>
|
||||||
echo "<br><img src='".G4_DATA_URL."/faq/{$fm_id}_t' border=0><br>";
|
<p>
|
||||||
|
<?php echo stripslashes($row['fa_content']); ?>
|
||||||
include_once('./_tail.php');
|
</p>
|
||||||
?>
|
<div class="sfaq_tolist"><a href="#sfaq_list" class="btn01">FAQ 목차</a></div>
|
||||||
|
</li>
|
||||||
|
<?php }
|
||||||
|
if ($i > 1) echo '</ol></section>';
|
||||||
|
|
||||||
|
if ($i == 1) echo '<p>등록된 FAQ가 없습니다.<br><a href="'.G4_ADMIN_URL.'/shop_admin/faqmasterlist.php">FAQ를 새로 등록하시려면 FAQ관리</a> 메뉴를 이용하십시오.</p>';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// 하단 HTML
|
||||||
|
echo '<div id="sfaq_thtml">'.stripslashes($fm['fm_tail_html']).'</div>';
|
||||||
|
|
||||||
|
$timg = G4_DATA_PATH.'/faq/'.$fm_id.'_t';
|
||||||
|
if (file_exists($timg))
|
||||||
|
echo '<div id="sfaq_timg" class="sfaq_img"><img src="'.G4_DATA_URL.'/faq/'.$fm_id.'_t" alt=""></div>';
|
||||||
|
|
||||||
|
if ($is_admin)
|
||||||
|
echo '<div class="sfaq_admin"><a href="'.G4_ADMIN_URL.'/shop_admin/faqmasterform.php?w=u&fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
|
||||||
|
|
||||||
|
include_once('./_tail.php');
|
||||||
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user