쇼핑몰: #98 레이아웃 이벤트, 커뮤니티 섹션 표준화 및 스타일 완료

This commit is contained in:
whitedot
2013-04-29 10:34:12 +09:00
parent e1cd082157
commit 6fa517685f
3 changed files with 60 additions and 36 deletions

View File

@ -123,6 +123,20 @@ a:active {color:#000;text-decoration:underline}
#container {z-index:4;position:relative;float:left;padding:25px 15px 15px;width:728px;min-height:500px;height:auto !important;height:500px;border:1px solid #cfded8;background:#fff;zoom:1}
#container:after {display:block;visibility:hidden;clear:both;content:""}
#sev {margin:0 0 5px;padding:0 0 10px;border:1px solid #ecc9d6;background:#fff8fb}
#sev h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#sev ul {margin:0;padding:10px 0 0;border:0;background:#fff;list-style:none}
#sev .sev_img {display:block;border-bottom:1px solid #faedf2}
#sev .sev_text {display:block;padding:7px 10px 5px;border-bottom:1px solid #faedf2;text-decoration:none}
#sev strong {}
#sev_empty {padding:15px 0;text-align:center}
#scomm {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#faf9f5}
#scomm h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#scomm ul {margin:0;padding:10px 0 0;border:0;background:#fff;list-style:none}
#scomm a {display:block;padding:7px 10px 5px;border-bottom:1px solid #f4f4f4;text-decoration:none}
#scomm_empty {padding:15px 0;text-align:center}
/* 텍스트 크기 조절 */
#text_size {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}

View File

@ -2,20 +2,22 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table bgcolor=#FFFFFF width=100% cellpadding=0 cellspacing=0>
<tr><td align=center valign=top height=50><img src='<?=G4_SHOP_URL?>/img/bar_community.gif'></td></tr>
<?
$hsql = " select bo_table, bo_subject from {$g4['board_table']} order by gr_id, bo_table ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{
if ($i > 0)
echo "<tr><td align=center><img src='".G4_SHOP_URL."/img/dot_line.gif'></td></tr>\n";
<section id="scomm">
<h2>쇼핑몰 커뮤니티</h2>
echo "<tr><td height=22>&nbsp;&nbsp;· <a href='".G4_BBS_URL."/board.php?bo_table={$row['bo_table']}'>{$row['bo_subject']}</a></td></tr>\n";
}
<ul>
if ($i==0)
echo "<tr><td height=50 align=center>등록된 게시판이 없습니다.</td></tr>\n";
?>
</table>
<?php
$hsql = " select bo_table, bo_subject from {$g4['board_table']} order by gr_id, bo_table ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{
echo '<li><a href="'.G4_BBS_URL.'/board.php?bo_table='.$row['bo_table'].'">'.$row['bo_subject'].'</a></li>'.PHP_EOL;
}
if ($i==0)
echo '<li id="scomm_empty">이벤트 없음</li>'.PHP_EOL;
?>
</ul>
</section>

View File

@ -2,29 +2,37 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table bgcolor=#FFFFFF width=100% cellpadding=0 cellspacing=0>
<tr><td align=center valign=top height=50><img src='<?=G4_SHOP_URL?>/img/bar_event.gif'></td></tr>
<?
$hsql = " select ev_id, ev_subject, ev_subject_strong from {$g4['shop_event_table']} where ev_use = '1' order by ev_id desc ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{
if ($i > 0)
echo "<tr><td align=center><img src='".G4_SHOP_URL."/img/dot_line.gif'></td></tr>\n";
<section id="sev">
<h2>쇼핑몰 이벤트</h2>
$href = G4_SHOP_URL."/event.php?ev_id={$row['ev_id']}";
<ul>
<?php
$hsql = " select ev_id, ev_subject, ev_subject_strong from {$g4['shop_event_table']} where ev_use = '1' order by ev_id desc ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{
echo '<li>';
$href = G4_SHOP_URL.'/event.php?ev_id='.$row['ev_id'];
$event_img = G4_DATA_PATH.'/event/'.$row['ev_id'].'_m'; // 이벤트 이미지
if (file_exists($event_img)) { // 이벤트 이미지가 있다면 이미지 출력
echo '<a href="'.$href.'" class="sev_img"><img src="'.G4_DATA_URL.'/event/'.$row['ev_id'].'_m" alt="'.$row['ev_subject'].'"></a>'.PHP_EOL;
} else { // 없다면 텍스트 출력
echo '<a href="'.$href.'" class="sev_text">';
if ($row['ev_subject_strong']) echo '<strong>';
echo $row['ev_subject'];
if ($row['ev_subject_strong']) echo '</strong>';
echo '</a>'.PHP_EOL;
}
echo '</li>'.PHP_EOL;
// 이벤트 메뉴이미지가 있다면
$event_img = G4_DATA_PATH."/event/{$row['ev_id']}_m";
if (file_exists($event_img)) {
echo "<tr><td><a href='$href'><img src='".G4_DATA_URL."/event/{$row['ev_id']}_m' border=0 align=absmiddle></a></td></tr>";
} else {
echo "<tr><td height=22>&nbsp;&nbsp;· <a href='$href'>{$row['ev_subject']}</a></td></tr>\n";;
}
}
if ($i==0)
echo '<li id="sev_empty">이벤트 없음</li>'.PHP_EOL;
?>
</ul>
if ($i==0)
echo "<tr><td height=50 align=center>등록된 자료가 없습니다.</td></tr>\n";
?>
</table>
</section>