영카트의 faq 내용관리 팝업관리 그누보드로 이동
This commit is contained in:
@ -1,6 +1,11 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크
|
||||
if( !isset($g5['content_table']) ){
|
||||
die('<meta charset="utf-8">관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.');
|
||||
}
|
||||
|
||||
// 내용
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
@ -50,22 +55,22 @@ $dst[] = $default['de_admin_info_email'];
|
||||
$str = preg_replace($src, $dst, $str);
|
||||
|
||||
if ($is_admin)
|
||||
echo '<div class="socc_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
|
||||
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
|
||||
?>
|
||||
|
||||
<!-- 등록내용 시작 { -->
|
||||
<?php
|
||||
$himg = G5_DATA_PATH.'/content/'.$co_id.'_h';
|
||||
if (file_exists($himg)) // 상단 이미지
|
||||
echo '<div id="socc_himg" class="socc_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>';
|
||||
echo '<div id="ctt_himg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>';
|
||||
?>
|
||||
|
||||
<article id="socc" class="socc_<?php echo $co_id; ?>">
|
||||
<article id="ctt" class="ctt_<?php echo $co_id; ?>">
|
||||
<header>
|
||||
<h1><?php echo $g5['title']; ?></h1>
|
||||
</header>
|
||||
|
||||
<div id="socc_con">
|
||||
<div id="ctt_con">
|
||||
<?php echo $str; ?>
|
||||
</div>
|
||||
|
||||
@ -74,10 +79,10 @@ if (file_exists($himg)) // 상단 이미지
|
||||
<?php
|
||||
$timg = G5_DATA_PATH.'/content/'.$co_id.'_t';
|
||||
if (file_exists($timg)) // 하단 이미지
|
||||
echo '<div id="socc_timg" class="socc_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_t" alt=""></div>';
|
||||
echo '<div id="ctt_timg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_t" alt=""></div>';
|
||||
|
||||
if ($is_admin)
|
||||
echo '<div class="socc_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
|
||||
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
|
||||
?>
|
||||
<!-- } 등록내용 끝 -->
|
||||
|
||||
|
||||
33
bbs/faq.php
33
bbs/faq.php
@ -3,6 +3,11 @@ include_once('./_common.php');
|
||||
|
||||
if (!$fm_id) $fm_id = 1;
|
||||
|
||||
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
|
||||
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
|
||||
die('<meta charset="utf-8">관리자 모드에서 게시판관리->FAQ관리를 먼저 확인해 주세요.');
|
||||
}
|
||||
|
||||
// FAQ MASTER
|
||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||
$fm = sql_fetch($sql);
|
||||
@ -15,20 +20,20 @@ include_once('./_head.php');
|
||||
|
||||
<?php
|
||||
if ($is_admin)
|
||||
echo '<div class="sfaq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
|
||||
echo '<div class="faq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
|
||||
?>
|
||||
|
||||
<!-- FAQ 시작 { -->
|
||||
<?php
|
||||
$himg = G5_DATA_PATH.'/faq/'.$fm_id.'_h';
|
||||
if (file_exists($himg))
|
||||
echo '<div id="sfaq_himg" class="sfaq_img"><img src="'.G5_DATA_URL.'/faq/'.$fm_id.'_h" alt=""></div>';
|
||||
echo '<div id="faq_himg" class="faq_img"><img src="'.G5_DATA_URL.'/faq/'.$fm_id.'_h" alt=""></div>';
|
||||
|
||||
// 상단 HTML
|
||||
echo '<div id="sfaq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
|
||||
echo '<div id="faq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
|
||||
?>
|
||||
|
||||
<div id="sfaq_wrap" class="sfaq_<?php echo $fm_id; ?>">
|
||||
<div id="faq_wrap" class="faq_<?php echo $fm_id; ?>">
|
||||
<?php // FAQ 목차
|
||||
$sql = " select * from {$g5['faq_table']}
|
||||
where fm_id = '$fm_id'
|
||||
@ -39,11 +44,11 @@ echo '<div id="sfaq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
|
||||
if ($i == 1)
|
||||
{
|
||||
?>
|
||||
<section id="sfaq_list">
|
||||
<section id="faq_list">
|
||||
<h2><?php echo $g5['title']; ?> 목차</h2>
|
||||
<ol>
|
||||
<?php } ?>
|
||||
<li><a href="#sfaq_<?php echo $fm_id.'_'.$i; ?>"><?php echo stripslashes($row['fa_subject']); ?></a></li>
|
||||
<li><a href="#faq_<?php echo $fm_id.'_'.$i; ?>"><?php echo stripslashes($row['fa_subject']); ?></a></li>
|
||||
<?php }
|
||||
if ($i > 1) echo '</ol></section>';
|
||||
?>
|
||||
@ -55,16 +60,16 @@ echo '<div id="sfaq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
|
||||
if ($i == 1)
|
||||
{
|
||||
?>
|
||||
<section id="sfaq_con">
|
||||
<section id="faq_con">
|
||||
<h2><?php echo $g5['title']; ?> 내용</h2>
|
||||
<ol>
|
||||
<?php } ?>
|
||||
<li id="sfaq_<?php echo $fm_id.'_'.$i; ?>">
|
||||
<li id="faq_<?php echo $fm_id.'_'.$i; ?>">
|
||||
<h3><?php echo stripslashes($row['fa_subject']); ?></h3>
|
||||
<p>
|
||||
<div id="con_inner">
|
||||
<?php echo stripslashes($row['fa_content']); ?>
|
||||
</p>
|
||||
<div class="sfaq_tolist"><a href="#sfaq_list" class="btn01">FAQ 목차</a></div>
|
||||
</div>
|
||||
<div class="faq_tolist"><a href="#faq_list" class="btn01">FAQ 목차</a></div>
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 1) echo '</ol></section>';
|
||||
@ -75,17 +80,17 @@ echo '<div id="sfaq_hhtml">'.stripslashes($fm['fm_head_html']).'</div>';
|
||||
|
||||
<?php
|
||||
// 하단 HTML
|
||||
echo '<div id="sfaq_thtml">'.stripslashes($fm['fm_tail_html']).'</div>';
|
||||
echo '<div id="faq_thtml">'.stripslashes($fm['fm_tail_html']).'</div>';
|
||||
|
||||
$timg = G5_DATA_PATH.'/faq/'.$fm_id.'_t';
|
||||
if (file_exists($timg))
|
||||
echo '<div id="sfaq_timg" class="sfaq_img"><img src="'.G5_DATA_URL.'/faq/'.$fm_id.'_t" alt=""></div>';
|
||||
echo '<div id="faq_timg" class="faq_img"><img src="'.G5_DATA_URL.'/faq/'.$fm_id.'_t" alt=""></div>';
|
||||
?>
|
||||
<!-- } FAQ 끝 -->
|
||||
|
||||
<?php
|
||||
if ($is_admin)
|
||||
echo '<div class="sfaq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
|
||||
echo '<div class="faq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
|
||||
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
|
||||
48
bbs/newwin.inc.php
Normal file
48
bbs/newwin.inc.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$sql = " select * from {$g5['new_win_table']}
|
||||
where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time
|
||||
and nw_device IN ( 'both', 'pc' )
|
||||
order by nw_id asc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 이미 체크 되었다면 Continue
|
||||
if ($_COOKIE["hd_pops_{$row_nw['nw_id']}"])
|
||||
continue;
|
||||
|
||||
$sql = " select * from {$g5['new_win_table']} where nw_id = '{$row_nw['nw_id']}' ";
|
||||
$nw = sql_fetch($sql);
|
||||
?>
|
||||
|
||||
<!-- 팝업레이어 시작 { -->
|
||||
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px;width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">
|
||||
<div class="hd_pops_con">
|
||||
<?php echo conv_content($nw['nw_content'], 1); ?>
|
||||
</div>
|
||||
<div class="hd_pops_footer">
|
||||
<button class="hd_pops_reject hd_pops_<?php echo $nw['nw_id']; ?> <?php echo $nw['nw_disable_hours']; ?>"><strong><?php echo $nw['nw_disable_hours']; ?></strong>시간 동안 다시 열람하지 않습니다.</button>
|
||||
<button class="hd_pops_close hd_pops_<?php echo $nw['nw_id']; ?>">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
if ($i == 0) echo '<span class="sound_only">팝업레이어 알림이 없습니다.</span>';
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(".hd_pops_reject").click(function() {
|
||||
var id = $(this).attr('class').split(' ');
|
||||
var ck_name = id[1];
|
||||
var exp_time = parseInt(id[2]);
|
||||
$("#"+id[1]).css("display", "none");
|
||||
set_cookie(ck_name, 1, exp_time, g5_cookie_domain);
|
||||
});
|
||||
$('.hd_pops_close').click(function() {
|
||||
var idb = $(this).attr('class').split(' ');
|
||||
$('#'+idb[1]).css('display','none');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 팝업레이어 끝 -->
|
||||
Reference in New Issue
Block a user