영카트의 faq 내용관리 팝업관리 그누보드로 이동

This commit is contained in:
chicpro
2014-02-14 13:22:42 +09:00
parent fa5cee60d5
commit 619e5c223c
19 changed files with 580 additions and 63 deletions

View File

@ -4,6 +4,7 @@ $menu['menu100'] = array (
array('', '기본환경설정', G5_ADMIN_URL.'/config_form.php', 'cf_basic'),
array('', '관리권한설정', G5_ADMIN_URL.'/auth_list.php', 'cf_auth'),
array('100300', '메일 테스트', G5_ADMIN_URL.'/sendmail_test.php', 'cf_mailtest'),
array('100310', '팝업레이어관리', G5_ADMIN_URL.'/newwinlist.php', 'scf_poplayer', 1),
//array('100400', '버전정보', G5_ADMIN_URL.'/version.php', 'cf_version'),
array('100800', '세션파일 일괄삭제',G5_ADMIN_URL.'/session_file_delete.php', 'cf_session', 1),
array('100900', '캐시파일 일괄삭제',G5_ADMIN_URL.'/cache_file_delete.php', 'cf_cache', 1),

View File

@ -4,6 +4,32 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
if( !isset($g5['content_table']) ){
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'content_table\'] = G5_TABLE_PREFIX.\'content\';</strong> 를 추가해 주세요.');
}
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE {$g5['content_table']} ", false)) {
if(sql_query(" DESCRIBE {$g5['g5_shop_content_table']} ", false)) {
sql_query(" ALTER TABLE {$g5['g5_shop_content_table']} RENAME TO `{$g5['content_table']}` ;", false);
} else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['content_table']}` (
`co_id` varchar(20) NOT NULL DEFAULT '',
`co_html` tinyint(4) NOT NULL DEFAULT '0',
`co_subject` varchar(255) NOT NULL DEFAULT '',
`co_content` longtext NOT NULL,
`co_hit` int(11) NOT NULL DEFAULT '0',
`co_include_head` varchar(255) NOT NULL,
`co_include_tail` varchar(255) NOT NULL,
PRIMARY KEY (`co_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
// 내용관리 생성
sql_query(" insert into `{$g5['content_table']}` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ", false );
sql_query(" insert into `{$g5['content_table']}` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '<p align=center><b>개인정보 처리방침에 대한 내용을 입력하십시오.</b></p>' ", false );
sql_query(" insert into `{$g5['content_table']}` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ", false );
}
}
$g5['title'] = '내용관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');

View File

@ -42,7 +42,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<td>
<input type="text" value="<?php echo get_text($fm['fm_subject']); ?>" name="fm_subject" id="fm_subject" required class="frm_input required" size="70">
<?php if ($w == 'u') { ?>
<a href="<?php echo G5_SHOP_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">보기</a>
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">보기</a>
<a href="./faqlist.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">상세보기</a>
<?php } ?>
</td>

View File

@ -4,6 +4,46 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <br ><strong>$g5[\'faq_table\'] = G5_TABLE_PREFIX.\'faq\';</strong><br ><strong>$g5[\'faq_master_table\'] = G5_TABLE_PREFIX.\'faq_master\';</strong><br > 를 추가해 주세요.');
}
//자주하시는 질문 마스터 테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE {$g5['faq_master_table']} ", false)) {
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_master_table']} ", false)) {
sql_query(" ALTER TABLE {$g5['g5_shop_faq_master_table']} RENAME TO `{$g5['faq_master_table']}` ;", false);
} else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
`fm_id` int(11) NOT NULL AUTO_INCREMENT,
`fm_subject` varchar(255) NOT NULL DEFAULT '',
`fm_head_html` text NOT NULL,
`fm_tail_html` text NOT NULL,
`fm_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
// FAQ Master
sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
}
//자주하시는 질문 테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
} else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
`fa_id` int(11) NOT NULL AUTO_INCREMENT,
`fm_id` int(11) NOT NULL DEFAULT '0',
`fa_subject` text NOT NULL,
`fa_content` text NOT NULL,
`fa_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`fa_id`),
KEY `fm_id` (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
}
$g5['title'] = 'FAQ관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');

