영카트의 faq 내용관리 팝업관리 그누보드로 이동
This commit is contained in:
@ -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),
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
147
adm/newwinform.php
Normal 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
51
adm/newwinformupdate.php
Normal 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&nw_id=$nw_id");
|
||||
}
|
||||
?>
|
||||
118
adm/newwinlist.php
Normal file
118
adm/newwinlist.php
Normal 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&nw_id=<?php echo $row['nw_id']; ?>"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>수정</a>
|
||||
<a href="./newwinformupdate.php?w=d&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');
|
||||
?>
|
||||
Reference in New Issue
Block a user