first commit
This commit is contained in:
1
application/views/admin/cs/cs_faq_category_code_count.php
Executable file
1
application/views/admin/cs/cs_faq_category_code_count.php
Executable file
@@ -0,0 +1 @@
|
||||
<?=$result?>
|
||||
250
application/views/admin/cs/cs_faq_category_list.php
Executable file
250
application/views/admin/cs/cs_faq_category_list.php
Executable file
@@ -0,0 +1,250 @@
|
||||
<?
|
||||
$menu_code = '722';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/cs/cs_faq_category_list/7">
|
||||
<input type="hidden" id="p_category_code" name="p_category_code">
|
||||
<input type="hidden" id="category_idx" name="category_idx">
|
||||
<input type="hidden" id="del_key" name="del_key">
|
||||
<input type="hidden" id="depth" name="depth">
|
||||
<input type="hidden" id="search_type" name="search_type" value="category_name">
|
||||
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
<div class="searh_area">
|
||||
<input type="text" name="search_keyword" id="search_keyword" value="<?=$search_keyword?>" placeholder="카테고리명" onkeypress="if( event.keyCode==13 ){check_search();}">
|
||||
<a href="javascript:check_search();" class="btn"><i class="fa moving_all fa-search" style="margin-left:8px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>생성일자</th>
|
||||
<th>관리</th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="4">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$category_code = $val['category_code'];
|
||||
$category_name = $val['category_name'];
|
||||
$p_category_code= $val['p_category_code'];
|
||||
$depth = $val['depth'];
|
||||
$reg_date = $val['reg_date'];
|
||||
|
||||
$del_key = $p_category_code;
|
||||
$reply_icon = '';
|
||||
$search_category_code = $category_code;
|
||||
if($depth == 2) {
|
||||
$reply_icon ='<img src="/img/admin/board/icon_reply.gif" style="vertical-align:middle;margin-top:-3px;" border="0"> ';
|
||||
$del_key = $idx;
|
||||
$search_category_code = $p_category_code.$category_code;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td style="text-align: left;">
|
||||
<input type="hidden" name="category_name_<?=$idx?>" id="category_name_<?=$idx?>" value="<?=$category_name?>">
|
||||
<?=$reply_icon?><a href="/admin/cs/cs_faq_list/7?search_category_code=<?=$search_category_code?>"><?=$category_name?></a>
|
||||
<? if($depth == 1) {?>
|
||||
<button type="button" class="btn_s_blue" style="width:110px" onclick="category_add('<?=$category_code?>');" style="cursor: pointer;">2차 카테고리등록</button>
|
||||
<? }?>
|
||||
</td>
|
||||
|
||||
<td><?=$reg_date?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:category_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:category_del_proc('<?=$depth?>', '<?=$del_key?>', '<?=$category_code?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:category_add('');">1차 카테고리등록</a>
|
||||
</div
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="category_reg_layer" style="display:none">
|
||||
<div class="black_board" style="display:block"></div>
|
||||
<div class="pop_con common_table moving_all" style="display:block;top:100px;">
|
||||
<a href="javascript:commonLayerClose('category_reg_layer')" class="pop_close">x</a>
|
||||
<h2>카테고리등록</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>카테고리명</th>
|
||||
<td><input type="text" name="category_name" id="category_name"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:category_reg_proc('add')" id="btn_category_add">신규등록</a>
|
||||
<a href="javascript:category_reg_proc('edit')" id="bnt_category_edit">수정</a>
|
||||
<a href="javascript:commonLayerClose('category_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 등록 - layer 열기
|
||||
function category_add(p_category_code) {
|
||||
$("#bnt_category_edit").hide();
|
||||
$("#btn_category_add").show();
|
||||
|
||||
$("#category_idx").val('');
|
||||
$("#p_category_code").val('');
|
||||
$("#category_name").val('');
|
||||
|
||||
if(p_category_code != '') {
|
||||
$("#p_category_code").val(p_category_code);
|
||||
}
|
||||
commonLayerOpen('category_reg_layer');
|
||||
}
|
||||
|
||||
// 등록 - layer열기
|
||||
function category_edit(idx){
|
||||
$("#bnt_category_edit").show();
|
||||
$("#btn_category_add").hide();
|
||||
|
||||
$("#category_idx").val('');
|
||||
$("#p_category_code").val('');
|
||||
$("#category_name").val('');
|
||||
|
||||
$("#category_idx").val(idx);
|
||||
$("#category_name").val($("#category_name_"+idx).val());
|
||||
|
||||
commonLayerOpen('category_reg_layer');
|
||||
}
|
||||
|
||||
|
||||
// 카테고리 저장
|
||||
function category_reg_proc(mode){
|
||||
var category_name = $("#category_name").val();
|
||||
var p_category_code = $("#p_category_code").val();
|
||||
var category_idx = $("#category_idx").val();
|
||||
|
||||
if(category_name=='') {
|
||||
alert("카테고리명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
var form_data = {
|
||||
"mode" : mode,
|
||||
"category_name" : category_name,
|
||||
"p_category_code" : p_category_code,
|
||||
"category_idx" : category_idx
|
||||
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/cs/cs_faq_category_reg_proc',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'html',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml.trim()=='0000') {
|
||||
alert("저장되었습니다.");
|
||||
window.location.reload(true);
|
||||
|
||||
} else {
|
||||
alert("등록에 실패했습니다.");
|
||||
commonLayerClose('category_reg_layer');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function category_del_proc(depth, del_key, category_code) {
|
||||
var form_data = {
|
||||
"depth" : depth,
|
||||
"category_code" : category_code
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/cs/cs_faq_category_code_count',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'html',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml.trim() == 0) {
|
||||
if(depth == '1') {
|
||||
var msg = '하위카테고리까지 모두 삭제됩니다. 삭제하시겠습니까?';
|
||||
} else {
|
||||
var msg = '카테고리가 삭제됩니다. 삭제하시겠습니까?';
|
||||
}
|
||||
if(confirm(msg) == true) { //확인
|
||||
$("#del_key").val(del_key);
|
||||
$("#depth").val(depth);
|
||||
$("#input_form").attr("action", "/admin/cs/cs_faq_category_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
} else if(rtnHtml > 0) {
|
||||
alert("등록되어있는 글이 있으면 삭제할수 없습니다.");
|
||||
return false;
|
||||
} else {
|
||||
alert("삭제에 실패했습니다. 다시시도해주세요.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
190
application/views/admin/cs/cs_faq_list.php
Executable file
190
application/views/admin/cs/cs_faq_list.php
Executable file
@@ -0,0 +1,190 @@
|
||||
<?
|
||||
$menu_code = '721';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/cs/cs_faq_list/7">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<input type="hidden" id="search_category_code" name="search_category_code" value="<?=$search_category_code?>">
|
||||
|
||||
|
||||
<div class="common_tep clearfix type01">
|
||||
<? if(count($arr_category1) > 0) {?>
|
||||
<ul class="clearfix">
|
||||
<? foreach ($arr_category1 as $val) {
|
||||
$css = '';
|
||||
if($search_category1 == $val['category_code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/cs/cs_faq_list/7?search_category_code=<?=$val['category_code']?>" <?=$css?>><?=$val['category_name']?></a></li>
|
||||
<?
|
||||
}?>
|
||||
</ul>
|
||||
<? } ?>
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="">선택</option>
|
||||
<option value="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="content" <? if($search_type=='content'){ echo 'selected';}?>>내용</option>
|
||||
</select> <input type="text" name="search_keyword" id="search_keyword" value="<?=$search_keyword?>" onkeypress="if( event.keyCode==13 ){check_search();}">
|
||||
<a href="javascript:check_search();" class="btn"><i class="fa moving_all fa-search" style="margin-left:8px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<? if(isset($arr_category2[$search_category1])==true) {?>
|
||||
<div class="common_tep type2 clearfix">
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/cs/cs_faq_list/7?search_category_code=<?=$search_category1?>" <? if($search_category2=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<?
|
||||
foreach ($arr_category2[$search_category1] as $val) {
|
||||
$css = '';
|
||||
if($search_category1.$val['category_code'] == $search_category_code) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/cs/cs_faq_list/7?search_category_code=<?=$search_category1.$val['category_code']?>" <?=$css?>><?=$val['category_name']?></a></li>
|
||||
<? }?>
|
||||
</ul>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<table>
|
||||
<thead>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>1차</th>
|
||||
<th>2차</th>
|
||||
<th>제목</th>
|
||||
<th>글쓴이</th>
|
||||
<th>작성일</th>
|
||||
<th>조회수</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="9">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$now_date = date("Y-m-d");
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$title = $val['title'];
|
||||
$write_id = $val['write_id'];
|
||||
$write_name = $val['write_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$category_name1?></td>
|
||||
<td><?=$category_name2?></td>
|
||||
<td class="title" style="text-align: left"><a href="javascript:faq_reg('<?=$idx?>')"><?=$title?></a></td>
|
||||
<td><?=$write_id?>(<?=$write_name?>)</td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:faq_reg('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:faq_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:faq_arr_del_proc()">삭제</a>
|
||||
<a href="/admin/cs/cs_faq_reg/7?search_category_code=<?=$search_category_code?>">FAQ등록</a>
|
||||
</div
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function faq_reg(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/cs/cs_faq_reg/7");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function faq_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/cs/cs_faq_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function faq_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/cs/cs_faq_arr_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// checkbox all checked/unchecked
|
||||
$(function(){
|
||||
$("#allcheck").click(function(){
|
||||
if($("#allcheck").prop("checked")) {
|
||||
$("input:checkbox[name='is_del[]']").prop('checked', true); // 전체선택하기
|
||||
} else {
|
||||
$("input:checkbox[name='is_del[]']").prop("checked", false);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
197
application/views/admin/cs/cs_faq_reg.php
Executable file
197
application/views/admin/cs/cs_faq_reg.php
Executable file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
$title = '';
|
||||
$content = '';
|
||||
$faq_category_code1 = '';
|
||||
$faq_category_code2 = '';
|
||||
if($mode=='edit') {
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content = htmlentities($result['content']);
|
||||
$faq_category_code1 = $result['faq_category_code1'];
|
||||
$faq_category_code2 = $result['faq_category_code2'];
|
||||
|
||||
} else {
|
||||
$faq_category_code1 = substr($search_category_code, 0, 2);
|
||||
$faq_category_code2 = substr($search_category_code, 2, 2);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script src="/ckeditor/ckeditor.js"></script>
|
||||
|
||||
<?
|
||||
$menu_code = '72';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/cs/cs_faq_reg_proc" method="post">
|
||||
<input type="hidden" name="idx" id="idx" value="<?=$idx?>">
|
||||
<input type="hidden" id="search_type" name="search_type" value="<?=$search_type?>">
|
||||
<input type="hidden" id="search_keyword" name="search_keyword" value="<?=$search_keyword?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="mode" name="mode" value="<?=$mode?>">
|
||||
<input type="hidden" id="search_category_code" name="search_category_code" value="<?=$search_category_code?>">
|
||||
<input type="hidden" id="img_path" name="img_path">
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<th>1차 카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category1" id="category1" onchange="change_category1(this.value);" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($arr_category1 as $val) { ?>
|
||||
<option value="<?=$val['category_code']?>" <? if($faq_category_code1==$val['category_code']) { echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2차 카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category2" id="category2" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if($faq_category_code1!='') {
|
||||
foreach($arr_category2 as $val) {
|
||||
if($val['p_category_code'] == $faq_category_code1) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($faq_category_code2==$val['category_code']) { echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title" id="title" value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>내용</th>
|
||||
<td>
|
||||
<!-- <textarea id="content" name="content"><?=$content?></textarea> -->
|
||||
<textarea name="content" id="ir1" style="width:100%; height:500px;" /><?=$content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:faq_reg_proc();">저장하기</a>
|
||||
<a href="/admin/cs/cs_faq_list/7/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_category_code=<?=$search_category_code?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var oEditors = [];
|
||||
var oEditors2 = [];
|
||||
|
||||
$(function(){
|
||||
nhn.husky.EZCreator.createInIFrame({
|
||||
oAppRef: oEditors,
|
||||
elPlaceHolder: "ir1",
|
||||
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
||||
htParams : {
|
||||
bUseToolbar : true,
|
||||
bUseVerticalResizer : true,
|
||||
bUseModeChanger : true,
|
||||
fOnBeforeUnload : function(){
|
||||
}
|
||||
},
|
||||
fOnAppLoad : function(){
|
||||
},
|
||||
fCreator: "createSEditor2"
|
||||
});
|
||||
|
||||
nhn.husky.EZCreator.createInIFrame({
|
||||
oAppRef: oEditors2,
|
||||
elPlaceHolder: "ir2",
|
||||
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
||||
htParams : {
|
||||
bUseToolbar : true,
|
||||
bUseVerticalResizer : true,
|
||||
bUseModeChanger : true,
|
||||
fOnBeforeUnload : function(){
|
||||
}
|
||||
},
|
||||
fOnAppLoad : function(){
|
||||
},
|
||||
fCreator: "createSEditor2"
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
/*
|
||||
CKEDITOR.replace('content', {
|
||||
height: '400px'
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
function faq_reg_proc(){
|
||||
//CKEDITOR.instances.content.updateElement();
|
||||
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
//oEditors2.getById["ir2"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
|
||||
if($("#category1").val()=='') {
|
||||
alert("1차 카테고리를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#category2").val()=='') {
|
||||
alert("2차 카테고리를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#title").val()=='') {
|
||||
alert("제목을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
if($("#content").val()=='') {
|
||||
alert("내용을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
if($("#ir1").val()=='' || $("#ir1").val()=='null' || $("#ir1").val()==' ' || $("#ir1").val()=='<p> </p>') {
|
||||
alert("내용을 입력해주세요.");
|
||||
oEditors.getById["ir1"].exec("focus");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
var json_category = '<?=json_encode($arr_category2)?>';
|
||||
json_category = eval(json_category);
|
||||
function change_category1(val){
|
||||
|
||||
$('#category2').empty();
|
||||
var option = '';
|
||||
|
||||
option = $("<option value=''>선택</option>");
|
||||
$('#category2').append(option);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['p_category_code'] == val) {
|
||||
option = $("<option value='"+json_category[key]['category_code']+"'>"+json_category[key]['category_name']+"</option>");
|
||||
$('#category2').append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
166
application/views/admin/cs/cs_notice_list.php
Executable file
166
application/views/admin/cs/cs_notice_list.php
Executable file
@@ -0,0 +1,166 @@
|
||||
<?
|
||||
$menu_code = '73';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/cs/cs_notice_list/7">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<input type="hidden" id="search_click" name="search_click" value="<?=$search_click?>">
|
||||
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="">선택</option>
|
||||
<option value="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="content" <? if($search_type=='content'){ echo 'selected';}?>>내용</option>
|
||||
</select> <input type="text" name="search_keyword" id="search_keyword" value="<?=$search_keyword?>" onkeypress="if( event.keyCode==13 ){check_search();}">
|
||||
<a href="javascript:check_search();" class="btn"><i class="fa moving_all fa-search" style="margin-left:8px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<a href="javascript:click_search('1');"><span style="font-weight:bold">오늘신규:</span> <?=number_format($new_count);?></a>
|
||||
<table>
|
||||
<thead>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>글쓴이</th>
|
||||
<th>작성일</th>
|
||||
<th>조회수</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="7">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$now_date = date("Y-m-d");
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$title = $val['title'];
|
||||
$write_id = $val['write_id'];
|
||||
$write_name = $val['write_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
$new = '';
|
||||
if($reg_date == $now_date) $new = '<img src="/img/admin/board/icon_new.gif" style="vertical-align:middle;margin-top:-3px;" border="0"> ';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=number_format($dataNumber)?></td>
|
||||
<td class="title" style="text-align:left;"><a href="javascript:notice_reg('<?=$idx?>')"><?=$new?><?=$title?></a></td>
|
||||
<td><?=$write_id?>(<?=$write_name?>)</td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=number_format($hit_count)?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:notice_reg('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:notice_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:notice_arr_del_proc()">삭제</a>
|
||||
<a href="/admin/cs/cs_notice_reg/7">공지등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function click_search(type){
|
||||
$("#search_click").val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function notice_reg(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/cs/cs_notice_reg/7");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function notice_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/cs/cs_notice_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function notice_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/cs/cs_notice_arr_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// checkbox all checked/unchecked
|
||||
$(function(){
|
||||
$("#allcheck").click(function(){
|
||||
if($("#allcheck").prop("checked")) {
|
||||
$("input:checkbox[name='is_del[]']").prop('checked', true); // 전체선택하기
|
||||
} else {
|
||||
$("input:checkbox[name='is_del[]']").prop("checked", false);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
134
application/views/admin/cs/cs_notice_reg.php
Executable file
134
application/views/admin/cs/cs_notice_reg.php
Executable file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
$title = '';
|
||||
$content = '';
|
||||
|
||||
if($mode=='edit') {
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content = $result['content'];
|
||||
$content = htmlentities($result['content']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '73';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<script src="/ckeditor/ckeditor.js"></script>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/cs/cs_notice_reg_proc" method="post">
|
||||
<input type="hidden" name="idx" id="idx" value="<?=$idx?>">
|
||||
<input type="hidden" id="search_type" name="search_type" value="<?=$search_type?>">
|
||||
<input type="hidden" id="search_keyword" name="search_keyword" value="<?=$search_keyword?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="mode" name="mode" value="<?=$mode?>">
|
||||
<input type="hidden" id="img_path" name="img_path">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title" id="title" class="input00" size="100" value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>공지내용</th>
|
||||
<td>
|
||||
<!-- <textarea id="content" name="content"><?=$content?></textarea> -->
|
||||
<textarea name="content" id="ir1" style="width:100%; height:500px;" /><?=$content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:notice_reg_proc();">저장하기</a>
|
||||
<a href="/admin/cs/cs_notice_list/7/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var oEditors = [];
|
||||
var oEditors2 = [];
|
||||
|
||||
$(function(){
|
||||
nhn.husky.EZCreator.createInIFrame({
|
||||
oAppRef: oEditors,
|
||||
elPlaceHolder: "ir1",
|
||||
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
||||
htParams : {
|
||||
bUseToolbar : true,
|
||||
bUseVerticalResizer : true,
|
||||
bUseModeChanger : true,
|
||||
fOnBeforeUnload : function(){
|
||||
}
|
||||
},
|
||||
fOnAppLoad : function(){
|
||||
},
|
||||
fCreator: "createSEditor2"
|
||||
});
|
||||
|
||||
nhn.husky.EZCreator.createInIFrame({
|
||||
oAppRef: oEditors2,
|
||||
elPlaceHolder: "ir2",
|
||||
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
||||
htParams : {
|
||||
bUseToolbar : true,
|
||||
bUseVerticalResizer : true,
|
||||
bUseModeChanger : true,
|
||||
fOnBeforeUnload : function(){
|
||||
}
|
||||
},
|
||||
fOnAppLoad : function(){
|
||||
},
|
||||
fCreator: "createSEditor2"
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
/*
|
||||
CKEDITOR.replace('content', {
|
||||
height: '400px'
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
function notice_reg_proc(){
|
||||
//CKEDITOR.instances.content.updateElement();
|
||||
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
//oEditors2.getById["ir2"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
|
||||
if($("#title").val()=='') {
|
||||
alert("제목을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
if($("#content").val()=='') {
|
||||
alert("내용을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
if($("#ir1").val()=='' || $("#ir1").val()=='null' || $("#ir1").val()==' ' || $("#ir1").val()=='<p> </p>') {
|
||||
alert("내용을 입력해주세요.");
|
||||
oEditors.getById["ir1"].exec("focus");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
207
application/views/admin/cs/cs_question_list.php
Executable file
207
application/views/admin/cs/cs_question_list.php
Executable file
@@ -0,0 +1,207 @@
|
||||
<?php
|
||||
$is_reply_y_count = 0;
|
||||
if(isset($arr_is_reply_count['Y'])==true) $is_reply_y_count = $arr_is_reply_count['Y'];
|
||||
|
||||
$is_reply_n_count = 0;
|
||||
if(isset($arr_is_reply_count['N'])==true) $is_reply_n_count = $arr_is_reply_count['N'];
|
||||
|
||||
|
||||
$menu_code = '71';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/cs/cs_question_list/7">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="search_click1" name="search_click1" value="<?=$search_click1?>">
|
||||
<input type="hidden" id="search_click2" name="search_click2" value="<?=$search_click2?>">
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="">선택</option>
|
||||
<option value="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="write_name" <? if($search_type=='write_name'){ echo 'selected';}?>>글쓴이</option>
|
||||
<option value="mobile_no" <? if($search_type=='mobile_no'){ echo 'selected';}?>>연락처</option>
|
||||
<option value="email" <? if($search_type=='email'){ echo 'selected';}?>>이메일</option>
|
||||
</select> <input type="text" name="search_keyword" id="search_keyword" value="<?=$search_keyword?>" onkeypress="if( event.keyCode==13 ){check_search();}">
|
||||
<a href="javascript:check_search();" class="btn"><i class="fa moving_all fa-search" style="margin-left:8px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<a href="javascript:click_search(1, 'search_click1');"><span style="font-weight:bold">오늘신규:</span> <?=number_format($new_count);?></a>
|
||||
<a href="javascript:click_search(1, 'search_click2');"><span style="font-weight:bold" class="text_blue">처리완료:</span> <?=number_format($is_reply_y_count);?></a>
|
||||
<a href="javascript:click_search(2, 'search_click2');"><span style="font-weight:bold" class="text_red">미처리:</span> <?=number_format($is_reply_n_count);?></a>
|
||||
<table>
|
||||
<thead>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>글쓴이</th>
|
||||
<th>연락처</th>
|
||||
<th>이메일</th>
|
||||
<th>작성일</th>
|
||||
<th>처리상태</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="9">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$now_date = date("Y-m-d");
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$s_idx = $val['s_idx'];
|
||||
$title = $val['title'];
|
||||
$write_id = $val['write_id'];
|
||||
$write_name = $val['write_name'];
|
||||
$mobile_no = $val['mobile_no'];
|
||||
$email = $val['email'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$is_reply = $val['is_reply'];
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
|
||||
switch ($is_reply) {
|
||||
case 'Y': $is_reply_txt = '<span class="text_blue">처리완료</span>'; break;
|
||||
case 'N': $is_reply_txt = '<span class="text_red">미처리</span>'; break;
|
||||
default : $is_reply_txt = ''; break;
|
||||
}
|
||||
|
||||
if($s_idx > 1) {
|
||||
$is_reply_txt = '';
|
||||
}
|
||||
|
||||
|
||||
$reply_icon = ''; $new = '';
|
||||
if($s_idx > 1) {
|
||||
$reply_icon ='<img src="/img/admin/board/icon_reply.gif" style="vertical-align:middle;margin-top:-3px;" border="0"> ';
|
||||
} else {
|
||||
if($reg_date == $now_date) $new = '<img src="/img/admin/board/icon_new.gif" style="vertical-align:middle;margin-top:-3px;" border="0"> ';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td class="title"><a href="javascript:question_view('<?=$idx?>')"><?=$reply_icon?><?=$new?><?=$title?></a></td>
|
||||
<td><?=$write_id?>(<?=$write_name?>)</td>
|
||||
<td><?=$mobile_no?></td>
|
||||
<td><?=$email?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$is_reply_txt?></td>
|
||||
<td class="tool_btn">
|
||||
<? if($s_idx==1) {?>
|
||||
<a href="javascript:question_reply_add('<?=$idx?>')"><i class="fa fa-pencil"></i>답글쓰기</a>
|
||||
<? } else { ?>
|
||||
<a href="javascript:question_reply_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:popup_arr_del_proc()">삭제</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function click_search(type, id){
|
||||
$("#"+id).val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 댭글쓰기
|
||||
function question_reply_add(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/cs/cs_question_reply_add/7");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function question_reply_del_proc(idx) {
|
||||
if(confirm("답글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/cs/cs_question_reply_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// view
|
||||
function question_view(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/cs/cs_question_view/7");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 복수 삭제
|
||||
function popup_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("답글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/cs/cs_question_reply_arr_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// checkbox all checked/unchecked
|
||||
$(function(){
|
||||
$("#allcheck").click(function(){
|
||||
if($("#allcheck").prop("checked")) {
|
||||
$("input:checkbox[name='is_del[]']").prop('checked', true); // 전체선택하기
|
||||
} else {
|
||||
$("input:checkbox[name='is_del[]']").prop("checked", false);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
133
application/views/admin/cs/cs_question_reply_add.php
Executable file
133
application/views/admin/cs/cs_question_reply_add.php
Executable file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$write_id = $result['write_id'];
|
||||
$reg_date = $result['reg_date'];
|
||||
$content = htmlentities($result['content']);
|
||||
|
||||
$content_txt = '<br /><br /><br /><br />';
|
||||
$content_txt.= '-----------------------------------------------<br />';
|
||||
$content_txt.= '--- 원글내용 ---<br /><br />';
|
||||
$content_txt.= '제목: '.$title.'<br />';
|
||||
$content_txt.= '작성자: '.$write_id.'<br />';
|
||||
$content_txt.= '작성일자: '.$reg_date.'<br />';
|
||||
$content_txt.= '내용: <br />';
|
||||
$content_txt.= $content;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<script src="/ckeditor/ckeditor.js"></script>
|
||||
|
||||
<?
|
||||
$menu_code = '71';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/cs/cs_question_reply_add_proc" method="post">
|
||||
<input type="hidden" name="idx" id="idx" value="<?=$idx?>">
|
||||
<input type="hidden" id="search_type" name="search_type" value="<?=$search_type?>">
|
||||
<input type="hidden" id="search_keyword" name="search_keyword" value="<?=$search_keyword?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="img_path" name="img_path">
|
||||
|
||||
<div class="common_table">
|
||||
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
|
||||
<tr>
|
||||
<th class="tb_tit18">제목</th>
|
||||
<td class="tb_tit01">
|
||||
<input type="text" name="title" id="title" class="input00" size="100" value="RE : <?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tb_tit18">문의내용</th>
|
||||
<td class="tb_tit01">
|
||||
<!-- <textarea id="content" name="content"><?=$content_txt?></textarea> -->
|
||||
<textarea name="content" id="ir1" style="width:100%; height:500px;" /><?=$content_txt?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:question_reply_add_proc();">저장하기</a>
|
||||
<a href="/admin/cs/cs_question_list/7/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>">목록으로</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var oEditors = [];
|
||||
var oEditors2 = [];
|
||||
|
||||
$(function(){
|
||||
nhn.husky.EZCreator.createInIFrame({
|
||||
oAppRef: oEditors,
|
||||
elPlaceHolder: "ir1",
|
||||
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
||||
htParams : {
|
||||
bUseToolbar : true,
|
||||
bUseVerticalResizer : true,
|
||||
bUseModeChanger : true,
|
||||
fOnBeforeUnload : function(){
|
||||
}
|
||||
},
|
||||
fOnAppLoad : function(){
|
||||
},
|
||||
fCreator: "createSEditor2"
|
||||
});
|
||||
|
||||
nhn.husky.EZCreator.createInIFrame({
|
||||
oAppRef: oEditors2,
|
||||
elPlaceHolder: "ir2",
|
||||
sSkinURI: "/smarteditor/SmartEditor2Skin.html",
|
||||
htParams : {
|
||||
bUseToolbar : true,
|
||||
bUseVerticalResizer : true,
|
||||
bUseModeChanger : true,
|
||||
fOnBeforeUnload : function(){
|
||||
}
|
||||
},
|
||||
fOnAppLoad : function(){
|
||||
},
|
||||
fCreator: "createSEditor2"
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
/*
|
||||
CKEDITOR.replace('content', {
|
||||
height: '400px'
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
function question_reply_add_proc(){
|
||||
//CKEDITOR.instances.content.updateElement();
|
||||
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
//oEditors2.getById["ir2"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
|
||||
if($("#title").val()=='') {
|
||||
alert("제목을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
if($("#content").val()=='') {
|
||||
alert("내용을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
if($("#ir1").val()=='' || $("#ir1").val()=='null' || $("#ir1").val()==' ' || $("#ir1").val()=='<p> </p>') {
|
||||
alert("내용을 입력해주세요.");
|
||||
oEditors.getById["ir1"].exec("focus");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
42
application/views/admin/cs/cs_question_view.php
Executable file
42
application/views/admin/cs/cs_question_view.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$title = $result['title'];
|
||||
$write_id = $result['write_id'];
|
||||
$write_name = $result['write_name'];
|
||||
$reg_date = $result['reg_date'];
|
||||
$content = $result['content'];
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?
|
||||
$menu_code = '71';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
|
||||
<tr>
|
||||
<th class="tb_tit18">제목</th>
|
||||
<td class="tl"><?=$title?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tb_tit18">작성자</th>
|
||||
<td class="tl"><?=$write_id?>(<?=$write_name?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tb_tit18">작성일</th>
|
||||
<td class="tl"><?=$reg_date?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tb_tit18">문의내용</th>
|
||||
<td class="tl"><?=$content?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="/admin/cs/cs_question_list/7/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>">목록으로</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user