147
adm/newwinform.php Normal file
View File

@ -0,0 +1,147 @@
<?php
$sub_menu = '100310';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
$html_title = "팝업레이어";
if ($w == "u")
{
$html_title .= " 수정";
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
$nw = sql_fetch($sql);
if (!$nw['nw_id']) alert("등록된 자료가 없습니다.");
}
else
{
$html_title .= " 입력";
$nw['nw_device'] = 'both';
$nw['nw_disable_hours'] = 24;
$nw['nw_left'] = 10;
$nw['nw_top'] = 10;
$nw['nw_width'] = 450;
$nw['nw_height'] = 500;
$nw['nw_content_html'] = 2;
}
$g5['title'] = $html_title;
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="frmnewwin" action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" method="post">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="nw_id" value="<?php echo $nw_id; ?>">
<div class="local_desc01 local_desc">
<p>쇼핑몰 초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="nw_device">접속기기</label></th>
<td>
<?php echo help("팝업레이어가 표시될 접속기기를 설정합니다."); ?>
<select name="nw_device" id="nw_device">
<option value="both"<?php echo get_selected($nw['nw_device'], 'both', true); ?>>PC와 모바일</option>
<option value="pc"<?php echo get_selected($nw['nw_device'], 'pc'); ?>>PC</option>
<option value="mobile"<?php echo get_selected($nw['nw_device'], 'mobile'); ?>>모바일</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="nw_disable_hours">시간</label></th>
<td>
<?php echo help("고객이 다시 보지 않음을 선택할 시 몇 시간동안 팝업레이어를 보여주지 않을지 설정합니다."); ?>
<input type="text" name="nw_disable_hours" value="<?php echo $nw['nw_disable_hours']; ?>" id="nw_disable_hours" required class="frm_input required" size="5"> 시간
</td>
</tr>
<tr>
<th scope="row"><label for="nw_begin_time">시작일시</label></th>
<td>
<input type="text" name="nw_begin_time" value="<?php echo $nw['nw_begin_time']; ?>" id="nw_begin_time" required class="frm_input required" size="21" maxlength="19">
<input type="checkbox" name="nw_begin_chk" value="<?php echo date("Y-m-d 00:00:00", G5_SERVER_TIME); ?>" id="nw_begin_chk" onclick="if (this.checked == true) this.form.nw_begin_time.value=this.form.nw_begin_chk.value; else this.form.nw_begin_time.value = this.form.nw_begin_time.defaultValue;">
<label for="nw_begin_chk">시작일시를 오늘로</label>
</td>
</tr>
<tr>
<th scope="row"><label for="nw_end_time">종료일시</label></th>
<td>
<input type="text" name="nw_end_time" value="<?php echo $nw['nw_end_time']; ?>" id="nw_end_time" required class="frm_input required" size="21" maxlength="19">
<input type="checkbox" name="nw_end_chk" value="<?php echo date("Y-m-d 23:59:59", G5_SERVER_TIME+(60*60*24*7)); ?>" id="nw_end_chk" onclick="if (this.checked == true) this.form.nw_end_time.value=this.form.nw_end_chk.value; else this.form.nw_end_time.value = this.form.nw_end_time.defaultValue;">
<label for="nw_end_chk">종료일시를 오늘로부터 7일 후로</label>
</td>
</tr>
<tr>
<th scope="row"><label for="nw_left">팝업레이어 좌측 위치</label></th>
<td>
<input type="text" name="nw_left" value="<?php echo $nw['nw_left']; ?>" id="nw_left" required class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_top">팝업레이어 상단 위치</label></th>
<td>
<input type="text" name="nw_top" value="<?php echo $nw['nw_top']; ?>" id="nw_top" required class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_width">팝업레이어 넓이</label></th>
<td>
<input type="text" name="nw_width" value="<?php echo $nw['nw_width'] ?>" id="nw_width" required class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_height">팝업레이어 높이</label></th>
<td>
<input type="text" name="nw_height" value="<?php echo $nw['nw_height'] ?>" id="nw_height" required class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_subject">팝업 제목</label></th>
<td>
<input type="text" name="nw_subject" value="<?php echo stripslashes($nw['nw_subject']) ?>" id="nw_subject" required class="frm_input required" size="80">
</td>
</tr>
<tr>
<th scope="row">내용</th>
<td><?php echo editor_html('nw_content', $nw['nw_content']); ?></td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./newwinlist.php">목록</a>
</div>
</form>
<script>
function frmnewwin_check(f)
{
errmsg = "";
errfld = "";
<?php echo get_editor_js('nw_content'); ?>
check_field(f.nw_subject, "제목을 입력하세요.");
if (errmsg != "") {
alert(errmsg);
errfld.focus();
return false;
}
return true;
}
</script>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

