first commit
This commit is contained in:
179
application/views/admin/column/column_comment_list.php
Executable file
179
application/views/admin/column/column_comment_list.php
Executable file
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
|
||||
if($search_comment_type == 'Y') {
|
||||
$menu_code = '342';
|
||||
} else {
|
||||
$menu_code = '341';
|
||||
}
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/column/column_comment_list/3">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_today" name="search_today" value="<?=$search_today?>">
|
||||
<input type="hidden" id="search_today_best" name="search_today_best" value="<?=$search_today_best?>">
|
||||
<input type="hidden" id="search_comment_type" name="search_comment_type" value="<?=$search_comment_type?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="">선택</option>
|
||||
<option value="write_name" <? if($search_type=='write_name'){ echo 'selected';}?>>닉네임</option>
|
||||
<option value="write_id" <? if($search_type=='write_id'){ echo 'selected';}?>>아이디</option>
|
||||
<option value="comment" <? if($search_type=='comment'){ 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 clearfix">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<a href="javascript:search_today();"><span style="font-weight:bold">오늘신규:</span> <?=number_format($new_count);?></a>
|
||||
<a href="/admin/news/news_comment_list/2?search_comment_type=Y"><span style="font-weight:bold" class="text_red">배댓전체:</span> <?=number_format($best_count);?></a>
|
||||
<a href="javascript:search_today_best();"><span style="font-weight:bold" class="text_blue">오늘의배댓:</span> <?=number_format($best_new_count);?></a>
|
||||
<div class="searh_area">
|
||||
<select name="search_theme_type" onchange="check_search();">
|
||||
<option value="">테마별</option>
|
||||
<? foreach ($def_arr_news_theme as $val) {?>
|
||||
<option value="<?=$val['code']?>" <? if($search_theme_type==$val['code']){ echo 'selected';}?>><?=$val['name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr><td>등록된 내용이 없습니다.</td></tr>
|
||||
<?
|
||||
} else {
|
||||
$now_date = date("Y-m-d");
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$p_idx = $val['p_idx'];
|
||||
$member_img = $val['member_img'];
|
||||
$write_name = $val['write_name'];
|
||||
$write_id = $val['write_id'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$like_count = $val['like_count'];
|
||||
$bad_count = $val['bad_count'];
|
||||
$theme_types = $val['theme_types'];
|
||||
$title = $val['title'];
|
||||
$column_name = $val['column_name'];
|
||||
$comment = $val['comment'];
|
||||
$is_best = $val['is_best'];
|
||||
$content_idx = $val['content_idx'];
|
||||
$best_txt = '';
|
||||
if($is_best == 'Y') {
|
||||
$best_txt = '[best]';
|
||||
}
|
||||
|
||||
$parent_comment = '';
|
||||
if($p_idx!=$idx) {
|
||||
# model - 카테고리 list
|
||||
$ci=& get_instance();
|
||||
$ci->load->model('admin/comm/m_comment');
|
||||
$arr_parent_comment = $ci->m_comment->comment_where_p_idx_select($p_idx);
|
||||
if(count($arr_parent_comment) > 0) {
|
||||
$parent_comment = '</br></br>---------------- 원댓글 내용 --------------------</br>';
|
||||
$parent_comment.= $arr_parent_comment['comment'];
|
||||
|
||||
}
|
||||
}
|
||||
$comment = $comment.$parent_comment.'<p> </p>';
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">
|
||||
<img src="<?=$member_img?>" width="25"> <?=$write_name?>(<?=$write_id?>) <?=$reg_date?>
|
||||
</th>
|
||||
<th style="text-align: right">
|
||||
<?=$best_txt?> <img src="/img/web/img_thumbup.jpg" style="vertical-align:middle;margin-top:-3px;"><?=number_format($like_count)?> <img src="/img/web/img_thumbdown.jpg" style="vertical-align:middle;margin-top:-3px;"><?=number_format($bad_count)?>
|
||||
<button type="button" class="btn_s_blue" style="width:40px" onclick="column_comment_del_proc('<?=$idx?>');" style="cursor: pointer;">삭제</button>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<a href="/web/news/column_view/<?=$content_idx?>" target="_blank"><?=$title?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;vertical-align: top" colspan="2"><?=$comment?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<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 search_today(){
|
||||
$("#search_today").val('Y');
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function search_today_best(){
|
||||
$("#search_today_best").val('Y');
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 삭제
|
||||
function column_comment_del_proc(idx) {
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/column/column_comment_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
281
application/views/admin/column/column_list.php
Executable file
281
application/views/admin/column/column_list.php
Executable file
@@ -0,0 +1,281 @@
|
||||
<?
|
||||
$menu_code = '32';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$colspan ="11";
|
||||
|
||||
$arr_display = array();
|
||||
foreach ($arr_display_count as $val) {
|
||||
$arr_display[$val['is_display']] = $val['cnt'];
|
||||
}
|
||||
$is_display1 = 0; $is_display2 = 0;
|
||||
if(isset($arr_display['Y'])==true) $is_display1 = $arr_display['Y'];
|
||||
if(isset($arr_display['N'])==true) $is_display2 = $arr_display['N'];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/column/column_list/3">
|
||||
<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_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="column_name" <? if($search_type=='column_name'){ echo 'selected';}?>>칼럼명</option>
|
||||
<option value="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="tag" <? if($search_type=='tag'){ 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">
|
||||
<? if($search_type=='tag' && $search_keyword!='') {?><h2 class="subtitle"><?=$search_keyword?></h2><? }?>
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<a href="javascript:click_search('1', 'search_click1');"><span style="margin-left: 5px;font-weight:bold">오늘신규:</span> <?=number_format($new_count);?></a>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="1" <? if($sort=='1') { echo 'checked';}?> onclick="check_search();"> 최신순</span>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="2" <? if($sort=='2') { echo 'checked';}?> onclick="check_search();"> 조회순</span>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="3" <? if($sort=='3') { echo 'checked';}?> onclick="check_search();"> 좋아요순</span>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="4" <? if($sort=='4') { echo 'checked';}?> onclick="check_search();"> 댓글순</span>
|
||||
<span style="margin-left: 10px">
|
||||
<a href="javascript:click_search('1', 'search_click2');"><span class="text_blue">출력중: <?=number_format($is_display1)?></span></a>
|
||||
<a href="javascript:click_search('2', 'search_click2');"><span class="text_red">예약중: <?=number_format($is_display2)?></span></a>
|
||||
</span>
|
||||
<table>
|
||||
<thead>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>썸네일</th>
|
||||
<th>칼럼명</th>
|
||||
<th>제목</th>
|
||||
<th>등록일시</br>(예약일시)</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<th>상태</</th>
|
||||
<? if($search_type=='tag' && $search_keyword!='' ) {
|
||||
$colspan ="12";
|
||||
?>
|
||||
<th>태그</th>
|
||||
<? }?>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="<?=$colspan?>">등록된 내용이 없습니다.</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'];
|
||||
$main_img = $val['main_img'];
|
||||
$column_name = $val['column_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$is_display = $val['is_display'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_date = $val['display_date'];
|
||||
$tag = $val['tag'];
|
||||
|
||||
$display_date_txt = '';
|
||||
if($is_display == 'N') {
|
||||
$display_date_txt = '</br><span class="text_green">('.$display_date.')</span>';
|
||||
}
|
||||
|
||||
|
||||
$arr_tag = explode(" ", $tag);
|
||||
$tag_count = count($arr_tag);
|
||||
$tag_txt = '';
|
||||
foreach ($arr_tag as $key=>$val) {
|
||||
if($key > 0) $tag_txt.= ', ';
|
||||
$tag_txt.='<a href="/admin/column/column_list/3?search_type=tag&search_keyword='.$val.'" class="text_blue">'.$val.'</a>';
|
||||
if($key==2) break;
|
||||
}
|
||||
|
||||
if($tag_count > 3) {
|
||||
$tag_txt.=' 외 '.($tag_count-3).'개';
|
||||
}
|
||||
|
||||
|
||||
$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><?=$dataNumber?></td>
|
||||
<td><img src="<?=$main_img?>" width="35"></td>
|
||||
<td><a href="/admin/column/column_list/3?search_type=column_name&search_keyword=<?=$column_name?>"><?=$column_name?></a></td>
|
||||
<td style="text-align:left;" class="title"><a href="javascript:column_edit('<?=$idx?>')"><?=$new?><?=$title?></a></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
<td>
|
||||
<? if($is_display == 'N') {?>
|
||||
<select name="is_display_<?=$idx?>" id="is_display_<?=$idx?>" onchange="change_is_display(this);">
|
||||
<option value="Y" <? if($is_display=='Y') { echo 'selected';}?>>출력</option>
|
||||
<option value="N" <? if($is_display=='N') { echo 'selected';}?>>예약</option>
|
||||
</select>
|
||||
<? } else {
|
||||
echo '출력';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<? if($search_type=='tag' && $search_keyword!='' ) {?>
|
||||
<td class="text_blue"><?=$tag_txt?></td>
|
||||
<? }?>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:column_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:column_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:column_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:column_add();">칼럼등록</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, id){
|
||||
$("#"+id).val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
function column_add(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/column/column_reg/3");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function column_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/column/column_reg/3");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function column_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/column/column_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function column_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/column/column_reg_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);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function change_is_display(t){
|
||||
var val = t.value;
|
||||
var select_id = t.id;
|
||||
var idx = select_id.replace("is_display_", "");
|
||||
|
||||
var form_data = {
|
||||
"is_display" : val,
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/column/column_is_display_update',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
if(rtn_json.result_code!='0000') {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
} else {
|
||||
window.location.reload(true);
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
587
application/views/admin/column/column_reg.php
Executable file
587
application/views/admin/column/column_reg.php
Executable file
@@ -0,0 +1,587 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
$arr_theme_reg = array();
|
||||
for($i=1;$i<=10;$i++) {
|
||||
$arr_theme_reg[$i] = '';
|
||||
}
|
||||
|
||||
$arr_section_reg = array();
|
||||
for($i=1;$i<=10;$i++) {
|
||||
$arr_section_reg[$i] = '';
|
||||
}
|
||||
|
||||
$admin_type = $this->session->userdata('Adm_Type');
|
||||
$admin_id = $this->session->userdata('Adm_Id');
|
||||
if($mode=='edit') {
|
||||
// 칼럼리스트는 자기 글만 삭제 가능
|
||||
$write_id = $result['write_id'];
|
||||
if($admin_type == '2') {
|
||||
if($write_id !=$admin_id) {
|
||||
gf_alert("잘못된 접근입니다.", "/admin/main");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
|
||||
$content = htmlentities($result['content']);
|
||||
$partner_idx = $result['partner_idx'];
|
||||
$tag = $result['tag'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$like_count = $result['like_count'];
|
||||
$is_auto_setting = $result['is_auto_setting'];
|
||||
$is_display = $result['is_display'];
|
||||
$display_date = $result['display_date'];
|
||||
$main_img = $result['main_img'];
|
||||
$video_url = $result['video_url'];
|
||||
|
||||
$video_url = str_replace('https://www.youtube.com/embed/','', $video_url);
|
||||
|
||||
$arr_display_date = explode(' ', $display_date);
|
||||
$display_date = $arr_display_date[0];
|
||||
$arr_display_time = explode(':', $arr_display_date[1]);
|
||||
$display_hour = $arr_display_time[0];
|
||||
$display_min = $arr_display_time[1];
|
||||
$display_sec = $arr_display_time[2];
|
||||
|
||||
$tag = str_replace(' ', ',', $tag);
|
||||
|
||||
foreach ($arr_theme as $val) {
|
||||
$arr_theme_reg[$val['theme_type']] = $val['rank'];
|
||||
}
|
||||
|
||||
|
||||
foreach ($arr_section as $val) {
|
||||
$arr_section_reg[$val['etc_section_type']] = $val['rank'];
|
||||
}
|
||||
|
||||
$relation_column_style = "none";
|
||||
if($is_auto_setting=='N') {
|
||||
$relation_column_style = "block";
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$title = '';
|
||||
$content = '';
|
||||
$partner_idx = '';
|
||||
$tag = '';
|
||||
$hit_count = 0;
|
||||
$like_count = 0;
|
||||
$is_auto_setting= 'Y';
|
||||
$display_date = '';
|
||||
$display_hour = '';
|
||||
$display_min = '';
|
||||
$display_sec = '';
|
||||
$main_img = '';
|
||||
$video_url = '';
|
||||
|
||||
$relation_column_style = "none";
|
||||
|
||||
}
|
||||
|
||||
$menu_code = '32';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/jquery-ui.min.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
<script src="/ckeditor/ckeditor.js"></script>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/column/column_reg_proc" method="post" enctype="multipart/form-data">
|
||||
<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="search_click1" name="search_click1" value="<?=$search_click1?>">
|
||||
<input type="hidden" id="search_click2" name="search_click2" value="<?=$search_click2?>">
|
||||
<input type="hidden" id="sort" name="sort" value="<?=$sort?>">
|
||||
<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 news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>컬럼명</th>
|
||||
<td class="tl">
|
||||
<select name="column_idx">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($arr_columnlist as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($partner_idx==$val['idx']) { echo 'selected';}?>><?=$val['partner_name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<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 class="tl">
|
||||
<input type="file" name="main_img" id="main_img" class="input00" size="100">
|
||||
<? if($main_img!='') { ?>
|
||||
<input type="checkbox" name="is_del_img" value="Y">삭제
|
||||
<img src="<?=$main_img?>" width="100px"></br>
|
||||
<? } else {
|
||||
$main_img = '';
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="org_main_img" id="org_main_img" value="<?=$main_img?>">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>youtube 주소</th>
|
||||
<td class="tl">
|
||||
https://youtu.be/<input type="text" name="video_url" id="video_url" class="input00" value="<?=$video_url?>" style="width:200px"> (키만 넣어주세요.)
|
||||
</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>
|
||||
<th>태그</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="tag" id="tag" class="type01" size="50" value="<?=$tag?>"> 최대 5개까지 입력 가능(,로 구분해주세요.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>조회수</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count" id="hit_count" class="type03" size="10" value="<?=$hit_count?>"> (관리자가 임의적으로 조회수를 설정할 수 있습니다.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>좋아요수</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="like_count" id="like_count" class="type03" size="10" value="<?=$like_count?>"> (관리자가 임의적으로 좋아요수를 설정할 수 있으나 조회수 이상이 될 수는 없습니다)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>관련연재</td>
|
||||
<td class="tl">
|
||||
<input type="radio" name="is_auto_setting" id="is_auto_setting" onclick="click_relation_news_auto_setting('Y');" value="Y" <? if($is_auto_setting=='Y') { echo 'checked';}?>> 자동설정
|
||||
<input type="radio" name="is_auto_setting" id="is_auto_setting" onclick="click_relation_news_auto_setting('N');" value="N" <? if($is_auto_setting=='N') { echo 'checked';}?>> 수동설정
|
||||
<div class="two_box_type01 clearfix" id="no_auto_setting_content" style="display:<?=$relation_column_style?>; margin-top:10px;">
|
||||
<div class="con">
|
||||
<div class="searh_area fn mb10">
|
||||
<input type="text" name="article_keyword" id="article_keyword" class="input00" size="20" placeholder="검색어 입력" onkeypress="if( event.keyCode==13 ){search_article();}">
|
||||
<a href="javascript:search_article();" class="btn"><i class="fa moving_all fa-search" style="margin-left:8px;"></i></a>
|
||||
</div>
|
||||
<div class="mb10">
|
||||
<input type="radio" name="article_sort" id="article_sort" value="1" onclick="search_article();" checked> 최신순
|
||||
<input type="radio" name="article_sort" id="article_sort" value="2" onclick="search_article();"> 오래된순
|
||||
|
||||
검색결과 <span class="mark" id="result_count">0</span>건
|
||||
</div>
|
||||
<div class="list scs">
|
||||
<ul id="result">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="con">
|
||||
<h3 class="mb10">선택된 뉴스 항목</h3>
|
||||
<div class="list type02 scs">
|
||||
<ul id="selected_news">
|
||||
<? $i=1;
|
||||
foreach ($arr_relation_article as $val) {?>
|
||||
<li><input type="checkbox" name="relation_idxs[]" id="relation_idx_<?=$i?>" value="<?=$val['relation_article_idx']?>" onclick="delete_article('<?=$i?>');" checked><a href="/web/news/column_view/<?=$val['relation_article_idx']?>" target="_blank"><?=$val['title']?></a></li>
|
||||
<? $i=1;
|
||||
}
|
||||
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<? if($admin_type == '0') {?>
|
||||
<h2 class="subtitle"><span>PC</span>테마설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>헤드라인<br />칼럼<br />(모바일공통)</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="theme_type7">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_column_theme[7]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[7] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/theme_column_1.png" width="400px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>오늘의<br />칼럼<br/>(모바일공통)</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="theme_type8">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_column_theme[8]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[8] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/theme_column_2_1.png" width="300px">
|
||||
<img src="/img/admin/theme_column_2_2.png" width="600px">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>추천연재<br />(모바일공통)</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="theme_type9">
|
||||
<option value="">순위선택</option>
|
||||
<? for($i=1;$i<=$def_arr_column_theme[9]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[9] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/theme_column_3_1.png" width="300px">
|
||||
<img src="/img/admin/theme_column_3_2.png" width="400px">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2 class="subtitle"><span>모바일</span>테마설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>추천칼럼</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="theme_type10">
|
||||
<option value="">순위선택</option>
|
||||
<? for($i=1;$i<=$def_arr_column_theme[10]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[10] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/theme_column_4.png" width="300px">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<h2 class="subtitle">기타섹션<span>(모바일공통)</span></h2>
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<th>인기영상</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="section_type1">
|
||||
<option value="">순위선택</option>
|
||||
<? for($i=1;$i<=$def_arr_etc_section[1]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_section_reg[1] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/news_7.png" width="200px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>인기포토</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="section_type2">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_etc_section[2]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_section_reg[2] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/news_7.png" width="200px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>은혜로운영상<br />(모바일전용)</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="section_type3">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_etc_section[3]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_section_reg[3] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/section2.png" width="250px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>카드뉴스</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="section_type4">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_etc_section[4]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_section_reg[4] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/news_10.png" width="250px">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<?}?>
|
||||
<h2 class="subtitle">등록일시설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>등록일시</th>
|
||||
<td class="tl">
|
||||
<? if($mode=='add') {?>
|
||||
<input type="text" name="display_date" id="display_date" value="<?=$display_date?>" class="type02" size="10" placeholder="예약일">
|
||||
<input type="text" name="display_hour" id="display_hour" value="<?=$display_hour?>" class="type03" size="3" placeholder="시">:<input type="text" name="display_min" id="display_min" value="<?=$display_min?>" class="type03" size="3" placeholder="분">:<input type="text" name="display_sec" id="display_sec" value="<?=$display_sec?>" class="type03" size="3" placeholder="초">
|
||||
<?} else {?>
|
||||
<? if($is_display=='N') {?>
|
||||
<input type="text" name="display_date" id="display_date" value="<?=$display_date?>" class="type02" size="10" placeholder="예약일">
|
||||
<input type="text" name="display_hour" id="display_hour" value="<?=$display_hour?>" class="type03" size="3" placeholder="시">:<input type="text" name="display_min" id="display_min" value="<?=$display_min?>" class="type03" size="3" placeholder="분">:<input type="text" name="display_sec" id="display_sec" value="<?=$display_sec?>" class="type03" size="3" placeholder="초">
|
||||
|
||||
<? } else {?>
|
||||
|
||||
<input type="hidden" name="display_date" value="<?=$display_date?>">
|
||||
<input type="hidden" name="display_hour" value="<?=$display_hour?>">
|
||||
<input type="hidden" name="display_min" value="<?=$display_min?>">
|
||||
<input type="hidden" name="display_sec" value="<?=$display_sec?>">
|
||||
|
||||
<?=$display_date?> <?=$display_hour?>:<?=$display_min?>:<?=$display_sec?>
|
||||
|
||||
<? }
|
||||
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:column_reg_proc();">저장하기</a>
|
||||
<a href="/admin/column/column_list/3/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&sort=<?=$sort?>&search_click1=<?=$search_click1?>&search_click2=<?=$search_click2?>">목록으로</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'
|
||||
});
|
||||
*/
|
||||
|
||||
if("<?=$is_auto_setting?>"=="N") {
|
||||
$("#no_auto_setting_content").show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function column_reg_proc(){
|
||||
//CKEDITOR.instances.content.updateElement();
|
||||
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
//oEditors2.getById["ir2"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
|
||||
console.log($("#content").val());
|
||||
|
||||
if($("#column_idx").val()=='') {
|
||||
alert("칼럼명을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#title").val()=='') {
|
||||
alert("제목을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img").val()=='' && $("#org_main_img").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;
|
||||
}
|
||||
|
||||
|
||||
var hit_count = parseInt($("#hit_count").val());
|
||||
var like_count = parseInt($("#like_count").val());
|
||||
if(like_count > hit_count) {
|
||||
alert("좋아요수가 조회수 이상이 될수 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var is_auto_setting = $("input[type=radio][id=is_auto_setting]:checked").val();
|
||||
if(is_auto_setting == 'Y' && $("#tag").val()=='') {
|
||||
alert("관련칼럼을 자동설정 하시려면 tag가 필요합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
function click_relation_news_auto_setting(type){
|
||||
if(type == 'Y') {
|
||||
$("#no_auto_setting_content").hide();
|
||||
} else {
|
||||
$("#no_auto_setting_content").show();
|
||||
$("#article_keyword").focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 칼럼 검색
|
||||
function search_article(){
|
||||
var article_keyword = $("#article_keyword").val();
|
||||
var article_sort = $(":input:radio[name=article_sort]:checked").val();
|
||||
|
||||
if(article_keyword == '') {
|
||||
alert("검색어를 입력해주세요");
|
||||
return false;
|
||||
}
|
||||
var form_data = {
|
||||
"content_type" : "<?=DEF_COLUMN_CODE?>",
|
||||
"article_keyword" : article_keyword,
|
||||
"sort" : article_sort,
|
||||
"type" : 'JSON'
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/search/search_article_list',
|
||||
async : false,
|
||||
type : 'POST',
|
||||
dataType : 'JSON',
|
||||
data : form_data,
|
||||
success: function (rtnJson) {
|
||||
if(rtnJson.result_code == '0000') {
|
||||
if(article_sort==1) {
|
||||
data = sortJSON(rtnJson.result_data.list,'reg_date', '321'); // 123 or 321
|
||||
} else {
|
||||
data = sortJSON(rtnJson.result_data.list,'reg_date', '123'); // 123 or 321
|
||||
}
|
||||
$('#result_count').html(rtnJson.result_data.count);
|
||||
$('#result').empty();
|
||||
|
||||
if(rtnJson.result_data.count == 0) {
|
||||
$('#result').html("<li>검색된 내용이 없습니다.</li>");
|
||||
} else {
|
||||
for(key in data) {
|
||||
var title = data[key]['title'];
|
||||
title = title.replace(/'/g, "'");
|
||||
title = title.replace(/"/g, '"');
|
||||
|
||||
$('#result').append('<li class="title"><a href="javascript:;" onclick="select_article(\''+data[key]['idx']+'\', \''+title+'\');">'+title+'</a></li>');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
alert("칼럼검색에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
error: function(jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function select_article(idx, title){
|
||||
var index = ($("input[name=\"relation_idxs[]\"]").length)+1;
|
||||
$('#selected_news').append('<li><input type="checkbox" name="relation_idxs[]" id="relation_idx_'+index+'" value="'+idx+'" onclick="delete_article('+index+');"><a href="/web/news/column_view/'+idx+'" target="_blank">'+title+'</a></li>');
|
||||
$("input[name='relation_idxs[]'][value=" + idx + "]").attr("checked", true);
|
||||
|
||||
}
|
||||
|
||||
function delete_article(idx) {
|
||||
var checkbox_id = 'relation_idx_'+idx;
|
||||
if($('input:checkbox[id=checkbox_id]').is(":checked") == false){
|
||||
$("#"+checkbox_id).parent().remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// jquery datepicker
|
||||
$("#display_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/btn_date.png",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
74
application/views/admin/column/column_setting_reg.php
Executable file
74
application/views/admin/column/column_setting_reg.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
$arr_stat_time = explode(':', $stat_time);
|
||||
$stat_time1 = $arr_stat_time[0];
|
||||
$stat_time2 = $arr_stat_time[1];
|
||||
$stat_time3 = $arr_stat_time[2];
|
||||
|
||||
$menu_code = '31';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/column/column_setting_reg_proc" method="post">
|
||||
<input type="hidden" name="idx" value="<?=$idx?>">
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle">칼럼조회수설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="3">집계설정</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="is_duplication" id="is_duplication" value="N" class="input00" <? if($is_duplication=='N') { echo 'checked';}?>> 중복집계 비허용
|
||||
<input type="radio" name="is_duplication" id="is_duplication" value="Y" class="input00" <? if($is_duplication=='Y') { echo 'checked';}?>> 중복집계 허용
|
||||
</br>* 한 명당 여러 번의 집계가 가능한지 불가능한지를 설정합니다.</br>
|
||||
* 중복집계 비허용 : 중복집계를 비허용으로 설정하시면 아래의 중복집계 판단 기준에 따라 중복이라고 판단되면 집계에 포함되지 않습니다..</br>
|
||||
* 중복집계허용 : 중복집계 판단 기준과 관계없이 모두 집계가 됩니다.</br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<p class="txt"><b>중복집계 판단 기준 설정 (중복집계 비허용시)</b></p>
|
||||
<input type="radio" name="no_duplication_setting" id="no_duplication_setting" value="1" class="input00" <? if($no_duplication_setting=='1') { echo 'checked';}?>> 아이디 기준 중복방지
|
||||
<input type="radio" name="no_duplication_setting" id="no_duplication_setting" value="2" class="input00" <? if($no_duplication_setting=='2') { echo 'checked';}?>> 아아피 기준 중복방지
|
||||
</br>* 중복집계를 비허용으로 설정하셨을 경우 중복기준을 아이디로 할 것인지 아이피로 할 것인지의 선택</br>
|
||||
* 아이디 기준 중복방지 : 중복집계를 비허용으로 하셨다면 같은 아이디로 접속시 중복으로 판단하고 집계가 되지 않습니다.</br>
|
||||
* 아이피 기중 중복장지 : 중복집계를 비허용으로 하셨다면 같은 아이피에서 접속시 중복으로 판단하고 집계가 되지 않습니다.</br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<p class="txt"><b>집계 허용시간</b></p>
|
||||
<input type="text" name="stat_time1" id="stat_time1" class="type03" size="5" value="<?=$stat_time1?>">시간 <input type="text" name="stat_time2" id="stat_time2" class="type03" size="5" value="<?=$stat_time2?>">분 <input type="text" name="stat_time3" id="stat_time3" class="type03" size="5" value="<?=$stat_time3?>">초
|
||||
</br>* 관리자의 랭킹집계관리 페이지에서 랭킹집계를 관리자가 수동으로 랭킹을 집계하셔야 합니다.</br>
|
||||
* 랭킹집계는 랭킹집계관리 페이지에서재집계버튼, 전체재집계버튼, 집계시작버튼으로 집계를 하실수 있습니다.</br>
|
||||
* 출력중 : 출력중으로 설정하시면 수동집계시 해당 집계가 사용자화면에 출력됩니다.</br>
|
||||
* 미출력 : 미출력으로 설정하시면 수동집계시 해당 집계가 사용자화면에 출력되지 않습니다.</br>
|
||||
예) 2013년 2월 랭킹집계는 출력으로 되어있고 3월 랭킹집계는 미출력으로 되어있다면2013년 2월 랭킹집계는 출력되지만 3월은 출력되지 않습니다.</br>
|
||||
*수동 집계 방식은 관리자가 랭킹을 직접 집계하고 출력상태로 해놓아야지만 사용자가 볼수 있습니다.</br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:column_setting_reg_proc()">저장하기</a>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function column_setting_reg_proc(){
|
||||
if($("#stat_time1").val()=='' && $("#stat_time2").val()=='' && $("#stat_time3").val()=='') {
|
||||
alert("집계허용시간을 설정해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
94
application/views/admin/column/column_tag_list.php
Executable file
94
application/views/admin/column/column_tag_list.php
Executable file
@@ -0,0 +1,94 @@
|
||||
<?
|
||||
$menu_code = '35';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/column/column_tag_list/3">
|
||||
<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_type" name="search_type" value="tag">
|
||||
|
||||
|
||||
|
||||
<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);?>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="1" <? if($sort=='1') { echo 'checked';}?> onclick="check_search();"> 최신순</span>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="2" <? if($sort=='2') { echo 'checked';}?> onclick="check_search();"> 인기순</span>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>태그명</th>
|
||||
<th>등록글수</th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$tag = $val['tag'];
|
||||
$article_count = $val['cnt'];
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=number_format($dataNumber)?></td>
|
||||
<td class="title"><a href="/admin/column/column_list/3?search_type=tag&search_keyword=<?=$tag?>"><?=$tag?></a></td>
|
||||
<td><?=number_format($article_count)?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
101
application/views/admin/column/column_theme_edit.php
Executable file
101
application/views/admin/column/column_theme_edit.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $result['content_idx'];
|
||||
$main_img = $result['theme_img'];
|
||||
$theme_type = $result['theme_type'];
|
||||
$rank = $result['rank'];
|
||||
$column_name = $result['column_name'];
|
||||
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
$menu_code = '33';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/column/column_theme_edit_proc" method="post" enctype="multipart/form-data">
|
||||
<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="search_ranking_type" name="search_theme_type" value="<?=$search_theme_type?>">
|
||||
<input type="hidden" id="sort" name="sort" value="<?=$sort?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="key" name="key">
|
||||
<input type="hidden" id="mode" name="theme_type" value="<?=$theme_type?>">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle"><?=$def_arr_column_theme[$theme_type]['name']?></h2>
|
||||
<?
|
||||
if($def_arr_column_theme[$theme_type]['display']=='all') {
|
||||
?>
|
||||
<span class="text_blue"><b>* 모바일과 공통 송출관리</b></span>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="4"><?=$rank?>위</th>
|
||||
<td class="tl"><input type="text" name="column_name" id="column_name" class="type02" size="20" placeholder="칼럼명" value="<?=$column_name?>" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx" id="content_idx" value="<?=$content_idx?>">
|
||||
<input type="text" name="title" id="title" class="input00" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view1"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img" id="img">
|
||||
<input type="hidden" name="org_img" id="org_img" value="<?=$main_img?>">
|
||||
<input type="file" name="theme_img" id="theme_img" class="input00" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="open_search_article('');" style="cursor: pointer;">컨텐츠검색</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:column_theme_list_reg_proc();">저장하기</a>
|
||||
<a href="/admin/column/column_theme_list/3/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_theme_type=<?=$search_theme_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<? require_once(APPPATH."views/admin/search/search_article_inc.php"); ?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function open_search_article(key){
|
||||
$("#key").val(key);
|
||||
$("#article_keyword").val('');
|
||||
commonLayerOpen('search_article');
|
||||
$("#article_keyword").focus();
|
||||
}
|
||||
|
||||
function column_theme_list_reg_proc(){
|
||||
if($("#title").val()!='') {
|
||||
if($("#content_idx").val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img").val()=='' && $("#img").val()=='' && $("#org_img").val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
248
application/views/admin/column/column_theme_list.php
Executable file
248
application/views/admin/column/column_theme_list.php
Executable file
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
|
||||
$menu_code = '33';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
|
||||
$arr_display = array();
|
||||
foreach ($arr_display_count as $val) {
|
||||
$arr_display[$val['is_display']] = $val['cnt'];
|
||||
}
|
||||
$is_display1 = 0; $is_display2 = 0;
|
||||
if(isset($arr_display['Y'])==true) $is_display1 = $arr_display['Y'];
|
||||
if(isset($arr_display['N'])==true) $is_display2 = $arr_display['N'];
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/column/column_theme_list/3">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="page" name="search_theme_type" value="<?=$search_theme_type?>">
|
||||
<input type="hidden" id="search_click1" name="search_click1" value="<?=$search_click1?>">
|
||||
<input type="hidden" id="search_click2" name="search_click2" value="<?=$search_click2?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
|
||||
|
||||
<div class="common_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li style="width:100px">PC테마</li>
|
||||
<li><a href="/admin/column/column_theme_list/3" <? if($search_theme_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<? foreach($def_arr_column_theme1 as $val) {
|
||||
$css = '';
|
||||
if($search_theme_type==$val['code']){
|
||||
$css = ' class="on"';
|
||||
}
|
||||
|
||||
?>
|
||||
<li><a href="/admin/column/column_theme_list/3?search_theme_type=<?=$val['code']?>" <?=$css?>><?=$val['name']?></a></li>
|
||||
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="">선택</option>
|
||||
<option value="column_name" <? if($search_type=='column_name'){ echo 'selected';}?>>칼럼명</option>
|
||||
<option value="title" <? if($search_type=='title'){ 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_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li style="width:100px">모바일테마</li>
|
||||
<? foreach($def_arr_column_theme2 as $val) {
|
||||
$css = '';
|
||||
if($search_theme_type==$val['code']){
|
||||
$css = ' class="on"';
|
||||
}
|
||||
|
||||
?>
|
||||
<li><a href="/admin/column/column_theme_list/3?search_theme_type=<?=$val['code']?>" <?=$css?>><?=$val['name']?></a></li>
|
||||
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_table" style="margin-top: 20px">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<a href="javascript:click_search('1', 'search_click1');"><span style="margin-left: 5px;font-weight:bold">오늘신규:</span> <?=number_format($new_count);?></a>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="1" <? if($sort=='1') { echo 'checked';}?> onclick="check_search();"> 최신순</span>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="2" <? if($sort=='2') { echo 'checked';}?> onclick="check_search();"> 조회순</span>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="3" <? if($sort=='3') { echo 'checked';}?> onclick="check_search();"> 좋아요순</span>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="4" <? if($sort=='4') { echo 'checked';}?> onclick="check_search();"> 댓글순</span>
|
||||
<span style="margin-left: 10px">
|
||||
<a href="javascript:click_search('1', 'search_click2');"><span class="text_blue">출력중: <?=number_format($is_display1)?></span></a>
|
||||
<a href="javascript:click_search('2', 'search_click2');"><span class="text_red">예약중: <?=number_format($is_display2)?></span></a>
|
||||
</span>
|
||||
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>썸네일</th>
|
||||
<th>테마명</th>
|
||||
<th>칼럼명</th>
|
||||
<th>제목</th>
|
||||
<th>등록일시</br>(예약일시)</th>
|
||||
<th>출력순위</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="12">등록된 내용이 없습니다.</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'];
|
||||
$main_img = $val['main_img'];
|
||||
$column_name = $val['column_name'];
|
||||
$theme_type = $val['theme_type'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$is_display = $val['is_display'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_date = $val['display_date'];
|
||||
$rank = $val['rank'];
|
||||
$content_idx = $val['content_idx'];
|
||||
|
||||
$display_date_txt = '';
|
||||
if($is_display == 'N') {
|
||||
$display_date_txt = '</br><span class="text_green">('.$display_date.')</span>';
|
||||
}
|
||||
|
||||
$theme_type_txt = $def_arr_column_theme[$theme_type]['name'];
|
||||
|
||||
$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><?=$dataNumber?></td>
|
||||
<td><img src="<?=$main_img?>" width="35"></td>
|
||||
<td><?=$theme_type_txt?></td>
|
||||
<td><a href="/admin/column/column_reg/3?mode=edit&idx=<?=$content_idx?>"><?=$column_name?></a></td>
|
||||
<td class="title" style="text-align:left;"><a href="/admin/column/column_reg/3?mode=edit&idx=<?=$content_idx?>"><?=$new?><?=$title?></a></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:column_theme_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:column_theme_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:column_theme_reg_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:column_theme_list_reg();">송출관리</a>
|
||||
<a href="/admin/column/column_reg/3?mode=add">칼럼등록</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, id){
|
||||
$("#"+id).val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function column_theme_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/column/column_theme_list_reg/3");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function column_theme_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/column/column_theme_edit/3");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function column_theme_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/column/column_theme_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function column_theme_reg_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/column/column_theme_reg_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>
|
||||
169
application/views/admin/column/column_theme_list_reg.php
Executable file
169
application/views/admin/column/column_theme_list_reg.php
Executable file
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_theme_rank = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
$arr_theme_rank[$val['rank']] = array('content_idx'=> $val['content_idx'], 'column_name'=>$val['column_name'], 'partner_idx'=>$val['partner_idx'], 'title'=>$val['title'], 'sub_content'=>$val['sub_content'], 'theme_img'=>$val['theme_img']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '33';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/column/column_theme_list_reg_proc" method="post" enctype="multipart/form-data">
|
||||
<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="search_theme_type" name="search_theme_type" value="<?=$search_theme_type?>">
|
||||
<input type="hidden" id="sort" name="sort" value="<?=$sort?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="mode" name="mode" value="<?=$mode?>">
|
||||
<input type="hidden" id="key" name="key">
|
||||
|
||||
|
||||
<?
|
||||
if($def_arr_column_theme[$search_theme_type]['display']=='all') {
|
||||
?>
|
||||
<span class="text_blue"><b>* 모바일과 공통 송출관리</b></span>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>테마</th>
|
||||
<td class="tl">
|
||||
<div style="width:80px; float: left"><b>PC섹션</b></div>
|
||||
<? foreach($def_arr_column_theme1 as $val) {?>
|
||||
<input type="radio" name="theme_type" value="<?=$val['code']?>" onclick="change_theme_type('<?=$val['code']?>')" <? if($search_theme_type==$val['code']) { echo 'checked';}?>> <?=$val['name']?>
|
||||
<? }?>
|
||||
</br>
|
||||
<div style="width:80px; float: left"><b>모바일섹션</b></div>
|
||||
<? foreach($def_arr_column_theme2 as $val) {?>
|
||||
<input type="radio" name="theme_type" value="<?=$val['code']?>" onclick="change_theme_type('<?=$val['code']?>')" <? if($search_theme_type==$val['code']) { echo 'checked';}?>> <?=$val['name']?>
|
||||
<? }?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
for($i=1;$i<=$def_arr_column_theme[$search_theme_type]['count'];$i++) {
|
||||
|
||||
$title = '';
|
||||
$sub_content = '';
|
||||
$theme_img = '';
|
||||
$theme_img_txt = '';
|
||||
$content_idx = '';
|
||||
$column_name = '';
|
||||
if(isset($arr_theme_rank[$i])== true) {
|
||||
$title = $arr_theme_rank[$i]['title'];
|
||||
$column_name= $arr_theme_rank[$i]['column_name'];
|
||||
$sub_content= $arr_theme_rank[$i]['sub_content'];
|
||||
$sub_content= htmlspecialchars($sub_content);
|
||||
$content_idx= $arr_theme_rank[$i]['content_idx'];
|
||||
$theme_img = $arr_theme_rank[$i]['theme_img'];
|
||||
if($theme_img!='') $theme_img_txt = '<img src="'.$theme_img.'" width=250>';
|
||||
}
|
||||
|
||||
$colspan = "4";
|
||||
if($search_theme_type == '7') $colspan = "5";
|
||||
if($search_theme_type == '8') $colspan = "3";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$colspan?>"><?=$i?>위</th>
|
||||
<td class="tl"><input type="text" name="column_name<?=$i?>" id="column_name<?=$i?>" class="type02" size="20" placeholder="칼럼명" value="<?=$column_name?>" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx<?=$i?>" id="content_idx<?=$i?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="title<?=$i?>" id="title<?=$i?>" class="input00" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? if($search_theme_type == '7') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<textarea id="sub_content<?=$i?>" name="sub_content<?=$i?>" placeholder="기사 간략 노출(3줄)" rows="3" cols="80"><?=$sub_content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? }?>
|
||||
<? if($search_theme_type != '8') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view<?=$i?>"><?=$theme_img_txt?></div>
|
||||
<input type="hidden" name="img<?=$i?>" id="img<?=$i?>">
|
||||
<input type="hidden" name="org_img<?=$i?>" id="org_img<?=$i?>" value="<?=$theme_img?>">
|
||||
<input type="file" name="theme_img<?=$i?>" id="theme_img<?=$i?>" class="input00" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<? }?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="open_search_article('<?=$i?>');" style="cursor: pointer;">컨텐츠검색</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:column_theme_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/column/column_theme_list/3/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_theme_type=<?=$search_theme_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<? require_once(APPPATH."views/admin/search/search_article_inc.php"); ?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function open_search_article(key){
|
||||
$("#key").val(key);
|
||||
$("#article_keyword").val('');
|
||||
commonLayerOpen('search_article');
|
||||
$("#article_keyword").focus();
|
||||
}
|
||||
|
||||
|
||||
function change_theme_type(theme_code){
|
||||
$("#search_theme_type").val(theme_code);
|
||||
$("#input_form").attr("action", "/admin/column/column_theme_list_reg/3");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var theme_count = "<?=$def_arr_column_theme[$search_theme_type]['count']?>";
|
||||
function column_theme_list_reg_proc(){
|
||||
for(i=1;i<=theme_count;i++) {
|
||||
if($("#title"+i).val()!='') {
|
||||
if($("#content_idx"+i).val()==''){
|
||||
alert("칼럼을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
<? if($search_theme_type != '8') {?>
|
||||
if($("#theme_img"+i).val()=='' && $("#img"+i).val()=='' && $("#org_img"+i).val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
<? }?>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user