51
adm/newwinformupdate.php Normal file
View File

@ -0,0 +1,51 @@
<?php
$sub_menu = '100310';
include_once('./_common.php');
if ($w == "u" || $w == "d")
check_demo();
if ($W == 'd')
auth_check($auth[$sub_menu], "d");
else
auth_check($auth[$sub_menu], "w");
$sql_common = " nw_device = '$nw_device',
nw_begin_time = '$nw_begin_time',
nw_end_time = '$nw_end_time',
nw_disable_hours = '$nw_disable_hours',
nw_left = '$nw_left',
nw_top = '$nw_top',
nw_height = '$nw_height',
nw_width = '$nw_width',
nw_subject = '$nw_subject',
nw_content = '$nw_content',
nw_content_html = '$nw_content_html' ";
if($w == "")
{
$sql = " insert {$g5['new_win_table']} set $sql_common ";
sql_query($sql);
$nw_id = mysql_insert_id();
}
else if ($w == "u")
{
$sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
sql_query($sql);
}
else if ($w == "d")
{
$sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
sql_query($sql);
}
if ($w == "d")
{
goto_url('./newwinlist.php');
}
else
{
goto_url("./newwinform.php?w=u&amp;nw_id=$nw_id");
}
?>

118
adm/newwinlist.php Normal file
View File

@ -0,0 +1,118 @@
<?php
$sub_menu = '100310';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
if( !isset($g5['new_win_table']) ){
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\';</strong> 를 추가해 주세요.');
}
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
if(!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
if(sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
} else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
`nw_device` varchar(10) NOT NULL DEFAULT 'both',
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_disable_hours` int(11) NOT NULL DEFAULT '0',
`nw_left` int(11) NOT NULL DEFAULT '0',
`nw_top` int(11) NOT NULL DEFAULT '0',
`nw_height` int(11) NOT NULL DEFAULT '0',
`nw_width` int(11) NOT NULL DEFAULT '0',
`nw_subject` text NOT NULL,
`nw_content` text NOT NULL,
`nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`nw_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
}
$g5['title'] = '팝업레이어 관리';
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql_common = " from {$g5['new_win_table']} ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$sql = "select * $sql_common order by nw_id desc ";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">전체 <?php echo $total_count; ?>건</div>
<div class="btn_add01 btn_add">
<a href="./newwinform.php">새창관리추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">번호</th>
<th scope="col">제목</th>
<th scope="col">접속기기</th>
<th scope="col">시작일시</th>
<th scope="col">종료일시</th>
<th scope="col">시간</th>
<th scope="col">Left</th>
<th scope="col">Top</th>
<th scope="col">Width</th>
<th scope="col">Height</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$bg = 'bg'.($i%2);
switch($row['nw_device']) {
case 'pc':
$nw_device = 'PC';
break;
case 'mobile':
$nw_device = '모바일';
break;
default:
$nw_device = '모두';
break;
}
?>
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $row['nw_id']; ?></td>
<td><?php echo $row['nw_subject']; ?></td>
<td class="td_device"><?php echo $nw_device; ?></td>
<td class="td_datetime"><?php echo substr($row['nw_begin_time'],2,14); ?></td>
<td class="td_datetime"><?php echo substr($row['nw_end_time'],2,14); ?></td>
<td class="td_num"><?php echo $row['nw_disable_hours']; ?>시간</td>
<td class="td_num"><?php echo $row['nw_left']; ?>px</td>
<td class="td_num"><?php echo $row['nw_top']; ?>px</td>
<td class="td_num"><?php echo $row['nw_width']; ?>px</td>
<td class="td_num"><?php echo $row['nw_height']; ?>px</td>
<td class="td_mngsmall">
<a href="./newwinform.php?w=u&amp;nw_id=<?php echo $row['nw_id']; ?>"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>수정</a>
<a href="./newwinformupdate.php?w=d&amp;nw_id=<?php echo $row['nw_id']; ?>" onclick="return delete_confirm();"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>삭제</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="11" class="empty_table">자료가 한건도 없습니다.</td></tr>';
}
?>
</tbody>
</table>
</div>
<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -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&amp;co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&amp;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&amp;co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/contentform.php?w=u&amp;co_id='.$co_id.'" class="btn_admin">내용 수정</a></div>';
?>
<!-- } 등록내용 끝 -->

View File

@ -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&amp;fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
echo '<div class="faq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&amp;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&amp;fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
echo '<div class="faq_admin"><a href="'.G5_ADMIN_URL.'/faqmasterform.php?w=u&amp;fm_id='.$fm_id.'" class="btn_admin">FAQ 수정</a></div>';
include_once('./_tail.php');
?>

48
bbs/newwin.inc.php Normal file
View 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>
<!-- } 팝업레이어 끝 -->

View File

@ -28,6 +28,13 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline}
#hd_wrapper {position:relative;margin:0 auto;padding:26px 0;width:970px;zoom:1}
#hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""}
#hd_pop {z-index:1000;position:relative;margin:0 auto;width:1000px;height:0}
#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff}
.hd_pops_con {margin:0 0 30px}
.hd_pops_footer {position:absolute;bottom:0;left:0;padding:10px 0;width:100%;background:#000;color:#fff;text-align:right}
.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff}
#logo {float:left;padding:5px 0 0}
/* 전체 검색 */
@ -93,41 +100,20 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline}
#ft h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#ft p {margin:0;padding:10px 0;line-height:1.8em}
#ft_catch {position:relative;margin:0 auto;padding:20px 0;width:970px;text-align:center}
#ft_catch {position:relative;margin:0 auto;padding:20px 0 0;width:970px;text-align:center}
#ft_company {text-align:center}
#ft_copy {background:#414141}
#ft_copy p {position:relative;margin:0 auto;padding:10px 0;width:970px;color:#fff}
#ft_copy a {position:absolute;top:10px;right:0;color:#fff}
#ft_copy div {position:relative;margin:0 auto;padding:10px 0;width:970px;color:#fff}
#ft_copy a {display:inline-block;margin:0 10px 0 0;color:inherit}
#ft_copy #ft_totop {position:absolute;top:10px;right:0}
/* 게시물 선택복사 선택이동 */
#copymove {}
.copymove_current {float:right;color:#ff3061}
.copymove_currentbg {background:#f4f4f4}
/* 내용관리 */
#socc {margin:10px 0;padding:10px;border:1px solid #e9e9e9}
.socc_admin {text-align:right}
#socc header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#socc_con {padding:10px 0}
.socc_img {text-align:center}
/* FAQ 관리 */
#sfaq_wrap {margin:10px 0}
#sfaq_wrap h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
.sfaq_admin {text-align:right}
#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:#f2f5f9}
#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:#f2f5f9;border-top:1px solid #e9e9e9}
#sfaq_con p {padding:10px}
.sfaq_tolist {padding:0 10px;text-align:right}
.sfaq_img {text-align:center}
/* 화면낭독기 사용자용 */
#hd_login_msg {position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
@ -271,6 +257,29 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
.new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em}
.new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none}
/* 내용관리 */
#ctt {margin:10px 0;padding:10px;border:1px solid #e9e9e9}
.ctt_admin {text-align:right}
#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#ctt_con {padding:10px 0}
.ctt_img {text-align:center}
/* FAQ 관리 */
#faq_wrap {margin:10px 0}
#faq_wrap h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
.faq_admin {text-align:right}
#faq_wrap ol {margin:0;padding:0;list-style:none}
#faq_list {margin:0 0 10px;border:1px solid #ccc}
#faq_list li {border-bottom:1px solid #fff;background:#f2f5f9}
#faq_list a {display:block;padding:10px;font-weight:bold;text-decoration:none}
#faq_list a:focus, #faq_list a:hover {background:#626870;color:#fff}
#faq_con {border:1px solid #e9e9e9;border-top:0}
#faq_con li {padding:0 0 10px}
#faq_con h3 {padding:10px;background:#f2f5f9;border-top:1px solid #e9e9e9}
#faq_con #con_inner {padding:10px;line-height:1.8em}
.faq_tolist {padding:0 10px;text-align:right}
.faq_img {text-align:center}
/* 자바스크립트 alert 대안 */
#validation_check {margin:100px auto;width:500px}
#validation_check h1 {margin-bottom:20px;font-size:1.3em}

View File

@ -96,10 +96,11 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline}
#ft h1 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
#ft p {margin:0;padding:10px 0;line-height:1.8em}
#ft_copy {background:#414141}
#ft_copy p {position:relative;padding:10px;color:#fff}
#ft_copy b {color:#fff}
#ft_copy a {color:#fff;text-decoration:none}
#ft_copy {padding:10px;background:#414141;color:#fff;line-height:2em}
#ft_copy #ft_company {text-align:center}
#ft_copy #ft_company a {display:inline-block;padding:5px 10px}
#ft_copy b {color:inherit}
#ft_copy a {color:inherit;text-decoration:none}
/* 게시물 선택복사 선택이동 */
#copymove {}
@ -214,6 +215,30 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
.new_win .win_btn button {display:inline-block;padding:0 10px;height:2.5em;border:0;background:#666;color:#fff;text-decoration:none;line-height:2.5em}
.new_win .win_btn input {padding:0 10px;height:2.5em;line-height:2.5em}
/* 내용관리 */
#ctt {margin:10px 0;padding:10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.ctt_admin {margin:0 5px;text-align:right}
#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#ctt_con {padding:10px 0}
.ctt_img {text-align:center}
/* FAQ 관리 */
#faq_wrap {margin:10px 5px}
#faq_wrap h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
.faq_admin {margin:0 5px;text-align:right}
#faq_wrap p {line-height:1.8em}
#faq_wrap ol {margin:0;padding:0;list-style:none}
#faq_list {margin:0 0 10px;border:1px solid #ccc}
#faq_list li {border-bottom:1px solid #fff;background:#f2f5f9}
#faq_list a {display:block;padding:10px;font-weight:bold;text-decoration:none}
#faq_list a:focus, #faq_list a:hover {background:#626870;color:#fff}
#faq_con {border:1px solid #e9e9e9;border-top:0}
#faq_con li {padding:0 0 10px}
#faq_con h3 {padding:10px;background:#f2f5f9;border-top:1px solid #e9e9e9}
#faq_con #con_inner {padding:10px;line-height:1.8em}
.faq_tolist {padding:0 10px;text-align:right}
.faq_img {text-align:center}
/* 사이드뷰 */
.sv_wrap {display:inline-block;position:relative;font-weight:normal}
.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;border:1px solid #283646}

View File

@ -29,6 +29,13 @@ if (G5_IS_MOBILE) {
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
<?php if(defined('_INDEX_')) { // index에서만 실행 ?>
<div id="hd_pop">
<h2>팝업레이어 알림</h2>
<?php include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어 ?>
</div>
<?php } ?>
<div id="hd_wrapper">
<div id="logo">
@ -92,6 +99,7 @@ if (G5_IS_MOBILE) {
<li><a href="<?php echo G5_BBS_URL ?>/register.php">회원가입</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/login.php"><b>로그인</b></a></li>
<?php } ?>
<li><a href="<?php echo G5_BBS_URL ?>/faq.php">FAQ</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php">접속자 <?php echo connect(); // 현재 접속자수 ?></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/new.php">새글</a></li>

View File

@ -834,4 +834,27 @@ CREATE TABLE IF NOT EXISTS `g5_faq_master` (
PRIMARY KEY (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- --------------------------------------------------------
--
-- Table structure for table `g5_new_win`
--
DROP TABLE IF EXISTS `g5_new_win`;
CREATE TABLE IF NOT EXISTS `g5_new_win` (
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
`nw_device` varchar(10) NOT NULL DEFAULT 'both',
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_disable_hours` int(11) NOT NULL DEFAULT '0',
`nw_left` int(11) NOT NULL DEFAULT '0',
`nw_top` int(11) NOT NULL DEFAULT '0',
`nw_height` int(11) NOT NULL DEFAULT '0',
`nw_width` int(11) NOT NULL DEFAULT '0',
`nw_subject` text NOT NULL,
`nw_content` text NOT NULL,
`nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`nw_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------

View File

@ -196,6 +196,8 @@ $dir_arr = array (
$data_path.'/log',
$data_path.'/member',
$data_path.'/session',
$data_path.'/content',
$data_path.'/faq',
$data_path.'/tmp'
);
@ -251,6 +253,7 @@ fwrite($f, "\$g5['qa_content_table'] = G5_TABLE_PREFIX.'qa_content'; // 1:1문
fwrite($f, "\$g5['content_table'] = G5_TABLE_PREFIX.'content'; // 내용(컨텐츠)정보 테이블\n");
fwrite($f, "\$g5['faq_table'] = G5_TABLE_PREFIX.'faq'; // 자주하시는 질문 테이블\n");
fwrite($f, "\$g5['faq_master_table'] = G5_TABLE_PREFIX.'faq_master'; // 자주하시는 질문 마스터 테이블\n");
fwrite($f, "\$g5['new_win_table'] = G5_TABLE_PREFIX.'new_win'; // 새창 테이블\n");
fwrite($f, "?>");
fclose($f);

View File

@ -97,7 +97,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">',
<?php
} else {
?>
<p>검색된 자료가 하나도 없습니다.</p>
<div class="empty_list">검색된 자료가 하나도 없습니다.</div>
<?php } } ?>
<hr>

View File

@ -31,10 +31,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<?php echo popular('basic'); // 인기검색어 ?>
<?php echo visit('basic'); // 방문자수 ?>
<div id="ft_copy">
<p>
Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
<a href="#">상단으로</a>
</p>
<div id="ft_company">
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보취급방침</a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a>
</div>
Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
<a href="#">상단으로</a>
</div>
</div>

View File

@ -93,7 +93,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">',
<?php
} else {
?>
<p>검색된 자료가 하나도 없습니다.</p>
<div class="empty_list">검색된 자료가 하나도 없습니다.</div>
<?php } } ?>
<hr>

View File

@ -24,13 +24,18 @@ if (G5_IS_MOBILE) {
<!-- 하단 시작 { -->
<div id="ft">
<?php echo popular('basic'); // 인기검색어 ?>
<?php echo visit('basic'); // 방문자수 ?>
<?php echo visit('basic'); // 접속자집계 ?>
<div id="ft_catch"><img src="<?php echo G5_IMG_URL; ?>/ft.png" alt="<?php echo G5_VERSION ?>"></div>
<div id="ft_company">
</div>
<div id="ft_copy">
<p>
<div>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보취급방침</a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a>
Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
<a href="#">상단으로</a>
</p>
<a href="#hd" id="ft_totop">상단으로</a>
</div>
</div>
</div>