first commit
This commit is contained in:
171
application/views/admin/admin_member/login.php
Executable file
171
application/views/admin/admin_member/login.php
Executable file
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
header("Pragma: no-cache");
|
||||
header("Cache-Control: no-cache,must-revalidate");
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimun-scale=1.0, user-scalable=yes, target-densitydpi=device-dpi" />
|
||||
<meta name="format-detection" content="telephone=no, address=no, email=no" />
|
||||
<title class="title">크로스미디어 관리자</title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/admin/base.css" media="all" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/admin/font_notosanskr.css" />
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="/css/admin/loaders.css" media="all" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/admin/common.css?<?=time()?>" media="all" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/admin/main.css" media="all" />
|
||||
|
||||
<script src="<?=DIR_JS?>/jquery-3.3.1.min.js"></script>
|
||||
<script src="<?=DIR_JS?>/admin/common.js?<?=time()?>"></script>
|
||||
<script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>
|
||||
<script src="<?=DIR_JS?>/admin/ie8-body.js"></script>
|
||||
|
||||
</head>
|
||||
<div id="iquersier"></div>
|
||||
<body>
|
||||
<style>
|
||||
body,html{height: 100%;}
|
||||
#header{display: none;}
|
||||
#tablet_wrap{display: none;}
|
||||
#container_wrap{height: 100%;width:100%;background: url(/img/admin/common/admin_bg.jpg)no-repeat center center;background-size: cover;
|
||||
position: relative;padding:0;}
|
||||
.login_box{width:400px;}
|
||||
.ad_btn_wrap{text-align: center;margin-top: 10px;}
|
||||
.ad_btn{display:inline-block;padding:4px 20px;background: #000;font-size: 14px;color:#fff;}
|
||||
/*intro 부분*/
|
||||
.admin_content{width:230px;left:50%;top:50%;position: absolute;border: 1px solid #fff;padding:55px 65px 45px;border-radius: 50%;background: rgba(255, 255, 255, 0.11);
|
||||
margin-top:-228px;margin-left:-181px;box-shadow: 2px 8px 4px #313131;}
|
||||
.admin_content .thumb{width:100px;margin:0 auto;}
|
||||
.admin_content .thumb img{width:100%;}
|
||||
.admin_content h3{color:#fff;font-weight: bold;text-align: center;font-size: 20px;margin:8px 0;}
|
||||
.admin_content .doc{color:#fff;}
|
||||
.admin_content .loader{position: absolute;bottom:-80px;left:50%;margin-left:-5px;}
|
||||
.fa{margin-right: 8px;}
|
||||
h2.tit{font-weight: 400;font-size: 20px; color:#73879C;text-align: left;margin-bottom: 10px;}
|
||||
.btn_wrap{text-align: right;}
|
||||
.btn_wrap a{display: inline-block;padding:2px 7px;color:#C5C7CB;}
|
||||
.btn_wrap a .fa{color:#C5C7CB;}
|
||||
body{background: #F7F7F7;}
|
||||
.admin_info{background: #fff;padding:20px;}
|
||||
.admin_info th{font-weight: bold;color:#73879C;}
|
||||
.select_op{color:#fff;text-align: center;padding-bottom: 10px;}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div id="container_wrap">
|
||||
<div class="admin_content">
|
||||
<form name="input_form" id="input_form" action="/admin/login/login_proc" method="post">
|
||||
<p class="thumb"><img src="/img/admin/sub/lock.png" alt=""></p>
|
||||
<h3>Cross Admin</h3>
|
||||
<p class="select_op"><input type="radio" name="user_type" id="user_type01" value="1"> partner <input type="radio" name="user_type" id="user_type02" value="0" checked> admin</p>
|
||||
<div class="doc">
|
||||
<input type="text" name="user_id" id="user_id" placeholder="ID" style="margin-bottom:5px;">
|
||||
<input type="password" name="user_pwd" id="user_pwd" placeholder="PASSWORD">
|
||||
</div>
|
||||
<div class="ad_btn_wrap">
|
||||
<a href="#;" class="ad_btn" onclick="login_proc()">login</a>
|
||||
</div>
|
||||
<div class="loader">
|
||||
<div class="loader-inner ball-triangle-path">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script language="JavaScript">
|
||||
$(document).ready(function(){
|
||||
// 저장된 쿠키값을 가져와서 ID 칸에 넣어준다. 없으면 공백으로 들어감.
|
||||
var crossmap_admin_id = getCookie("crossmap_admin_id");
|
||||
var crossmap_admin_type = getCookie("crossmap_admin_type");
|
||||
$("#user_id").val(crossmap_admin_id);
|
||||
if(crossmap_admin_type!='') {
|
||||
$('input:radio[name=user_type]:input[value=' + crossmap_admin_type+ ']').attr("checked", true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 엔터쳤을때 검색
|
||||
$('#user_pwd').keypress(function(event){
|
||||
if ( event.which == 13 ) {
|
||||
login_proc();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function login_proc() {
|
||||
if($("#user_id").val()=="") {
|
||||
alert("아이디를 입력해주세요");
|
||||
return false;
|
||||
}
|
||||
if($("#user_pwd").val()=="") {
|
||||
alert("비밀번호를 입력해주세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
var user_id = $("#user_id").val();
|
||||
var user_type = $('input[name=user_type]:checked').val();
|
||||
setCookie("crossmap_admin_id", user_id, 100); // 100일 동안 쿠키 보관
|
||||
setCookie("crossmap_admin_type", user_type, 100); // 100일 동안 쿠키 보관
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setCookie(cookieName, value, exdays){
|
||||
var exdate = new Date();
|
||||
exdate.setDate(exdate.getDate() + exdays);
|
||||
var cookieValue = escape(value) + ((exdays==null) ? "" : "; expires=" + exdate.toGMTString());
|
||||
document.cookie = cookieName + "=" + cookieValue;
|
||||
}
|
||||
|
||||
function deleteCookie(cookieName){
|
||||
var expireDate = new Date();
|
||||
expireDate.setDate(expireDate.getDate() - 1);
|
||||
document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString();
|
||||
}
|
||||
|
||||
function getCookie(cookieName) {
|
||||
cookieName = cookieName + '=';
|
||||
var cookieData = document.cookie;
|
||||
var start = cookieData.indexOf(cookieName);
|
||||
var cookieValue = '';
|
||||
if(start != -1){
|
||||
start += cookieName.length;
|
||||
var end = cookieData.indexOf(';', start);
|
||||
if(end == -1)end = cookieData.length;
|
||||
cookieValue = cookieData.substring(start, end);
|
||||
}
|
||||
return unescape(cookieValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
63
application/views/admin/admin_member/member_edit.php
Executable file
63
application/views/admin/admin_member/member_edit.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<div class="title_big">
|
||||
<p>비밀번호변경</p>
|
||||
<ul class="clearfix location">
|
||||
<li><a href="/admin/main"><i class="fa fa-home"></i></a></li>
|
||||
<li>비밀번호변경</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/admin_member/member_edit_proc" method="post">
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>기존 비밀번호</th>
|
||||
<td><input type="password" name="org_user_pwd" id="org_user_pwd"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>새로운 비밀번호</th>
|
||||
<td class="tl"><input type="password" name="new_user_pwd" id="new_user_pwd"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호 확인</th>
|
||||
<td class="tl"><input type="password" name="chk_new_user_pwd" id="chk_new_user_pwd" onkeypress="if( event.keyCode==13 ){member_edit_proc();}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:member_edit_proc()">저장하기</a>
|
||||
<a href="/admin/main">취소하기</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function member_edit_proc(){
|
||||
if($("#org_user_pwd").val()=='') {
|
||||
alert("기존 비밀번호를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#new_user_pwd").val()=='') {
|
||||
alert("새로운 비밀번호를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#chk_new_user_pwd").val()=='') {
|
||||
alert("비밀번호 확인을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#new_user_pwd").val() != $("#chk_new_user_pwd").val()) {
|
||||
alert("비밀번호 확인을 다시해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
300
application/views/admin/advertisement/ad_code.php
Executable file
300
application/views/admin/advertisement/ad_code.php
Executable file
@@ -0,0 +1,300 @@
|
||||
<?
|
||||
$menu_code = '15';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<style>
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
</style>
|
||||
|
||||
<div class="common_depth3 clearfix">
|
||||
<ul class="clearfix depth3_tep">
|
||||
<li><a href="/admin/advertisement/1">광고 페이지 관리</a></li>
|
||||
<li><a href="/admin/advertisement/ad_code" class="on fw700">개별 광고 관리</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:ad_page_arr_del_proc();">삭제</a>
|
||||
<a href="#" id="btn_open_popup">등록</a>
|
||||
</div>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/setting/setting_comment_reg_proc" method="post">
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fw500" style="width:50px;"><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th class="fw500" width="100">번호</th>
|
||||
<th class="fw500">페이지 이름</th>
|
||||
<th class="fw500">광고 위치</th>
|
||||
<th class="fw500">광고 코드</th>
|
||||
<th class="fw500">광고보기</th>
|
||||
<th class="fw500">관리</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// $len = count($row);
|
||||
// foreach($row as $v) {
|
||||
// ?>
|
||||
<?/*
|
||||
// <tr>
|
||||
// <td><input type="checkbox" name="is_del[]" value="<?php echo $v['idx'];?>"></td>
|
||||
// <td><?php echo $len;?></td>
|
||||
// <td><?php echo $v['page_key'];?></td>
|
||||
// <td><?php echo $v['page_name'];?></td>
|
||||
// <td><?php echo $v['ad_pos_key'];?></td>
|
||||
// <td><?php echo $v['ad_pos_name'];?></td>
|
||||
// <td style="width:200px" class="tool_btn">
|
||||
// <a href="#" class="btn_modify" value="<?php echo $v['idx'];?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
// </td>
|
||||
// </tr>
|
||||
// <?php $len-=1;}?>
|
||||
// </tbody>
|
||||
// </table>
|
||||
// </div>
|
||||
|
||||
// <!--div class="write_btn tc">
|
||||
// <a href="javascript:setting_comment_reg_proc()">저장하기</a>
|
||||
// </div-->
|
||||
|
||||
// </form>
|
||||
|
||||
<!-- register popup -->
|
||||
<div id="dialog" title="광고 페이지 등록" style="display:none;">
|
||||
<!--p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p-->
|
||||
<form name="popup" action="" target="ifrm" method="post">
|
||||
<input type="hidden" id="popup_mode" name="mode" value="" />
|
||||
<input type="hidden" id="popup_idx" name="idx" value="" />
|
||||
<fieldset>
|
||||
<label for="page_key">페이지 키 영(대/소)문자만 사용</label>
|
||||
<input type="text" id="page_key" name="page_key" value="" class="text ui-widget-content ui-corner-all" maxlength="20">
|
||||
<label for="page_name">페이지 이름</label>
|
||||
<input type="text" id="page_name" name="page_name" value="" class="text ui-widget-content ui-corner-all" maxlength="100">
|
||||
<label for="ad_pos_key">광고 위치 키 영(대/소)문자만 사용</label>
|
||||
<input type="text" id="ad_pos_key" name="ad_pos_key" value="" class="text ui-widget-content ui-corner-all" maxlength="20">
|
||||
<label for="ad_pos_name">광고 위치 이름</label>
|
||||
<input type="text" id="ad_pos_name" name="ad_pos_name" value="" class="text ui-widget-content ui-corner-all" maxlength="100">
|
||||
|
||||
<!-- Allow form submission with keyboard without duplicating the dialog button -->
|
||||
<input type="button" value=" 등록 " id="btn_register" tabindex="-1" >
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!-- //register popup -->
|
||||
|
||||
<iframe frameborder="1" width="600" height="300" name="ifrm" style="border:2px ccc solid;"></iframe>
|
||||
|
||||
|
||||
// <script type="text/javascript">
|
||||
// $(document).ready(function() {
|
||||
// function reset_popup_form() {
|
||||
// $("#page_key").val('');
|
||||
// $("#page_name").val('');
|
||||
// $("#ad_pos_key").val('');
|
||||
// $("#ad_pos_name").val('');
|
||||
// $( "#dialog" ).dialog();
|
||||
// }
|
||||
|
||||
// function fill_popup_form(a,b,c,d) {
|
||||
// if(a!='' && b!='' && c!='' && d!='') {
|
||||
// reset_popup_form();
|
||||
// $("#page_key").val(a);
|
||||
// $("#page_name").val(b);
|
||||
// $("#ad_pos_key").val(c);
|
||||
// $("#ad_pos_name").val(d);
|
||||
// $( "#dialog" ).dialog();
|
||||
// }
|
||||
// }
|
||||
|
||||
// $(".btn_modify").click(function() {
|
||||
// idx = $(this).attr('value');
|
||||
// if(idx>0) {
|
||||
// $.ajax({
|
||||
// url: '/admin/advertisement/ad_page_edit',
|
||||
// data: {
|
||||
// format: 'json',
|
||||
// idx:idx
|
||||
// },
|
||||
// //dataType: 'jsonp',
|
||||
// type:'get',
|
||||
// success: function(msg) {
|
||||
// var json = $.parseJSON(msg);
|
||||
// if(json.result=='success') {
|
||||
// $("#popup_mode").val('upt');
|
||||
// $("#popup_idx").val(idx);
|
||||
// fill_popup_form(json.page_key,json.page_name,json.ad_pos_key,json.ad_pos_name);
|
||||
// }
|
||||
// },
|
||||
// error: function(err) {
|
||||
// console.log(err);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// $("#btn_open_popup").click(function() {
|
||||
// reset_popup_form();
|
||||
// });
|
||||
|
||||
// $("#btn_register").click(function() {
|
||||
// frm = $("form[name='popup']");
|
||||
|
||||
// frm.attr('target','ifrm');
|
||||
// frm.attr('action','/admin/advertisement/ad_page_proc');
|
||||
// frm.submit();
|
||||
// });
|
||||
// });
|
||||
|
||||
// function close_popup() {
|
||||
// $("")
|
||||
// }
|
||||
|
||||
// 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 category_search(){
|
||||
// $("#input_form").submit();
|
||||
// }
|
||||
|
||||
// function life_add(){
|
||||
// $("#mode").val('add');
|
||||
// $("#input_form").attr("action", "/admin/life/life_reg/5");
|
||||
// $("#input_form").submit();
|
||||
// }
|
||||
|
||||
// // edit
|
||||
// function life_edit(idx){
|
||||
// $("#idx").val(idx);
|
||||
// $("#mode").val('edit');
|
||||
// $("#input_form").attr("action", "/admin/life/life_reg/5");
|
||||
// $("#input_form").submit();
|
||||
// }
|
||||
|
||||
// // 삭제
|
||||
// function life_del_proc(idx) {
|
||||
// if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
// $("#idx").val(idx);
|
||||
// $("#input_form").attr("action", "/admin/life/life_reg_del_proc");
|
||||
// $("#input_form").submit();
|
||||
// } else { //취소
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 복수 삭제
|
||||
// function ad_page_arr_del_proc() {
|
||||
// if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
// alert("삭제할 내용이 없습니다.");
|
||||
// return false;
|
||||
// }
|
||||
// if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
// $("#input_form").attr("action", "/admin/advertisement/ad_page_arr_del_proc");
|
||||
// $("#input_form").attr('target','ifrm');
|
||||
// $("#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/life/life_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>
|
||||
|
||||
|
||||
// <script type="text/javascript">
|
||||
// // 컨텐츠 선택
|
||||
// function select_setting_type(){
|
||||
// $("#input_form").attr("action", "/admin/advertisement/ads/1");
|
||||
// $("#input_form").submit();
|
||||
// }
|
||||
|
||||
// // 저장하기
|
||||
// function setting_comment_reg_proc(){
|
||||
// $("#input_form").submit();
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// </script> */?>
|
||||
|
||||
<!-- // register popup -->
|
||||
<div id="dialog" title="광고 페이지 등록" style="display:none;">
|
||||
<!--p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p-->
|
||||
<form name="popup" action="" target="ifrm" method="post">
|
||||
<input type="hidden" id="popup_mode" name="mode" value="" />
|
||||
<input type="hidden" id="popup_idx" name="idx" value="" />
|
||||
<fieldset>
|
||||
<label for="page_name">페이지 이름 영(대/소)문자만 사용</label>
|
||||
<input type="text" id="page_key" name="page_key" value="" class="text ui-widget-content ui-corner-all" maxlength="20">
|
||||
<label for="page_name">광고 위치 이름</label>
|
||||
<input type="text" id="page_name" name="page_name" value="" class="text ui-widget-content ui-corner-all" maxlength="100">
|
||||
<label for="ad_pos_key">광고 위치 키 영(대/소)문자만 사용</label>
|
||||
<input type="text" id="ad_pos_key" name="ad_pos_key" value="" class="text ui-widget-content ui-corner-all" maxlength="20">
|
||||
<label for="ad_pos_name">광고 위치 이름</label>
|
||||
<input type="text" id="ad_pos_name" name="ad_pos_name" value="" class="text ui-widget-content ui-corner-all" maxlength="100">
|
||||
<!-- Allow form submission with keyboard without duplicating the dialog button -->
|
||||
<input type="button" value=" 등록 " id="btn_register" tabindex="-1" >
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!-- //register popup -->
|
||||
|
||||
<iframe frameborder="1" width="600" height="300" name="ifrm" style="border:2px ccc solid;"></iframe>
|
||||
134
application/views/admin/advertisement/ad_detail.php
Executable file
134
application/views/admin/advertisement/ad_detail.php
Executable file
@@ -0,0 +1,134 @@
|
||||
<?
|
||||
$menu_code = '15';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<style>
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
</style>
|
||||
|
||||
<div class="common_depth3 clearfix">
|
||||
<ul class="clearfix depth3_tep">
|
||||
<li><a href="/admin/advertisement/1">광고 페이지 관리</a></li>
|
||||
<li><a href="/admin/advertisement/ad_detail" class="on fw700">개별 광고 관리</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:fn_ad_detail_arr_del_proc();">삭제</a>
|
||||
<a href="ad_register" id="ad_register">등록</a>
|
||||
</div>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/setting/setting_comment_reg_proc" method="post">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fw500" style="width:50px;"><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th class="fw500" width="100">번호</th>
|
||||
<th class="fw500">페이지 이름</th>
|
||||
<th class="fw500">광고 위치</th>
|
||||
<th class="fw500">광고 코드</th>
|
||||
<th class="fw500">광고보기</th>
|
||||
<th class="fw500">관리</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$len = count($row);
|
||||
foreach($row as $v) {
|
||||
?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?php echo $v['idx'];?>"></td>
|
||||
<td><?=$len;?></td>
|
||||
<td><?=$v['page_name']?></td>
|
||||
<td><?=$v['ad_pos_name']?></td>
|
||||
<td><?=$v['ad_code']?></td>
|
||||
<td><?
|
||||
if(empty(!$v['ad_file'])){
|
||||
echo '<img id="image_section" src="'.$v['ad_file'].'" style="max-height: 100%; max-width: 100%;"/>';
|
||||
}?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="javascript:ad_detail_edit('<?=$v['idx']?>')" class="btn_modify" value="<?php echo $v['idx'];?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $len-=1;}?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<iframe frameborder="1" width="600" height="300" name="ifrm" style="border:2px ccc solid;"></iframe>
|
||||
<script>
|
||||
|
||||
// 복수 삭제
|
||||
function fn_ad_detail_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/advertisement/ad_detail_arr_del_proc");
|
||||
$("#input_form").attr('target','ifrm');
|
||||
$("#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);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// modify data
|
||||
function ad_detail_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('modify');
|
||||
$("#input_form").attr("action", "ad_register");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
<?
|
||||
// $(".btn_modify").click(function() {
|
||||
// idx = $(this).attr('value');
|
||||
// if(idx>0) {
|
||||
// $.ajax({
|
||||
// url: '/admin/advertisement/ad_page_edit',
|
||||
// data: {
|
||||
// format: 'json',
|
||||
// idx:idx
|
||||
// },
|
||||
// //dataType: 'jsonp',
|
||||
// type:'get',
|
||||
// success: function(msg) {
|
||||
// var json = $.parseJSON(msg);
|
||||
// if(json.result=='success') {
|
||||
// $("#popup_mode").val('upt');
|
||||
// $("#popup_idx").val(idx);
|
||||
// fill_popup_form(json.page_key,json.page_name,json.ad_pos_key,json.ad_pos_name);
|
||||
// }
|
||||
// },
|
||||
// error: function(err) {
|
||||
// console.log(err);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
?>
|
||||
232
application/views/admin/advertisement/ad_reg.php
Executable file
232
application/views/admin/advertisement/ad_reg.php
Executable file
@@ -0,0 +1,232 @@
|
||||
<?
|
||||
$menu_code = '15';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<style>
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
</style>
|
||||
|
||||
<div class="common_depth3 clearfix">
|
||||
<ul class="clearfix depth3_tep">
|
||||
<li><a href="/admin/advertisement/1">광고 페이지 관리</a></li>
|
||||
<li><a href="/admin/advertisement/ad_detail" class="on fw700">개별 광고 관리</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="ad_detail" id="ad_detail">취소</a>
|
||||
</div>
|
||||
|
||||
<div class="inner_content">
|
||||
<form name="input_form" id="input_form" action="/admin/advertisement/ad_detail_reg" method="post" enctype="multipart/form-data">
|
||||
<div class="common_table">
|
||||
<table><tbody>
|
||||
<tr>
|
||||
<th class="fw500">페이지 이름</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="page_title" id="page_name" value="" readonly style="display:none">
|
||||
<SELECT id="page_list" NAME="page_name" SIZE=1></SELECT>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">광고 위치 등록</th>
|
||||
<td class="tl">
|
||||
<SELECT id="ad_pos" NAME="ad_pos" SIZE=1></SELECT>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">광고등록 옵션</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="ad_option" value="0" id="ad_option_0">파일 업로드<br>
|
||||
<input type="radio" name="ad_option" value="1" id="ad_option_1">광고 코드 등록<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="option_file" style="display: none;">
|
||||
<th class="fw500">업로드 파일 선택</th>
|
||||
<td class="tl">
|
||||
<input type="file" name="ad_file" id="ad_file" onchange="change_img(this)">
|
||||
<div style="width:600px;height:200px">
|
||||
<img id="image_section" src="#" style="max-height: 100%; max-width: 100%;"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="option_file" style="display: none;">
|
||||
<th class="fw500">랜딩 페이지 주소</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="ad_lending" id="ad_lending" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="option_HTML" style="display: none;">
|
||||
<th class="fw500">HTML</th>
|
||||
<td class="tl">
|
||||
<textarea style="width:600px;height:200px" name="ad_code" id="ad_code"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:setting_ad_reg_proc()">저장하기</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
const page_name=<?=json_encode($page_name)?>;
|
||||
const ad_pos_name =<?=json_encode($ad_pos_name)?>;
|
||||
|
||||
$(document).ready(function(){
|
||||
setting_page_list(page_name)
|
||||
setting_ad_pos_option();
|
||||
<?if($mode=='modify'){?>
|
||||
var edit_data = <?=json_encode($edit_data)?>;
|
||||
setting_edit_data(edit_data);
|
||||
<?}?>
|
||||
ad_option_check();
|
||||
});
|
||||
|
||||
//load 데이터 setting
|
||||
function setting_edit_data(edit_data){
|
||||
console.log(edit_data);
|
||||
if(edit_data){
|
||||
//페이지 이름
|
||||
let page_key=page_name.indexOf(edit_data.page_name);
|
||||
$("#page_list").val(page_key).prop("selected", true);
|
||||
//광고 위치
|
||||
$("#ad_pos option").remove();
|
||||
setting_ad_pos_option();
|
||||
$("#ad_pos").val(edit_data.ad_pos_name).prop("selected", true);
|
||||
//광고 옵션
|
||||
(edit_data.ad_option==0)?$("#ad_option_0").prop("checked", true):$("#ad_option_1").prop("checked", true);
|
||||
ad_option_check();
|
||||
//File
|
||||
$('#image_section').attr('src', edit_data.ad_file);
|
||||
//lending
|
||||
$("#ad_lending").val(edit_data.ad_lending);
|
||||
//HTML
|
||||
$("#ad_code").val(edit_data.ad_code);
|
||||
}else{
|
||||
//image
|
||||
$("#ad_file").val("");
|
||||
$('#image_section').attr('src', "");
|
||||
$('#image_section').css('display', "noen");
|
||||
//lending
|
||||
$("#ad_lending").val("");
|
||||
//HTML
|
||||
$("#ad_code").val("");
|
||||
$("input:radio")[0]['checked']=false;
|
||||
$("input:radio")[1]['checked']=false;
|
||||
ad_option_check();
|
||||
}
|
||||
}
|
||||
|
||||
//page name setting
|
||||
function setting_page_list(page_name){
|
||||
for (var i in page_name) {
|
||||
$("#page_list").append(new Option(page_name[i], i));
|
||||
}
|
||||
}
|
||||
|
||||
//ad_pos option setting
|
||||
function setting_ad_pos_option(){
|
||||
let num =$("#page_list").val();
|
||||
for (var i in ad_pos_name[num]) {
|
||||
$("#ad_pos").append(new Option(ad_pos_name[num][i], ad_pos_name[num][i]));
|
||||
}
|
||||
}
|
||||
|
||||
//페이지 이름 변경 이벤트
|
||||
$("#page_list").change(function(){
|
||||
$("#ad_pos option").remove();
|
||||
setting_ad_pos_option();
|
||||
call_data_ajax();
|
||||
})
|
||||
|
||||
// 광고 등록 옵션 변경 이벤트
|
||||
$('input[name="ad_option"]').change(function(){
|
||||
ad_option_check();
|
||||
})
|
||||
|
||||
// ad_option radio btn check event
|
||||
function ad_option_check(){
|
||||
if($('input[name="ad_option"]:checked').val()==null) {
|
||||
$(".option_file").css("display","none");
|
||||
$(".option_HTML").css("display","none");
|
||||
}else if($('input[name="ad_option"]:checked').val()==0){
|
||||
$(".option_file").css("display","");
|
||||
$(".option_HTML").css("display","none");
|
||||
}else if($('input[name="ad_option"]:checked').val()==1){
|
||||
$(".option_file").css("display","none");
|
||||
$(".option_HTML").css("display","");
|
||||
}
|
||||
}
|
||||
|
||||
//광고 위치등록 변경 이벤트
|
||||
$("#ad_pos").change(function(){
|
||||
call_data_ajax();
|
||||
});
|
||||
|
||||
|
||||
//ad_file 변경 이벤트
|
||||
function change_img(value){
|
||||
if (value.files && value.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
$('#image_section').attr('src', e.target.result);
|
||||
}
|
||||
|
||||
reader.readAsDataURL(value.files[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function call_data_ajax(){
|
||||
var page_name=$("#page_list option:selected").text();
|
||||
var pos_name=$("#ad_pos").val();
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "/admin/advertisement_ajax/ajax_call_ad_detail_ad_idx",
|
||||
// data : {"pagename" : page_name,
|
||||
// "pos_name" : pos_name},
|
||||
data : {"page_name" : page_name,
|
||||
"pos_name" : pos_name},
|
||||
dataType: 'json',
|
||||
success : function (response) {
|
||||
setting_edit_data(response);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//validation
|
||||
function setting_ad_reg_proc(){
|
||||
if($('input[name="ad_option"]:checked').val()==null) {
|
||||
alert("광고옵션을 선택해주세요");
|
||||
return false;
|
||||
}else{
|
||||
if($('input[name="ad_option"]:checked').val()=='0') {
|
||||
// if($('#ad_file').val()==''){
|
||||
// alert("file을 선택해주세요");
|
||||
// return false;
|
||||
// }
|
||||
// if($('ad_lending').val()==''){
|
||||
// alert("페이지 주소를 입력해주세요");
|
||||
// }
|
||||
}else if($('input[name="ad_option"]:checked').val()=="1"){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$("#page_name").val(page_name[$("#page_list").val()]);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
306
application/views/admin/advertisement/ads.php
Executable file
306
application/views/admin/advertisement/ads.php
Executable file
@@ -0,0 +1,306 @@
|
||||
<?
|
||||
$menu_code = '15';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<style>
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
</style>
|
||||
|
||||
<div class="common_depth3 clearfix">
|
||||
<ul class="clearfix depth3_tep">
|
||||
<li><a href="/admin/advertisement/1" class="on fw700">광고 페이지 관리</a></li>
|
||||
<li><a href="/admin/advertisement/ad_detail">개별 광고 관리</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:ad_page_arr_del_proc();">삭제</a>
|
||||
<a href="#" id="btn_open_popup">광고 페이지 등록</a>
|
||||
</div>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/setting/setting_comment_reg_proc" method="post">
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fw500" style="width:50px;"><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th class="fw500" width="100">번호</th>
|
||||
<th class="fw500">페이지 키</th>
|
||||
<th class="fw500">페이지 이름</th>
|
||||
<th class="fw500">광고 위치 키</th>
|
||||
<th class="fw500">광고 위치 이름</th>
|
||||
<th class="fw500">관리</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$len = count($row);
|
||||
foreach($row as $v) {
|
||||
?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?php echo $v['idx'];?>"></td>
|
||||
<td><?php echo $len;?></td>
|
||||
<td><?php echo $v['page_key'];?></td>
|
||||
<td><?php echo $v['page_name'];?></td>
|
||||
<td><?php echo $v['ad_pos_key'];?></td>
|
||||
<td><?php echo $v['ad_pos_name'];?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="#" class="btn_modify" value="<?php echo $v['idx'];?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $len-=1;}?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--div class="write_btn tc">
|
||||
<a href="javascript:setting_comment_reg_proc()">저장하기</a>
|
||||
</div-->
|
||||
|
||||
</form>
|
||||
|
||||
<!-- register popup -->
|
||||
<div id="dialog" title="광고 페이지 등록" style="display:none;">
|
||||
<!--p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p-->
|
||||
<form name="popup" action="" target="ifrm" method="post">
|
||||
<input type="hidden" id="popup_mode" name="mode" value="" />
|
||||
<input type="hidden" id="popup_idx" name="idx" value="" />
|
||||
<fieldset>
|
||||
<label for="page_key">페이지 키 영(대/소)문자만 사용</label>
|
||||
<input type="text" id="page_key" name="page_key" value="" class="text ui-widget-content ui-corner-all" maxlength="20">
|
||||
<label for="page_name">페이지 이름</label>
|
||||
<input type="text" id="page_name" name="page_name" value="" class="text ui-widget-content ui-corner-all" maxlength="100">
|
||||
<label for="ad_pos_key">광고 위치 키 영(대/소)문자만 사용</label>
|
||||
<input type="text" id="ad_pos_key" name="ad_pos_key" value="" class="text ui-widget-content ui-corner-all" maxlength="20">
|
||||
<label for="ad_pos_name">광고 위치 이름</label>
|
||||
<input type="text" id="ad_pos_name" name="ad_pos_name" value="" class="text ui-widget-content ui-corner-all" maxlength="100">
|
||||
|
||||
<!-- Allow form submission with keyboard without duplicating the dialog button -->
|
||||
<input type="button" value=" 등록 " id="btn_register" tabindex="-1" >
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!-- //register popup -->
|
||||
|
||||
<iframe frameborder="0" width="0" height="0" name="ifrm"></iframe>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
function reset_popup_form() {
|
||||
$("#page_key").val('');
|
||||
$("#page_name").val('');
|
||||
$("#ad_pos_key").val('');
|
||||
$("#ad_pos_name").val('');
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
|
||||
function fill_popup_form(a,b,c,d) {
|
||||
if(a!='' && b!='' && c!='' && d!='') {
|
||||
reset_popup_form();
|
||||
$("#page_key").val(a);
|
||||
$("#page_name").val(b);
|
||||
$("#ad_pos_key").val(c);
|
||||
$("#ad_pos_name").val(d);
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
}
|
||||
|
||||
$(".btn_modify").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(idx>0) {
|
||||
$.ajax({
|
||||
url: '/admin/advertisement/ad_page_edit',
|
||||
data: {
|
||||
format: 'json',
|
||||
idx:idx
|
||||
},
|
||||
//dataType: 'jsonp',
|
||||
type:'get',
|
||||
success: function(msg) {
|
||||
var json = $.parseJSON(msg);
|
||||
if(json.result=='success') {
|
||||
$("#popup_mode").val('upt');
|
||||
$("#popup_idx").val(idx);
|
||||
fill_popup_form(json.page_key,json.page_name,json.ad_pos_key,json.ad_pos_name);
|
||||
}
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#btn_open_popup").click(function() {
|
||||
reset_popup_form();
|
||||
});
|
||||
|
||||
$("#btn_register").click(function() {
|
||||
frm = $("form[name='popup']");
|
||||
|
||||
if($("#page_key").val()=='') {
|
||||
alert('페이지 키를 등록해 주십시오.');
|
||||
$("#page_key").focus();
|
||||
return false;
|
||||
}
|
||||
if($("#page_key").val().search(/[^a-zA-Z]+/)==0) {
|
||||
alert('페이지 키는 영(대/소)문자만 사용가능합니다.');
|
||||
$("#page_key").select();
|
||||
return false;
|
||||
}
|
||||
if($("#page_name").val()=='') {
|
||||
alert('페이지 이름을 등록해 주십시오.');
|
||||
$("#page_name").focus();
|
||||
return false;
|
||||
}
|
||||
if($("#ad_pos_key").val()=='') {
|
||||
alert('광고위치 키를 등록해 주십시오.');
|
||||
$("#ad_pos_key").focus();
|
||||
return false;
|
||||
}
|
||||
if($("#ad_pos_key").val().search(/[^a-zA-Z]+/)==0) {
|
||||
alert('광고위치 키는 영(대/소)문자만 사용가능합니다.');
|
||||
$("#ad_pos_key").select();
|
||||
return false;
|
||||
}
|
||||
if($("#ad_pos_name").val()=='') {
|
||||
alert('광고위치 이름을 등록해 주십시오.');
|
||||
$("#ad_pos_name").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
frm.attr('target','ifrm');
|
||||
frm.attr('action','/admin/advertisement/ad_page_proc');
|
||||
frm.submit();
|
||||
});
|
||||
});
|
||||
|
||||
function close_popup() {
|
||||
$("")
|
||||
}
|
||||
|
||||
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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function life_add(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/life/life_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function life_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/life/life_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function life_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function ad_page_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/advertisement/ad_page_arr_del_proc");
|
||||
$("#input_form").attr('target','ifrm');
|
||||
$("#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/life/life_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>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// 컨텐츠 선택
|
||||
function select_setting_type(){
|
||||
$("#input_form").attr("action", "/admin/advertisement/ads/1");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 저장하기
|
||||
function setting_comment_reg_proc(){
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
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>
|
||||
1
application/views/admin/comm/result_html.php
Executable file
1
application/views/admin/comm/result_html.php
Executable file
@@ -0,0 +1 @@
|
||||
<?=$result?>
|
||||
5
application/views/admin/comm/result_json.php
Executable file
5
application/views/admin/comm/result_json.php
Executable file
@@ -0,0 +1,5 @@
|
||||
<?
|
||||
echo json_encode($result);
|
||||
|
||||
|
||||
?>
|
||||
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>
|
||||
195
application/views/admin/design/design_popup_list.php
Executable file
195
application/views/admin/design/design_popup_list.php
Executable file
@@ -0,0 +1,195 @@
|
||||
<?
|
||||
$menu_code = '81';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/design/design_popup_list/8">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<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="popup_type_name" <? if($search_type=='popup_type_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_table" style="margin-top: 30px">
|
||||
<span><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<div class="searh_area">
|
||||
<select name="search_menu_code" onchange="check_search();" style="width:100px">
|
||||
<option value="">위치</option>
|
||||
<option value="1" <? if($search_menu_code==1){ echo 'selected';}?>>홈</option>
|
||||
<option value="2" <? if($search_menu_code==2){ echo 'selected';}?>>홈(은혜)</option>
|
||||
<option value="3" <? if($search_menu_code==3){ echo 'selected';}?>>라이프</option>
|
||||
<option value="4" <? if($search_menu_code==4){ echo 'selected';}?>>뉴스</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>썸네일</th>
|
||||
<th>구분</th>
|
||||
<th>위치</th>
|
||||
<th>제목</th>
|
||||
<th>top</th>
|
||||
<th>left</th>
|
||||
<th>크기</th>
|
||||
<th>출력상태</th>
|
||||
<th>마감일</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="12">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$popup_type_name= $val['popup_type_name'];
|
||||
$title = $val['title'];
|
||||
$menu_code = $val['menu_code'];
|
||||
$top_margin = $val['top_margin'];
|
||||
$left_margin = $val['left_margin'];
|
||||
$width_size = $val['width_size'];
|
||||
$height_size = $val['height_size'];
|
||||
$is_display = $val['is_display'];
|
||||
$end_date = $val['end_date'];
|
||||
$end_date = substr($end_date, 0, 16);
|
||||
$prev_img = $val['prev_img'];
|
||||
|
||||
switch ($menu_code) {
|
||||
case '1': $menu_code_txt = '<a href="/" target="_blank">홈(PC)</a>'; break;
|
||||
case '2': $menu_code_txt = '<a href="/m/" target="_blank">은혜(모바일)</a>'; break;
|
||||
case '3': $menu_code_txt = '<a href="/web/life/" target="_blank">라이프</a>'; break;
|
||||
case '4': $menu_code_txt = '<a href="/web/news/" target="_blank">뉴스</a>'; break;
|
||||
default : $menu_code_txt = ''; break;
|
||||
}
|
||||
|
||||
switch ($is_display) {
|
||||
case 'Y': $is_display_txt = 'ON'; break;
|
||||
case 'N': $is_display_txt = 'OFF'; break;
|
||||
default : $is_display_txt = ''; break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$prev_img?>" width="35"></td>
|
||||
<td><?=$popup_type_name?></td>
|
||||
<td><?=$menu_code_txt?></td>
|
||||
<td><?=$title?></td>
|
||||
<td><?=$top_margin?></td>
|
||||
<td><?=$left_margin?></td>
|
||||
<td><?=$width_size?>*<?=$height_size?></td>
|
||||
<td><?=$is_display_txt?></td>
|
||||
<td><?=$end_date?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:popup_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:popup_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:popup_arr_del_proc()">삭제</a>
|
||||
<a href="/admin/design/design_popup_reg/8?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 popup_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/design/design_popup_reg/8");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function popup_del_proc(idx) {
|
||||
if(confirm("팝업이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/design/design_popup_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 복수 삭제
|
||||
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/design/design_popup_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>
|
||||
322
application/views/admin/design/design_popup_reg.php
Executable file
322
application/views/admin/design/design_popup_reg.php
Executable file
@@ -0,0 +1,322 @@
|
||||
<?php
|
||||
|
||||
$idx = '';
|
||||
$popup_type_name = '';
|
||||
$title = '';
|
||||
$popup_menu_code = '';
|
||||
$top_margin = '';
|
||||
$left_margin = '';
|
||||
$width_size = '';
|
||||
$height_size = '';
|
||||
$link_url = '';
|
||||
$content = '';
|
||||
$start_date = '';
|
||||
$start_time1 = '';
|
||||
$start_time2 = '';
|
||||
$end_date = '';
|
||||
$end_time1 = '';
|
||||
$end_time2 = '';
|
||||
$is_display = '';
|
||||
$prev_img = '';
|
||||
if(count($result) > 0) {
|
||||
$idx = $result['idx'];
|
||||
$popup_type_name = $result['popup_type_name'];
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$popup_menu_code = $result['menu_code'];
|
||||
$top_margin = $result['top_margin'];
|
||||
$left_margin = $result['left_margin'];
|
||||
$width_size = $result['width_size'];
|
||||
$height_size = $result['height_size'];
|
||||
$link_url = $result['link_url'];
|
||||
$content = $result['content'];
|
||||
$content = htmlentities($result['content']);
|
||||
$start_date = $result['start_date'];
|
||||
$end_date = $result['end_date'];
|
||||
$is_display = $result['is_display'];
|
||||
$prev_img = $result['prev_img'];
|
||||
|
||||
$arr_start_date = explode(' ', $start_date);
|
||||
$start_date = $arr_start_date[0];
|
||||
|
||||
$arr_start_time = explode(':', $arr_start_date[1]);
|
||||
$start_time1 = $arr_start_time[0];
|
||||
$start_time2 = $arr_start_time[1];
|
||||
|
||||
$arr_end_date = explode(' ', $end_date);
|
||||
$end_date = $arr_end_date[0];
|
||||
|
||||
$arr_end_time = explode(':', $arr_end_date[1]);
|
||||
$end_time1 = $arr_end_time[0];
|
||||
$end_time2 = $arr_end_time[1];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<script src="/ckeditor/ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/jquery-ui.min.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
<?
|
||||
$menu_code = '81';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/design/design_popup_reg_proc" method="post">
|
||||
<input type="hidden" name="idx" id="idx" value="<?=$idx?>">
|
||||
<input type="hidden" id="mode" name="mode" value="<?=$mode?>">
|
||||
<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_menu_code" name="search_menu_code" value="<?=$search_menu_code?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="img_path" name="img_path" value="<?=$prev_img?>">
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>구분</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="popup_type_name" id="popup_type_name" class="type02" value="<?=$popup_type_name?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title" id="title" value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>노출경로</th>
|
||||
<td class="tl">
|
||||
<select name="menu_code" class="type01">
|
||||
<option value="">선택</option>
|
||||
<option value="1" <? if($popup_menu_code=='1') { echo 'selected';}?>>홈(PC)</option>
|
||||
<option value="2" <? if($popup_menu_code=='2') { echo 'selected';}?>>은혜(모바일)</option>
|
||||
<option value="3" <? if($popup_menu_code=='3') { echo 'selected';}?>>라이프</option>
|
||||
<option value="4" <? if($popup_menu_code=='4') { echo 'selected';}?>>뉴스</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="subtitle">노출위치</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>위쪽여백</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="top_margin" id="top_margin" class="type03" value="<?=$top_margin?>"> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>왼쪽여백</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="left_margin" id="left_margin" class="type03" value="<?=$left_margin?>"> px
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="subtitle">팝업사이즈</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>가로</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="width_size" id="width_size" class="type03" value="<?=$width_size?>"> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>세로</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="height_size" id="height_size" class="type03" value="<?=$height_size?>"> px
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>링크</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="link_url" id="link_url" value="<?=$link_url?>">
|
||||
</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>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="subtitle">송출관리</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>출력기간</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="start_date" id="start_date" class="type02" value="<?=$start_date?>" /> <input type="text" name="start_time1" id="start_time1" class="type03" value="<?=$start_time1?>" />:<input type="text" name="start_time2" id="start_time2" class="type03" value="<?=$start_time2?>" />
|
||||
~ <input type="text" name="end_date" id="end_date" class="type02" value="<?=$end_date?>" /> <input type="text" name="end_time1" id="end_time1" class="type03" value="<?=$end_time1?>" />:<input type="text" name="end_time2" id="end_time2" class="type03" value="<?=$end_time2?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>출력상태</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="is_display" value="Y" <? if($is_display=='Y' || $is_display=='') { echo 'checked';}?>> ON
|
||||
<input type="radio" name="is_display" value="N" <? if($is_display=='N') { echo 'checked';}?>> OFF
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:popup_reg_proc();">저장하기</a>
|
||||
<a href="/admin/design/design_popup_list/8/<?=$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');*/
|
||||
});
|
||||
|
||||
function popup_reg_proc(){
|
||||
//CKEDITOR.instances.content.updateElement();
|
||||
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
//oEditors2.getById["ir2"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
|
||||
if($("#popup_type_name").val()=='') {
|
||||
alert("구분을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#title").val()=='') {
|
||||
alert("제목을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#menu_code").val()=='') {
|
||||
alert("노출경로를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#top_margin").val()=='') {
|
||||
alert("위쪽여백을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if(checkNumber($("#top_margin").val())==false) {
|
||||
alert("위쪽여백을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#left_margin").val()=='') {
|
||||
alert("왼쪽여백을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if(checkNumber($("#left_margin").val())==false) {
|
||||
alert("왼쪽여백을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#width_size").val()=='') {
|
||||
alert("가로사이즈를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if(checkNumber($("#width_size").val())==false) {
|
||||
alert("가로사이즈를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#height_size").val()=='') {
|
||||
alert("세로사이즈를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if(checkNumber($("#height_size").val())==false) {
|
||||
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;
|
||||
}
|
||||
|
||||
if($("#start_date").val()=='') {
|
||||
alert("노출기간을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#end_date").val()=='') {
|
||||
alert("노출기간을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
// jquery datepicker
|
||||
$("#start_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/btn_date.png",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
|
||||
});
|
||||
$("#end_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/btn_date.png",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
});
|
||||
</script>
|
||||
242
application/views/admin/etc_section/channel_edit.php
Executable file
242
application/views/admin/etc_section/channel_edit.php
Executable file
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$category_code1 = $result1['category_idx'];
|
||||
$category_code2 = $result1['channel_idx'];
|
||||
$etc_section_type = $result1['etc_section_type'];
|
||||
$rank = $result1['rank'];
|
||||
$life_etc_section_idx = $idx;
|
||||
|
||||
|
||||
$menu_code = '67';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$arr_etc_section_detail_rank = array();
|
||||
foreach ($result2 as $val) {
|
||||
$arr_etc_section_detail_rank[$val['rank']] = array('idx'=>$val['idx'], 'main_img'=> $val['main_img'], 'head_title'=> $val['head_title'], 'title'=> $val['title'], 'content_idx'=> $val['content_idx'], 'hit_count'=>$val['hit_count'], 'editor_name'=>$val['editor_name']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/channel_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_category" name="search_category" value="<?=$search_category?>">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_type?>">
|
||||
<input type="hidden" id="etc_section_type" name="etc_section_type" value="<?=$etc_section_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">
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle"><?=$def_arr_channel_etc_section[$etc_section_type]['name']?></h2>
|
||||
<table>
|
||||
<tr><th colspan="2">채널 <?=$rank?>위</th></tr>
|
||||
<tr>
|
||||
<th>카테고리선택</th>
|
||||
<td class="tl">
|
||||
<select name="category1" id="category1" onchange="change_category(1, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category1) > 0) {
|
||||
foreach ($arr_category1 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code1==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널선택</th>
|
||||
<td class="tl">
|
||||
<select name="category2" id="category2" class="type01" onchange="change_category(2, this.value)">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category2) > 0 && $category_code2!='') {
|
||||
foreach ($arr_category2 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code2==$val['idx']) { echo 'selected'; }?>><?=$val['channel_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
for($z=1;$z<=$def_arr_channel_etc_section[$etc_section_type]['detail_count'];$z++) {
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$title = '';
|
||||
$main_img_txt = '';
|
||||
$main_img = '';
|
||||
$editor_name = '';
|
||||
$hit_count = '';
|
||||
$content_idx = '';
|
||||
$list_idx = '';
|
||||
|
||||
if(isset($arr_etc_section_detail_rank[$z])== true) {
|
||||
$head_title = $arr_etc_section_detail_rank[$z]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_etc_section_detail_rank[$z]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $arr_etc_section_detail_rank[$z]['content_idx'];
|
||||
$main_img = $arr_etc_section_detail_rank[$z]['main_img'];
|
||||
$hit_count = $arr_etc_section_detail_rank[$z]['hit_count'];
|
||||
$editor_name = $arr_etc_section_detail_rank[$z]['editor_name'];
|
||||
$list_idx = $arr_etc_section_detail_rank[$z]['idx'];
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
}
|
||||
|
||||
switch($etc_section_type) {
|
||||
case '1': $rowspan = '4';break;
|
||||
case '2': $rowspan = '5';break;
|
||||
case '3': $rowspan = '5';break;
|
||||
default : $rowspan = '4';break;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$z?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="list_idx_<?=$z?>" id="list_idx_<?=$z?>" value="<?=$list_idx?>">
|
||||
<input type="hidden" name="content_idx_<?=$z?>" id="content_idx_<?=$z?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title_<?=$z?>" id="head_title_<?=$z?>" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<input type="text" name="title_<?=$z?>" id="title_<?=$z?>" size="50" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="editor_name_<?=$z?>" id="editor_name_<?=$z?>" class="type02" size="20" placeholder="에디터" value="<?=$editor_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">이미지첨부
|
||||
<div id="img_view_<?=$z?>"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img_<?=$z?>" id="img_<?=$z?>">
|
||||
<input type="hidden" name="org_img_<?=$z?>" id="org_img_<?=$z?>" value="<?=$main_img?>">
|
||||
<input type="file" name="main_img_<?=$z?>" id="main_img_<?=$z?>" class="input00" size="20" accept="image/*">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? if($etc_section_type != '1') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count_<?=$z?>" id="hit_count_<?=$z?>" class="type02" size="20" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="open_search_article('<?=$z?>');" style="cursor: pointer;">컨텐츠검색</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:channel_edit_proc();">저장하기</a>
|
||||
<a href="/admin/etc_section/channel_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_category=<?=$search_category?>&search_etc_section_type=<?=$search_etc_section_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<?
|
||||
$content_type = '3';
|
||||
require_once(APPPATH."views/admin/search/search_article_inc.php");
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_category(depth, val){
|
||||
reset();
|
||||
if(depth == 1) {
|
||||
var json_category = '<?=json_encode($arr_category2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#category2').empty();
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category2').append(option);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['category_idx'] == val) {
|
||||
option = "<option value='"+json_category[key]['idx']+"'>"+json_category[key]['channel_name']+"</option>";
|
||||
$('#category2').append(option);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var etc_detail_count = "<?=$def_arr_channel_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function reset(){
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
$("#content_idx_"+z).val('');
|
||||
$("#head_title_"+z).val('');
|
||||
$("#title_"+z).val('');
|
||||
$("#editor_name_"+z).val('');
|
||||
$("#img_"+z).val('');
|
||||
$("#org_img_"+z).val('');
|
||||
$("#main_img_"+z).val('');
|
||||
$("#img_view_"+z).empty();
|
||||
$("#hit_count_"+z).empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function open_search_article(key){
|
||||
$("#key").val("_"+key);
|
||||
$("#article_keyword").val('');
|
||||
commonLayerOpen('search_article');
|
||||
$("#article_keyword").focus();
|
||||
}
|
||||
|
||||
|
||||
var etc_detail_count = "<?=$def_arr_channel_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function channel_edit_proc(){
|
||||
if($("#category1").val()==''){
|
||||
alert("카테고리를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#category2").val()==''){
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
if($("#title_"+z).val()!='') {
|
||||
if($("#content_idx_"+z).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img_"+z).val()=='' && $("#img_"+z).val()=='' && $("#org_img_"+z).val()=='') {
|
||||
alert("이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
223
application/views/admin/etc_section/channel_list.php
Executable file
223
application/views/admin/etc_section/channel_list.php
Executable file
@@ -0,0 +1,223 @@
|
||||
<?
|
||||
include_once ("./static_data/code.php");
|
||||
$menu_code = '67';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/channel_list/6">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_type?>">
|
||||
<input type="hidden" id="search_category" name="search_category" value="<?=$search_category?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_type" name="search_type" value="channel_name">
|
||||
<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>
|
||||
<? foreach ($def_arr_channel_etc_section1 as $val) { ?>
|
||||
<li><a href="/admin/etc_section/channel_list/6?search_etc_section_type=<?=$val['code']?>" <? if($search_etc_section_type==$val['code']) { echo 'class="on"';}?>><?=$val['name']?></a></li>
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
|
||||
<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_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li style="width:100px">모바일섹션</li>
|
||||
<? foreach ($def_arr_channel_etc_section2 as $val) { ?>
|
||||
<li><a href="/admin/etc_section/channel_list/6?search_etc_section_type=<?=$val['code']?>" <? if($search_etc_section_type==$val['code']) { echo 'class="on"';}?>><?=$val['name']?></a></li>
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<span><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<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>
|
||||
<div class="searh_area">
|
||||
<select name="search_category" onchange="check_search();" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<? foreach ($category_list as $key=>$val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($search_category==$val['idx']){ echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>등록일</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="11">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
} else {
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$rank = $val['rank'];
|
||||
$category_name = $val['category_name'];
|
||||
$channel_icon = $val['channel_icon'];
|
||||
$channel_name = $val['channel_name'];
|
||||
$editor_count = $val['editor_count'];
|
||||
$article_count = $val['article_count'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><a href="/admin/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name?>"><?=$category_name?></a></td>
|
||||
<td><img src="<?=$channel_icon?>" width="35"></td>
|
||||
<td><a href="/admin/life/life_channel_list/5?search_type=channel_name&search_keyword=<?=$channel_name?>"><?=$channel_name?></a></td>
|
||||
<td><?=number_format($editor_count)?></td>
|
||||
<td><?=number_format($article_count)?></td>
|
||||
<td><?=number_format($hit_count)?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:channel_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:channel_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:channel_arr_del_proc()">삭제</a>
|
||||
<a href="javascript:channel_list_reg()">송출관리</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--// 카테고리 등록/수정 layer -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function channel_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/etc_section/channel_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// edit
|
||||
function channel_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/channel_edit/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function channel_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/channel_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function channel_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/channel_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>
|
||||
295
application/views/admin/etc_section/channel_list_reg.php
Executable file
295
application/views/admin/etc_section/channel_list_reg.php
Executable file
@@ -0,0 +1,295 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_life_etc_section_rank = array();
|
||||
foreach ($arr_etc_section as $val) {
|
||||
$arr_life_etc_section_rank[$val['rank']] = array('idx'=> $val['idx'], 'category_idx'=> $val['category_idx'], 'channel_idx'=> $val['channel_idx']);
|
||||
}
|
||||
|
||||
$arr_life_etc_section_detail_rank = array();
|
||||
foreach ($arr_etc_section_detail as $val) {
|
||||
$arr_life_etc_section_detail_rank[$val['life_etc_section_idx']][$val['rank']] = array('main_img'=> $val['main_img'], 'head_title'=> $val['head_title'], 'title'=> $val['title'], 'content_idx'=> $val['content_idx'], 'hit_count'=>$val['hit_count'], 'editor_name'=>$val['editor_name']);
|
||||
}
|
||||
|
||||
$menu_code = '67';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/channel_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_category" name="search_category" value="<?=$search_category?>">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_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="rank1" name="rank1">
|
||||
<input type="hidden" id="rank2" name="rank2">
|
||||
|
||||
|
||||
<?
|
||||
if($def_arr_channel_etc_section[$search_etc_section_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_channel_etc_section1 as $val) { ?>
|
||||
<input type="radio" name="etc_section_type" value="<?=$val['code']?>" onclick="change_etc_section_type('<?=$val['code']?>')" <? if($search_etc_section_type==$val['code']) { echo 'checked';}?>> <?=$val['name']?>
|
||||
<? }?>
|
||||
</br>
|
||||
<div style="width:80px; float: left"><b>모바일섹션</b></div>
|
||||
<? foreach ($def_arr_channel_etc_section2 as $val) { ?>
|
||||
<input type="radio" name="etc_section_type" value="<?=$val['code']?>" onclick="change_etc_section_type('<?=$val['code']?>')" <? if($search_etc_section_type==$val['code']) { echo 'checked';}?>> <?=$val['name']?>
|
||||
<? }?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
for($i=1;$i<=$def_arr_channel_etc_section[$search_etc_section_type]['count'];$i++) {
|
||||
$category_code1 = '';
|
||||
$category_code2 = '';
|
||||
$life_etc_section_idx = '';
|
||||
if(isset($arr_life_etc_section_rank[$i])== true) {
|
||||
$life_etc_section_idx = $arr_life_etc_section_rank[$i]['idx'];
|
||||
$category_code1 = $arr_life_etc_section_rank[$i]['category_idx'];
|
||||
$category_code2 = $arr_life_etc_section_rank[$i]['channel_idx'];
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<tr><th colspan="2">채널 <?=$i?>위</th></tr>
|
||||
<tr>
|
||||
<th>카테고리선택</th>
|
||||
<td class="tl">
|
||||
<select name="category1_<?=$i?>" id="category1_<?=$i?>" onchange="change_category(1, this.value, '<?=$i?>')" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category1) > 0) {
|
||||
foreach ($arr_category1 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code1==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널선택</th>
|
||||
<td class="tl">
|
||||
<select name="category2_<?=$i?>" id="category2_<?=$i?>" class="type01" onchange="change_category(2, this.value, '<?=$i?>')">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category2) > 0 && $category_code2!='') {
|
||||
foreach ($arr_category2 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code2==$val['idx']) { echo 'selected'; }?>><?=$val['channel_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
for($z=1;$z<=$def_arr_channel_etc_section[$etc_section_type]['detail_count'];$z++) {
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$title = '';
|
||||
$main_img_txt = '';
|
||||
$main_img = '';
|
||||
$editor_name = '';
|
||||
$hit_count = '';
|
||||
$content_idx = '';
|
||||
|
||||
|
||||
if(isset($arr_life_etc_section_detail_rank[$life_etc_section_idx][$z])== true) {
|
||||
$head_title = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['content_idx'];
|
||||
$main_img = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['main_img'];
|
||||
$hit_count = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['hit_count'];
|
||||
$editor_name = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['editor_name'];
|
||||
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
}
|
||||
|
||||
switch($etc_section_type) {
|
||||
case '1': $rowspan = '4';break;
|
||||
case '2': $rowspan = '5';break;
|
||||
case '3': $rowspan = '5';break;
|
||||
default : $rowspan = '4';break;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$z?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx_<?=$i?>_<?=$z?>" id="content_idx_<?=$i?>_<?=$z?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title_<?=$i?>_<?=$z?>" id="head_title_<?=$i?>_<?=$z?>" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<input type="text" name="title_<?=$i?>_<?=$z?>" id="title_<?=$i?>_<?=$z?>" size="50" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="editor_name_<?=$i?>_<?=$z?>" id="editor_name_<?=$i?>_<?=$z?>" class="type02" size="20" placeholder="에디터" value="<?=$editor_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">이미지첨부
|
||||
<div id="img_view_<?=$i?>_<?=$z?>"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img_<?=$i?>_<?=$z?>" id="img_<?=$i?>_<?=$z?>">
|
||||
<input type="hidden" name="org_img_<?=$i?>_<?=$z?>" id="org_img_<?=$i?>_<?=$z?>" value="<?=$main_img?>">
|
||||
<input type="file" name="main_img_<?=$i?>_<?=$z?>" id="main_img_<?=$i?>_<?=$z?>" class="input00" size="20" accept="image/*">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? if($etc_section_type != '1') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count_<?=$i?>_<?=$z?>" id="hit_count_<?=$i?>_<?=$z?>" class="type02" size="20" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="open_search_article('<?=$i?>', '<?=$z?>');" style="cursor: pointer;">컨텐츠검색</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:channel_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/etc_section/channel_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_category=<?=$search_category?>&search_etc_section_type=<?=$search_etc_section_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<?
|
||||
$content_type = '3';
|
||||
require_once(APPPATH."views/admin/search/search_article_inc.php");
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_category(depth, val, rank){
|
||||
reset(rank);
|
||||
if(depth == 1) {
|
||||
var json_category = '<?=json_encode($arr_category2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#category2_'+rank).empty();
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category2_'+rank).append(option);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['category_idx'] == val) {
|
||||
option = "<option value='"+json_category[key]['idx']+"'>"+json_category[key]['channel_name']+"</option>";
|
||||
$('#category2_'+rank).append(option);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function open_search_article(rank1, rank2){
|
||||
$("#key").val("_"+rank1+'_'+rank2);
|
||||
$("#rank1").val(rank1);
|
||||
$("#rank2").val(rank2);
|
||||
if($("#category1_"+rank1).val()=='') {
|
||||
alert("카테고리를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#category2_"+rank1).val()=='') {
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#article_keyword").val('');
|
||||
commonLayerOpen('search_article');
|
||||
$("#article_keyword").focus();
|
||||
}
|
||||
|
||||
|
||||
var etc_detail_count = "<?=$def_arr_channel_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function reset(rank){
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
$("#content_idx_"+rank+"_"+z).val('');
|
||||
$("#head_title_"+rank+"_"+z).val('');
|
||||
$("#title_"+rank+"_"+z).val('');
|
||||
$("#editor_name_"+rank+"_"+z).val('');
|
||||
$("#img_"+rank+"_"+z).val('');
|
||||
$("#org_img_"+rank+"_"+z).val('');
|
||||
$("#main_img_"+rank+"_"+z).val('');
|
||||
$("#img_view_"+rank+"_"+z).empty();
|
||||
$("#hit_count_"+rank+"_"+z).empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function change_etc_section_type(val){
|
||||
$("#search_etc_section_type").val(val);
|
||||
$("#input_form").attr("action", "/admin/etc_section/channel_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var etc_count = "<?=$def_arr_channel_etc_section[$etc_section_type]['count']?>";
|
||||
var etc_detail_count = "<?=$def_arr_channel_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function channel_list_reg_proc(){
|
||||
for(i=1;i<=etc_count;i++) {
|
||||
if($("#category1_"+i).val()!='') {
|
||||
if($("#category2_"+i).val()==''){
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
if($("#title_"+i+'_'+z).val()!='') {
|
||||
if($("#content_idx_"+i+'_'+z).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img_"+i+'_'+z).val()=='' && $("#img_"+i+'_'+z).val()=='' && $("#org_img_"+i+'_'+z).val()=='') {
|
||||
alert("이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
277
application/views/admin/etc_section/editor_edit.php
Executable file
277
application/views/admin/etc_section/editor_edit.php
Executable file
@@ -0,0 +1,277 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$category_code1 = $result1['category_idx'];
|
||||
$category_code2 = $result1['channel_idx'];
|
||||
$category_code3 = $result1['partner_idx'];
|
||||
$etc_section_type = $result1['etc_section_type'];
|
||||
$rank = $result1['rank'];
|
||||
$life_etc_section_idx = $idx;
|
||||
|
||||
|
||||
$menu_code = '68';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$arr_etc_section_detail_rank = array();
|
||||
foreach ($result2 as $val) {
|
||||
$arr_etc_section_detail_rank[$val['rank']] = array('idx'=>$val['idx'], 'main_img'=> $val['main_img'], 'head_title'=> $val['head_title'], 'title'=> $val['title'], 'content_idx'=> $val['content_idx'], 'hit_count'=>$val['hit_count'], 'editor_name'=>$val['editor_name']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/editor_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_category" name="search_category" value="<?=$search_category?>">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_type?>">
|
||||
<input type="hidden" id="etc_section_type" name="etc_section_type" value="<?=$etc_section_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">
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle"><?=$def_arr_editor_etc_section[$etc_section_type]['name']?></h2>
|
||||
<table>
|
||||
<tr><th colspan="2">채널 <?=$rank?>위</th></tr>
|
||||
<tr>
|
||||
<th>카테고리선택</th>
|
||||
<td class="tl">
|
||||
<select name="category1" id="category1" onchange="change_category(1, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category1) > 0) {
|
||||
foreach ($arr_category1 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code1==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널선택</th>
|
||||
<td class="tl">
|
||||
<select name="category2" id="category2" class="type01" onchange="change_category(2, this.value)">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category2) > 0 && $category_code2!='') {
|
||||
foreach ($arr_category2 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code2==$val['idx']) { echo 'selected'; }?>><?=$val['channel_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>에디터선택</th>
|
||||
<td class="tl">
|
||||
<select name="category3" id="category3" class="type01" onchange="change_category(3, this.value, '<?=$i?>')">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category3) > 0 && $category_code3!='') {
|
||||
foreach ($arr_category3 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code3==$val['idx']) { echo 'selected'; }?>><?=$val['partner_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?
|
||||
for($z=1;$z<=$def_arr_editor_etc_section[$etc_section_type]['detail_count'];$z++) {
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$main_img_txt = '';
|
||||
$main_img = '';
|
||||
$hit_count = '';
|
||||
$content_idx = '';
|
||||
$list_idx = '';
|
||||
|
||||
if(isset($arr_etc_section_detail_rank[$z])== true) {
|
||||
$head_title = $arr_etc_section_detail_rank[$z]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_etc_section_detail_rank[$z]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $arr_etc_section_detail_rank[$z]['content_idx'];
|
||||
$main_img = $arr_etc_section_detail_rank[$z]['main_img'];
|
||||
$hit_count = $arr_etc_section_detail_rank[$z]['hit_count'];
|
||||
$list_idx = $arr_etc_section_detail_rank[$z]['idx'];
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
}
|
||||
|
||||
switch($etc_section_type) {
|
||||
case '4': $rowspan = '3';break;
|
||||
case '5': $rowspan = '4';break;
|
||||
case '6': $rowspan = '3';break;
|
||||
default : $rowspan = '3';break;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$z?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="list_idx_<?=$z?>" id="list_idx_<?=$z?>" value="<?=$list_idx?>">
|
||||
<input type="hidden" name="content_idx_<?=$z?>" id="content_idx_<?=$z?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title_<?=$z?>" id="head_title_<?=$z?>" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<input type="text" name="title_<?=$z?>" id="title_<?=$z?>" size="50" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">이미지첨부
|
||||
<div id="img_view_<?=$z?>"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img_<?=$z?>" id="img_<?=$z?>">
|
||||
<input type="hidden" name="org_img_<?=$z?>" id="org_img_<?=$z?>" value="<?=$main_img?>">
|
||||
<input type="file" name="main_img_<?=$z?>" id="main_img_<?=$z?>" class="input00" size="20" accept="image/*">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? if($etc_section_type == '5') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count_<?=$z?>" id="hit_count_<?=$z?>" class="type02" size="20" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="open_search_article('<?=$z?>');" style="cursor: pointer;">컨텐츠검색</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:editor_edit_proc();">저장하기</a>
|
||||
<a href="/admin/etc_section/editor_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_category=<?=$search_category?>&search_etc_section_type=<?=$search_etc_section_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<?
|
||||
$content_type = '3';
|
||||
require_once(APPPATH."views/admin/search/search_article_inc.php");
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_category(depth, val){
|
||||
reset();
|
||||
if(depth == 1) {
|
||||
var json_category = '<?=json_encode($arr_category2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category2').empty();
|
||||
$('#category2').append(option);
|
||||
|
||||
$('#category3').empty();
|
||||
$('#category3').append(option);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['category_idx'] == val) {
|
||||
option = "<option value='"+json_category[key]['idx']+"'>"+json_category[key]['channel_name']+"</option>";
|
||||
$('#category2').append(option);
|
||||
}
|
||||
}
|
||||
|
||||
} else if(depth == 2) {
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category3').empty();
|
||||
$('#category3').append(option);
|
||||
|
||||
var json_category = '<?=json_encode($arr_category3)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['channel_idx'] == val) {
|
||||
option = $("<option value='"+json_category[key]['idx']+"'>"+json_category[key]['partner_name']+"</option>");
|
||||
$('#category3').append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
var etc_detail_count = "<?=$def_arr_editor_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function reset(){
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
$("#content_idx_"+z).val('');
|
||||
$("#head_title_"+z).val('');
|
||||
$("#title_"+z).val('');
|
||||
$("#editor_name_"+z).val('');
|
||||
$("#img_"+z).val('');
|
||||
$("#org_img_"+z).val('');
|
||||
$("#main_img_"+z).val('');
|
||||
$("#img_view_"+z).empty();
|
||||
$("#hit_count_"+z).empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function open_search_article(key){
|
||||
$("#key").val("_"+key);
|
||||
$("#article_keyword").val('');
|
||||
commonLayerOpen('search_article');
|
||||
$("#article_keyword").focus();
|
||||
}
|
||||
|
||||
|
||||
var etc_detail_count = "<?=$def_arr_editor_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function editor_edit_proc(){
|
||||
if($("#category1").val()==''){
|
||||
alert("카테고리를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#category2").val()==''){
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#category3").val()==''){
|
||||
alert("에디터를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
if($("#title_"+z).val()!='') {
|
||||
if($("#content_idx_"+z).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img_"+z).val()=='' && $("#img_"+z).val()=='' && $("#org_img_"+z).val()=='') {
|
||||
alert("이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
213
application/views/admin/etc_section/editor_list.php
Executable file
213
application/views/admin/etc_section/editor_list.php
Executable file
@@ -0,0 +1,213 @@
|
||||
<?
|
||||
include_once ("./static_data/code.php");
|
||||
$menu_code = '68';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/editor_list/6">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_type?>">
|
||||
<input type="hidden" id="etc_section_type" name="etc_section_type" value="<?=$search_etc_section_type?>">
|
||||
<input type="hidden" id="search_category" name="search_category" value="<?=$search_category?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_type" name="search_type" value="partner_name">
|
||||
<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">모바일섹션</li>
|
||||
<? foreach ($def_arr_editor_etc_section as $val) { ?>
|
||||
<li><a href="/admin/etc_section/editor_list/6?search_etc_section_type=<?=$val['code']?>" <? if($search_etc_section_type==$val['code']) { echo 'class="on"';}?>><?=$val['name']?></a></li>
|
||||
|
||||
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
|
||||
<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" style="margin-top: 30px">
|
||||
<span><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<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>
|
||||
<div class="searh_area">
|
||||
<select name="search_category" onchange="check_search();" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<? foreach ($category_list as $key=>$val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($search_category==$val['idx']){ echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>등록일</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="11">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
} else {
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$rank = $val['rank'];
|
||||
$category_name = $val['category_name'];
|
||||
$channel_name = $val['channel_name'];
|
||||
$partner_img = $val['partner_img'];
|
||||
$partner_name = $val['partner_name'];
|
||||
$article_count = $val['article_count'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><a href="/admin/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name?>"><?=$category_name?></a></td>
|
||||
<td><a href="/admin/life/life_channel_list/5?search_type=channel_name&search_keyword=<?=$channel_name?>"><?=$channel_name?></a></td>
|
||||
<td><img src="<?=$partner_img?>" width="35"></td>
|
||||
<td><a href="/admin/life/life_list/5?search_type=editor_name&search_keyword=<?=$partner_name?>"><?=$partner_name?></a></td>
|
||||
<td><?=number_format($article_count)?></td>
|
||||
<td><?=number_format($hit_count)?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:editor_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:editor_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:editor_arr_del_proc()">삭제</a>
|
||||
<a href="javascript:editor_list_reg()">송출관리</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--// 카테고리 등록/수정 layer -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function editor_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/etc_section/editor_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// edit
|
||||
function editor_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/editor_edit/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function editor_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/editor_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function editor_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/editor_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>
|
||||
327
application/views/admin/etc_section/editor_list_reg.php
Executable file
327
application/views/admin/etc_section/editor_list_reg.php
Executable file
@@ -0,0 +1,327 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_life_etc_section_rank = array();
|
||||
foreach ($arr_etc_section as $val) {
|
||||
$arr_life_etc_section_rank[$val['rank']] = array('idx'=> $val['idx'], 'category_idx'=> $val['category_idx'], 'channel_idx'=> $val['channel_idx'], 'editor_idx'=> $val['partner_idx']);
|
||||
}
|
||||
//
|
||||
//echo "<pre>";
|
||||
//
|
||||
//var_dump($arr_etc_section_detail);
|
||||
|
||||
|
||||
$arr_life_etc_section_detail_rank = array();
|
||||
foreach ($arr_etc_section_detail as $val) {
|
||||
$arr_life_etc_section_detail_rank[$val['life_etc_section_idx']][$val['rank']] = array('main_img'=> $val['main_img'], 'head_title'=> $val['head_title'], 'title'=> $val['title'], 'content_idx'=> $val['content_idx'], 'hit_count'=>$val['hit_count'], 'editor_name'=>$val['editor_name']);
|
||||
}
|
||||
|
||||
$menu_code = '68';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
//exit();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/editor_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_category" name="search_category" value="<?=$search_category?>">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_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="rank1" name="rank1">
|
||||
<input type="hidden" id="rank2" name="rank2">
|
||||
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>기타섹션</th>
|
||||
<td class="tl">
|
||||
<div style="width:80px; float: left"><b>모바일섹션</b></div>
|
||||
<? foreach ($def_arr_editor_etc_section as $val) { ?>
|
||||
<input type="radio" name="etc_section_type" value="<?=$val['code']?>" onclick="change_etc_section_type('<?=$val['code']?>')" <? if($search_etc_section_type==$val['code']) { echo 'checked';}?>> <?=$val['name']?>
|
||||
<? }?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
for($i=1;$i<=$def_arr_editor_etc_section[$search_etc_section_type]['count'];$i++) {
|
||||
$category_code1 = '';
|
||||
$category_code2 = '';
|
||||
$life_etc_section_idx = '';
|
||||
if(isset($arr_life_etc_section_rank[$i])== true) {
|
||||
$life_etc_section_idx = $arr_life_etc_section_rank[$i]['idx'];
|
||||
$category_code1 = $arr_life_etc_section_rank[$i]['category_idx'];
|
||||
$category_code2 = $arr_life_etc_section_rank[$i]['channel_idx'];
|
||||
$category_code3 = $arr_life_etc_section_rank[$i]['editor_idx'];
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<tr><th colspan="2">에디터 <?=$i?>위</th></tr>
|
||||
<tr>
|
||||
<th>카테고리선택</th>
|
||||
<td class="tl">
|
||||
<select name="category1_<?=$i?>" id="category1_<?=$i?>" onchange="change_category(1, this.value, '<?=$i?>')" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category1) > 0) {
|
||||
foreach ($arr_category1 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code1==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널선택</th>
|
||||
<td class="tl">
|
||||
<select name="category2_<?=$i?>" id="category2_<?=$i?>" class="type01" onchange="change_category(2, this.value, '<?=$i?>')">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category2) > 0 && $category_code2!='') {
|
||||
foreach ($arr_category2 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code2==$val['idx']) { echo 'selected'; }?>><?=$val['channel_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>에디터선택</th>
|
||||
<td class="tl">
|
||||
<select name="category3_<?=$i?>" id="category3_<?=$i?>" class="type01" onchange="change_category(3, this.value, '<?=$i?>')">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category3) > 0 && $category_code3!='') {
|
||||
foreach ($arr_category3 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code3==$val['idx']) { echo 'selected'; }?>><?=$val['partner_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
for($z=1;$z<=$def_arr_editor_etc_section[$etc_section_type]['detail_count'];$z++) {
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$main_img_txt = '';
|
||||
$main_img = '';
|
||||
$hit_count = '';
|
||||
$content_idx = '';
|
||||
|
||||
|
||||
if(isset($arr_life_etc_section_detail_rank[$life_etc_section_idx][$z])== true) {
|
||||
$head_title = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['content_idx'];
|
||||
$main_img = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['main_img'];
|
||||
$hit_count = $arr_life_etc_section_detail_rank[$life_etc_section_idx][$z]['hit_count'];
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
}
|
||||
|
||||
switch($etc_section_type) {
|
||||
case '4': $rowspan = '3';break;
|
||||
case '5': $rowspan = '4';break;
|
||||
case '6': $rowspan = '3';break;
|
||||
default : $rowspan = '3';break;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$z?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx_<?=$i?>_<?=$z?>" id="content_idx_<?=$i?>_<?=$z?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title_<?=$i?>_<?=$z?>" id="head_title_<?=$i?>_<?=$z?>" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<input type="text" name="title_<?=$i?>_<?=$z?>" id="title_<?=$i?>_<?=$z?>" size="50" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">이미지첨부
|
||||
<div id="img_view_<?=$i?>_<?=$z?>"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img_<?=$i?>_<?=$z?>" id="img_<?=$i?>_<?=$z?>">
|
||||
<input type="hidden" name="org_img_<?=$i?>_<?=$z?>" id="org_img_<?=$i?>_<?=$z?>" value="<?=$main_img?>">
|
||||
<input type="file" name="main_img_<?=$i?>_<?=$z?>" id="main_img_<?=$i?>_<?=$z?>" class="input00" size="20" accept="image/*">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? if($etc_section_type== '5') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count_<?=$i?>_<?=$z?>" id="hit_count_<?=$i?>_<?=$z?>" class="type02" size="20" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="open_search_article('<?=$i?>', '<?=$z?>');" style="cursor: pointer;">컨텐츠검색</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:editor_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/etc_section/editor_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_category=<?=$search_category?>&search_etc_section_type=<?=$search_etc_section_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<?
|
||||
$content_type = '3';
|
||||
require_once(APPPATH."views/admin/search/search_article_inc.php");
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_category(depth, val, rank){
|
||||
|
||||
reset(rank);
|
||||
|
||||
if(depth == 1) {
|
||||
|
||||
$('#category3_'+rank).empty();
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category3_'+rank).append(option);
|
||||
|
||||
|
||||
|
||||
var json_category = '<?=json_encode($arr_category2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#category2_'+rank).empty();
|
||||
$('#category2_'+rank).append(option);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['category_idx'] == val) {
|
||||
option = "<option value='"+json_category[key]['idx']+"'>"+json_category[key]['channel_name']+"</option>";
|
||||
$('#category2_'+rank).append(option);
|
||||
}
|
||||
}
|
||||
|
||||
} else if(depth == 2) {
|
||||
|
||||
$('#category3_'+rank).empty();
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category3_'+rank).append(option);
|
||||
|
||||
var json_category = '<?=json_encode($arr_category3)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['channel_idx'] == val) {
|
||||
option = $("<option value='"+json_category[key]['idx']+"'>"+json_category[key]['partner_name']+"</option>");
|
||||
$('#category3_'+rank).append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function open_search_article(rank1, rank2){
|
||||
$("#key").val("_"+rank1+'_'+rank2);
|
||||
$("#rank1").val(rank1);
|
||||
$("#rank2").val(rank2);
|
||||
if($("#category1_"+rank1).val()=='') {
|
||||
alert("카테고리를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#category2_"+rank1).val()=='') {
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#category3_"+rank1).val()=='') {
|
||||
alert("에디터를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#article_keyword").val('');
|
||||
commonLayerOpen('search_article');
|
||||
$("#article_keyword").focus();
|
||||
}
|
||||
|
||||
|
||||
var etc_detail_count = "<?=$def_arr_editor_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function reset(rank){
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
$("#content_idx_"+rank+"_"+z).val('');
|
||||
$("#head_title_"+rank+"_"+z).val('');
|
||||
$("#title_"+rank+"_"+z).val('');
|
||||
$("#editor_name_"+rank+"_"+z).val('');
|
||||
$("#img_"+rank+"_"+z).val('');
|
||||
$("#org_img_"+rank+"_"+z).val('');
|
||||
$("#main_img_"+rank+"_"+z).val('');
|
||||
$("#img_view_"+rank+"_"+z).empty();
|
||||
$("#hit_count_"+rank+"_"+z).empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function change_etc_section_type(val){
|
||||
$("#search_etc_section_type").val(val);
|
||||
$("#input_form").attr("action", "/admin/etc_section/editor_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var etc_count = "<?=$def_arr_editor_etc_section[$etc_section_type]['count']?>";
|
||||
var etc_detail_count = "<?=$def_arr_editor_etc_section[$etc_section_type]['detail_count']?>";
|
||||
function editor_list_reg_proc(){
|
||||
for(i=1;i<=etc_count;i++) {
|
||||
if($("#category1_"+i).val()!='') {
|
||||
if($("#category2_"+i).val()==''){
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#category3_"+i).val()==''){
|
||||
alert("에디터를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
for(z=1;z<=etc_detail_count;z++) {
|
||||
if($("#title_"+i+'_'+z).val()!='') {
|
||||
if($("#content_idx_"+i+'_'+z).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img_"+i+'_'+z).val()=='' && $("#img_"+i+'_'+z).val()=='' && $("#org_img_"+i+'_'+z).val()=='') {
|
||||
alert("이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
398
application/views/admin/etc_section/main_category_company_list.php
Executable file
398
application/views/admin/etc_section/main_category_company_list.php
Executable file
@@ -0,0 +1,398 @@
|
||||
<?php
|
||||
$arr_category2_add = array();
|
||||
foreach ($arr_category2 as $key=>$val) {
|
||||
foreach ($val as $val1) {
|
||||
$arr_category2_add[] = array('p_category_code' => $key, 'category_code' => $val1['category_code'], 'category_name' => $val1['category_name']);
|
||||
}
|
||||
}
|
||||
|
||||
$menu_code = '613';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/main_category_company_list/6" enctype="multipart/form-data">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="del_key" name="del_key">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<input type="hidden" id="search_type" name="search_type" value="company_name">
|
||||
|
||||
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
<div class="searh_area">
|
||||
<input type="text" name="search_keyword" id="search_keyword" value="<?=$search_keyword?>" onkeypress="if( event.keyCode==13 ){check_search();}" placeholder="업체명">
|
||||
<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" style="margin-top: 30px">
|
||||
<span><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<div class="searh_area">
|
||||
<select name="search_category_code1" id="search_category_code1" onchange="change_category(1)">
|
||||
<option value="">카테고리 1</option>
|
||||
<? foreach ($arr_category1 as $val) { ?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<select name="search_category_code2" id="search_category_code2" onchange="change_category(2)">
|
||||
<option value="">카테고리 2</option>
|
||||
<?
|
||||
if($search_category_code1!='') {
|
||||
foreach ($arr_category2[$search_category_code1] as $val) { ?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>출력상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="11">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$company_name = $val['company_name'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$logo_img = $val['logo_img'];
|
||||
$homepage = $val['homepage'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_sort = $val['display_sort'];
|
||||
$is_direct = $val['is_direct'];
|
||||
$category_code1 = $val['category_code1'];
|
||||
$category_code2 = $val['category_code2'];
|
||||
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
$is_direct_txt = '';
|
||||
if($is_direct == 'Y') $is_direct_txt = '<span class="text_blue">ON</span>';
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><a href="/admin/etc_section/main_category_list/6?search_category_code1=<?=$category_code1?>"><?=$category_name1?></a> > <a href="/admin/etc_section/main_category_list/6?search_category_code1=<?=$category_code1?>&search_category_code2=<?=$category_code2?>"><?=$category_name2?></a></td>
|
||||
<td><img src="<?=$logo_img?>" width="75"></td>
|
||||
<td><?=$company_name?></td>
|
||||
<td><a href="<?=$homepage?>" target="_blank"><?=$homepage?></a></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$display_sort?></td>
|
||||
<td><?=$is_direct_txt?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:company_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:company_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:company_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:company_add();">업체등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="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('reg_layer')" class="pop_close">x</a>
|
||||
<h2>업체등록</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category1" id="category1" onchange="change_category1(this.value);">
|
||||
<option value="" selected>선택</option>
|
||||
<? foreach ($arr_category1 as $val) { ?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
<select name="category2" id="category2">
|
||||
<option value="" selected>선택</option>
|
||||
<? if($search_category_code1!='') {
|
||||
foreach($arr_category2_add as $val) {
|
||||
if($val['p_category_code'] == $search_category_code1) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected';}?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>업체명</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="company_name" id="company_name" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>홈페이지</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="homepage" id="homepage" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>송출관리</th>
|
||||
<td class="tl">
|
||||
<input type="checkbox" name="is_direct" id="is_direct" class="input00" value="Y"> 바로가기에 노출
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>출력순서</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="display_sort" id="display_sort" class="input00" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>로고첨부</th>
|
||||
<td class="tl">
|
||||
<span id="load_img"></span>
|
||||
<input type="hidden" name="org_logo_img" id="org_logo_img">
|
||||
<input type="file" name="logo_img" id="logo_img" class="input00">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:company_reg_proc('add')" id="btn_add" style="display:none;">신규등록</a>
|
||||
<a href="javascript:company_reg_proc('edit')" id="bnt_edit" style="display:none;">수정</a>
|
||||
<a href="javascript:commonLayerClose('reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--// 카테고리 등록/수정 layer -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 등록 - layer 열기
|
||||
function company_add() {
|
||||
form_reset();
|
||||
$("#btn_add").show();
|
||||
commonLayerOpen('reg_layer');
|
||||
}
|
||||
|
||||
// form 초기화
|
||||
function form_reset(){
|
||||
$("#bnt_edit").hide();
|
||||
$("#btn_add").hide();
|
||||
|
||||
console.log("<?=$search_category_code2?>");
|
||||
|
||||
$("#category1").val("<?=$search_category_code1?>").prop("selected", true);
|
||||
$("#category2").val("<?=$search_category_code2?>").prop("selected", true);
|
||||
|
||||
$("#idx").val('');
|
||||
$("#company_name").val('');
|
||||
$("#homepage").val('');
|
||||
$("#display_sort").val('');
|
||||
$("input:checkbox[id='is_direct']").attr("checked", false);
|
||||
$("#org_logo_img").val('');
|
||||
$('#load_img').empty();
|
||||
}
|
||||
|
||||
// 수정 - layer열기
|
||||
function company_edit(idx){
|
||||
form_reset();
|
||||
|
||||
$("#bnt_edit").show();
|
||||
$("#btn_add").hide();
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/etc_section/main_category_company_detail',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
console.log(rtn_json);
|
||||
if(rtn_json.result_code=='0000') {
|
||||
var result = rtn_json.result_data;
|
||||
$("#idx").val(idx);
|
||||
$("#category1").val(result.category_code1).prop("selected", true);
|
||||
change_category1(result.category_code1);
|
||||
$("#category2").val(result.category_code2).prop("selected", true);
|
||||
|
||||
$("#company_name").val(result.company_name);
|
||||
$("#homepage").val(result.homepage);
|
||||
$("#display_sort").val(result.display_sort);
|
||||
if(result.is_direct=='Y') {
|
||||
$("input:checkbox[id='is_direct']").attr("checked", true);
|
||||
}
|
||||
if(result.logo_img!= '') {
|
||||
$("#org_logo_img").val(result.logo_img);
|
||||
$('#load_img').html('<img src="' + result.logo_img + '" width="100"><br /><input type="checkbox" name="is_del_img" value="Y"> 이미지삭제 ');
|
||||
}
|
||||
commonLayerOpen('reg_layer');
|
||||
} else {
|
||||
alert("데이터로드에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 저장
|
||||
function company_reg_proc(mode){
|
||||
if($("#category1").val()=='') {
|
||||
alert("카테고리1를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#category2").val()=='') {
|
||||
alert("카테고리2를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#company_name").val()=='') {
|
||||
alert("업체명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#mode").val(mode);
|
||||
|
||||
$("#input_form").attr("action", "/admin/etc_section/main_category_company_reg_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function change_category(depth){
|
||||
if(depth=='1') $("#search_category_code2").val("").prop("selected", true);
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
var json_category = '<?=json_encode($arr_category2_add)?>';
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 삭제
|
||||
function company_del_proc(idx) {
|
||||
if(confirm("업체가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/main_category_company_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function company_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("업체가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/main_category_company_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>
|
||||
274
application/views/admin/etc_section/main_category_list.php
Executable file
274
application/views/admin/etc_section/main_category_list.php
Executable file
@@ -0,0 +1,274 @@
|
||||
<?
|
||||
|
||||
$menu_code = '612';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/main_category_list/6" enctype="multipart/form-data">
|
||||
<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="mode" name="mode">
|
||||
<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" style="margin-top: 30px">
|
||||
<span><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>아이콘</th>
|
||||
<th>카테고리</th>
|
||||
<th>등록일</th>
|
||||
<th>출력순서</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="6">등록된 내용이 없습니다.</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'];
|
||||
$category_img = $val['category_img'];
|
||||
$p_category_code= $val['p_category_code'];
|
||||
$depth = $val['depth'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_sort = $val['display_sort'];
|
||||
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
$del_key = $p_category_code;
|
||||
$reply_icon = '';
|
||||
$company_url = '/admin/etc_section/main_category_company_list/6?search_category_code1='.$p_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;
|
||||
$company_url.='&search_category_code2='.$category_code;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<input type="hidden" name="display_sort_<?=$idx?>" id="display_sort_<?=$idx?>" value="<?=$display_sort?>">
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$category_img?>" width="75"></td>
|
||||
<td style="text-align: left;">
|
||||
<input type="hidden" name="category_name_<?=$idx?>" id="category_name_<?=$idx?>" value="<?=$category_name?>">
|
||||
<input type="hidden" name="category_img_<?=$idx?>" id="category_img_<?=$idx?>" value="<?=$category_img?>">
|
||||
<?=$reply_icon?><a href="<?=$company_url?>"><?=$category_name?></a>
|
||||
<? if($depth == 1) {?>
|
||||
<button type="button" class="btn_s_blue" style="width:120px" onclick="category_add('<?=$category_code?>');" style="cursor: pointer;">2차 카테고리등록</button>
|
||||
<? }?>
|
||||
</td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$display_sort?></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 class="write_btn">
|
||||
<a href="javascript:category_add();">카테고리등록</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 class="tl">
|
||||
<input type="text" name="category_name" id="category_name" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>아이콘</th>
|
||||
<td class="tl">
|
||||
<span id="load_img"></span>
|
||||
<input type="hidden" name="org_category_img" id="org_category_img">
|
||||
<input type="file" name="category_img" id="category_img" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>출력순서</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="display_sort" id="display_sort" class="input03" style="width:50px">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:category_reg_proc('add')" id="btn_category_add" style="display:none;">신규등록</a>
|
||||
<a href="javascript:category_reg_proc('edit')" id="bnt_category_edit" style="display:none;">수정</a>
|
||||
<a href="javascript:commonLayerClose('category_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--// 카테고리 등록/수정 layer -->
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<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) {
|
||||
form_reset();
|
||||
|
||||
$("#btn_category_add").show();
|
||||
if(p_category_code != '') {
|
||||
$("#p_category_code").val(p_category_code);
|
||||
}
|
||||
|
||||
commonLayerOpen('category_reg_layer');
|
||||
}
|
||||
|
||||
// 수정 - layer열기
|
||||
function category_edit(idx){
|
||||
form_reset();
|
||||
|
||||
$("#bnt_category_edit").show();
|
||||
|
||||
$("#category_idx").val(idx);
|
||||
$("#category_name").val($("#category_name_"+idx).val());
|
||||
$("#org_category_img").val($("#category_img_"+idx).val());
|
||||
$("#display_sort").val($("#display_sort_"+idx).val());
|
||||
$('#load_img').html('<img src="' + $("#category_img_"+idx).val() + '" width="250"><br /><input type="checkbox" name="is_del_img" value="Y"> 이미지삭제 ');
|
||||
|
||||
commonLayerOpen('category_reg_layer');
|
||||
}
|
||||
|
||||
// form 초기화
|
||||
function form_reset(){
|
||||
$("#bnt_category_edit").hide();
|
||||
$("#btn_category_add").hide();
|
||||
$('#load_img').empty();
|
||||
$("#category_idx").val('');
|
||||
$("#category_name").val('');
|
||||
$("#p_category_code").val('');
|
||||
$("#org_category_img").val('');
|
||||
}
|
||||
|
||||
|
||||
// 카테고리 저장
|
||||
function category_reg_proc(mode){
|
||||
if($("#category_name").val()=='') {
|
||||
alert("카테고리명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#mode").val(mode);
|
||||
|
||||
$("#input_form").attr("action", "/admin/etc_section/main_category_reg_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 삭제
|
||||
function category_del_proc(depth, del_key, category_code) {
|
||||
var form_data = {
|
||||
"depth" : depth,
|
||||
"category_code" : category_code
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/etc_section/main_category_code_count',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'html',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml == 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/etc_section/main_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>
|
||||
140
application/views/admin/etc_section/media_edit.php
Executable file
140
application/views/admin/etc_section/media_edit.php
Executable file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$head_title = $result['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $result['content_idx'];
|
||||
$main_img = $result['main_img'];
|
||||
$etc_section_type = $result['etc_section_type'];
|
||||
$content_type = $result['content_type'];
|
||||
$video_url = $result['video_url'];
|
||||
$rank = $result['rank'];
|
||||
$content_name = $def_arr_content[$content_type];
|
||||
$video_url = str_replace('https://www.youtube.com/embed/','', $video_url);
|
||||
|
||||
$main_img_txt = '';
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
|
||||
switch($search_etc_section_type) {
|
||||
case '1': $rowspan = '5';break;
|
||||
case '2': $rowspan = '4';break;
|
||||
case '3': $rowspan = '5';break;
|
||||
case '4': $rowspan = '4';break;
|
||||
default : $rowspan = '4';break;
|
||||
|
||||
}
|
||||
|
||||
$menu_code = '64';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/media_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_content_type" value="<?=$search_content_type?>">
|
||||
<input type="hidden" id="search_category_code1" name="search_etc_section_type" value="<?=$search_etc_section_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">
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle"><?=$def_arr_etc_section[$etc_section_type]['name']?></h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$rank?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_type" id="content_type" value="<?=$content_type?>">
|
||||
<input type="hidden" name="content_idx" id="content_idx" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title" id="head_title" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<input type="text" name="title" id="title" size="50" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="content_name" id="content_name" class="type02" placeholder="카테고리" value="<?=$content_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">이미지첨부
|
||||
<div id="img_view"><?=$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="main_img" id="main_img" class="input00" size="20" accept="image/*">
|
||||
</td>
|
||||
</tr>
|
||||
<? if($etc_section_type!='2' && $etc_section_type!='4') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
youtube url </br>https://youtu.be/<input type="text" name="video_url" id="video_url" class="input00" value="<?=$video_url?>" style="width:200px"> (키만 넣어주세요.)
|
||||
</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:media_edit_proc();">저장하기</a>
|
||||
<a href="/admin/etc_section/media_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_content_type=<?=$search_content_type?>&search_etc_section_type=<?=$search_etc_section_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<?
|
||||
$content_type = 'all';
|
||||
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 media_edit_proc(){
|
||||
if($("#title").val()!='') {
|
||||
if($("#content_idx").val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img").val()=='' && $("#img").val()=='' && $("#org_img").val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
<? if($etc_section_type!='2' && $etc_section_type!='4') {?>
|
||||
if($("#video_url").val()=='') {
|
||||
alert("영상을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
<? }?>
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
279
application/views/admin/etc_section/media_list.php
Executable file
279
application/views/admin/etc_section/media_list.php
Executable file
@@ -0,0 +1,279 @@
|
||||
<?
|
||||
include_once ("./static_data/code.php");
|
||||
$menu_code = '64';
|
||||
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/etc_section/media_list/6">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_type?>">
|
||||
<input type="hidden" id="search_is_display" name="search_is_display" value="<?=$search_is_display?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<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/etc_section/media_list/6?search_etc_section_type=2" <? if($search_etc_section_type=='2') { echo 'class="on"';}?>>인기포토</a></li>
|
||||
<li><a href="/admin/etc_section/media_list/6?search_etc_section_type=1" <? if($search_etc_section_type=='1') { echo 'class="on"';}?>>인기영상</a></li>
|
||||
<li><a href="/admin/etc_section/media_list/6?search_etc_section_type=4" <? if($search_etc_section_type=='4') { echo 'class="on"';}?>>카드뉴스</a></li>
|
||||
</ul>
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="" <? if($search_type==''){ echo 'selected';}?>>선택</option>
|
||||
<option value="a.title" <? if($search_type=='a.title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="b.search_name" <? if($search_type=='b.search_name'){ 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>
|
||||
<li><a href="/admin/etc_section/media_list/6?search_etc_section_type=3" <? if($search_etc_section_type=='3') { echo 'class="on"';}?>>은혜로운 영상</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<span><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<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:search_is_display('Y');"><span class="text_blue">출력중: <?=number_format($is_display1)?></span></a>
|
||||
<a href="javascript:search_is_display('N');"><span class="text_red">예약중: <?=number_format($is_display2)?></span></a>
|
||||
</span>
|
||||
<div class="searh_area">
|
||||
<select name="search_content_type" onchange="check_search();" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<? foreach ($def_arr_content as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_content_type==$key){ echo 'selected';}?>><?=$val?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>썸네일</th>
|
||||
<th>카테고리</th>
|
||||
<th>구분</th>
|
||||
<th>제목</th>
|
||||
<th>작성자</th>
|
||||
<th>등록일시</br>(예약일시)</th>
|
||||
<th>순위</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요수</th>
|
||||
<th>댓글수</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="14">등록된 내용이 없습니다.</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'];
|
||||
$content_idx = $val['content_idx'];
|
||||
$content_type = $val['content_type'];
|
||||
$etc_section_type = $val['etc_section_type'];
|
||||
$search_name = $val['search_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$rank = $val['rank'];
|
||||
$is_display = $val['is_display'];
|
||||
$display_date = $val['display_date'];
|
||||
|
||||
$display_date_txt = '';
|
||||
if($is_display == 'N') {
|
||||
$display_date_txt = '</br><span class="text_green">('.$display_date.')</span>';
|
||||
}
|
||||
|
||||
$content_txt = $def_arr_content[$content_type];
|
||||
$etc_section_txt = $def_arr_etc_section[$etc_section_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"> ';
|
||||
|
||||
switch ($content_type) {
|
||||
case '1':
|
||||
$view_url = '/admin/news/news_reg/2?mode=edit&idx='.$content_idx;
|
||||
$search_url = '/admin/news/news_list/3?search_type=reporter_name&search_keyword='.$search_name;
|
||||
break;
|
||||
case '2':
|
||||
$view_url = '/admin/column/column_reg/3?mode=edit&idx='.$content_idx;
|
||||
$search_url = '/admin/column/column_list/3?search_type=column_name&search_keyword='.$search_name;
|
||||
break;
|
||||
case '3':
|
||||
$view_url = '/admin/life/life_reg/5?mode=edit&idx='.$content_idx;
|
||||
$search_url = '/admin/life/life_list/3?search_type=editor_name&search_keyword='.$search_name;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$main_img?>" width="35"></td>
|
||||
<td><?=$content_txt?></td>
|
||||
<td><?=$etc_section_txt?></td>
|
||||
<td class="title" style="text-align:left;">
|
||||
<a href="javascript:media_edit('<?=$idx?>')"><?=$new?><?=$title?></a>
|
||||
<button type="button" class="btn_s_blue" style="width:80px" onclick="location.href='<?=$view_url?>'" style="cursor: pointer;"><?=$content_txt?>보기</button>
|
||||
</td>
|
||||
<td><a href="<?=$search_url?>"><?=$search_name?></a></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><?=number_format($hit_count)?></td>
|
||||
<td><?=number_format($like_count)?></td>
|
||||
<td><?=number_format($comment_count)?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:media_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:media_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:media_arr_del_proc()">삭제</a>
|
||||
<a href="javascript:media_list_reg()">송출관리</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 search_is_display(type){
|
||||
$("#search_is_display").val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function media_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/etc_section/media_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// edit
|
||||
function media_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/media_edit/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function media_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/media_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function media_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/media_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>
|
||||
199
application/views/admin/etc_section/media_list_reg.php
Executable file
199
application/views/admin/etc_section/media_list_reg.php
Executable file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_etc_section_rank = array();
|
||||
foreach ($arr_etc_section as $val) {
|
||||
$arr_etc_section_rank[$val['rank']] = array('content_idx'=> $val['content_idx'], 'content_type'=> $val['content_type'],'head_title'=>$val['head_title'], 'title'=>$val['title'], 'main_img'=>$val['main_img'], 'main_video'=>$val['main_video'], 'video_url'=>$val['video_url']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '64';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/media_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_content_type" name="search_content_type" value="<?=$search_content_type?>">
|
||||
<input type="hidden" id="search_etc_section_type" name="search_etc_section_type" value="<?=$search_etc_section_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">
|
||||
|
||||
|
||||
<?
|
||||
if($def_arr_etc_section[$search_etc_section_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>
|
||||
<input type="radio" name="etc_section_type" value="2" onclick="change_etc_section_type('2')" <? if($search_etc_section_type==2) { echo 'checked';}?>> 인기포토
|
||||
<input type="radio" name="etc_section_type" value="1" onclick="change_etc_section_type('1')" <? if($search_etc_section_type==1) { echo 'checked';}?>> 인기영상
|
||||
<input type="radio" name="etc_section_type" value="4" onclick="change_etc_section_type('4')" <? if($search_etc_section_type==4) { echo 'checked';}?>> 카드뉴스
|
||||
</br>
|
||||
<div style="width:80px; float: left"><b>모바일섹션</b></div>
|
||||
<input type="radio" name="etc_section_type" value="3" onclick="change_etc_section_type('3')" <? if($search_etc_section_type==3) { echo 'checked';}?>> 은혜로운 영상
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
for($i=1;$i<=$def_arr_etc_section[$search_etc_section_type]['count'];$i++) {
|
||||
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$main_img = '';
|
||||
$main_img_txt = '';
|
||||
$main_video = '';
|
||||
$main_video_txt = '';
|
||||
$content_idx = '';
|
||||
$content_type = '';
|
||||
$content_name = '';
|
||||
$video_url = '';
|
||||
if(isset($arr_etc_section_rank[$i])== true) {
|
||||
$head_title = $arr_etc_section_rank[$i]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_etc_section_rank[$i]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $arr_etc_section_rank[$i]['content_idx'];
|
||||
$main_img = $arr_etc_section_rank[$i]['main_img'];
|
||||
$content_type = $arr_etc_section_rank[$i]['content_type'];
|
||||
$video_url = $arr_etc_section_rank[$i]['video_url'];
|
||||
$content_name = $def_arr_content[$content_type];
|
||||
|
||||
$video_url = str_replace('https://www.youtube.com/embed/','', $video_url);
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
}
|
||||
|
||||
switch($search_etc_section_type) {
|
||||
case '1': $rowspan = '5';break;
|
||||
case '2': $rowspan = '4';break;
|
||||
case '3': $rowspan = '5';break;
|
||||
case '4': $rowspan = '4';break;
|
||||
default : $rowspan = '4';break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$i?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_type<?=$i?>" id="content_type<?=$i?>" value="<?=$content_type?>">
|
||||
<input type="hidden" name="content_idx<?=$i?>" id="content_idx<?=$i?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title<?=$i?>" id="head_title<?=$i?>" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<input type="text" name="title<?=$i?>" id="title<?=$i?>" size="50" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="content_name<?=$i?>" id="content_name<?=$i?>" class="type02" placeholder="카테고리" value="<?=$content_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">이미지첨부
|
||||
<div id="img_view<?=$i?>"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img<?=$i?>" id="img<?=$i?>">
|
||||
<input type="hidden" name="org_img<?=$i?>" id="org_img<?=$i?>" value="<?=$main_img?>">
|
||||
<input type="file" name="main_img<?=$i?>" id="main_img<?=$i?>" class="input00" size="20" accept="image/*">
|
||||
</td>
|
||||
</tr>
|
||||
<? if($search_etc_section_type!='2' && $search_etc_section_type!='4') {?>
|
||||
|
||||
<td class="tl">
|
||||
youtube url </br>https://youtu.be/<input type="text" name="video_url<?=$i?>" id="video_url<?=$i?>" class="input00" value="<?=$video_url?>" style="width:200px"> (키만 넣어주세요.)
|
||||
</td>
|
||||
|
||||
<? }?>
|
||||
|
||||
|
||||
<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:media_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/etc_section/media_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_content_type=<?=$search_content_type?>&search_etc_section_type=<?=$search_etc_section_type?>&sort=<?=$sort?>">목록으로</a>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<?
|
||||
$content_type = 'all';
|
||||
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_etc_section_type(val){
|
||||
$("#search_etc_section_type").val(val);
|
||||
$("#input_form").attr("action", "/admin/etc_section/media_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var etc_count_count = "<?=$def_arr_etc_section[$search_etc_section_type]['count']?>";
|
||||
function media_list_reg_proc(){
|
||||
for(i=1;i<=etc_count_count;i++) {
|
||||
if($("#title"+i).val()!='') {
|
||||
if($("#content_idx"+i).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img"+i).val()=='' && $("#img"+i).val()=='' && $("#org_img"+i).val()=='') {
|
||||
alert("이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
<? if($search_etc_section_type!='2' && $search_etc_section_type!='4') {?>
|
||||
if($("#video_url"+i).val()=='') {
|
||||
alert("영상을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
<? }?>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
5
application/views/admin/etc_section/press_detail.php
Executable file
5
application/views/admin/etc_section/press_detail.php
Executable file
@@ -0,0 +1,5 @@
|
||||
<?
|
||||
echo json_encode($result);
|
||||
|
||||
|
||||
?>
|
||||
298
application/views/admin/etc_section/press_list.php
Executable file
298
application/views/admin/etc_section/press_list.php
Executable file
@@ -0,0 +1,298 @@
|
||||
<?
|
||||
|
||||
$menu_code = '611';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/press_list/6" enctype="multipart/form-data">
|
||||
<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="press_name">
|
||||
<input type="hidden" id="search_click1" name="search_click1" value="<?=$search_click1?>">
|
||||
|
||||
|
||||
|
||||
|
||||
<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" style="margin-top: 30px">
|
||||
<span><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<a href="javascript:click_search('1', 'search_click1');"><span style="margin-left:5px"><b>바로가기:</b> <?=number_format($direct_count);?></span></a>
|
||||
<span style="margin-left:10px"><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>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="10">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$now_date = date("Y-m-d");
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$logo_img = $val['logo_img'];
|
||||
$press_name = $val['press_name'];
|
||||
$article_count = $val['article_count'];
|
||||
$homepage = $val['homepage'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_sort = $val['display_sort'];
|
||||
$is_direct = $val['is_direct'];
|
||||
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
$is_direct_txt = '';
|
||||
if($is_direct=='Y') $is_direct_txt = '<span class="text_blue">ON</span>';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$logo_img?>" width="55"></td>
|
||||
<td><?=$press_name?></td>
|
||||
<td><?=$article_count?></td>
|
||||
<td><a href="<?=$homepage?>" target="_blank"><?=$homepage?></a></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$display_sort?></td>
|
||||
<td><?=$is_direct_txt?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:press_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:press_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:press_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:press_add();">언론사등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="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('reg_layer')" class="pop_close">x</a>
|
||||
<h2>언론사등록</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>언론사명</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="press_name" id="press_name" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>홈페이지</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="homepage" id="homepage" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>송출관리</th>
|
||||
<td class="tl">
|
||||
<input type="checkbox" name="is_direct" id="is_direct" class="input00" value="Y"> 바로가기에 노출
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>출력순서</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="display_sort" id="display_sort" class="type03" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>로고첨부</th>
|
||||
<td class="tl">
|
||||
<span id="load_img"></span>
|
||||
<input type="hidden" name="org_logo_img" id="org_logo_img">
|
||||
<input type="file" name="logo_img" id="logo_img" class="input00">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:press_reg_proc('add')" id="btn_add" style="display:none;">신규등록</a>
|
||||
<a href="javascript:press_reg_proc('edit')" id="bnt_edit" style="display:none;">수정</a>
|
||||
<a href="javascript:commonLayerClose('reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</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();
|
||||
}
|
||||
|
||||
|
||||
// 등록 - layer 열기
|
||||
function press_add() {
|
||||
form_reset();
|
||||
$("#bnt_edit").hide();
|
||||
$("#btn_add").show();
|
||||
|
||||
commonLayerOpen('reg_layer');
|
||||
}
|
||||
|
||||
// 수정 - layer열기
|
||||
function press_edit(idx){
|
||||
form_reset();
|
||||
|
||||
$("#bnt_edit").show();
|
||||
$("#btn_add").hide();
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/etc_section/press_detail',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
console.log(rtn_json);
|
||||
if(rtn_json.result_code=='0000') {
|
||||
var result = rtn_json.result_data;
|
||||
$("#idx").val(idx);
|
||||
$("#press_name").val(result.press_name);
|
||||
$("#homepage").val(result.homepage);
|
||||
$("#display_sort").val(result.display_sort);
|
||||
if(result.is_direct=='Y') {
|
||||
$("input:checkbox[id='is_direct']").attr("checked", true);
|
||||
}
|
||||
if(result.logo_img!= '') {
|
||||
$("#org_logo_img").val(result.logo_img);
|
||||
$('#load_img').html('<img src="' + result.logo_img + '" style="max-width:150px"><br /><input type="checkbox" name="is_del_img" value="Y"> 이미지삭제 ');
|
||||
}
|
||||
commonLayerOpen('reg_layer');
|
||||
} else {
|
||||
alert("데이터로드에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 언론사 저장
|
||||
function press_reg_proc(mode){
|
||||
$("#mode").val(mode);
|
||||
if($("#press_name").val()=='') {
|
||||
alert("언론사명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").attr("action", "/admin/etc_section/press_reg_proc/6");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// form 초기화
|
||||
function form_reset(){
|
||||
$("#idx").val('');
|
||||
$("#press_name").val('');
|
||||
$("#homepage").val('');
|
||||
$("#display_sort").val('');
|
||||
$("input:checkbox[id='is_direct']").attr("checked", false);
|
||||
$("#org_logo_img").val('');
|
||||
$('#load_img').empty();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function press_del_proc(idx) {
|
||||
if(confirm("언론사가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/press_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function press_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("언론사가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/press_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>
|
||||
294
application/views/admin/etc_section/recommend_app_list.php
Executable file
294
application/views/admin/etc_section/recommend_app_list.php
Executable file
@@ -0,0 +1,294 @@
|
||||
<?
|
||||
$menu_code = '62';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/recommend_app_list/6" enctype="multipart/form-data">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="del_key" name="del_key">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<input type="hidden" id="search_type" name="search_type" value="app_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><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="10">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$app_name = $val['app_name'];
|
||||
$icon_img = $val['icon_img'];
|
||||
$market_url = $val['market_url'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_sort = $val['display_sort'];
|
||||
$is_direct = $val['is_direct'];
|
||||
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
$is_direct_txt = '';
|
||||
if($is_direct == 'Y') $is_direct_txt = '<span class="text_blue">ON</span>';
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$icon_img?>" width="75"></td>
|
||||
<td><?=$app_name?></td>
|
||||
<td><a href="<?=$market_url?>" target="_blank"><?=$market_url?></a></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$display_sort?></td>
|
||||
<td><?=$is_direct_txt?></td>
|
||||
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:app_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:app_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:app_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:app_add();">어플등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="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('reg_layer')" class="pop_close">x</a>
|
||||
<h2>추천어플등록</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>어플명</th>
|
||||
<td>
|
||||
<input type="text" name="app_name" id="app_name" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>마켓주소</th>
|
||||
<td>
|
||||
<input type="text" name="market_url" id="market_url" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>송출관리</th>
|
||||
<td class="tl">
|
||||
<input type="checkbox" name="is_direct" id="is_direct" class="input00" value="Y"> 펼침메뉴에 노출
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>출력순서</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="display_sort" id="display_sort" class="type03" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>로고첨부</th>
|
||||
<td class="tl">
|
||||
<span id="load_img"></span>
|
||||
<input type="hidden" name="org_icon_img" id="org_icon_img">
|
||||
<input type="file" name="icon_img" id="icon_img" class="input00">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:app_reg_proc('add')" id="btn_add" style="display:none;">신규등록</a>
|
||||
<a href="javascript:app_reg_proc('edit')" id="bnt_edit" style="display:none;">수정</a>
|
||||
<a href="javascript:commonLayerClose('reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--// 카테고리 등록/수정 layer -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 등록 - layer 열기
|
||||
function app_add() {
|
||||
form_reset();
|
||||
$("#btn_add").show();
|
||||
commonLayerOpen('reg_layer');
|
||||
}
|
||||
|
||||
// form 초기화
|
||||
function form_reset(){
|
||||
$("#bnt_edit").hide();
|
||||
$("#btn_add").hide();
|
||||
|
||||
$("#idx").val('');
|
||||
$("#app_name").val('');
|
||||
$("#marker_url").val('');
|
||||
$("#display_sort").val('');
|
||||
$("input:checkbox[id='is_direct']").attr("checked", false);
|
||||
$("#org_icon_img").val('');
|
||||
$('#load_img').empty();
|
||||
}
|
||||
|
||||
// 수정 - layer열기
|
||||
function app_edit(idx){
|
||||
form_reset();
|
||||
|
||||
$("#bnt_edit").show();
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/etc_section/recommend_app_detail',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
console.log(rtn_json);
|
||||
if(rtn_json.result_code=='0000') {
|
||||
var result = rtn_json.result_data;
|
||||
$("#idx").val(idx);
|
||||
$("#app_name").val(result.app_name);
|
||||
$("#market_url").val(result.market_url);
|
||||
$("#display_sort").val(result.display_sort);
|
||||
if(result.is_direct=='Y') {
|
||||
$("input:checkbox[id='is_direct']").attr("checked", true);
|
||||
}
|
||||
if(result.icon_img!= '') {
|
||||
$("#org_icon_img").val(result.icon_img);
|
||||
$('#load_img').html('<img src="' + result.icon_img + '" width="250"><br /><input type="checkbox" name="is_del_img" value="Y"> 이미지삭제 ');
|
||||
}
|
||||
commonLayerOpen('reg_layer');
|
||||
} else {
|
||||
alert("데이터로드에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 저장
|
||||
function app_reg_proc(mode){
|
||||
if($("#app_name").val()=='') {
|
||||
alert("어플명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#market_url").val()=='') {
|
||||
alert("마켓주소를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#mode").val(mode);
|
||||
|
||||
$("#input_form").attr("action", "/admin/etc_section/recommend_app_reg_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function app_del_proc(idx) {
|
||||
if(confirm("추천앱이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/recommend_app_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function app_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("추천앱이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/recommend_app_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>
|
||||
328
application/views/admin/etc_section/today_word_list.php
Executable file
328
application/views/admin/etc_section/today_word_list.php
Executable file
@@ -0,0 +1,328 @@
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/jquery-ui.min.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
|
||||
<?
|
||||
$menu_code = '63';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/today_word_list/6" enctype="multipart/form-data">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<input type="hidden" id="search_type" name="search_type" value="word">
|
||||
|
||||
|
||||
<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><b>Total:</b> <?=number_format($total_count);?></span>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>성경구절</th>
|
||||
<th>성경본문</th>
|
||||
<th>노출일</th>
|
||||
<th>출력상태</th>
|
||||
<th>관리</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
$i =0;
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="7">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$i=1;
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$word = $val['word'];
|
||||
$title = $val['title'];
|
||||
$display_date = $val['display_date'];
|
||||
$is_display = $val['is_display'];
|
||||
|
||||
$is_display_txt = '';
|
||||
if($is_display == 'Y') $is_display_txt = '<span class="text_blue">ON</span>';
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$word?></td>
|
||||
<td><?=$title?></td>
|
||||
<td><input type="text" name="display_date_<?=$idx?>" id="display_date_<?=$i?>" style="width:100px" size="12" value="<?=$display_date?>" /></td>
|
||||
<td><?=$is_display_txt?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:today_word_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:today_word_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$i++;
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:today_word_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:today_word_add();">오늘의말씀등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="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('reg_layer')" class="pop_close">x</a>
|
||||
<h2>오늘의말씀 등록</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>성경구절</th>
|
||||
<td>
|
||||
<input type="text" name="word" id="word" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>성경본문</th>
|
||||
<td>
|
||||
<input type="text" name="title" id="title" class="input00" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>노출일시</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="display_date" id="display_date" class="type02" size="12" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:today_word_reg_proc('add')" id="btn_add" style="display:none;">신규등록</a>
|
||||
<a href="javascript:today_word_reg_proc('edit')" id="bnt_edit" style="display:none;">수정</a>
|
||||
<a href="javascript:commonLayerClose('reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--// 카테고리 등록/수정 layer -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 등록 - layer 열기
|
||||
function today_word_add() {
|
||||
form_reset();
|
||||
$("#btn_add").show();
|
||||
commonLayerOpen('reg_layer');
|
||||
}
|
||||
|
||||
// form 초기화
|
||||
function form_reset(){
|
||||
$("#bnt_edit").hide();
|
||||
$("#btn_add").hide();
|
||||
|
||||
$("#idx").val('');
|
||||
$("#word").val('');
|
||||
$("#title").val('');
|
||||
$("#display_date").val('');
|
||||
}
|
||||
|
||||
// 수정 - layer열기
|
||||
function today_word_edit(idx){
|
||||
form_reset();
|
||||
|
||||
$("#bnt_edit").show();
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/etc_section/today_word_detail',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
console.log(rtn_json);
|
||||
if(rtn_json.result_code=='0000') {
|
||||
var result = rtn_json.result_data;
|
||||
$("#idx").val(idx);
|
||||
$("#word").val(result.word);
|
||||
$("#title").val(result.title);
|
||||
$("#display_date").val(result.display_date);
|
||||
|
||||
commonLayerOpen('reg_layer');
|
||||
} else {
|
||||
alert("데이터로드에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 저장
|
||||
function today_word_reg_proc(mode){
|
||||
if($("#word").val()=='') {
|
||||
alert("어플명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#market_url").val()=='') {
|
||||
alert("마켓주소를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#display_date").val()!='') {
|
||||
var display_date = new Date($('#display_date').val());
|
||||
var now_date = new Date();
|
||||
now_date.setHours(0, 0, 0, 0);
|
||||
if (display_date < now_date){
|
||||
alert('노출일을 이전으로 등록할수 없습니다.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$("#mode").val(mode);
|
||||
|
||||
$("#input_form").attr("action", "/admin/etc_section/today_word_reg_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function today_word_del_proc(idx) {
|
||||
if(confirm("오늘의말씀이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/today_word_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function today_word_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("오늘의말씀이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/today_word_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);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// jquery datepicker
|
||||
$("#display_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/btn_date.png",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
|
||||
});
|
||||
for(z=1;z<"<?=$i?>";z++) {
|
||||
var datepicker_id = "display_date_"+z;
|
||||
$("#"+datepicker_id).datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/btn_date.png",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true,
|
||||
onSelect: function (dateText, inst) {
|
||||
change_display_date(dateText, inst)
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function change_display_date(dateText, inst){
|
||||
var datepicker_id = inst.id;
|
||||
name = $('#'+datepicker_id).attr('name');
|
||||
var idx = name.replace("display_date_", "");
|
||||
|
||||
var form_data = {
|
||||
"display_date" : dateText,
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/etc_section/today_word_display_date_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>
|
||||
352
application/views/admin/etc_section/weather_list.php
Executable file
352
application/views/admin/etc_section/weather_list.php
Executable file
@@ -0,0 +1,352 @@
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/jquery-ui.min.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
|
||||
<?
|
||||
$menu_code = '65';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$arr_display_status = array();
|
||||
foreach ($display_status_result as $val) {
|
||||
$arr_display_status[$val['display_status']] = $val['cnt'];
|
||||
}
|
||||
|
||||
$use_count = 0; $reservation_count = 0;
|
||||
if(isset($arr_display_status[1])==true) $use_count = $arr_display_status[1];
|
||||
if(isset($arr_display_status[0])==true) $reservation_count = $arr_display_status[0];
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/etc_section/weather_list/6" enctype="multipart/form-data">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<input type="hidden" id="search_display_status" name="search_display_status">
|
||||
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="" <? if($search_type==''){ echo 'selected';}?>>선택</option>
|
||||
<option value="continent" <? if($search_type=='continent'){ echo 'selected';}?>>대륙</option>
|
||||
<option value="country" <? if($search_type=='country'){ echo 'selected';}?>>나라</option>
|
||||
<option value="weather_content" <? if($search_type=='weather_content'){ echo 'selected';}?>>날씨코멘트</option>
|
||||
<option value="reg_date" <? if($search_type=='reg_date'){ echo 'selected';}?>>등록일시</option>
|
||||
<option value="news_title" <? if($search_type=='news_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_table">
|
||||
<span><a href="javascript:click_search()"><b>Total:</b> <?=number_format($total_count);?></a></span>
|
||||
<span style="margin-left: 10px"><a href="javascript:click_search('1')" class="text_blue"><b>출력중:</b> <?=number_format($use_count);?></a></span>
|
||||
<span style="margin-left: 10px"><a href="javascript:click_search('0')" class="text_red"><b>예약중:</b> <?=number_format($reservation_count);?></a></span>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>순위</th>
|
||||
<th>대륙</th>
|
||||
<th>나라</th>
|
||||
<th>날씨</th>
|
||||
<th>코멘트</th>
|
||||
<th>등록일시</br>(예약일)</th>
|
||||
<th>관련뉴스</th>
|
||||
<th>출력상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="11">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$i=1;
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$rank = $val['rank'];
|
||||
$continent = $val['continent'];
|
||||
$country = $val['country'];
|
||||
$weather_icon = $val['weather_icon'];
|
||||
$weather_content= $val['weather_content'];
|
||||
$display_date = $val['display_date'];
|
||||
$display_status = $val['display_status'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$news_title = $val['news_title'];
|
||||
$news_idx = $val['news_idx'];
|
||||
|
||||
$display_date_txt = '';
|
||||
if($display_status == '0') {
|
||||
$display_date_txt = '</br><span class="text_green">('.$display_date.')</span>';
|
||||
}
|
||||
|
||||
$arr_news_title = explode("||||", $news_title);
|
||||
if(count($arr_news_title) > 1) $news_title = $arr_news_title[0].' 외 '.(count($arr_news_title)-1).'개';
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><?=$continent?></td>
|
||||
<td><?=$country?></td>
|
||||
<td><img src="<?=$weather_icon?>" width="50"></td>
|
||||
<td><?=$weather_content?></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></td>
|
||||
<td><a href="/web/news/news_view/<?=$news_idx?>" target="_blank"><?=$news_title?></a></td>
|
||||
<td>
|
||||
<? if($display_status == '0') {?>
|
||||
<select name="display_status_<?=$idx?>" id="display_status_<?=$idx?>" onchange="change_display_status(this);">
|
||||
<option value="1" <? if($display_status=='1') { echo 'selected';}?>>출력</option>
|
||||
<option value="0" <? if($display_status=='0') { echo 'selected';}?>>예약</option>
|
||||
</select>
|
||||
<? } else if($display_status == '1') {
|
||||
echo '<span class="text_blue">출력</span>';
|
||||
} else {
|
||||
echo '';
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:weather_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:weather_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$i++;
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:weather_icon_add();">날씨아이콘등록</a>
|
||||
<a href="javascript:weather_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:weather_list_reg();">송출관리</a>
|
||||
<a href="javascript:weather_add();">영적기상도등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="icon_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('icon_reg_layer')" class="pop_close">x</a>
|
||||
<h2>날씨아이콘</h2>
|
||||
<table>
|
||||
<tr style="height:50px">
|
||||
<th>아이콘리스트</th>
|
||||
<td class="tl">
|
||||
<div class="icon_list" style="overflow-y: scroll; height:150px;">
|
||||
<? foreach ($weather_icon_list as $val) {?>
|
||||
<a href="javascript:;" class="por">
|
||||
<img src="<?=$val['weather_icon']?>" alt=""/>
|
||||
</a>
|
||||
<? }?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>아이콘첨부</th>
|
||||
<td class="tl">
|
||||
<input type="file" name="weather_icon" id="weather_icon" class="input00" size="30" >
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:weather_icon_add_proc()">신규등록</a>
|
||||
<a href="javascript:commonLayerClose('icon_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#search_type").val()=='reg_date') {
|
||||
if(check_date($("#search_keyword").val())==false) {
|
||||
alert("날짜를 정확히 입력해주세요. (YYYY-MM-DD)");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 날짜체크
|
||||
function check_date(val){
|
||||
var regexp= /^\d{4}-\d{2}-\d{2}$/;
|
||||
if( !regexp.test(val) ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function click_search(status){
|
||||
$("#search_display_status").val(status);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 송출관리
|
||||
function weather_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/etc_section/weather_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// add
|
||||
function weather_add(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/etc_section/weather_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function weather_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/etc_section/weather_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function weather_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/etc_section/weather_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function weather_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/etc_section/weather_reg_arr_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 날씨아이콘등록
|
||||
function weather_icon_add(){
|
||||
commonLayerOpen('icon_reg_layer');
|
||||
}
|
||||
|
||||
|
||||
function weather_icon_add_proc(){
|
||||
var weather_icon = $("#weather_icon").val();
|
||||
if(weather_icon=='') {
|
||||
alert("아이콘을 등록해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").attr("action", "/admin/etc_section/weather_icon_add_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 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_display_status(t){
|
||||
var val = t.value;
|
||||
var select_id = t.id;
|
||||
var idx = select_id.replace("display_status_", "");
|
||||
|
||||
var form_data = {
|
||||
"display_status" : val,
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/etc_section/weather_display_status_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>
|
||||
396
application/views/admin/etc_section/weather_list_reg.php
Executable file
396
application/views/admin/etc_section/weather_list_reg.php
Executable file
@@ -0,0 +1,396 @@
|
||||
<?php
|
||||
include_once ("./static_data/continent.php");
|
||||
|
||||
$menu_code = '65';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
|
||||
$arr_weather_rank = array();
|
||||
foreach ($arr_weather as $val) {
|
||||
$arr_weather_rank[$val['rank']] = array('continent'=> $val['continent'], 'country'=> $val['country'],'weather_icon'=>$val['weather_icon'], 'weather_content'=>$val['weather_content'], 'display_date'=>$val['display_date'], 'display_status'=>$val['display_status'], 'is_auto_setting'=>$val['is_auto_setting'], 'tag'=>$val['tag']);
|
||||
}
|
||||
|
||||
$arr_relation_article_rank = array();
|
||||
foreach ($arr_relation_article as $val) {
|
||||
$arr_relation_article_rank[$val['rank']][] = array('title'=> $val['title'], 'relation_article_idx'=> $val['idx']);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/weather_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_display_status" name="search_display_status" value="<?=$search_display_status?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="rank" name="rank">
|
||||
|
||||
|
||||
<span class="text_blue"><b>* 모바일과 공통 송출관리</b></span>
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
|
||||
|
||||
<?
|
||||
for($z=1;$z<=10;$z++) {
|
||||
|
||||
$continent = '';
|
||||
$country = '';
|
||||
$weather_icon = '';
|
||||
$weather_content = '';
|
||||
$tag = '';
|
||||
$is_auto_setting = 'Y';
|
||||
$continent_key = '';
|
||||
if(isset($arr_weather_rank[$z])== true) {
|
||||
$continent = $arr_weather_rank[$z]['continent'];
|
||||
$country = $arr_weather_rank[$z]['country'];
|
||||
$weather_icon = $arr_weather_rank[$z]['weather_icon'];
|
||||
$weather_content = $arr_weather_rank[$z]['weather_content'];
|
||||
$weather_content = htmlspecialchars($weather_content);
|
||||
$tag = $arr_weather_rank[$z]['tag'];
|
||||
$tag = str_replace(" ", ",", $tag);
|
||||
$is_auto_setting = $arr_weather_rank[$z]['is_auto_setting'];
|
||||
|
||||
$continent_key_tmp = array_keys($arr_continent1, $continent);
|
||||
$continent_key = $continent_key_tmp[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th rowspan="6"><?=$z?>위</th>
|
||||
<td class="tl">
|
||||
<select name="continent<?=$z?>" id="continent<?=$z?>" onchange="change_continent(this.value, '<?=$z?>')">
|
||||
<option value="">대륙선택</option>
|
||||
<? foreach ($arr_continent1 as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($continent==$val) { echo 'selected';}?>><?=$val?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="tl">
|
||||
<select name="country<?=$z?>" id="country<?=$z?>">
|
||||
<option value="">나라선택</option>
|
||||
<? if(isset($arr_continent2[$continent_key])==true) {
|
||||
foreach ($arr_continent2[$continent_key] as $val) {
|
||||
?>
|
||||
<option value="<?=$val?>" <? if($country==$val) { echo 'selected';}?>><?=$val?></option>
|
||||
<? }
|
||||
|
||||
}?>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
날씨아이콘
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="view_icon('<?=$z?>');" style="cursor: pointer;">선택하기</button>
|
||||
<input type="hidden" name="weather_icon<?=$z?>" id="weather_icon<?=$z?>" value="<?=$weather_icon?>">
|
||||
<div id="icon_img<?=$z?>">
|
||||
<? if($weather_icon!='') { ?>
|
||||
<img src="<?=$weather_icon?>" width="50px">
|
||||
<? } ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="weather_content<?=$z?>" id="weather_content<?=$z?>" value="<?=$weather_content?>" placeholder="날씨코멘트">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="tag<?=$z?>" id="tag<?=$z?>" class="type01" value="<?=$tag?>"> 최대 5개까지 입력 가능(,로 구분해주세요.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">관련뉴스
|
||||
<input type="radio" name="is_auto_setting<?=$z?>" id="is_auto_setting<?=$z?>" onclick="click_relation_news_auto_setting('Y', '<?=$z?>');" value="Y" <? if($is_auto_setting=='Y') { echo 'checked';}?>> 자동설정
|
||||
<input type="radio" name="is_auto_setting<?=$z?>" id="is_auto_setting<?=$z?>" onclick="click_relation_news_auto_setting('N', '<?=$z?>');" value="N" <? if($is_auto_setting=='N') { echo 'checked';}?>> 수정설정
|
||||
<div class="two_box_type01 clearfix" id="no_auto_setting_content<?=$z?>" style="display:none; margin-top:10px;">
|
||||
<div class="con">
|
||||
<div class="searh_area fn mb10">
|
||||
<input type="text" name="article_keyword<?=$z?>" id="article_keyword<?=$z?>" class="input00" size="20" placeholder="검색어 입력" onkeypress="if( event.keyCode==13 ){search_article('<?=$z?>');}">
|
||||
<a href="javascript:search_article('<?=$z?>');" 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<?=$z?>" id="article_sort<?=$z?>" value="1" onclick="search_article('<?=$z?>');" checked> 최신순
|
||||
<input type="radio" name="article_sort<?=$z?>" id="article_sort<?=$z?>" value="2" onclick="search_article('<?=$z?>');"> 오래된순
|
||||
|
||||
검색결과 <span class="mark" id="result_count<?=$z?>">0</span>건
|
||||
</div>
|
||||
<div class="list scs">
|
||||
<ul id="result<?=$z?>">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="con">
|
||||
<h3 class="mb10">선택된 뉴스 항목</h3>
|
||||
<div class="list type02 scs">
|
||||
<ul id="selected_news<?=$z?>">
|
||||
<?
|
||||
if(isset($arr_relation_article_rank[$z])==true) {
|
||||
$i=1;
|
||||
foreach ($arr_relation_article_rank[$z] as $val) {
|
||||
?>
|
||||
<li><input type="checkbox" name="relation_idxs<?=$z?>[]" id="relation_idx<?=$z?>_<?=$i?>" value="<?=$val['relation_article_idx']?>" onclick="delete_article('<?=$i?>', '<?=$z?>');" checked><a href="/web/news/news_view/<?=$val['relation_article_idx']?>" target="_blank"><?=$val['title']?></a></li>
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?
|
||||
|
||||
if($is_auto_setting=='N') {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$("#no_auto_setting_content<?=$z?>").show();
|
||||
</script>
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:weather_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/etc_section/weather_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_display_status=<?=$search_display_status?>">목록으로</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="icon_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('icon_reg_layer')" class="pop_close">x</a>
|
||||
<h2>채널아이콘</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width:150px">아이콘선택</th>
|
||||
<td class="tl">
|
||||
<div class="icon_list" style="overflow-y: scroll; height:150px;">
|
||||
<? foreach ($weather_icon_list as $val) {?>
|
||||
<a href="#;" class="por">
|
||||
<input type="radio" name="sel_weather_icon" id="sel_weather_icon" class="stebox" value="<?=$val['weather_icon']?>">
|
||||
<img src="<?=$val['weather_icon']?>" width="50px" />
|
||||
</a>
|
||||
<? }?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:select_weather_icon('add')">적용하기</a>
|
||||
<a href="javascript:commonLayerClose('icon_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// 대륙변경
|
||||
function change_continent(val, rank){
|
||||
var json_category = '<?=json_encode($arr_continent2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#country'+rank).empty();
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#country'+rank).append(option);
|
||||
for(key in json_category[val]) {
|
||||
option = $("<option value='"+json_category[val][key]+"'>"+json_category[val][key]+"</option>");
|
||||
$('#country'+rank).append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 아이콘 보기
|
||||
function view_icon(rank){
|
||||
$("#rank").val(rank);
|
||||
commonLayerOpen('icon_reg_layer')
|
||||
|
||||
}
|
||||
|
||||
// 아이콘 적용
|
||||
function select_weather_icon(){
|
||||
var weather_icon = $("input[type=radio][id=sel_weather_icon]:checked").val();
|
||||
var rank = $("#rank").val();
|
||||
|
||||
if(weather_icon == '' || weather_icon == undefined) {
|
||||
alert("적용할 아이콘이 없습니다.");
|
||||
} else {
|
||||
$("#weather_icon"+rank).val(weather_icon);
|
||||
$("#icon_img"+rank).empty();
|
||||
$("#icon_img"+rank).html('<img src="'+weather_icon+'" width="50px">');
|
||||
}
|
||||
|
||||
commonLayerClose('icon_reg_layer')
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 관련뉴스검색
|
||||
function click_relation_news_auto_setting(type, rank){
|
||||
$("#rank").val(rank);
|
||||
if(type == 'Y') {
|
||||
$("#no_auto_setting_content"+rank).hide();
|
||||
} else {
|
||||
$("#no_auto_setting_content"+rank).show();
|
||||
$("#article_keyword"+rank).focus();
|
||||
}
|
||||
}
|
||||
|
||||
function search_article(rank){
|
||||
$("#rank").val(rank);
|
||||
|
||||
var article_keyword = $("#article_keyword"+rank).val();
|
||||
var article_sort = $(":input:radio[name=article_sort"+rank+"]:checked").val();
|
||||
|
||||
if(article_keyword == '') {
|
||||
alert("검색어를 입력해주세요");
|
||||
return false;
|
||||
}
|
||||
var form_data = {
|
||||
"content_type" : "1",
|
||||
"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'+rank).html(rtnJson.result_data.count);
|
||||
$('#result'+rank).empty();
|
||||
|
||||
|
||||
|
||||
if(rtnJson.result_data.count == 0) {
|
||||
$('#result'+rank).html("<li>검색된 내용이 없습니다.</li>");
|
||||
} else {
|
||||
for(key in data) {
|
||||
var title = data[key]['title'];
|
||||
title = title.replace(/'/g, "'");
|
||||
title = title.replace(/"/g, '"');
|
||||
|
||||
$('#result'+rank).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 rank = $("#rank").val();
|
||||
var index = ($("input[name=\"relation_idxs"+rank+"[]\"]").length)+1;
|
||||
$('#selected_news'+rank).append('<li><input type="checkbox" name="relation_idxs'+rank+'[]" id="relation_idx'+rank+'_'+index+'" value="'+idx+'" onclick="delete_article('+index+', '+rank+');"> <a href="/web/news/news_view/'+idx+'" target="_blank">'+title+'</a></li>');
|
||||
$("input[name='relation_idxs"+rank+"[]'][value=" + idx + "]").attr("checked", true);
|
||||
}
|
||||
|
||||
function delete_article(idx, rank) {
|
||||
$("#rank").val(rank);
|
||||
var checkbox_id = 'relation_idx'+rank+'_'+idx;
|
||||
if($('input:checkbox[id=checkbox_id]').is(":checked") == false){
|
||||
$("#"+checkbox_id).parent().remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function weather_list_reg_proc(){
|
||||
for(i=1;i<=10;i++) {
|
||||
if($("#continent"+i).val()!='') {
|
||||
if($("#country"+i).val()==''){
|
||||
alert("나라를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#weather_icon"+i).val()=='') {
|
||||
alert("날씨아이콘을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#weather_content"+i).val()=='') {
|
||||
alert("날씨코멘트를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var is_auto_setting = $("input[type=radio][id=is_auto_setting"+i+"]:checked").val();
|
||||
if(is_auto_setting == 'Y' && $("#tag"+i).val()=='') {
|
||||
alert("관련뉴스를 자동설정 하시려면 tag가 필요합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 아이콘 이미지 선택
|
||||
$(".icon_list a").click(function(){
|
||||
$(".icon_list a").removeClass("on");
|
||||
$(this).addClass("on");
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
408
application/views/admin/etc_section/weather_reg.php
Executable file
408
application/views/admin/etc_section/weather_reg.php
Executable file
@@ -0,0 +1,408 @@
|
||||
<?php
|
||||
include_once ("./static_data/continent.php");
|
||||
|
||||
if($mode=='edit') {
|
||||
$continent = $result['continent'];
|
||||
$country = $result['country'];
|
||||
$weather_icon = $result['weather_icon'];
|
||||
$weather_content = $result['weather_content'];
|
||||
$weather_content = htmlspecialchars($weather_content);
|
||||
$reg_date = $result['reg_date'];
|
||||
$display_status = $result['display_status'];
|
||||
$display_date = $result['display_date'];
|
||||
$tag = $result['tag'];
|
||||
$tag = str_replace(" ", ",", $tag);
|
||||
$is_auto_setting = $result['is_auto_setting'];
|
||||
$rank = $result['rank'];
|
||||
|
||||
$continent_key_tmp = array_keys($arr_continent1, $continent);
|
||||
$continent_key = $continent_key_tmp[0];
|
||||
} else {
|
||||
$continent = '';
|
||||
$country = '';
|
||||
$weather_icon = '';
|
||||
$weather_content = '';
|
||||
$display_status = '';
|
||||
$display_date = date("Y-m-d");
|
||||
$tag = '';
|
||||
$is_auto_setting = 'Y';
|
||||
$rank = '';
|
||||
$arr_relation_article = array();
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '65';
|
||||
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>
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/etc_section/weather_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="search_display_status" name="search_display_status" value="<?=$search_display_status?>">
|
||||
<input type="hidden" id="mode" name="mode" value="<?=$mode?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="key" name="key">
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle">영적기상도 등록</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>대륙</th>
|
||||
<td class="tl">
|
||||
<select name="continent" id="continent" onchange="change_continent(this.value)">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($arr_continent1 as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($continent==$val) { echo 'selected';}?>><?=$val?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>나라</th>
|
||||
<td class="tl">
|
||||
<select name="country" id="country">
|
||||
<option value="">선택</option>
|
||||
<? if(isset($arr_continent2[$continent_key])==true) {
|
||||
foreach ($arr_continent2[$continent_key] as $val) {
|
||||
?>
|
||||
<option value="<?=$val?>" <? if($country==$val) { echo 'selected';}?>><?=$val?></option>
|
||||
<? }
|
||||
|
||||
}?>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>날씨아이콘</th>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="view_icon();" style="cursor: pointer;">선택하기</button>
|
||||
<input type="hidden" name="weather_icon" id="weather_icon" value="<?=$weather_icon?>">
|
||||
<div id="icon_img">
|
||||
<? if($weather_icon!='') { ?>
|
||||
<img src="<?=$weather_icon?>" width="50px">
|
||||
<? } ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>날씨코멘트</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="weather_content" id="weather_content" value="<?=$weather_content?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>순위</th>
|
||||
<td class="tl">
|
||||
<select name="rank" id="rank">
|
||||
<option value="">선택</option>
|
||||
<? for ($i=1; $i<=10; $i++) {?>
|
||||
<option value="<?=$i?>" <? if($rank==$i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등록일시</th>
|
||||
<td class="tl">
|
||||
<? if($mode=='add' || $display_status == '0') {?>
|
||||
<input type="text" name="display_date" id="display_date" value="<?=$display_date?>" class="type02" size="10">
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<?=$reg_date?>
|
||||
|
||||
<?}?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>태그</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="tag" id="tag" class="type01" value="<?=$tag?>"> 최대 5개까지 입력 가능(,로 구분해주세요.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>관련뉴스</th>
|
||||
<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:none; 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/news_view/<?=$val['relation_article_idx']?>" target="_blank"><?=$val['title']?></a></li>
|
||||
<?
|
||||
$i++;
|
||||
} ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:weather_reg_proc();">저장하기</a>
|
||||
<a href="/admin/etc_section/weather_list/6/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_display_status=<?=$search_display_status?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="icon_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('icon_reg_layer')" class="pop_close">x</a>
|
||||
<h2>채널아이콘</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width:150px">아이콘선택</th>
|
||||
<td class="tl">
|
||||
<div class="icon_list" style="overflow-y: scroll; height:150px;">
|
||||
<? foreach ($weather_icon_list as $val) {?>
|
||||
<a href="#;" class="por">
|
||||
<input type="radio" name="sel_weather_icon" id="sel_weather_icon" class="stebox" value="<?=$val['weather_icon']?>">
|
||||
<img src="<?=$val['weather_icon']?>" width="50px" />
|
||||
</a>
|
||||
<? }?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:select_weather_icon('add')">적용하기</a>
|
||||
<a href="javascript:commonLayerClose('icon_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<? if($is_auto_setting=='N') {?>
|
||||
$("#no_auto_setting_content").show();
|
||||
<? }?>
|
||||
// 대륙변경
|
||||
function change_continent(val){
|
||||
var json_category = '<?=json_encode($arr_continent2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#country').empty();
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#country').append(option);
|
||||
for(key in json_category[val]) {
|
||||
option = $("<option value='"+json_category[val][key]+"'>"+json_category[val][key]+"</option>");
|
||||
$('#country').append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 아이콘 보기
|
||||
function view_icon(){
|
||||
commonLayerOpen('icon_reg_layer')
|
||||
|
||||
}
|
||||
|
||||
// 아이콘 적용
|
||||
function select_weather_icon(){
|
||||
var weather_icon = $("input[type=radio][id=sel_weather_icon]:checked").val();
|
||||
|
||||
if(weather_icon == '' || weather_icon == undefined) {
|
||||
alert("적용할 아이콘이 없습니다.");
|
||||
} else {
|
||||
$("#weather_icon").val(weather_icon);
|
||||
$("#icon_img").empty();
|
||||
$("#icon_img").html('<img src="'+weather_icon+'" width="50px">');
|
||||
}
|
||||
|
||||
commonLayerClose('icon_reg_layer')
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 관련뉴스검색
|
||||
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_NEWS_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/news_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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 저장
|
||||
function weather_reg_proc(){
|
||||
if($("#continent").val()==''){
|
||||
alert("대륙을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#country").val()==''){
|
||||
alert("나라를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#weather_icon").val()=='') {
|
||||
alert("날씨이미지를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#weather_content").val()=='') {
|
||||
alert("날씨코멘트를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#rank").val()=='') {
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 아이콘 이미지 선택
|
||||
$(".icon_list a").click(function(){
|
||||
$(".icon_list a").removeClass("on");
|
||||
$(this).addClass("on");
|
||||
});
|
||||
|
||||
|
||||
// jquery datepicker
|
||||
$("#display_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/admin/btn_date.jpg",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
|
||||
});
|
||||
$('img.ui-datepicker-trigger').css({'cursor':'pointer', 'width':'30px'}); //아이콘(icon) 위치
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
190
application/views/admin/life/life_category_list.php
Executable file
190
application/views/admin/life/life_category_list.php
Executable file
@@ -0,0 +1,190 @@
|
||||
<?
|
||||
$menu_code = '521';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/life/life_category_list/5">
|
||||
<input type="hidden" id="category_idx" name="category_idx">
|
||||
<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);?>
|
||||
<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>
|
||||
<table>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>등록채널 수</th>
|
||||
<th>등록에디터 수</th>
|
||||
<th>등록 글 수</th>
|
||||
<th>조회수</th>
|
||||
<th>노출순서</th>
|
||||
<th>생성일자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="9">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$category_name = $val['category_name'];
|
||||
$channel_count = $val['channel_count'];
|
||||
$editor_count = $val['editor_count'];
|
||||
$article_count = $val['article_count'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$display_sort = $val['display_sort'];
|
||||
$reg_date = $val['reg_date'];
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$category_name?></td>
|
||||
<td><?=number_format($channel_count, 0)?></td>
|
||||
<td><?=number_format($editor_count, 0)?></td>
|
||||
<td><?=number_format($article_count, 0)?></td>
|
||||
<td><?=number_format($hit_count, 0)?></td>
|
||||
<td><?=number_format($display_sort, 0)?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:category_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
|
||||
<a href="javascript:commonLayerOpen('category_reg_layer');">카테고리등록</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
<tr>
|
||||
<th>출력순서</th>
|
||||
<td><input type="text" name="display_sort" id="display_sort"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:category_add_proc('add')">신규등록</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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 카테고리 등록
|
||||
function category_add_proc(){
|
||||
var category_name = $("#category_name").val();
|
||||
var display_sort = $("#display_sort").val();
|
||||
if(category_name=='') {
|
||||
alert("카테고리명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"category_name" : category_name,
|
||||
"display_sort" : display_sort
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/life/life_category_add_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(idx) {
|
||||
if(confirm("회원이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#category_idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_category_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
204
application/views/admin/life/life_channel_list.php
Executable file
204
application/views/admin/life/life_channel_list.php
Executable file
@@ -0,0 +1,204 @@
|
||||
<?
|
||||
$menu_code = '522';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/life/life_channel_list/5" enctype="multipart/form-data">
|
||||
<input type="hidden" id="search_type" name="search_type" value="channel_name">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
|
||||
|
||||
<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" style="margin-top: 30px">
|
||||
<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>
|
||||
<span style="margin-left: 5px"><input type="radio" name="sort" value="3" <? if($sort=='3') { echo 'checked';}?> onclick="check_search();"> 조회수순</span>
|
||||
<div class="searh_area">
|
||||
<select name="search_category" onchange="check_search();">
|
||||
<option value="">전체</option>
|
||||
<? foreach($category_list as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($search_category==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<th>번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>채널아이콘</th>
|
||||
<th>채널명</th>
|
||||
<th>등록에디터 수</th>
|
||||
<th>등록 글 수</th>
|
||||
<th>조회수</th>
|
||||
<th>생성일자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="9">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$category_idx = $val['category_idx'];
|
||||
$category_name = $val['category_name'];
|
||||
$channel_icon = $val['channel_icon'];
|
||||
$channel_name = $val['channel_name'];
|
||||
$editor_count = $val['editor_count'];
|
||||
$article_count = $val['article_count'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><a href="/admin/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name?>"><?=$category_name?></a></td>
|
||||
<td><img src="<?=$channel_icon?>" width="40px"></td>
|
||||
<td><a href="/admin/member/editor_list/4?$search_category_code1=<?=$category_idx?>&search_category_code2=<?=$idx?>"><?=$channel_name?></a></td>
|
||||
<td><?=number_format($editor_count)?></td>
|
||||
<td><?=number_format($article_count)?></td>
|
||||
<td><?=number_format($hit_count)?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:channel_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:channel_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:channel_icon_add();">채널아이콘등록</a>
|
||||
<a href="/admin/life/life_channel_reg/5">채널등록</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="icon_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('icon_reg_layer')" class="pop_close">x</a>
|
||||
<h2>채널아이콘</h2>
|
||||
<table>
|
||||
<tr style="height:50px">
|
||||
<th>아이콘리스트</th>
|
||||
<td class="tl">
|
||||
<div class="icon_list" style="overflow-y: scroll; height:150px;">
|
||||
<? foreach ($channel_icon_list as $val) {?>
|
||||
<a href="javascript:;" class="por">
|
||||
<img src="<?=$val['channel_icon']?>" alt=""/>
|
||||
</a>
|
||||
<? }?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>아이콘첨부</th>
|
||||
<td class="tl">
|
||||
<input type="file" name="channel_icon" id="channel_icon" class="input00" size="30" >
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:channel_icon_add_proc()">신규등록</a>
|
||||
<a href="javascript:commonLayerClose('icon_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function channel_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/life/life_channel_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 채널아이콘등록
|
||||
function channel_icon_add(){
|
||||
commonLayerOpen('icon_reg_layer');
|
||||
}
|
||||
|
||||
function channel_icon_add_proc(){
|
||||
var channel_icon = $("#channel_icon").val();
|
||||
if(channel_icon=='') {
|
||||
alert("아이콘을 등록해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").attr("action", "/admin/life/life_channel_icon_add_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function channel_del_proc(idx) {
|
||||
$("#idx").val(idx);
|
||||
if(confirm("채널을 삭제하면 하위글도 모두 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#category_idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_channel_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
235
application/views/admin/life/life_channel_reg.php
Executable file
235
application/views/admin/life/life_channel_reg.php
Executable file
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
$category_idx = $search_category;
|
||||
$channel_name = '';
|
||||
$channel_intro = '';
|
||||
$channel_icon = '';
|
||||
$main_img = '';
|
||||
if($mode=='edit') {
|
||||
$category_idx = $result[0]['category_idx'];
|
||||
$channel_name = $result[0]['channel_name'];
|
||||
$channel_intro = $result[0]['channel_intro'];
|
||||
$channel_intro = htmlspecialchars($channel_intro);
|
||||
$channel_icon = $result[0]['channel_icon'];
|
||||
$main_img = $result[0]['main_img'];
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '52';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
<link href="/css/admin/multi-select.css" media="screen" rel="stylesheet" type="text/css">
|
||||
<script src="/js/admin/jquery.multi-select.js" type="text/javascript"></script>
|
||||
<script src="/js/admin/jquery.quicksearch.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/life/life_channel_reg_proc" enctype="multipart/form-data">
|
||||
<input type="hidden" id="mode" name="mode" value="<?=$mode?>">
|
||||
<input type="hidden" id="idx" name="idx" value="<?=$idx?>">
|
||||
<input type="hidden" id="editor_count" name="editor_count" value="<?=$editor_count?>">
|
||||
<input type="hidden" id="editor_val" name="editor_val" value="">
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<th>카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category_idx" id="category_idx">
|
||||
<option value="">선택</option>
|
||||
<? foreach($category_list as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_idx==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널명</th>
|
||||
<td class="tl"><input type="text" name="channel_name" id="channel_name" class="type01" size="100" value="<?=$channel_name?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>한줄소개</th>
|
||||
<td class="tl"><input type="text" name="channel_intro" id="channel_intro" class="input00" size="100" value="<?=$channel_intro?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>체널아이콘</th>
|
||||
<td class="tl">
|
||||
<button type="button" class="btn_black" style="width:100px" onclick="view_channel_icon();" style="cursor: pointer;">선택하기</button>
|
||||
<input type="hidden" name="channel_icon" id="channel_icon" value="<?=$channel_icon?>">
|
||||
<div id="icon_img">
|
||||
<? if($channel_icon!='') { ?>
|
||||
<img src="<?=$channel_icon?>" width="100px">
|
||||
<? } ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>대문이미지</th>
|
||||
<td class="tl">
|
||||
<? if($main_img!='') { ?>
|
||||
<input type="checkbox" name="is_del_main_img" value="Y">삭제
|
||||
<input type="hidden" name="org_main_img" value="<?=$main_img?>">
|
||||
<img src="<?=$main_img?>" width="100px"></br>
|
||||
<? } ?>
|
||||
<input type="file" name="main_img" id="main_img" class="input00">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>에디터등록</th>
|
||||
<td class="tl">
|
||||
<div style="border:solid 0px #5362a4;width:45%;float:left;">
|
||||
<select multiple="multiple" id="editor" name="editor[]">
|
||||
<? foreach($editor_all_list as $val) {?>
|
||||
<option value="<?=$val['idx']?>"><?=$val['partner_name']?>(<?=$val['partner_id']?>)</option>
|
||||
<? }?>
|
||||
<? foreach($channel_editor_list as $val) {?>
|
||||
<option value="<?=$val['idx']?>" selected><?=$val['partner_name']?>(<?=$val['partner_id']?>)</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:channel_reg_proc();">저장하기</a>
|
||||
<a href="/admin/life/life_channel_list/5/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_category=<?=$search_category?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="icon_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('icon_reg_layer')" class="pop_close">x</a>
|
||||
<h2>채널아이콘</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>아이콘선택</th>
|
||||
<td class="tl">
|
||||
<div class="icon_list" style="overflow-y: scroll; height:150px;">
|
||||
<? foreach ($channel_icon_list as $val) {?>
|
||||
<a href="#;" class="por">
|
||||
<input type="radio" name="sel_channel_icon" id="sel_channel_icon" class="stebox" value="<?=$val['channel_icon']?>">
|
||||
<img src="<?=$val['channel_icon']?>" alt=""/>
|
||||
</a>
|
||||
|
||||
<? }?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:select_channel_icon('add')">적용하기</a>
|
||||
<a href="javascript:commonLayerClose('icon_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var editor_num = new Array();
|
||||
|
||||
$('#editor').multiSelect({
|
||||
selectableHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='이름 or 아이디' style='padding: 10px;margin-left: 5px; width:280px;'>",
|
||||
selectionHeader: "<div style='height:37px;text-align:right;width:280px'>에디터: <span id='edit_count_txt'><?=number_format($editor_count)?></span>, 등록글수: <?=number_format($article_count)?></div>",
|
||||
afterInit: function(ms){
|
||||
var that = this,
|
||||
$selectableSearch = that.$selectableUl.prev(),
|
||||
selectableSearchString = '#'+that.$container.attr('id')+' .ms-elem-selectable:not(.ms-selected)';
|
||||
|
||||
that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
|
||||
.on('keydown', function(e){
|
||||
if (e.which === 40){
|
||||
that.$selectableUl.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
afterSelect: function(e){
|
||||
this.qs1.cache();
|
||||
var new_editor_count = parseInt($("#editor_count").val())+1;
|
||||
$("#editor_count").val(new_editor_count);
|
||||
$("#edit_count_txt").html(new_editor_count);
|
||||
|
||||
$('#editor').find('option[value="'+e[0]+'"]').prop('selected', true);
|
||||
},
|
||||
afterDeselect: function(e){
|
||||
this.qs1.cache();
|
||||
var new_editor_count = parseInt($("#editor_count").val())-1;
|
||||
$("#editor_count").val(new_editor_count);
|
||||
$("#edit_count_txt").html(new_editor_count);
|
||||
$('#editor').find('option[value="'+e[0]+'"]').prop('selected', false);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 아이콘 보기
|
||||
function view_channel_icon(){
|
||||
commonLayerOpen('icon_reg_layer')
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 아이콘 적용
|
||||
function select_channel_icon(){
|
||||
var channel_icon = $("input[type=radio][id=sel_channel_icon]:checked").val();
|
||||
$("#channel_icon").val(channel_icon);
|
||||
$("#icon_img").empty();
|
||||
$("#icon_img").html('<img src="'+channel_icon+'" width="40">');
|
||||
commonLayerClose('icon_reg_layer')
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 채널추가
|
||||
function channel_reg_proc(){
|
||||
if($("#category_idx").val()=='') {
|
||||
alert("카테고리를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#channel_name").val()=='') {
|
||||
alert("채널명을 등록해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$('.ms-selection').find('.ms-list').find('li.ms-selected span').each(function(e, val){
|
||||
$('#editor option').each(function(i, v){
|
||||
if($(v).text() == $(val).text()) {
|
||||
editor_num[e] = $(v).val();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#editor_val').val(editor_num.join(','));
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(".icon_list a").click(function(){
|
||||
$(".icon_list a").removeClass("on");
|
||||
$(this).addClass("on");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
199
application/views/admin/life/life_comment_list.php
Executable file
199
application/views/admin/life/life_comment_list.php
Executable file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
if($search_comment_type == 'Y') {
|
||||
$menu_code = '562';
|
||||
} else {
|
||||
$menu_code = '561';
|
||||
}
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/life/life_comment_list/5">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="page" name="search_comment_type" value="<?=$search_comment_type?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
<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?>">
|
||||
|
||||
<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/life/life_comment_list/5?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_life_type" onchange="check_search();">
|
||||
<option value="">기능별</option>
|
||||
<? foreach ($def_arr_life_type as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_life_type==$key){ echo 'selected';}?>><?=$val?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
|
||||
|
||||
<select name="search_theme_type" onchange="check_search();">
|
||||
<option value="">테마별</option>
|
||||
<? foreach ($def_arr_life_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'];
|
||||
$title = $val['title'];
|
||||
$life_type = $val['life_type'];
|
||||
$theme_types = $val['theme_types'];
|
||||
$comment = $val['comment'];
|
||||
$content_idx = $val['content_idx'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$is_best = $val['is_best'];
|
||||
$content_idx = $val['content_idx'];
|
||||
$best_txt = '';
|
||||
if($is_best == 'Y') {
|
||||
$best_txt = '[best]';
|
||||
}
|
||||
|
||||
$category_name = $category_name1;
|
||||
if($category_name2!='') $category_name.= '> '.$category_name2;
|
||||
|
||||
$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:60px" onclick="location.href='/admin/life/life_reg/5?mode=edit&idx=<?=$content_idx?>'" style="cursor: pointer;">글보기</button>
|
||||
<button type="button" class="btn_s_blue" style="width:40px" onclick="life_comment_del_proc('<?=$idx?>');" style="cursor: pointer;">삭제</button>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<a href="/web/life/life_view/<?=$content_idx?>" target="_blank">[<?=$category_name?>]</br><?=$title?></a>
|
||||
</td>
|
||||
<td style="text-align:right"><?=$def_arr_life_type[$life_type]?></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 life_comment_del_proc(idx) {
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_comment_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
337
application/views/admin/life/life_list.php
Executable file
337
application/views/admin/life/life_list.php
Executable file
@@ -0,0 +1,337 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
foreach ($arr_category1 as $key=>$val) {
|
||||
$arr_category_add1[] = array('category_code'=>$val['idx'], 'category_name'=>$val['category_name']);
|
||||
}
|
||||
|
||||
foreach ($arr_category2 as $key=>$val) {
|
||||
$arr_category_add2[$val['category_idx']][] = array('category_code'=>$val['idx'], 'category_name'=>$val['channel_name']);
|
||||
}
|
||||
|
||||
$menu_code = '53';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
|
||||
# 에디터체크
|
||||
$admin_type = $this->session->userdata('Adm_Type');
|
||||
|
||||
|
||||
$colspan = '14';
|
||||
|
||||
$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/life/life_list/5">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_life_type" name="search_life_type" value="<?=$search_life_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><a href="/admin/life/life_list/5" <? if($search_life_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<? foreach ($def_arr_life_type as $key=>$val) {?>
|
||||
<li><a href="/admin/life/life_list/5?search_life_type=<?=$key?>" <? if($search_life_type==$key) { echo 'class="on"';}?>><?=$val?></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="editor_name" <? if($search_type=='editor_name'){ 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" style="margin-top: 30px">
|
||||
<? 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="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>
|
||||
<? if($admin_type == '0') {?>
|
||||
<div class="searh_area">
|
||||
<select name="search_category_code1" onchange="category_search()" class="type01">
|
||||
<option value="">카테고리</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()" class="type01">
|
||||
<option value="">채널</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<?}?>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<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>등록일시</br>(예약일시)</th>
|
||||
<th>상태</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<? if($search_type=='tag' && $search_keyword!='' ) {
|
||||
$colspan="15";
|
||||
?>
|
||||
<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'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$life_type = $val['life_type'];
|
||||
$editor_name = $val['editor_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'];
|
||||
$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/life/life_list/5?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/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name1?>"><?=$category_name1?></a></td>
|
||||
<td><a href="/admin/life/life_channel_list/5?search_type=channel_name&search_keyword=<?=$category_name2?>"><?=$category_name2?></a></td>
|
||||
<td><?=$def_arr_life_type[$life_type]?></td>
|
||||
<td><a href="/admin/life/life_list/5?search_type=editor_name&search_keyword=<?=$editor_name?>"><?=$editor_name?></a></td>
|
||||
<td style="text-align:left;" class="title"><a href="javascript:life_edit('<?=$idx?>')"><?=$new?><?=$title?></a></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></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>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
<? if($search_type=='tag' && $search_keyword!='' ) {?>
|
||||
<td class="text_blue"><?=$tag_txt?></td>
|
||||
<? }?>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:life_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:life_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:life_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:life_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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function life_add(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/life/life_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function life_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/life/life_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function life_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function life_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/life/life_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/life/life_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>
|
||||
141
application/views/admin/life/life_ranking_edit.php
Executable file
141
application/views/admin/life/life_ranking_edit.php
Executable file
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
|
||||
$head_title = $result['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$sub_content = $result['sub_content'];
|
||||
$sub_content = htmlspecialchars($sub_content);
|
||||
$content_idx = $result['content_idx'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$share_count = $result['share_count'];
|
||||
$comment_count = $result['comment_count'];
|
||||
$main_img = $result['main_img'];
|
||||
$ranking_type = $result['ranking_type'];
|
||||
$rank = $result['rank'];
|
||||
$editor_name = $result['editor_name'];
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
|
||||
$menu_code = '55';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/life/life_ranking_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_ranking_type" value="<?=$search_ranking_type?>">
|
||||
<input type="hidden" id="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_theme_type" name="search_theme_type" value="<?=$search_theme_type?>">
|
||||
<input type="hidden" id="search_life_type" name="search_life_type" value="<?=$search_life_type?>">
|
||||
<input type="hidden" id="mode" name="mode" value="edit">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="key" name="key">
|
||||
<input type="hidden" id="mode" name="ranking_type" value="<?=$ranking_type?>">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle"><?=$def_arr_ranking[$ranking_type]['name']?></h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="6"><?=$rank?>위(썸네일)</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx" id="content_idx" value="<?=$content_idx?>">
|
||||
<input type="text" name="title" id="title" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="sub_content" id="sub_content" size="50" placeholder="내용 간략노출" value="<?=$sub_content?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view"><?=$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="main_img" id="main_img" class="input00" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="editor_name" id="editor_name" class="type03" placeholder="에디터명" value="<?=$editor_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<? if($ranking_type == '1') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count" id="hit_count" class="type03" size="20" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? } else if($ranking_type == '2') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="comment_count" id="comment_count" class="type03" size="20" placeholder="댓글수" value="<?=$comment_count?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? } else if($ranking_type == '3') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="share_count" id="share_count" class="type03" size="20" placeholder="공감수" value="<?=$share_count?>">
|
||||
</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:life_ranking_list_reg_proc();">저장하기</a>
|
||||
<a href="/admin/life/life_ranking_list/5/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_ranking_type=<?=$search_ranking_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_theme_type=<?=$search_theme_type?>&search_life_type=<?=$search_life_type?>">목록으로</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 life_ranking_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>
|
||||
264
application/views/admin/life/life_ranking_list.php
Executable file
264
application/views/admin/life/life_ranking_list.php
Executable file
@@ -0,0 +1,264 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
foreach ($arr_category1 as $key=>$val) {
|
||||
$arr_category_add1[] = array('category_code'=>$val['idx'], 'category_name'=>$val['category_name']);
|
||||
}
|
||||
|
||||
foreach ($arr_category2 as $key=>$val) {
|
||||
$arr_category_add2[$val['category_idx']][] = array('category_code'=>$val['idx'], 'category_name'=>$val['channel_name']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '551';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/life/life_ranking_list/5">
|
||||
<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_ranking_type" name="search_ranking_type" value="<?=$search_ranking_type?>">
|
||||
|
||||
|
||||
<div class="common_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/life/life_ranking_list/5" <? if($search_ranking_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<? foreach($def_arr_ranking as $val) {
|
||||
$css = '';
|
||||
if($search_ranking_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/life/life_ranking_list/5?search_ranking_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="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="editor_name" <? if($search_type=='editor_name'){ 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" style="margin-top: 30px">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<div class="searh_area">
|
||||
|
||||
<select name="search_life_type" onchange="category_search()">
|
||||
<option value="">기능</option>
|
||||
<? if(count($def_arr_life_type) > 0) {
|
||||
foreach ($def_arr_life_type as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_life_type==$key) { echo 'selected'; }?>><?=$val?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select name="search_category_code1" onchange="category_search()">
|
||||
<option value="">카테고리</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()">
|
||||
<option value="">채널</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>등록일시</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="15">등록된 내용이 없습니다.</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'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$ranking_type = $val['ranking_type'];
|
||||
$life_type = $val['life_type'];
|
||||
$editor_name = $val['editor_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$rank = $val['rank'];
|
||||
$content_idx = $val['content_idx'];
|
||||
|
||||
$ranking_type_txt = $def_arr_ranking[$ranking_type]['name'];
|
||||
$life_type_txt = $def_arr_life_type[$life_type];
|
||||
|
||||
|
||||
|
||||
|
||||
$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><?=$rank?></td>
|
||||
<td><img src="<?=$main_img?>" width="35"></td>
|
||||
<td><?=$ranking_type_txt?></td>
|
||||
<td><a href="/admin/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name1?>"><?=$category_name1?></a></td>
|
||||
<td><a href="/admin/life/life_channel_list/5?search_type=channel_name&search_keyword=<?=$category_name2?>"><?=$category_name2?></a></td>
|
||||
<td><?=$life_type_txt?></td>
|
||||
<td style="text-align:left;" class="title"><a href="/admin/life/life_reg/5?mode=edit&idx=<?=$content_idx?>"><?=$new?><?=$title?></a></td>
|
||||
<td><a href="/admin/life/life_list/5?search_type=editor_name&search_keyword=<?=$editor_name?>"><?=$editor_name?></a></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:life_ranking_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:life_ranking_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:life_ranking_reg_arr_del_proc()">삭제</a>
|
||||
<a href="javascript:life_ranking_list_reg()">송출관리</a>
|
||||
<a href="/admin/life/life_reg/5?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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function life_ranking_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/life/life_ranking_list_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function life_ranking_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_ranking_edit/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function life_ranking_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_ranking_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function life_ranking_reg_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/life/life_ranking_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>
|
||||
180
application/views/admin/life/life_ranking_list_reg.php
Executable file
180
application/views/admin/life/life_ranking_list_reg.php
Executable file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_ranking_list = array();
|
||||
foreach ($arr_ranking as $val) {
|
||||
$arr_ranking_list[$val['rank']] = array('content_idx'=> $val['content_idx'], 'head_title'=>$val['head_title'], 'title'=>$val['title'], 'sub_content'=>$val['sub_content'], 'main_img'=>$val['main_img'], 'hit_count'=>$val['hit_count'], 'comment_count'=>$val['comment_count'], 'share_count'=>$val['share_count'], 'editor_name'=>$val['editor_name']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '55';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/life/life_ranking_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_ranking_type" name="search_ranking_type" value="<?=$search_ranking_type?>">
|
||||
<input type="hidden" id="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_theme_type" name="search_theme_type" value="<?=$search_theme_type?>">
|
||||
<input type="hidden" id="search_life_type" name="search_life_type" value="<?=$search_life_type?>">
|
||||
<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">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>테마</th>
|
||||
<td class="tl">
|
||||
|
||||
<? foreach($def_arr_ranking as $val) {?>
|
||||
<input type="radio" name="ranking_type" value="<?=$val['code']?>" onclick="change_ranking_type('<?=$val['code']?>')" <? if($search_ranking_type==$val['code']) { echo 'checked';}?>> <?=$val['name']?>
|
||||
<? }?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
for($i=1;$i<=$def_arr_ranking[$search_ranking_type]['count'];$i++) {
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$sub_content = '';
|
||||
$main_img = '';
|
||||
$main_img_txt = '';
|
||||
$content_idx = '';
|
||||
$hit_count = '';
|
||||
$share_count = '';
|
||||
$comment_count = '';
|
||||
$editor_name = '';
|
||||
if(isset($arr_ranking_list[$i])== true) {
|
||||
$head_title = $arr_ranking_list[$i]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_ranking_list[$i]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$sub_content = $arr_ranking_list[$i]['sub_content'];
|
||||
$sub_content = htmlspecialchars($sub_content);
|
||||
$content_idx = $arr_ranking_list[$i]['content_idx'];
|
||||
$hit_count = $arr_ranking_list[$i]['hit_count'];
|
||||
$share_count = $arr_ranking_list[$i]['share_count'];
|
||||
$comment_count = $arr_ranking_list[$i]['comment_count'];
|
||||
$main_img = $arr_ranking_list[$i]['main_img'];
|
||||
$editor_name = $arr_ranking_list[$i]['editor_name'];
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th rowspan="6"><?=$i?>위(썸네일)</th>
|
||||
<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?>" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="content<?=$i?>" id="content<?=$i?>" placeholder="내용간략노출" value="<?=$sub_content?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view<?=$i?>"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img<?=$i?>" id="img<?=$i?>">
|
||||
<input type="hidden" name="org_img<?=$i?>" id="org_img<?=$i?>" value="<?=$main_img?>">
|
||||
<input type="file" name="main_img<?=$i?>" id="main_img<?=$i?>" class="input00" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="editor_name<?=$i?>" id="editor_name<?=$i?>" class="type03" placeholder="에디터명" value="<?=$editor_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<? if($search_ranking_type == '1') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count<?=$i?>" id="hit_count<?=$i?>" class="type03" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? } else if($search_ranking_type == '2') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="comment_count<?=$i?>" id="comment_count<?=$i?>" class="type03" size="20" placeholder="댓글수" value="<?=$comment_count?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? } else if($search_ranking_type == '3') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="share_count<?=$i?>" id="share_count<?=$i?>" class="type03" size="20" placeholder="공감수" value="<?=$share_count?>">
|
||||
</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:life_ranking_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/life/life_ranking_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_ranking_type=<?=$search_ranking_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_theme_type=<?=$search_theme_type?>&search_life_type=<?=$search_life_type?>">목록으로</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_ranking_type(ranking_code){
|
||||
$("#search_ranking_type").val(ranking_code);
|
||||
$("#input_form").attr("action", "/admin/life/life_ranking_list_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var ranking_count = "<?=$def_arr_ranking[$search_ranking_type]['count']?>";
|
||||
function life_ranking_list_reg_proc(){
|
||||
for(i=1;i<=ranking_count;i++) {
|
||||
if($("#title"+i).val()!='') {
|
||||
if($("#content_idx"+i).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img"+i).val()=='' && $("#img"+i).val()=='' && $("#org_img"+i).val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
197
application/views/admin/life/life_ranking_log_list.php
Executable file
197
application/views/admin/life/life_ranking_log_list.php
Executable file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
foreach ($arr_category1 as $key=>$val) {
|
||||
$arr_category_add1[] = array('category_code'=>$val['idx'], 'category_name'=>$val['category_name']);
|
||||
}
|
||||
|
||||
foreach ($arr_category2 as $key=>$val) {
|
||||
$arr_category_add2[$val['category_idx']][] = array('category_code'=>$val['idx'], 'category_name'=>$val['channel_name']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '552';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/life/life_ranking_log_list/5">
|
||||
<input type="hidden" id="search_ranking_type" name="search_ranking_type" value="<?=$search_ranking_type?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
|
||||
|
||||
|
||||
<div class="common_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/life/life_ranking_log_list/5" <? if($search_ranking_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<? foreach($def_arr_ranking as $val) {
|
||||
$css = '';
|
||||
if($search_ranking_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/life/life_ranking_log_list/5?search_ranking_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="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="editor_name" <? if($search_type=='editor_name'){ 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" style="margin-top: 30px">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
|
||||
<div class="searh_area">
|
||||
|
||||
<select name="search_life_type" onchange="category_search()">
|
||||
<option value="">기능</option>
|
||||
<? if(count($def_arr_life_type) > 0) {
|
||||
foreach ($def_arr_life_type as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_life_type==$key) { echo 'selected'; }?>><?=$val?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select name="search_category_code1" onchange="category_search()">
|
||||
<option value="">카테고리</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()">
|
||||
<option value="">채널</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순위</th>
|
||||
<th>썸네일</th>
|
||||
<th>구분</th>
|
||||
<th>카테고리</th>
|
||||
<th>채널</th>
|
||||
<th>기능</th>
|
||||
<th>제목</th>
|
||||
<th>에디터</th>
|
||||
<th>등록일시</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
</tr>
|
||||
</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'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$ranking_type = $val['ranking_type'];
|
||||
$life_type = $val['life_type'];
|
||||
$editor_name = $val['editor_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$rank = $val['rank'];
|
||||
$content_idx = $val['content_idx'];
|
||||
|
||||
$ranking_type_txt = $def_arr_ranking[$ranking_type]['name'];
|
||||
$life_type_txt = $def_arr_life_type[$life_type];
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$rank?></td>
|
||||
<td><img src="<?=$main_img?>" width="35"></td>
|
||||
<td><?=$ranking_type_txt?></td>
|
||||
<td><a href="/admin/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name1?>"><?=$category_name1?></a></td>
|
||||
<td><a href="/admin/life/life_channel_list/5?search_type=channel_name&search_keyword=<?=$category_name2?>"><?=$category_name2?></a></td>
|
||||
<td><?=$life_type_txt?></td>
|
||||
<td style="text-align:left;" class="title"><a href="/admin/life/life_reg/5?mode=edit&idx=<?=$content_idx?>"><?=$title?></a></td>
|
||||
<td><a href="/admin/life/life_list/5?search_type=editor_name&search_keyword=<?=$editor_name?>"><?=$editor_name?></a></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
587
application/views/admin/life/life_reg.php
Executable file
587
application/views/admin/life/life_reg.php
Executable file
@@ -0,0 +1,587 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
$arr_theme_reg = array();
|
||||
for($i=11;$i<=21;$i++) {
|
||||
$arr_theme_reg[$i] = '';
|
||||
}
|
||||
|
||||
|
||||
$arr_section_reg = array();
|
||||
for($i=1;$i<=4;$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 == '1') {
|
||||
if($write_id != $admin_id) {
|
||||
gf_alert("잘못된 접근입니다.", "/admin/main");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
|
||||
$content = htmlentities($result['content']);
|
||||
$category_code1 = $result['category_idx'];
|
||||
$category_code2 = $result['channel_idx'];
|
||||
$category_code3 = $result['partner_idx'];
|
||||
$head_title = $result['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$sub_title = $result['sub_title'];
|
||||
$sub_title = htmlspecialchars($sub_title);
|
||||
$tag = $result['tag'];
|
||||
$org_url = $result['org_url'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$like_count = $result['like_count'];
|
||||
$display_date = $result['display_date'];
|
||||
$is_display = $result['is_display'];
|
||||
$org_main_img = $result['main_img'];
|
||||
$life_type = $result['life_type'];
|
||||
$main_img = $result['main_img'];
|
||||
$video_url = $result['video_url'];
|
||||
if($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'];
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$main_img = '';
|
||||
$category_code1 = '';
|
||||
$category_code2 = '';
|
||||
$category_code3 = '';
|
||||
$title = '';
|
||||
$head_title = '';
|
||||
$content = '';
|
||||
$sub_title = '';
|
||||
$tag = '';
|
||||
$org_url = '';
|
||||
$hit_count = 0;
|
||||
$like_count = 0;
|
||||
$video_url = '';
|
||||
|
||||
$display_date = '';
|
||||
$display_hour = '';
|
||||
$display_min = '';
|
||||
$display_sec = '';
|
||||
$life_type = $search_life_type;
|
||||
if($life_type == '') $life_type = '1';
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/jquery-ui.min.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
<script src="<?=DIR_JS?>/admin/jquery.multiselect.js"></script>
|
||||
<link href="<?=DIR_CSS?>/admin/jquery.multiselect.css" rel="stylesheet">
|
||||
<script src="/ckeditor/ckeditor.js"></script>
|
||||
|
||||
|
||||
<?
|
||||
$menu_code = '53';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/life/life_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_life_type" name="search_life_type" value="<?=$search_life_type?>">
|
||||
<input type="hidden" id="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<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">
|
||||
<? foreach ($def_arr_life_type as $key=>$val) {?>
|
||||
<input type="radio" name="life_type" value="<?=$key?>" <? if($life_type==$key) { echo 'checked';}?>> <?=$val?>
|
||||
<? }?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category1" id="category1" onchange="change_category(1, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category1) > 0) {
|
||||
foreach ($arr_category1 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code1==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널</th>
|
||||
<td class="tl">
|
||||
<select name="category2" id="category2" onchange="change_category(2, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category2) > 0) {
|
||||
foreach ($arr_category2 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code2==$val['idx']) { echo 'selected'; }?>><?=$val['channel_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>에디터</th>
|
||||
<td class="tl">
|
||||
<select name="category3" id="category3" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category3) > 0) {
|
||||
foreach ($arr_category3 as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_code3==$val['idx']) { echo 'selected'; }?>><?=$val['partner_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>말머리</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="head_title" id="head_title" class="type02" value="<?=$head_title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title" id="title" value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>부제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="sub_title" id="sub_title" value="<?=$sub_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>태그</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="tag" id="tag" class="type01" value="<?=$tag?>"> 최대 5개까지 입력 가능(,로 구분해주세요.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>원본주소</th>
|
||||
<td class="tl">
|
||||
기사의 원본 주소를 입력하면 기사 클릭시 기사원본의 주소로 이동합니다.</br>
|
||||
<input type="text" name="org_url" id="org_url" class="input00" value="<?=$org_url?>">
|
||||
</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="hit_count" id="hit_count" class="type03" value="<?=$hit_count?>"> (관리자가 임의적으로 조회수를 설정할 수 있습니다.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>좋아요수</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="like_count" id="like_count" class="type03" value="<?=$like_count?>"> (관리자가 임의적으로 좋아요수를 설정할 수 있으나 조회수 이상이 될 수는 없습니다)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<? if($admin_type=='0') {?>
|
||||
|
||||
<h2 class="subtitle"><span>PC</span>테마설정</h2>
|
||||
<table>
|
||||
<? foreach($def_arr_life_theme as $key=>$val) {
|
||||
if($key == '16') break;
|
||||
$add_txt = '';
|
||||
$width = "300px";
|
||||
if($key == '13' || $key == '14') {
|
||||
$add_txt = '</br>(모바일공통)';
|
||||
$width="400px";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th><?=$val['name']?><?=$add_txt?></td>
|
||||
<td class="tl">
|
||||
|
||||
<div class="opt_box">
|
||||
<select name="theme_type<?=$key?>" class="type01">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_life_theme[$key]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[$key] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/life<?=$key?>.png" width="<?=$width?>">
|
||||
<? if($key==13){ ?><img src="/img/admin/1.png" width="300px"><? }?>
|
||||
<? if($key==14){ ?><img src="/img/admin/2.png" width="250px"><? }?>
|
||||
<? if($key==15){ ?><img src="/img/admin/3.png" width="400px"><? }?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<? }?>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="subtitle"><span>모바일</span>테마설정</h2>
|
||||
<table>
|
||||
<? for($key=16;$key<=21;$key++){
|
||||
$add_txt = '라이프</br>';
|
||||
if($key <= '19') {
|
||||
$add_txt = '은혜</br>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th><?=$add_txt?><?=$def_arr_life_theme[$key]['name']?></td>
|
||||
<td class="tl">
|
||||
|
||||
<div class="opt_box">
|
||||
<select name="theme_type<?=$key?>" class="type01">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_life_theme[$key]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[$key] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/life<?=$key?>.png" width="350px">
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<? }?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<h2 class="subtitle">기타섹션<span>(모바일공통)</span></h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>인기영상</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="section_type1" class="type01">
|
||||
<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/section1.png" width="300px">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>인기포토</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="section_type2" class="type01">
|
||||
<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/section1.png" width="300px">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>은혜로운영상<br />(모바일전용)</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="section_type3" class="type01">
|
||||
<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>카드뉴스</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="section_type4" class="type01">
|
||||
<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(true) {?>
|
||||
<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:life_reg_proc();">저장하기</a>
|
||||
<a href="/admin/life/life_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_life_type=<?=$search_life_type?>&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'
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
|
||||
function life_reg_proc(){
|
||||
//CKEDITOR.instances.content.updateElement();
|
||||
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
//oEditors2.getById["ir2"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
|
||||
if($("#category1").val()=='') {
|
||||
alert("카테고리를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#category2").val()=='') {
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#category3").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;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function change_category(depth, val){
|
||||
if(depth == 1) {
|
||||
var json_category = '<?=json_encode($arr_category2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#category2').empty();
|
||||
$('#category3').empty();
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category2').append(option);
|
||||
$('#category3').append(option);
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['category_idx'] == val) {
|
||||
option = $("<option value='"+json_category[key]['idx']+"'>"+json_category[key]['channel_name']+"</option>");
|
||||
$('#category2').append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
var json_category = <?=json_encode($arr_category3)?>;
|
||||
|
||||
$('#category3').empty();
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category3').append(option);
|
||||
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['channel_idx'] == val) {
|
||||
option = $("<option value='"+json_category[key]['idx']+"'>"+json_category[key]['partner_name']+"</option>");
|
||||
$('#category3').append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// jquery datepicker
|
||||
$("#display_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/admin/btn_date.jpg",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
|
||||
});
|
||||
$('img.ui-datepicker-trigger').css({'cursor':'pointer', 'width':'30px'}); //아이콘(icon) 위치
|
||||
|
||||
</script>
|
||||
85
application/views/admin/life/life_setting_reg.php
Executable file
85
application/views/admin/life/life_setting_reg.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
$is_duplication = $result['is_duplication'];
|
||||
$no_duplication_setting = $result['no_duplication_setting'];
|
||||
$stat_time = $result['stat_time'];
|
||||
|
||||
$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 = '51';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/life/life_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 colspan="3" 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';}?>> 중복집계 허용
|
||||
<div>
|
||||
한 명당 여러 번의 집계가 가능한지 불가능한지를 설정합니다.</br>
|
||||
중복집계 비허용 : 중복집계를 비허용으로 설정하시면 아래의 중복집계 판단 기준에 따라 중복이라고 판단되면 집계에 포함되지 않습니다..</br>
|
||||
중복집계허용 : 중복잡계 판단 기준과 관계없이 모두 집계가 됩니다.</br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="tl">
|
||||
<div><b>중복집계 판단 기준 설정 (중복집계 비허용시)</b></div>
|
||||
<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';}?>> 아아피 기준 중복방지
|
||||
<div>
|
||||
중복집계를 비허용으로 설정하셨을 경우 중복기준을 아이디로 할 것인지 아이피로 할 것인지의 선택</br>
|
||||
아이디 기준 중복방지 : 중복집계를 비허용으로 하셨다면 같은 아이디로 접속시 중복으로 판단하고 집계가 되지 않습니다.</br>
|
||||
아이피 기중 중복장지 : 중복집계를 비허용으로 하셨다면 같은 아이피에서 접속시 중복으로 판단하고 집계가 되지 않습니다.</br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="tl">
|
||||
<div><b>집계 허용시간</b></div>
|
||||
<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?>">초
|
||||
<div>
|
||||
관리자의 랭킹집계관리 페이지에서 랭킹집계를 관리자가 수동으로 랭킹을 집계하셔야 합니다.</br>
|
||||
랭킹집계는 랭킹집계관리 페이지에서재집계버튼, 전체재집계버튼, 집계시작버튼으로 집계를 하실수 있습니다.</br>
|
||||
출력중 : 출력중으로 설정하시면 수동집계시 해당 집계가 사용자화면에 출력됩니다.</br>
|
||||
미출력 : 미출력으로 설정하시면 수동집계시 해당 집계가 사용자화면에 출력되지 않습니다.</br>
|
||||
예) 2013년 2월 랭킹집계는 출력으로 되어있고 3월 랭킹집계는 미출력으로 되어있다면2013년 2월 랭킹집계는 출력되지만 3월은 출력되지 않습니다.</br>
|
||||
수동 집계 방식은 관리자가 랭킹을 직접 집계하고 출력상태로 해놓아야지만 사용자가 볼수 있습니다.</br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:life_setting_reg_proc()">저장하기</a>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function life_setting_reg_proc(){
|
||||
if($("#stat_time1").val()=='' && $("#stat_time2").val()=='' && $("#stat_time3").val()=='') {
|
||||
alert("집계허용시간을 설정해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
97
application/views/admin/life/life_tag_list.php
Executable file
97
application/views/admin/life/life_tag_list.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?
|
||||
$menu_code = '57';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/life/life_tag_list/5">
|
||||
<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 {
|
||||
$now_date = date("Y-m-d");
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$tag = $val['tag'];
|
||||
$article_count = $val['cnt'];
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td class="title"><a href="/admin/life/life_list/5?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>
|
||||
167
application/views/admin/life/life_theme_edit.php
Executable file
167
application/views/admin/life/life_theme_edit.php
Executable file
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$head_title = $result['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$sub_title = $result['sub_title'];
|
||||
$sub_title = htmlspecialchars($sub_title);
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content_idx = $result['content_idx'];
|
||||
$main_img = $result['theme_img'];
|
||||
$theme_type = $result['theme_type'];
|
||||
$rank = $result['rank'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$like_count = $result['like_count'];
|
||||
$editor_name = $result['editor_name'];
|
||||
$main_img_txt = '';
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
switch($theme_type) {
|
||||
case '11': $rowspan = '4';break;
|
||||
case '17': $rowspan = '4';break;
|
||||
case '19': $rowspan = '5';break;
|
||||
case '20': $rowspan = '4';break;
|
||||
case '21': $rowspan = '5';break;
|
||||
default : $rowspan = '3';break;
|
||||
|
||||
}
|
||||
|
||||
$menu_code = '54';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/life/life_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="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_life_type" name="search_life_type" value="<?=$search_life_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_life_theme[$theme_type]['name']?></h2>
|
||||
<?
|
||||
if($def_arr_life_theme[$theme_type]['display']=='all') {
|
||||
?>
|
||||
<span class="text_blue"><b>* 모바일과 공통 송출관리</b></span>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$rank?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx" id="content_idx" value="<?=$content_idx?>">
|
||||
<? if($theme_type=='11' || $theme_type=='16' || $theme_type=='17' || $theme_type=='18' || $theme_type=='19' || $theme_type=='20' || $theme_type=='21') {?>
|
||||
<input type="text" name="head_title" id="head_title" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
|
||||
<? }?>
|
||||
|
||||
<input type="text" name="title" id="title" class="type00" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? if($theme_type=='11'){?>
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="sub_title" id="sub_title" placeholder="부제목" value="<?=$sub_title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
|
||||
if($theme_type=='17' || $theme_type=='19' ||$theme_type=='20' || $theme_type=='21' ){?>
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="editor_name" id="editor_name" class="type02" placeholder="에디터" value="<?=$editor_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?}
|
||||
|
||||
if($theme_type=='19') {
|
||||
?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="like_count" id="like_count" class="type03" placeholder="좋아요수" value="<?=$like_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
if($theme_type=='21') {
|
||||
?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count" id="hit_count" class="type03" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view"><?=$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:life_theme_list_reg_proc();">저장하기</a>
|
||||
<a href="/admin/life/life_theme_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_theme_type=<?=$search_theme_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_life_type=<?=$search_life_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 life_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>
|
||||
316
application/views/admin/life/life_theme_list.php
Executable file
316
application/views/admin/life/life_theme_list.php
Executable file
@@ -0,0 +1,316 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
foreach ($arr_category1 as $key=>$val) {
|
||||
$arr_category_add1[] = array('category_code'=>$val['idx'], 'category_name'=>$val['category_name']);
|
||||
}
|
||||
|
||||
foreach ($arr_category2 as $key=>$val) {
|
||||
$arr_category_add2[$val['category_idx']][] = array('category_code'=>$val['idx'], 'category_name'=>$val['channel_name']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '54';
|
||||
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/life/life_theme_list/5">
|
||||
<input type="hidden" id="search_theme_type" name="search_theme_type" value="<?=$search_theme_type?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<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/life/life_theme_list/5" <? if($search_theme_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<?
|
||||
foreach($def_arr_life_theme1 as $val) {
|
||||
$css = '';
|
||||
if($search_theme_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/life/life_theme_list/5?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="a.title" <? if($search_type=='a.title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="b.editor_name" <? if($search_type=='b.editor_name'){ 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_life_theme2 as $val) {
|
||||
$css = '';
|
||||
if($search_theme_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/life/life_theme_list/5?search_theme_type=<?=$val['code']?>" <?=$css?>><?=$val['name']?></a></li>
|
||||
<?
|
||||
|
||||
}?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table clearfix" style="margin-top: 30px">
|
||||
<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>
|
||||
<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>
|
||||
<div class="searh_area">
|
||||
|
||||
<select name="search_life_type" onchange="category_search()">
|
||||
<option value="">기능</option>
|
||||
<? if(count($def_arr_life_type) > 0) {
|
||||
foreach ($def_arr_life_type as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_life_type==$key) { echo 'selected'; }?>><?=$val?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
|
||||
|
||||
<select name="search_category_code1" onchange="category_search()">
|
||||
<option value="">카테고리</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()">
|
||||
<option value="">채널</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>출력순위</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<th>등록일시</br>(예약일시)</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="15">등록된 내용이 없습니다.</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'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$theme_type = $val['theme_type'];
|
||||
$editor_name = $val['editor_name'];
|
||||
$life_type = $val['life_type'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$rank = $val['rank'];
|
||||
$is_display = $val['is_display'];
|
||||
$display_date = $val['display_date'];
|
||||
$content_idx = $val['content_idx'];
|
||||
|
||||
$display_date_txt = '';
|
||||
if($is_display == 'N') {
|
||||
$display_date_txt = '</br><span class="text_green">('.$display_date.')</span>';
|
||||
}
|
||||
|
||||
$life_type_txt = $def_arr_life_type[$life_type];
|
||||
$theme_type_txt = $def_arr_life_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><a href="/admin/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name1?>"><?=$category_name1?></a></td>
|
||||
<td><a href="/admin/life/life_channel_list/5?search_type=channel_name&search_keyword=<?=$category_name2?>"><?=$category_name2?></td>
|
||||
<td><?=$life_type_txt?></td>
|
||||
<td><?=$theme_type_txt?></td>
|
||||
<td><a href="/admin/life/life_list/5?search_type=editor_name&search_keyword=<?=$editor_name?>"><?=$editor_name?></a></td>
|
||||
<td class="title" style="text-align:left;"><a href="/admin/life/life_reg/5?mode=edit&idx=<?=$content_idx?>"><?=$new?><?=$title?></a></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:life_theme_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:life_theme_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:life_theme_reg_arr_del_proc()">삭제</a>
|
||||
<a href="javascript:life_theme_list_reg()">송출관리</a>
|
||||
<a href="/admin/life/life_reg/5?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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function life_theme_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/life/life_theme_list_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function life_theme_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_theme_edit/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function life_theme_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/life/life_theme_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function life_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/life/life_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>
|
||||
274
application/views/admin/life/life_theme_list_reg.php
Executable file
274
application/views/admin/life/life_theme_list_reg.php
Executable file
@@ -0,0 +1,274 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
if($mode=='edit') {
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$content = $result['content'];
|
||||
$category_code = $result['category_code'];
|
||||
$press_idx = $result['press_idx'];
|
||||
$reporter_name = $result['reporter_name'];
|
||||
$reporter_email = $result['reporter_email'];
|
||||
$sub_title = $result['sub_title'];
|
||||
$sub_title = htmlspecialchars($sub_title);
|
||||
$tag = $result['tag'];
|
||||
$org_url = $result['org_url'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$share_count = $result['share_count'];
|
||||
$review_count1 = $result['review_count1'];
|
||||
$review_count2 = $result['review_count2'];
|
||||
$review_count3 = $result['review_count3'];
|
||||
$review_count4 = $result['review_count4'];
|
||||
$review_count5 = $result['review_count5'];
|
||||
$is_auto_setting = $result['is_auto_setting'];
|
||||
$display_date = $result['display_date'];
|
||||
$org_main_img = $result['main_img'];
|
||||
$life_type = $result['life_type'];
|
||||
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
$category_code2 = substr($category_code, 0, 4);
|
||||
$category_code3 = substr($category_code, 0, 6);
|
||||
|
||||
$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'];
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$theme_img = '';
|
||||
$sub_content = '';
|
||||
$content_idx = '';
|
||||
|
||||
}
|
||||
|
||||
$arr_theme_rank = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
$arr_theme_rank[$val['rank']] = array('content_idx'=> $val['content_idx'], 'head_title'=>$val['head_title'], 'title'=>$val['title'], 'sub_title'=>$val['sub_title'], 'sub_content'=>$val['sub_content'], 'editor_name'=>$val['editor_name'], 'theme_img'=>$val['theme_img'], 'like_count'=>$val['like_count'], 'hit_count'=>$val['hit_count']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '54';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/life/life_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="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_life_type" name="search_life_type" value="<?=$search_life_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_life_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_life_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_life_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_life_theme[$search_theme_type]['count'];$i++) {
|
||||
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$sub_title = '';
|
||||
$theme_img = '';
|
||||
$theme_img_txt = '';
|
||||
$content_idx = '';
|
||||
$editor_name = '';
|
||||
$hit_count = '';
|
||||
$like_count = '';
|
||||
if(isset($arr_theme_rank[$i])== true) {
|
||||
$head_title = $arr_theme_rank[$i]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_theme_rank[$i]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$sub_title = $arr_theme_rank[$i]['sub_title'];
|
||||
$sub_title = htmlspecialchars($sub_title);
|
||||
$content_idx= $arr_theme_rank[$i]['content_idx'];
|
||||
$theme_img = $arr_theme_rank[$i]['theme_img'];
|
||||
$editor_name= $arr_theme_rank[$i]['editor_name'];
|
||||
$hit_count = $arr_theme_rank[$i]['hit_count'];
|
||||
$like_count = $arr_theme_rank[$i]['like_count'];
|
||||
if($theme_img!='') $theme_img_txt = '<img src="'.$theme_img.'" width=250>';
|
||||
}
|
||||
|
||||
switch($search_theme_type) {
|
||||
case '11': $rowspan = '4';break;
|
||||
case '17': $rowspan = '4';break;
|
||||
case '19': $rowspan = '5';break;
|
||||
case '20': $rowspan = '4';break;
|
||||
case '21': $rowspan = '5';break;
|
||||
default : $rowspan = '3';break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$i?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx<?=$i?>" id="content_idx<?=$i?>" value="<?=$content_idx?>">
|
||||
<? if($search_theme_type=='11' || $search_theme_type=='16' || $search_theme_type=='17' || $search_theme_type=='18' || $search_theme_type=='19' || $search_theme_type=='20' || $search_theme_type=='21') {?>
|
||||
<input type="text" name="head_title<?=$i?>" id="head_title<?=$i?>" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<? }?>
|
||||
<input type="text" name="title<?=$i?>" id="title<?=$i?>" size="50" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? if($search_theme_type=='11'){?>
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="sub_title<?=$i?>" id="sub_title<?=$i?>" placeholder="부제목" value="<?=$sub_title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
|
||||
if($search_theme_type=='17' || $search_theme_type=='19' ||$search_theme_type=='20' || $search_theme_type=='21' ){?>
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="editor_name<?=$i?>" id="editor_name<?=$i?>" class="type02" placeholder="에디터" value="<?=$editor_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?}
|
||||
|
||||
if($search_theme_type=='19') {
|
||||
?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="like_count<?=$i?>" id="like_count<?=$i?>" class="type03" placeholder="좋아요수" value="<?=$like_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
if($search_theme_type=='21') {
|
||||
?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count<?=$i?>" id="hit_count<?=$i?>" class="type03" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
?>
|
||||
<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:life_theme_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/life/life_theme_list/5/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_theme_type=<?=$search_theme_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_life_type=<?=$search_life_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/life/life_theme_list_reg/5");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var theme_count = "<?=$def_arr_life_theme[$search_theme_type]['count']?>";
|
||||
function life_theme_list_reg_proc(){
|
||||
for(i=1;i<=theme_count;i++) {
|
||||
if($("#title"+i).val()!='') {
|
||||
if($("#content_idx"+i).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#theme_img"+i).val()=='' && $("#img"+i).val()=='' && $("#org_img"+i).val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
224
application/views/admin/maptoon/cartoonist.php
Executable file
224
application/views/admin/maptoon/cartoonist.php
Executable file
@@ -0,0 +1,224 @@
|
||||
<?php
|
||||
$menu_code = '1050';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<!-- jquery UI -->
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<style>
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
</style>
|
||||
<!-- //jquery UI -->
|
||||
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<span style="font-weight:bold">Total:</span> <?//=number_format($total_count);?>
|
||||
|
||||
<span style="margin-left:20px">
|
||||
<?/*
|
||||
foreach ($arr_default_member_gendar as $val) {
|
||||
$member_gender_count = 0;
|
||||
if(isset($arr_member_gender[$val['code']])==true) {
|
||||
$member_gender_count = $arr_member_gender[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_gender', '<?=$val['code']?>');"><?=number_format($member_gender_count)?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px">
|
||||
<?
|
||||
foreach ($arr_default_member_group as $val) {
|
||||
$member_group_count = 0;
|
||||
if(isset($arr_member_group[$val['code']])==true) {
|
||||
$member_group_count = $arr_member_group[$val['code']];
|
||||
}
|
||||
echo '<b>'.$val['txt'].':</b> '.number_format($member_group_count).' ';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px"><b>오늘신규가입:</b> <a href="javascript:click_search('search_member_new', 'today');"><?=number_format($member_new_count);?></a></span>
|
||||
</ul>
|
||||
<ul style="text-align:left; padding-top:10px; padding-bottom:10px;">
|
||||
<span>
|
||||
<?
|
||||
foreach ($arr_default_member_age as $val) {
|
||||
$member_age_count = 0;
|
||||
if(isset($arr_member_age[$val['code']])==true) {
|
||||
$member_age_count = $arr_member_age[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_age', '<?=$val['code']?>');"><?=number_format($member_age_count)?></a>
|
||||
<?
|
||||
}*/
|
||||
?>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>맵툰작가</th>
|
||||
<th>작가 블로그 & 홈페이지 주소</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(isset($list)==TRUE) {
|
||||
if(count($list)==0) {
|
||||
echo '<tr><td colspan="4">등록된 내용이 없습니다.</td></tr>';
|
||||
} else {
|
||||
//$dataNumber = ($total_rows + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$name = $val['name'];
|
||||
$website = $val['website'];
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $idx?></td>
|
||||
<td><?php echo $name?></td>
|
||||
<td><?php echo $website?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="#" class="btn_modify" value="<?php echo $idx;?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="#" class="btn_delete" value="<?php echo $idx;?>"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
//$dataNumber--;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn">
|
||||
<!--a href="javascript:news_arr_del_proc();">삭제</a-->
|
||||
<a href="#" id="btn_reg">등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?//=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- register popup -->
|
||||
<div id="dialog" title="맵툰 작가 등록/수정" style="display:none;">
|
||||
<!--p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p-->
|
||||
<form name="popup" action="" target="ifrm" method="post">
|
||||
<input type="hidden" id="popup_mode" name="mode" value="" />
|
||||
<input type="hidden" id="popup_idx" name="idx" value="" />
|
||||
<fieldset>
|
||||
<label for="name">맵툰 작가명</label>
|
||||
<input type="text" id="name" name="name" value="" class="text ui-widget-content ui-corner-all" maxlength="50">
|
||||
<label for="website">홈페이지 & 블로그 주소</label>
|
||||
<input type="text" id="website" name="website" value="" class="text ui-widget-content ui-corner-all" maxlength="300">
|
||||
|
||||
<input type="button" value=" 등록 " id="btn_register" tabindex="-1" >
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!-- //register popup -->
|
||||
|
||||
<iframe name="ifrm" frameborder="0" width="0" height="0" style="display:none;"></iframe>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#btn_reg").click(function() {
|
||||
$("#dialog").dialog();
|
||||
return false;
|
||||
});
|
||||
|
||||
function reset_popup_form() {
|
||||
$("#name").val('');
|
||||
$("#website").val('');
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
|
||||
function fill_popup_form(a,b) {
|
||||
if(a!='' && b!='') {
|
||||
reset_popup_form();
|
||||
$("#name, json.website").val(a);
|
||||
$("#website").val(b);
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
}
|
||||
|
||||
$(".btn_delete").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(idx>0 && confirm('정말 삭제하시겠습니까?')) {
|
||||
frm = $("form[name='popup']");
|
||||
frm.attr('target','ifrm');
|
||||
$("#popup_idx").val(idx);
|
||||
frm.attr('action','/admin/maptoon/cartoonist_del_proc');
|
||||
frm.submit();
|
||||
}
|
||||
});
|
||||
|
||||
$(".btn_modify").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(idx>0) {
|
||||
$.ajax({
|
||||
url: '/admin/maptoon/cartoonist/?idx='+idx,
|
||||
data: {
|
||||
format: 'json',
|
||||
idx:idx
|
||||
},
|
||||
//dataType: 'jsonp',
|
||||
type:'get',
|
||||
success: function(msg) {
|
||||
var json = $.parseJSON(msg);
|
||||
console.log(json);
|
||||
if(json.result=='success') {
|
||||
$("#popup_mode").val('upt');
|
||||
$("#popup_idx").val(idx);
|
||||
fill_popup_form(json.name, json.website);
|
||||
}
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#btn_open_popup").click(function() {
|
||||
reset_popup_form();
|
||||
});
|
||||
|
||||
$("#btn_register").click(function() {
|
||||
frm = $("form[name='popup']");
|
||||
|
||||
if($("#name").val()=='') {
|
||||
alert('이름을 등록해 주십시오.');
|
||||
$("#name").focus();
|
||||
return false;
|
||||
}
|
||||
if($("#website").val()=='') {
|
||||
alert('홈페이지 혹은 블로그 주소를 등록해 주십시오.');
|
||||
$("#website").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
frm.attr('target','ifrm');
|
||||
frm.attr('action','/admin/maptoon/cartoonist_proc');
|
||||
frm.submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
168
application/views/admin/maptoon/category_detail.php
Executable file
168
application/views/admin/maptoon/category_detail.php
Executable file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
$menu_code = '1010';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<!-- jquery UI -->
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<!-- //jquery UI -->
|
||||
<style>
|
||||
#sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
|
||||
#sortable tr { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; height: 1.5em; }
|
||||
html>body #sortable tr { height: 1.5em; line-height: 1.2em; }
|
||||
.ui-state-highlight { height: 1.5em; line-height: 1.2em; }
|
||||
</style>
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
|
||||
<div style="border:2px red solid;padding:5px;"><b>이곳에 등록된 에피소드들만 웹툰 홈페이지의 위젯에 나오게 됩니다 (예: 슬라이드쇼)</b></div>
|
||||
<span style="font-weight:bold">카테고리 명 : </span> <?php echo $c_name;?>
|
||||
<div class="common_table clearfix type01">
|
||||
<div class="">
|
||||
<input type="text" name="search_keyword" id="search_keyword" value="" placeholder="맵툰이름으로 검색" onkeypress="" class="fw300" style="width:300px;height:30px;line-height: 30px;">
|
||||
<a href="#" class="btn" id="btn_search"><i class="fa moving_all fa-search" style="margin-left:8px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<form name="frm" method="post" action="/admin/maptoon/register_episode_in_category">
|
||||
<input type="hidden" name="idx" id="idx" value="<?php if(isset($idx)==TRUE) echo $idx;?>" />
|
||||
<div class="common_table" style="">
|
||||
<table>
|
||||
<thead>
|
||||
<th>썸네일</th>
|
||||
<th>맵툰 제목</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody id="search_row">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div> <hr></div>
|
||||
|
||||
<h3>"<?php echo $c_name;?>"으로 등록된 에피소드들</h3>
|
||||
<!-- 등록되어 있는 맵툰목록 -->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>썸네일</th>
|
||||
<th>맵툰 제목</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody id="episode_list">
|
||||
<?php
|
||||
// use this one : https://jqueryui.com/sortable/
|
||||
if(isset($list)==TRUE && is_array($list)==TRUE) {
|
||||
if(count($list)==0) {
|
||||
echo '<tr><td colspan="3">등록된 내용이 없습니다.</td></tr>';
|
||||
} else {
|
||||
//$dataNumber = ($total_rows + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$main_img = $val['main_img'];
|
||||
$title = $val['title'];
|
||||
?>
|
||||
<tr>
|
||||
<td><?php if($main_img!='') echo '<img src="'.$main_img.'" width="150" >';?></td>
|
||||
<td><?php if($title!='') echo $title;?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="#" class="del_button" value="<?php echo $idx;?>"><i class="fa fa-close"></i>삭제</a>
|
||||
|
||||
<input type="hidden" name="episodes_idx[]" value="<?php echo $idx;?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
//$dataNumber--;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<!--a href="javascript:news_arr_del_proc();">삭제</a-->
|
||||
<a href="#" id="btn_reg">등록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// String.prototype.stripSlashes = function(){
|
||||
// return this.replace(/\\(.)/mg, "$1");
|
||||
// }
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#btn_reg").click(function() {
|
||||
$("form[name=frm]").submit();
|
||||
});
|
||||
|
||||
$( "#episode_list" ).sortable({
|
||||
placeholder: "ui-state-highlight"
|
||||
});
|
||||
$( "#episode_list" ).disableSelection();
|
||||
|
||||
$("#btn_search").click(function() {
|
||||
search_keyword_obj = $("#search_keyword");
|
||||
if(search_keyword_obj.val()=='') {
|
||||
alert('검색어를 입력해 주십시오.');
|
||||
search_keyword_obj.focus();
|
||||
return false;
|
||||
}
|
||||
if(search_keyword_obj.val()!='') {
|
||||
$.ajax({
|
||||
url: '/admin/maptoon/get_episodes_by_search_keyword/',
|
||||
data: {
|
||||
format: 'json',
|
||||
keyword:search_keyword_obj.val()
|
||||
},
|
||||
//dataType: 'jsonp',
|
||||
type:'get',
|
||||
success: function(msg) {
|
||||
var json = $.parseJSON(msg);
|
||||
if(json=='') {
|
||||
alert('검색어에 해당하는 웹툰 에피소드가 없습니다.'); return false;
|
||||
}
|
||||
html = generate_search_result(json);
|
||||
$("#search_row").empty();
|
||||
$("#search_row").append(html);
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", "table .add_button", function() {
|
||||
_idx = $(this).attr('idx');
|
||||
_title = $(this).attr('title');
|
||||
_main_img = $(this).attr('main_img');
|
||||
console.log(_idx);
|
||||
console.log(_title);
|
||||
console.log(_main_img);
|
||||
html = '<tr><td><img src="'+_main_img+'" width="150" /></td><td>'+_title+'</td><td><input class="del_button" type="button" value="삭제하기" idx="'+_idx+'" img="'+_main_img+'" title=""'+_title+' /><input type="hidden" name="episodes_idx[]" value="'+_idx+'" /></td></tr>';
|
||||
$("#episode_list").append(html);
|
||||
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
|
||||
$(document).on('click','table .del_button', function() {
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
|
||||
function generate_search_result(json_str) {
|
||||
if(typeof json_str!=='undefined' && json_str.length>0) {
|
||||
html = '';
|
||||
json_str.forEach(function(ele){
|
||||
html += '<tr><td><img src="'+ele.main_img+'" width="150" /></td><td>'+ele.title+'</td><td><input class="add_button" type="button" value="등록하기" idx="'+ele.idx+'" main_img="'+ele.main_img+'" title="'+ele.title+'" /></td></tr>';
|
||||
//console.log(ele.idx);
|
||||
});
|
||||
return html;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
213
application/views/admin/maptoon/category_list.php
Executable file
213
application/views/admin/maptoon/category_list.php
Executable file
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
$menu_code = '1010';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<!-- jquery UI -->
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<style>
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
</style>
|
||||
<!-- //jquery UI -->
|
||||
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<span style="font-weight:bold">Total:</span> <?//=number_format($total_count);?>
|
||||
|
||||
<span style="margin-left:20px">
|
||||
<?/*
|
||||
foreach ($arr_default_member_gendar as $val) {
|
||||
$member_gender_count = 0;
|
||||
if(isset($arr_member_gender[$val['code']])==true) {
|
||||
$member_gender_count = $arr_member_gender[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_gender', '<?=$val['code']?>');"><?=number_format($member_gender_count)?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px">
|
||||
<?
|
||||
foreach ($arr_default_member_group as $val) {
|
||||
$member_group_count = 0;
|
||||
if(isset($arr_member_group[$val['code']])==true) {
|
||||
$member_group_count = $arr_member_group[$val['code']];
|
||||
}
|
||||
echo '<b>'.$val['txt'].':</b> '.number_format($member_group_count).' ';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px"><b>오늘신규가입:</b> <a href="javascript:click_search('search_member_new', 'today');"><?=number_format($member_new_count);?></a></span>
|
||||
</ul>
|
||||
<ul style="text-align:left; padding-top:10px; padding-bottom:10px;">
|
||||
<span>
|
||||
<?
|
||||
foreach ($arr_default_member_age as $val) {
|
||||
$member_age_count = 0;
|
||||
if(isset($arr_member_age[$val['code']])==true) {
|
||||
$member_age_count = $arr_member_age[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_age', '<?=$val['code']?>');"><?=number_format($member_age_count)?></a>
|
||||
<?
|
||||
}*/
|
||||
?>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(isset($list)==TRUE) {
|
||||
if(count($list)==0) {
|
||||
echo '<tr><td colspan="3">등록된 내용이 없습니다.</td></tr>';
|
||||
} else {
|
||||
//$dataNumber = ($total_rows + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$c_name = $val['c_name'];
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $idx?></td>
|
||||
<td><a href="/admin/maptoon/category_detail/10?idx=<?php echo $idx;?>"><?php echo $c_name?></a></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="#" class="btn_modify" value="<?php echo $idx;?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="#" class="btn_delete" value="<?php echo $idx;?>"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
//$dataNumber--;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn">
|
||||
<!--a href="javascript:news_arr_del_proc();">삭제</a-->
|
||||
<a href="#" id="btn_reg">등록</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?//=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- register popup -->
|
||||
<div id="dialog" title="맵툰 카테고리 등록/수정" style="display:none;">
|
||||
<!--p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p-->
|
||||
<form name="popup" action="" target="ifrm" method="post">
|
||||
<input type="hidden" id="popup_mode" name="mode" value="" />
|
||||
<input type="hidden" id="popup_idx" name="idx" value="" />
|
||||
<fieldset>
|
||||
<label for="c_name">맵툰 카테고리 명</label>
|
||||
<input type="text" id="c_name" name="c_name" value="" class="text ui-widget-content ui-corner-all" maxlength="50">
|
||||
<input type="button" value=" 등록 " id="btn_register" tabindex="-1" >
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!-- //register popup -->
|
||||
|
||||
<iframe name="ifrm" frameborder="0" width="0" height="0"></iframe>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#btn_reg").click(function() {
|
||||
$("#dialog").dialog();
|
||||
$("#popup_mode").val("");
|
||||
$("#c_name").val("");
|
||||
return false;
|
||||
});
|
||||
|
||||
function reset_popup_form() {
|
||||
$("#c_name").val('');
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
|
||||
function fill_popup_form(a) {
|
||||
if(a!='') {
|
||||
reset_popup_form();
|
||||
$("#c_name").val(a);
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
}
|
||||
|
||||
$(".btn_delete").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(idx>0 && confirm('정말 삭제하시겠습니까?')) {
|
||||
frm = $("form[name='popup']");
|
||||
frm.attr('target','ifrm');
|
||||
$("#popup_idx").val(idx);
|
||||
frm.attr('action','/admin/maptoon/category_del_proc');
|
||||
frm.submit();
|
||||
}
|
||||
});
|
||||
|
||||
$(".btn_modify").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(idx>0) {
|
||||
$.ajax({
|
||||
url: '/admin/maptoon/category/?idx='+idx,
|
||||
data: {
|
||||
format: 'json',
|
||||
idx:idx
|
||||
},
|
||||
//dataType: 'jsonp',
|
||||
type:'get',
|
||||
success: function(msg) {
|
||||
var json = $.parseJSON(msg);
|
||||
console.log(json);
|
||||
if(json.result=='success') {
|
||||
$("#popup_mode").val('upt');
|
||||
$("#popup_idx").val(idx);
|
||||
fill_popup_form(json.c_name);
|
||||
}
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#btn_open_popup").click(function() {
|
||||
reset_popup_form();
|
||||
});
|
||||
|
||||
$("#btn_register").click(function() {
|
||||
frm = $("form[name='popup']");
|
||||
|
||||
if($("#c_name").val()=='') {
|
||||
alert('카테고리를 등록해 주십시오.');
|
||||
$("#c_name").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
frm.attr('target','ifrm');
|
||||
frm.attr('action','/admin/maptoon/category_proc');
|
||||
frm.submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
443
application/views/admin/maptoon/episode_list.php
Executable file
443
application/views/admin/maptoon/episode_list.php
Executable file
@@ -0,0 +1,443 @@
|
||||
<?php
|
||||
$menu_code = '1030';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
<link href="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script>
|
||||
<script src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script>
|
||||
|
||||
<style>
|
||||
.row {margin-left: 0px; margin-bottom: 15px;}
|
||||
div.sortform{border: 1px solid #d8dcdd;padding: 15px;}
|
||||
label.sort_label{width: 80px;}
|
||||
button{ background:#1AAB8A; color:#fff; border:none; position:relative; height:60px; font-size:1.6em; padding:0 2em; cursor:pointer; transition:800ms ease all; outline:none;}
|
||||
button:hover{background:#fff; color:#1AAB8A;}
|
||||
button:before,button:after{ content:''; position:absolute; top:0; right:0; height:2px; width:0; background: #1AAB8A; transition:400ms ease all;}
|
||||
button:after{ right:inherit; top:inherit; left:0; bottom:0; }
|
||||
button:hover:before,button:hover:after{width:100%; transition:800ms ease all; }
|
||||
.write_btn_1{background: #ebebeb; float: right; border: 1px solid #ccc; margin-right: 15px; padding: 4px 15px;}
|
||||
|
||||
* {box-sizing: border-box;}
|
||||
/*the container must be positioned relative:*/
|
||||
.autocomplete {position: relative; display: inline-block;}
|
||||
.autocomplete-items { position: absolute; border: 1px solid #d4d4d4; border-bottom: none; border-top: none; z-index: 99; /*position the autocomplete items to be the same width as the container:*/
|
||||
top: 100%; left: 0; right: 0; margin: 0px 16px; width: 89%;}
|
||||
.autocomplete-items div { padding: 10px; cursor: pointer; background-color: #fff; border-bottom: 1px solid #d4d4d4; }
|
||||
/*when hovering an item:*/
|
||||
.autocomplete-items div:hover { background-color: #e9e9e9; }
|
||||
/*when navigating through the items using the arrow keys:*/
|
||||
.autocomplete-active { background-color: DodgerBlue !important; color: #ffffff; }
|
||||
#inp_authorautocomplete-list{margin-left: 100px; width: 39%;}
|
||||
#inp_mt_nameautocomplete-list{margin-left: 20%; width: 60%;}
|
||||
</style>
|
||||
<form class="" name="sort_form" id="sort_form" method="get" action="episode">
|
||||
<input type="hidden" name="sort_list" id="sort_list">
|
||||
<div class="common_tep clearfix type01 sortform">
|
||||
<div class="row">
|
||||
<div class="row form-group">
|
||||
<div class="col-md-3">
|
||||
<label for="date_reg" class="sort_label" >등록 날짜별</label>
|
||||
<select name="date_reg" id="select_sort_date">
|
||||
<option value="">선택안함</option>
|
||||
<option value="td">오늘</option>
|
||||
<option value="yd">어제</option>
|
||||
<option value="w">일주일</option>
|
||||
<option value="30d">지난30일</option>
|
||||
<option value="lm">지난달</option>
|
||||
<option value="sel">날짜지정</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- <label for="ca">카테고리</label>
|
||||
<select id="select_cartegory" name="ca">
|
||||
<option value="">선택안함</option>
|
||||
<? foreach($category as $i){?>
|
||||
<option value="<?=$i['idx']?>"><?=$i['c_name']?></option>
|
||||
<?}?>
|
||||
</select> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="datepicker_reg" class="row" style="display:none; margin-left: 85px; margin-bottom: 20px;">
|
||||
<div class='col-md-2'>
|
||||
<label for="sdate" >시작일</label>
|
||||
<div class='input-group date' id='div_s_date'>
|
||||
<input type='text' id="sdate" name="sdate" class="form-control"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-2'>
|
||||
<label for="edate">종료일</label>
|
||||
<div class='input-group date' id='div_e_date'>
|
||||
<input type='text' id="edate" name="edate" class="form-control"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label for="author" class="sort_label">작가</label>
|
||||
<input type="text" id="inp_author" name="author">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="mt_name">맵툰 이름</label>
|
||||
<input type="text" name="mt_name" id="inp_mt_name">
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="ep_title" class="sort_label">맵툰 제목</label>
|
||||
<input type="text" name="ep_title" id="inp_ep_name">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="write_btn a" style="float:right;">검색</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="searh_area">
|
||||
</div>
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<div class="row">
|
||||
<span style="font-weight:bold">Total:</span> <?=$total_count;?>
|
||||
<span style="margin-left:20px"></span>
|
||||
<span style="margin-left:20px">오늘 신규</span>
|
||||
<span style="margin-left:20px"></span>
|
||||
<span style="margin-left:20px">
|
||||
<input type="radio" id="sort_list_up" name="sort_list" value="up" onclick="change_sort();"> 최신순
|
||||
<input type="radio" id="sort_list_vi" name="sort_list" value="vi" onclick="change_sort();"> 조회순
|
||||
</span>
|
||||
<div class="write_btn_1">
|
||||
<a href="/admin/maptoon/episode_reg" id="btn_reg">등록</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>썸네일</th>
|
||||
<th>맵툰이름</th>
|
||||
<th>작가명</th>
|
||||
<th>제목</th>
|
||||
<th>조회수</th>
|
||||
<th>상태</th>
|
||||
<th>등록일시</th>
|
||||
<th>예약일시</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?if(count($list)==0) {
|
||||
echo '<tr><td colspan="10">등록된 내용이 없습니다.</td></tr>';
|
||||
} else {
|
||||
$i=0;
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$main_img = $val['main_img'];
|
||||
// $mt_categories_idx = $val['mt_categories_idx'];
|
||||
$name = $val['name'];
|
||||
$title = $val['title'];
|
||||
$mt_list_idx = $val['mt_list_idx'];
|
||||
$recommend_count = $val['recommend_count'];
|
||||
$view_count = $val['view_count'];
|
||||
$mt_cartoonists_idx = $val['mt_cartoonists_idx'];
|
||||
$is_display = $val['is_display'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_date = $val['display_date'];?>
|
||||
<tr>
|
||||
<td><?=$idx?><input type="hidden" id="index_<?=$idx?>" value="<?=$i?>"></td>
|
||||
<td><img id="" style="width: 75px; height: 53px;" class="img" src="<?=$main_img?>"></td>
|
||||
<!-- <td><?if($mt_categories_idx!=0){echo $category_list[$mt_categories_idx];}?></td> -->
|
||||
<td><?=$name?></td>
|
||||
<td><?=$cartoonist_list[$mt_cartoonists_idx]?></td>
|
||||
<td><?=$title ?></td>
|
||||
<td><?=$view_count?></td>
|
||||
<td><?if($is_display==0){echo "N";}else{echo "Y";}?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$display_date ?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="#" class="btn_modify" value="<?= $idx;?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="#" class="btn_delete" value="<?= $idx;?>"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?$i++; }
|
||||
}?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
set_sort_option();
|
||||
set_search_area();
|
||||
$("#btn_reg").click(function() {
|
||||
$("#dialog").dialog();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
//search condition
|
||||
function set_search_area(){
|
||||
var url_string = window.location.href; //window.location.href
|
||||
var url = new URL(url_string);
|
||||
var date_reg = url.searchParams.get("date_reg");
|
||||
var category = url.searchParams.get("ca");
|
||||
var author = url.searchParams.get("author");
|
||||
var mt_name = url.searchParams.get("mt_name");
|
||||
var ep_title = url.searchParams.get("ep_title");
|
||||
var s_date = url.searchParams.get("sdate");
|
||||
var e_date = url.searchParams.get("edate");
|
||||
|
||||
if(date_reg!=''){
|
||||
$("#select_sort_date").val(date_reg);
|
||||
if(date_reg=="sel"){
|
||||
$("#datepicker_reg").show();
|
||||
$("sdate").val(s_date);
|
||||
$("edate").val(e_date);
|
||||
}
|
||||
}
|
||||
if(category!=''){
|
||||
$("#select_cartegory").val(category);
|
||||
}
|
||||
if(author!=''){
|
||||
$("#inp_author").val(author);
|
||||
}
|
||||
if(mt_name!=''){
|
||||
$("inp_mt_name").val(mt_name);
|
||||
}
|
||||
if(ep_title!=''){
|
||||
$("inp_ep_name").val(ep_title);
|
||||
}
|
||||
}
|
||||
|
||||
//show datepickup
|
||||
$("#select_sort_date").on('change',function(){
|
||||
if($(this).val()=="sel"){
|
||||
$("#datepicker_reg").show();
|
||||
}else{
|
||||
$("#datepicker_reg").hide();
|
||||
};
|
||||
})
|
||||
// modify btn event
|
||||
$(".btn_modify").click(function() {
|
||||
var idx = $(this).attr('value');
|
||||
redirectUrl='/admin/maptoon/episode_reg';
|
||||
if(idx>0) {
|
||||
var form = $('<form action="' + redirectUrl + '" method="post">' +
|
||||
'<input type="hidden" name="idx" value="' + idx + '"></input>' + '</form>');
|
||||
$('body').append(form);
|
||||
$(form).submit();
|
||||
}else{
|
||||
alert("값이 존재하지 않습니다 관리자에게 문의주세요");
|
||||
}
|
||||
});
|
||||
|
||||
//delete click event
|
||||
$(".btn_delete").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
redirectUrl='/admin/maptoon/episode_del_proc';
|
||||
if(confirm('정말 삭제하시겠습니까?')) {
|
||||
var form = $('<form action="' + redirectUrl + '" method="post">' +
|
||||
'<input type="hidden" name="idx" value="' + idx + '"></input>' + '</form>');
|
||||
$('body').append(form);
|
||||
$(form).submit();
|
||||
frm.attr('action','/admin/maptoon/announcement_del_proc');
|
||||
frm.submit();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// set checkbox option
|
||||
function set_sort_option(){
|
||||
var url_string = document.URL; //window.location.href
|
||||
var url = new URL(url_string);
|
||||
var sort_list = url.searchParams.get("sort_list");
|
||||
if(sort_list==null){
|
||||
document.getElementById("sort_list_up").checked = true;
|
||||
document.getElementById("sort_list").value="up";
|
||||
}else if(sort_list=="up"){
|
||||
document.getElementById("sort_list").value="up";
|
||||
document.getElementById("sort_list_up").checked = true;
|
||||
}else if(sort_list=="vi"){
|
||||
document.getElementById("sort_list").value="vi";
|
||||
document.getElementById("sort_list_vi").checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
// radio button 조회순 업데이트 순 조회
|
||||
function change_sort(){
|
||||
var url_string = document.URL; //window.location.href
|
||||
var url = new URL(url_string);
|
||||
var sort_list = url.searchParams.get("sort_list");
|
||||
if(location.search!=""){
|
||||
if (document.getElementById('sort_list_up').checked){
|
||||
sort_list==null?window.location.href=url_string+"&sort_list=up":window.location.href=url_string.replace("sort_list=vi", "sort_list=up");
|
||||
} else {
|
||||
sort_list==null?window.location.href=url_string+"&sort_list=vi":window.location.href=url_string.replace("sort_list=up", "sort_list=vi");
|
||||
}
|
||||
}else{
|
||||
if (document.getElementById('sort_list_up').checked){
|
||||
window.location.href=url_string+"?sort_list=up"
|
||||
}else{
|
||||
window.location.href=url_string+"?sort_list=vi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//dateTime picker
|
||||
$(function () {
|
||||
$('#div_s_date').datetimepicker({
|
||||
locale: 'ko',
|
||||
format : "YYYY-MM-DD HH:mm:ss"
|
||||
});
|
||||
$('#div_e_date').datetimepicker({
|
||||
useCurrent: false, //Important! See issue #1075
|
||||
locale: 'ko',
|
||||
format : "YYYY-MM-DD HH:mm:ss"
|
||||
});
|
||||
$("#div_s_date").on("dp.change", function (e) {
|
||||
$('#div_e_date').data("DateTimePicker").minDate(e.date);
|
||||
});
|
||||
$("#div_e_date").on("dp.change", function (e) {
|
||||
$('#div_s_date').data("DateTimePicker").maxDate(e.date);
|
||||
});
|
||||
});
|
||||
|
||||
//autocomplete
|
||||
function autocomplete(inp, arr) {
|
||||
var currentFocus;
|
||||
/*execute a function when someone writes in the text field:*/
|
||||
inp.addEventListener("input", function(e) {
|
||||
var a, b, i, val = this.value;
|
||||
/*close any already open lists of autocompleted values*/
|
||||
closeAllLists();
|
||||
if (!val) { return false;}
|
||||
currentFocus = -1;
|
||||
/*create a DIV element that will contain the items (values):*/
|
||||
a = document.createElement("DIV");
|
||||
a.setAttribute("id", this.id + "autocomplete-list");
|
||||
a.setAttribute("class", "autocomplete-items");
|
||||
|
||||
/*append the DIV element as a child of the autocomplete container:*/
|
||||
this.parentNode.appendChild(a);
|
||||
/*for each item in the array...*/
|
||||
for (i = 0; i < arr.length; i++) {
|
||||
/*check if the item starts with the same letters as the text field value:*/
|
||||
if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
|
||||
/*create a DIV element for each matching element:*/
|
||||
b = document.createElement("DIV");
|
||||
/*make the matching letters bold:*/
|
||||
b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
|
||||
b.innerHTML += arr[i].substr(val.length);
|
||||
/*insert a input field that will hold the current array item's value:*/
|
||||
b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
|
||||
/*execute a function when someone clicks on the item value (DIV element):*/
|
||||
b.addEventListener("click", function(e) {
|
||||
/*insert the value for the autocomplete text field:*/
|
||||
inp.value = this.getElementsByTagName("input")[0].value;
|
||||
/*close the list of autocompleted values,
|
||||
(or any other open lists of autocompleted values:*/
|
||||
closeAllLists();
|
||||
});
|
||||
a.appendChild(b);
|
||||
}
|
||||
}
|
||||
});
|
||||
/*execute a function presses a key on the keyboard:*/
|
||||
inp.addEventListener("keydown", function(e) {
|
||||
var x = document.getElementById(this.id + "autocomplete-list");
|
||||
if (x) x = x.getElementsByTagName("div");
|
||||
if (e.keyCode == 40) {
|
||||
/*If the arrow DOWN key is pressed,
|
||||
increase the currentFocus variable:*/
|
||||
currentFocus++;
|
||||
/*and and make the current item more visible:*/
|
||||
addActive(x);
|
||||
} else if (e.keyCode == 38) { //up
|
||||
/*If the arrow UP key is pressed,
|
||||
decrease the currentFocus variable:*/
|
||||
currentFocus--;
|
||||
/*and and make the current item more visible:*/
|
||||
addActive(x);
|
||||
} else if (e.keyCode == 13) {
|
||||
/*If the ENTER key is pressed, prevent the form from being submitted,*/
|
||||
e.preventDefault();
|
||||
if (currentFocus > -1) {
|
||||
/*and simulate a click on the "active" item:*/
|
||||
if (x) x[currentFocus].click();
|
||||
}
|
||||
}
|
||||
});
|
||||
function addActive(x) {
|
||||
/*a function to classify an item as "active":*/
|
||||
if (!x) return false;
|
||||
/*start by removing the "active" class on all items:*/
|
||||
removeActive(x);
|
||||
if (currentFocus >= x.length) currentFocus = 0;
|
||||
if (currentFocus < 0) currentFocus = (x.length - 1);
|
||||
/*add class "autocomplete-active":*/
|
||||
x[currentFocus].classList.add("autocomplete-active");
|
||||
}
|
||||
function removeActive(x) {
|
||||
/*a function to remove the "active" class from all autocomplete items:*/
|
||||
for (var i = 0; i < x.length; i++) {
|
||||
x[i].classList.remove("autocomplete-active");
|
||||
}
|
||||
}
|
||||
function closeAllLists(elmnt) {
|
||||
/*close all autocomplete lists in the document,
|
||||
except the one passed as an argument:*/
|
||||
var x = document.getElementsByClassName("autocomplete-items");
|
||||
for (var i = 0; i < x.length; i++) {
|
||||
if (elmnt != x[i] && elmnt != inp) {
|
||||
x[i].parentNode.removeChild(x[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*execute a function when someone clicks in the document:*/
|
||||
document.addEventListener("click", function (e) {
|
||||
closeAllLists(e.target);
|
||||
});
|
||||
}
|
||||
|
||||
/*An array containing all the country names in the world:*/
|
||||
var countries = ["atest",'btest',"ctest","dtest","etest","qtest","wtest","rtest","ttest","ytest","utest","itest","otest","ptest","stest","ftest","gtest","htest","jtest","ktest","ltest","ztest","xtest","vtest","ntest","mtest"];
|
||||
|
||||
var cartoonist = <?=json_encode($cartoonist);?>;
|
||||
var auto_cartoonist= new Array();
|
||||
for (var i in cartoonist) {
|
||||
auto_cartoonist[i] = cartoonist[i]['name'];
|
||||
}
|
||||
|
||||
var mt_list = <?=json_encode($mt_title)?>;
|
||||
var auto_mt_list= new Array();
|
||||
var auto_mt_idx= new Array();
|
||||
for (var i in mt_list) {
|
||||
auto_mt_list[i] = mt_list[i]['name'];
|
||||
auto_mt_idx[i] = mt_list[i]['idx'];
|
||||
}
|
||||
|
||||
/*initiate the autocomplete function on the "myInput" element, and pass along the countries array as possible autocomplete values:*/
|
||||
autocomplete(document.getElementById("inp_author"), auto_cartoonist);
|
||||
autocomplete(document.getElementById("inp_mt_name"), auto_mt_list);
|
||||
|
||||
</script>
|
||||
|
||||
<?
|
||||
// print_r($_SERVER['QUERY_STRING']);
|
||||
?>
|
||||
366
application/views/admin/maptoon/episode_reg.php
Executable file
366
application/views/admin/maptoon/episode_reg.php
Executable file
@@ -0,0 +1,366 @@
|
||||
<?php
|
||||
$menu_code = '1030';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
<link href="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script>
|
||||
<script src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script>
|
||||
|
||||
<style>
|
||||
div.sortform{border: 1px solid #d8dcdd; padding: 15px; }
|
||||
label.sort_label{width: 80px;}
|
||||
div.mt_div{width: 43%;float:left;}
|
||||
.w175{width: 175px;}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="episode" id="">취소</a>
|
||||
</div>
|
||||
|
||||
<div class="inner_content">
|
||||
<?$mode="";
|
||||
if(isset($modify_data)) $mode="edit";?>
|
||||
<form name="input_form" id="input_form" action="/admin/maptoon/episode_reg_proc" method="post" enctype="multipart/form-data">
|
||||
<?if($mode!="edit"){?>
|
||||
<input type="hidden" name="mode" id="mode_txt" value="">
|
||||
<input type="hidden" name="idx" id="idx_txt" value="">
|
||||
<div class="common_table">
|
||||
<table><tbody>
|
||||
<tr>
|
||||
<th class="fw500">카테고리</th>
|
||||
<td class="tl">
|
||||
<SELECT id="page_list" name="mt_categories_idx" SIZE=1>
|
||||
<option value="n">선택없음</option>
|
||||
<? foreach($category as $i){?>
|
||||
<option value="<?=$i['idx']?>"><?=$i['c_name']?></option>
|
||||
<?}?>
|
||||
</SELECT>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">맵툰 이름</th>
|
||||
<td class="tl">
|
||||
<SELECT id="mt_list_idx" name="mt_list_idx" SIZE=1>
|
||||
<? foreach($mt_title as $i){?>
|
||||
<option value="<?=$i['idx']?>"><?=$i['name']?></option>
|
||||
<?}?>
|
||||
</SELECT>
|
||||
<!-- <span id="edit_mt_list_idx"></span> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">맵툰 회차</th>
|
||||
<td class="tl">
|
||||
<input type="text" id="ep_no" name="ep_no" numberOnly/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title">
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">회차 대표 썸네일<br />(865x486 px)</th>
|
||||
<td class="tl">
|
||||
<input type="file" name="main_img" id="main_img" onchange="change_main_img(this)">
|
||||
<div class="show_img" style="width:600px;height:200px display:none;">
|
||||
<img class="show_img" id="image_section" src="" style="max-height: 100%; max-width: 100%; display:none;"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">맵툰 이미지 업로드</th>
|
||||
<td class="tl">
|
||||
<div style="row">
|
||||
<div class="mt_div" id="mt_img_1">
|
||||
<input type="file" name="webtoon_images[]" id="webtoon_images" data-width="680" data-height="10000">
|
||||
</div>
|
||||
<div class="mt_div">
|
||||
<div class="write_btn tc">
|
||||
<a onclick="add_img();">업로드 필드 추가</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">노출유무</th>
|
||||
<td class="tl">
|
||||
<select id="" name="is_display">
|
||||
<option value="0" >N</option>
|
||||
<option value="1" >Y</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">노출일</th>
|
||||
<td class="tl">
|
||||
<div class="row">
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" name="display_date"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">등록일</th>
|
||||
<td class="tl">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">추천수</th>
|
||||
<td class="tl">
|
||||
<span> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<?}else if($mode=="edit"){?>
|
||||
<input type="hidden" name="mode" id="mode_txt" value="edit">
|
||||
<input type="hidden" name="idx" id="idx_txt" value="<?=$modify_data['idx']?>">
|
||||
<div class="common_table">
|
||||
<table><tbody>
|
||||
<tr>
|
||||
<th class="fw500 w175">카테고리</th>
|
||||
<td class="tl">
|
||||
<?if($mode=="edit"){?>
|
||||
<SELECT id="page_list" name="mt_categories_idx" SIZE=1>
|
||||
<option value="n">선택없음</option>
|
||||
<? foreach($category as $i){
|
||||
if($i['idx']==$modify_data['mt_categories_idx']){?>
|
||||
<option value="<?=$i['idx']?>" selected><?=$i['c_name']?></option>
|
||||
<?}else{?>
|
||||
<option value="<?=$i['idx']?>"><?=$i['c_name']?></option>
|
||||
<?}
|
||||
}
|
||||
}else{?>
|
||||
<SELECT id="page_list" name="mt_categories_idx" SIZE=1>
|
||||
<? foreach($category as $i){?>
|
||||
<option value="<?=$i['idx']?>"><?=$i['c_name']?></option>
|
||||
<?}?>
|
||||
</SELECT>
|
||||
<?}?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">맵툰 이름</th>
|
||||
<td class="tl">
|
||||
<SELECT id="mt_list_idx" name="mt_list_idx" SIZE=1>
|
||||
<? foreach($mt_title as $i){
|
||||
if($modify_data['mt_list_idx']==$i['idx']){?>
|
||||
<option value="<?=$i['idx']?>" selected><?=$i['name']?></option>
|
||||
<?}else{?>
|
||||
<option value="<?=$i['idx']?>"><?=$i['name']?></option>
|
||||
<?}}?>
|
||||
</SELECT>
|
||||
<!-- <span>
|
||||
|
||||
<?//$mt_title[array_search($modify_data['mt_list_idx'],$mt_title)]['name']?>
|
||||
</span>
|
||||
<input type="hidden" value="<?//$modify_data['idx']?>"> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">맵툰 회차</th>
|
||||
<td class="tl">
|
||||
<input type="text" id="ep_no" name="ep_no" numberOnly value="<?= $modify_data['ep_no'];?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title" value="<?if($mode=="edit") echo $modify_data['title'];?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">회차 대표 썸네일</th>
|
||||
<td class="tl">
|
||||
<input type="file" name="main_img" id="main_img" onchange="change_main_img(this)">
|
||||
<div class="show_img" style="width:600px;height:200px">
|
||||
<img class="show_img" id="image_section" src="<?if($mode=="edit") echo $modify_data['main_img'];?>" style="max-height: 100%; max-width: 100%; "/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">맵툰 이미지 업로드</th>
|
||||
<td class="tl">
|
||||
<div style="row">
|
||||
<div class="mt_div" id="mt_img_1">
|
||||
<input type="file" name="webtoon_images[]" id="webtoon_images" data-width="680" data-height="10000">
|
||||
</div>
|
||||
<div class="mt_div">
|
||||
<div class="write_btn tc">
|
||||
<a onclick="add_img();">업로드 필드 추가</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="show_img mt_div">
|
||||
<?$webtoon_images=json_decode($modify_data['webtoon_images']);
|
||||
foreach($webtoon_images as $val){?>
|
||||
<img class="show_img" id="w_image" src="<?if($mode=="edit") echo $val;?>" style="max-height: 20%; max-width: 20%; "/>
|
||||
<?}?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">노출유무</th>
|
||||
<td class="tl">
|
||||
<select id="" name="is_display">
|
||||
<option value="0" <?if($modify_data['is_display']==0) echo "selected"?>>N</option>
|
||||
<option value="1" <?if($modify_data['is_display']==1) echo "selected"?>>Y</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">노출일</th>
|
||||
<td class="tl">
|
||||
<div class="row">
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" name="display_date" value="<?=$modify_data['display_date'] ?>"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">등록일</th>
|
||||
<td class="tl">
|
||||
<span><?=$modify_data['reg_date']?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">추천수</th>
|
||||
<td class="tl">
|
||||
<span><?=$modify_data['recommend_count']?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody></table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:submit_episode()">저장하기</a>
|
||||
<?if($mode=="edit"){?>
|
||||
<a href="/admin/maptoon/announcement/10?idx=<?=$modify_data['mt_list_idx']?>">공지보기</a>
|
||||
<?}?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
//submit btn event
|
||||
function submit_episode(){
|
||||
$( "#input_form" ).submit();
|
||||
}
|
||||
|
||||
//add file upload btn
|
||||
function add_img(){
|
||||
$("#mt_img_1").append("<input type='file' name='webtoon_images[]' />");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//thumbnil img change event
|
||||
function change_main_img(value){
|
||||
if (value.files && value.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
$('#image_section').attr('src', e.target.result);
|
||||
}
|
||||
$(".show_img").show();
|
||||
reader.readAsDataURL(value.files[0]);
|
||||
}
|
||||
}
|
||||
|
||||
//dateTime picker
|
||||
$(function () {
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
locale: 'ko',
|
||||
format : "YYYY-MM-DD HH:mm:ss"
|
||||
});
|
||||
});
|
||||
|
||||
//image size 제한
|
||||
$(document).on('change', 'input[name=webtoon_images]', function(){
|
||||
var $width = $(this).attr('data-width');
|
||||
var $height = $(this).attr('data-height');
|
||||
var $target = $(this);
|
||||
if(window.FileReader){ //FileReader를 지원하는 브라우저의 경우 IE 10이상, 크롬..
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
$('body').append('<img src="" id="temp_img" style="display:none;" />'); //보이지 않는 임시 img 태그를 생성.
|
||||
$img = $('#temp_img').attr('src', e.target.result); //파일을 선택했을 경우 정보를 $img 객체에 저장
|
||||
if($img.width() != $width || $img.height() <= $height){ //가로 세로 사이즈 비교 후 반환
|
||||
alert('지정된 크기와 맞지 않습니다.( 선택된 파일의 크기는 '+$width + 'x'+ $height +' 입니다) 가로는 680 이며 세로가 10000 보다 클 경우 분할 해주세요' );
|
||||
$target.val('');
|
||||
$('#temp_img').remove(); //위에서 생성한 임시 img 태그 삭제
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
reader.readAsDataURL($(this)[0].files[0]); //파일을 img 태그에 보여줄 수 있도록 base64로 url을 생성합니다.
|
||||
} else { //FileReader를 지원하지 않는 브라우저의 경우 IE 9 이하
|
||||
$(this)[0].select();
|
||||
var src = document.selection.createRange().text;
|
||||
$('body').append('<img src="" id="temp_img" style="display:none;" />');
|
||||
$img = $('#temp_img').attr('src', src);
|
||||
$('#temp_img').remove();
|
||||
if($img.width() != $width || $img.height() != $height){
|
||||
alert('지정된 크기와 맞지 않습니다.('+$width + 'x'+ $height +')');
|
||||
|
||||
$(this).val('');
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
$('#temp_img').remove();
|
||||
});
|
||||
|
||||
|
||||
$("input:text[numberOnly]").on("focus", function() {
|
||||
var x = $(this).val();
|
||||
x = removeCommas(x);
|
||||
$(this).val(x);
|
||||
}).on("focusout", function() {
|
||||
var x = $(this).val();
|
||||
if(x && x.length > 0) {
|
||||
if(!$.isNumeric(x)) {
|
||||
x = x.replace(/[^0-9]/g,"");
|
||||
}
|
||||
x = addCommas(x);
|
||||
$(this).val(x);
|
||||
}
|
||||
}).on("keyup", function() {
|
||||
$(this).val($(this).val().replace(/[^0-9]/g,""));
|
||||
});
|
||||
|
||||
</script>
|
||||
198
application/views/admin/maptoon/list.php
Executable file
198
application/views/admin/maptoon/list.php
Executable file
@@ -0,0 +1,198 @@
|
||||
<?php
|
||||
$menu_code = '1020';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/member/member_list/4">
|
||||
|
||||
<!-- <div class="common_tep clearfix type01">
|
||||
|
||||
|
||||
<div class="searh_area">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="write_btn">
|
||||
<!--a href="javascript:news_arr_del_proc();">삭제</a-->
|
||||
<a href="#" id="btn_reg">등록</a>
|
||||
</div>
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<span style="font-weight:bold">Total:</span> <?php echo number_format($total_count);?>
|
||||
|
||||
<span style="margin-left:20px">
|
||||
<?/*
|
||||
foreach ($arr_default_member_gendar as $val) {
|
||||
$member_gender_count = 0;
|
||||
if(isset($arr_member_gender[$val['code']])==true) {
|
||||
$member_gender_count = $arr_member_gender[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_gender', '<?=$val['code']?>');"><?=number_format($member_gender_count)?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px">
|
||||
<?
|
||||
foreach ($arr_default_member_group as $val) {
|
||||
$member_group_count = 0;
|
||||
if(isset($arr_member_group[$val['code']])==true) {
|
||||
$member_group_count = $arr_member_group[$val['code']];
|
||||
}
|
||||
echo '<b>'.$val['txt'].':</b> '.number_format($member_group_count).' ';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px"><b>오늘신규가입:</b> <a href="javascript:click_search('search_member_new', 'today');"><?=number_format($member_new_count);?></a></span>
|
||||
</ul>
|
||||
<ul style="text-align:left; padding-top:10px; padding-bottom:10px;">
|
||||
<span>
|
||||
<?
|
||||
foreach ($arr_default_member_age as $val) {
|
||||
$member_age_count = 0;
|
||||
if(isset($arr_member_age[$val['code']])==true) {
|
||||
$member_age_count = $arr_member_age[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_age', '<?=$val['code']?>');"><?=number_format($member_age_count)?></a>
|
||||
<?
|
||||
}*/
|
||||
?>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>썸네일</th>
|
||||
<th>웹툰이름</th>
|
||||
<th>작가명</th>
|
||||
<th>상태</th>
|
||||
<th>관심웹툰 등록수</th>
|
||||
<th>연재일</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?php
|
||||
if(($total_rows=count($list))==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="13">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?php
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_rows + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$main_img = $val['main_img'];
|
||||
$name = $val['name'];
|
||||
if($val['status']==0) {
|
||||
$status = '연재중';
|
||||
} else if($val['status']==1) {
|
||||
$status = '완결';
|
||||
} else if($val['status']==2) {
|
||||
$status = '미완결';
|
||||
} else {
|
||||
$status = '';
|
||||
}
|
||||
$date_sun = ($val['date_sun']==1) ? '일 / ' : '';
|
||||
$date_mon = ($val['date_mon']==1) ? '월 / ' : '';
|
||||
$date_tue = ($val['date_tue']==1) ? '화 / ' : '';
|
||||
$date_wed = ($val['date_wed']==1) ? '수 / ' : '';
|
||||
$date_thu = ($val['date_thu']==1) ? '목 / ' : '';
|
||||
$date_fri = ($val['date_fri']==1) ? '금 / ' : '';
|
||||
$date_sat = ($val['date_sat']==1) ? '토 / ' : '';
|
||||
$interest_count = $val['interest_count'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $dataNumber;?></td>
|
||||
<td><?php if($main_img!='') echo '<img src="'.$main_img.'" width="100" />';?></td>
|
||||
<td><?php echo $name;?></td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($cartoonist as $v) {
|
||||
if($v['idx']==$val['mt_cartoonists_idx']) {
|
||||
echo $v['name'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $status?></td>
|
||||
<td><?php echo number_format($interest_count);?></td>
|
||||
<td><?php echo $date_sun.$date_mon.$date_tue.$date_wed.$date_thu.$date_fri.$date_sat;?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="/admin/maptoon/maptoon_detail/10?idx=<?php echo $idx;?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
<?php
|
||||
if($val['num_of_episodes']==0) {
|
||||
echo '<a id="btn_del" attr="'.$idx.'" style="cursor:pointer;"><i class="fa fa-close"></i>삭제</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?//=$pagination?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#btn_reg").click(function() {
|
||||
document.location.href = '/admin/maptoon/maptoon_detail/10';
|
||||
});
|
||||
|
||||
$("#btn_del").click(function() {
|
||||
idx = $(this).attr('attr');
|
||||
if(confirm('정말 삭제하시겠습니다. 삭제 후 복구 불가능합니다.') && idx!=undefined && idx>0) {
|
||||
$.ajax({
|
||||
url: '/admin/maptoon/maptoon_list_del',
|
||||
data: {
|
||||
format: 'json',
|
||||
idx:idx
|
||||
},
|
||||
//dataType: 'jsonp',
|
||||
type:'post',
|
||||
success: function(msg) {
|
||||
var json = $.parseJSON(msg);
|
||||
if(json.result=='success') {
|
||||
document.location.reload();
|
||||
} else {
|
||||
alert(json.result);
|
||||
document.location.reload();
|
||||
}
|
||||
},
|
||||
error: function(err) {
|
||||
// console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
180
application/views/admin/maptoon/maptoon_detail.php
Executable file
180
application/views/admin/maptoon/maptoon_detail.php
Executable file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
$menu_code = '1010';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<!-- jquery UI -->
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
|
||||
<!-- //jquery UI -->
|
||||
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<span style="font-weight:bold">웹툰 등록 및 수정</span>
|
||||
</div>
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table news">
|
||||
<form name="frm" method="post" action="/admin/maptoon/maptoon_proc" enctype="multipart/form-data">
|
||||
<!--input type="hidden" name="mode" value="<?php if(isset($mode)==TRUE) echo $mode;?>" /-->
|
||||
<input type="hidden" name="idx" value="<?php if(isset($maptoon_idx)==TRUE) echo $maptoon_idx;?>" />
|
||||
<?php if(isset($aaa)==TRUE) echo $aaa;?>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>맵툰 썸네일</th>
|
||||
<td class="tl"><?php if(isset($data['main_img'])==TRUE && $data['main_img']!='') echo '<img src="'.$data['main_img'].'" />';?> <input type="file" name="main_img" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>맵툰 작가명</th>
|
||||
<td class="tl">
|
||||
<select name="mt_cartoonists_idx">
|
||||
<option value="">------------</option>
|
||||
<?php
|
||||
if(isset($cartoonist)==TRUE) {
|
||||
foreach($cartoonist as $v) {
|
||||
$selected = (isset($data['mt_cartoonists_idx'])==TRUE && $v['idx']==$data['mt_cartoonists_idx']) ? 'selected' : '';
|
||||
echo '<option value="'.$v['idx'].'" '.$selected.'>'.$v['name'].'</option>\n';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>맵툰 이름</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="name" id="name" class="type01" value="<?php if(isset($data['name'])==TRUE) { echo $data['name']; }?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>상태</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="status" id="status1" class="" value="0" <?php if(isset($data['status'])==TRUE && $data['status']==0) echo 'checked'; ?>> <label for="status1">연재중</label>
|
||||
<input type="radio" name="status" id="status2" class="" value="1" <?php if(isset($data['status'])==TRUE && $data['status']==1) echo 'checked'; ?>> <label for="status2">완결</label>
|
||||
<input type="radio" name="status" id="status3" class="" value="2" <?php if(isset($data['status'])==TRUE && $data['status']==2) echo 'checked'; ?>> <label for="status3">미완결</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>연재요일</th>
|
||||
<td class="tl">
|
||||
<input type="checkbox" name="date_sun" id="date_sun" class="" value="1" <?php if(isset($data['date_sun'])==TRUE && $data['date_sun']==1) echo 'checked'; ?>> <label for="date_sun">일</label>
|
||||
<input type="checkbox" name="date_mon" id="date_mon" class="" value="1" <?php if(isset($data['date_mon'])==TRUE && $data['date_mon']==1) echo 'checked'; ?>> <label for="date_mon">월</label>
|
||||
<input type="checkbox" name="date_tue" id="date_tue" class="" value="1" <?php if(isset($data['date_tue'])==TRUE && $data['date_tue']==1) echo 'checked'; ?>> <label for="date_tue">화</label>
|
||||
<input type="checkbox" name="date_wed" id="date_wed" class="" value="1" <?php if(isset($data['date_wed'])==TRUE && $data['date_wed']==1) echo 'checked'; ?>> <label for="date_wed">수</label>
|
||||
<input type="checkbox" name="date_thu" id="date_thu" class="" value="1" <?php if(isset($data['date_thu'])==TRUE && $data['date_thu']==1) echo 'checked'; ?>> <label for="date_thu">목</label>
|
||||
<input type="checkbox" name="date_fri" id="date_fri" class="" value="1" <?php if(isset($data['date_fri'])==TRUE && $data['date_fri']==1) echo 'checked'; ?>> <label for="date_fri">금</label>
|
||||
<input type="checkbox" name="date_sat" id="date_sat" class="" value="1" <?php if(isset($data['date_sat'])==TRUE && $data['date_sat']==1) echo 'checked'; ?>> <label for="date_sat">토</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>맵툰 설명글</th>
|
||||
<td class="tl">
|
||||
<textarea name="description" rows="10" cols="200"><?php if(isset($data['description'])==TRUE) echo $data['description']?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>관심 웹툰 등록수</th>
|
||||
<td class="tl"><?php if(isset($data['interest_count'])==TRUE) echo number_format($data['interest_count']);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등록 편수</th>
|
||||
<td class="tl"><?php if(isset($num_of_episodes)==TRUE) echo number_format($num_of_episodes);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등록일</th>
|
||||
<td class="tl"><?php if(isset($data['reg_date'])==TRUE) echo $data['reg_date'];?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="/admin/">공지보기</a>
|
||||
<a href="#" id="btn_reg">저장하기</a>
|
||||
<a href="/admin/maptoon/maptoon_list/10">목록으로</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#btn_reg").click(function() {
|
||||
$("form[name=frm]").submit();
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
$("#btn_reg").click(function() {
|
||||
$("#dialog").dialog();
|
||||
return false;
|
||||
});
|
||||
|
||||
function reset_popup_form() {
|
||||
$("#c_name").val('');
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
|
||||
function fill_popup_form(a) {
|
||||
if(a!='') {
|
||||
reset_popup_form();
|
||||
$("#c_name").val(a);
|
||||
$( "#dialog" ).dialog();
|
||||
}
|
||||
}
|
||||
|
||||
$(".btn_delete").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(idx>0 && confirm('정말 삭제하시겠습니까?')) {
|
||||
frm = $("form[name='popup']");
|
||||
frm.attr('target','ifrm');
|
||||
$("#popup_idx").val(idx);
|
||||
frm.attr('action','/admin/maptoon/category_del_proc');
|
||||
frm.submit();
|
||||
}
|
||||
});
|
||||
|
||||
$(".btn_modify").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(idx>0) {
|
||||
$.ajax({
|
||||
url: '/admin/maptoon/category/?idx='+idx,
|
||||
data: {
|
||||
format: 'json',
|
||||
idx:idx
|
||||
},
|
||||
//dataType: 'jsonp',
|
||||
type:'get',
|
||||
success: function(msg) {
|
||||
var json = $.parseJSON(msg);
|
||||
console.log(json);
|
||||
if(json.result=='success') {
|
||||
$("#popup_mode").val('upt');
|
||||
$("#popup_idx").val(idx);
|
||||
fill_popup_form(json.c_name);
|
||||
}
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#btn_open_popup").click(function() {
|
||||
reset_popup_form();
|
||||
});
|
||||
|
||||
$("#btn_register").click(function() {
|
||||
frm = $("form[name='popup']");
|
||||
|
||||
if($("#c_name").val()=='') {
|
||||
alert('카테고리를 등록해 주십시오.');
|
||||
$("#c_name").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
frm.attr('target','ifrm');
|
||||
frm.attr('action','/admin/maptoon/category_proc');
|
||||
frm.submit();
|
||||
});*/
|
||||
});
|
||||
</script>
|
||||
261
application/views/admin/maptoon/notice_list.php
Executable file
261
application/views/admin/maptoon/notice_list.php
Executable file
@@ -0,0 +1,261 @@
|
||||
<?php
|
||||
$menu_code = '1010';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
<!-- jquery UI -->
|
||||
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
|
||||
<!--oringin-->
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
|
||||
<!-- <link href="./css/prettify-1.0.css" rel="stylesheet"> -->
|
||||
<!-- <link href="./css/base.css" rel="stylesheet"> -->
|
||||
<link href="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script>
|
||||
|
||||
<script src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
textarea { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
* {box-sizing: border-box;}
|
||||
/*the container must be positioned relative:*/
|
||||
.autocomplete {position: relative; display: inline-block;}
|
||||
.autocomplete-items { position: absolute; border: 1px solid #d4d4d4; border-bottom: none; border-top: none; z-index: 99; /*position the autocomplete items to be the same width as the container:*/
|
||||
top: 15%; left: 0; right: 0; margin: 0px 16px; width: 89%;}
|
||||
.autocomplete-items div { padding: 10px; cursor: pointer; background-color: #fff; border-bottom: 1px solid #d4d4d4; }
|
||||
/*when hovering an item:*/
|
||||
.autocomplete-items div:hover { background-color: #e9e9e9; }
|
||||
/*when navigating through the items using the arrow keys:*/
|
||||
.autocomplete-active { background-color: DodgerBlue !important; color: #ffffff; }
|
||||
</style>
|
||||
<!-- //jquery UI -->
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>맵툰 이름</th>
|
||||
<th>공지 사항 제목</th>
|
||||
<th>등록일</th>
|
||||
<th>공지 기간</th>
|
||||
<th>관리</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?if(count($list)==0) {
|
||||
echo '<tr><td colspan="6">등록된 내용이 없습니다.</td></tr>';
|
||||
} else {
|
||||
$i=0;
|
||||
foreach($list as $val) {
|
||||
$idx= $val['idx'];
|
||||
$mt_name=$val['name'];
|
||||
$contents= $val['contents'];
|
||||
$s_date=$val['s_date'];
|
||||
$e_date=$val['e_date'];
|
||||
$reg_date=$val['reg_date'];?>
|
||||
<tr>
|
||||
<td><?=$idx?><input type="hidden" id="index_<?=$idx?>" value="<?=$i?>"></td>
|
||||
<td><?=$mt_name?></td>
|
||||
<td><?=$contents?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$s_date." ~ ".$e_date?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="#" class="btn_modify" value="<?= $idx;?>"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="#" class="btn_delete" value="<?= $idx;?>"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?$i++; }
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="#" id="btn_reg">등록</a>
|
||||
</div>
|
||||
<div class="pasing_wrap">
|
||||
<?//=$pagination?>
|
||||
</div>
|
||||
|
||||
<!-- register popup -->
|
||||
<div id="dialog" title="맵툰 카테고리 등록/수정" style="display:none;">
|
||||
<!--p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p-->
|
||||
<form name="popup" action="" target="ifrm" method="post">
|
||||
<input type="hidden" id="popup_mode" name="mode" value="" />
|
||||
<input type="hidden" id="popup_idx" name="idx" value="" />
|
||||
<fieldset>
|
||||
<label for="mt_title">맵툰 선택</label>
|
||||
<select id="mt_title" class="ui-widget-content ui-corner-all" name="mt_title">
|
||||
<?foreach($mt_title as $val){?>
|
||||
<option value="<?=$val["idx"]?>"><?=$val["name"]?></option>
|
||||
<?}?>
|
||||
</select>
|
||||
|
||||
<label for="contents">공지 사항 내용</label>
|
||||
<textarea id="contents" name="contents" value="" class="text ui-widget-content ui-corner-all" maxlength="500"></textarea>
|
||||
<label>공지기간</label>
|
||||
<div style="width: 95%;">
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='div_s_date'>
|
||||
<input type='text' id="s_date" name="s_date" class="form-control"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 95%;">
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='div_e_date'>
|
||||
<input type='text' id="e_date" name="e_date" class="form-control"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#div_s_date').datetimepicker({
|
||||
locale: 'ko',
|
||||
format : "YYYY-MM-DD HH:mm:ss"
|
||||
});
|
||||
$('#div_e_date').datetimepicker({
|
||||
useCurrent: false, //Important! See issue #1075
|
||||
locale: 'ko',
|
||||
format : "YYYY-MM-DD HH:mm:ss"
|
||||
});
|
||||
$("#div_s_date").on("dp.change", function (e) {
|
||||
$('#div_e_date').data("DateTimePicker").minDate(e.date);
|
||||
});
|
||||
$("#div_e_date").on("dp.change", function (e) {
|
||||
$('#div_s_date').data("DateTimePicker").maxDate(e.date);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<input type="button" value=" 등록 " id="btn_register" tabindex="-1" >
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<!-- //register popup -->
|
||||
|
||||
<iframe name="ifrm" frameborder="0" width="0" height="0"></iframe>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#btn_reg").click(function() {
|
||||
reset_popup_form();
|
||||
$("#dialog").dialog({"width": 500, "height": 650} );
|
||||
return false;
|
||||
});
|
||||
|
||||
//팝업 초기화
|
||||
function reset_popup_form() {
|
||||
$("#popup_mode").val('');
|
||||
$("#popup_idx").val('');
|
||||
$("#contents").val('');
|
||||
$("#s_date").val('');
|
||||
$("#e_date").val('');
|
||||
$( "#dialog" ).dialog({"width": 500, "height": 650});
|
||||
$("#mt_title option").not(":selected").removeAttr("disabled")
|
||||
}
|
||||
|
||||
//delete click event
|
||||
$(".btn_delete").click(function() {
|
||||
idx = $(this).attr('value');
|
||||
if(confirm('정말 삭제하시겠습니까?')) {
|
||||
frm = $("form[name='popup']");
|
||||
frm.attr('target','ifrm');
|
||||
$("#popup_idx").val(idx);
|
||||
frm.attr('action','/admin/maptoon/announcement_del_proc');
|
||||
frm.submit();
|
||||
}
|
||||
});
|
||||
|
||||
//modify click event
|
||||
$(".btn_modify").click(function() {
|
||||
var idx = $(this).attr('value');
|
||||
var list_index=$("#index_"+idx).val();
|
||||
if(idx>0) {
|
||||
reset_popup_form();
|
||||
|
||||
<?if(isset($list)==TRUE) {?>
|
||||
var edit_notice=<?= json_encode($list);?>;
|
||||
var list=edit_notice[list_index];
|
||||
$("#mt_title").val(list.mt_list_idx);
|
||||
$("#mt_title option").not(":selected").attr("disabled", "disabled");
|
||||
$("#mt_title").attr("readonly",true);
|
||||
$("#contents").val(list.contents);
|
||||
$("#s_date").val(list.s_date);
|
||||
$("#e_date").val(list.e_date);
|
||||
$("#popup_mode").val("modify");
|
||||
$("#popup_idx").val(idx);
|
||||
|
||||
<?}else{?> alert("값이 존재하지 않습니다 관리자에게 문의주세요"); <?}?>
|
||||
}else{
|
||||
alert("값이 존재하지 않습니다 관리자에게 문의주세요");
|
||||
}
|
||||
});
|
||||
|
||||
//등록
|
||||
$("#btn_open_popup").click(function() {
|
||||
reset_popup_form();
|
||||
});
|
||||
|
||||
// 등록하기
|
||||
$("#btn_register").click(function() {
|
||||
frm = $("form[name='popup']");
|
||||
|
||||
if($("#mt_title").val()=='') {
|
||||
alert('맵툰을 선택해주세요.');
|
||||
$("#mt_title").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#s_date").val()=='') {
|
||||
alert('시작일을 등록해 주십시오.');
|
||||
$("#s_date").focus();
|
||||
return false;
|
||||
}
|
||||
if($("#e_date").val()=='') {
|
||||
alert('종료일을 등록해 주십시오.');
|
||||
$("#e_date").focus();
|
||||
return false;
|
||||
}
|
||||
frm.attr('target','ifrm');
|
||||
frm.attr('action','/admin/maptoon/announcement_reg_proc');
|
||||
frm.submit();
|
||||
});
|
||||
});
|
||||
|
||||
//autocomplete
|
||||
|
||||
|
||||
</script>
|
||||
204
application/views/admin/member/columnist_list.php
Executable file
204
application/views/admin/member/columnist_list.php
Executable file
@@ -0,0 +1,204 @@
|
||||
<?
|
||||
$menu_code = '44';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/member/columnist_list/4">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="sort" name="sort" value="<?=$sort?>">
|
||||
<input type="hidden" id="member_group_idx" name="member_group_idx" value="<?=$member_group_idx?>">
|
||||
<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="partner_name" <? if($search_type=='partner_name'){ echo 'selected';}?>>칼럼명</option>
|
||||
<option value="partner_real_name" <? if($search_type=='partner_real_name'){ 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);?>
|
||||
<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>
|
||||
<tr>
|
||||
<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>
|
||||
<th>작성글수</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="10">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$partner_id = $val['partner_id'];
|
||||
$partner_img = $val['partner_img'];
|
||||
$partner_real_name = $val['partner_real_name'];
|
||||
$partner_name = $val['partner_name'];
|
||||
$partner_gender = $val['partner_gender'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$last_login_date = $val['last_login_date'];
|
||||
$article_count = $val['article_count'];
|
||||
$display_sort = $val['display_sort'];
|
||||
|
||||
$partner_gender_txt = '';
|
||||
if($partner_gender == 1) {
|
||||
$partner_gender_txt = '남';
|
||||
} else if($partner_gender == 2) {
|
||||
$partner_gender_txt = '여';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$partner_img?>" width="40"></td>
|
||||
<td><a href="/admin/column/column_list/3?search_type=write_id&search_keyword=<?=$partner_id?>"><?=$partner_name?></a></td>
|
||||
<td><?=$partner_real_name?></td>
|
||||
<td><?=$partner_gender_txt?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$last_login_date?></td>
|
||||
<td><?=number_format($display_sort)?></td>
|
||||
<td><?=number_format($article_count)?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="javascript:partner_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:partner_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
<a href="javascript:partner_article_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>전체게시글삭제</a>
|
||||
<a href="/admin/column/column_list/3?search_type=write_id&search_keyword=<?=$partner_id?>"><i class="fa fa-file"></i>전체게시글보기</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:partner_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:partner_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 partner_add(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/member/columnist_reg/4");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 수정페이지
|
||||
function partner_edit(idx){
|
||||
$("#mode").val('edit');
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/columnist_reg/4");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function partner_del_proc(idx) {
|
||||
$("#idx").val(idx);
|
||||
if(confirm("에디터가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#partner_idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/partner_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 복수 삭제
|
||||
function partner_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("에디터가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/member/partner_del_arr_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 칼럼리스트의 글 모두 삭제
|
||||
function partner_article_del_proc(idx) {
|
||||
if(confirm("칼럼리스트의 글이 모두 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/partner_article_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>
|
||||
289
application/views/admin/member/columnist_reg.php
Executable file
289
application/views/admin/member/columnist_reg.php
Executable file
@@ -0,0 +1,289 @@
|
||||
<?php
|
||||
|
||||
$partner_img = '';
|
||||
$partner_name = '';
|
||||
$partner_id = '';
|
||||
$partner_gender = '';
|
||||
$partner_mobile1 = '';
|
||||
$partner_mobile2 = '';
|
||||
$partner_mobile3 = '';
|
||||
$partner_real_name = '';
|
||||
$partner_email1 = '';
|
||||
$partner_email2 = '';
|
||||
$write_count = 0;
|
||||
$hit_count = 0;
|
||||
$visit_count = 0;
|
||||
$last_login_date = '';
|
||||
$display_sort = 0;
|
||||
if($mode=='edit') {
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/admin/main');
|
||||
exit;
|
||||
}
|
||||
|
||||
$partner_img = $result['partner_img'];
|
||||
$partner_name = $result['partner_name'];
|
||||
$partner_id = $result['partner_id'];
|
||||
$partner_gender = $result['partner_gender'];
|
||||
$partner_mobile = $result['partner_mobile'];
|
||||
$partner_real_name = $result['partner_real_name'];
|
||||
$partner_email = $result['partner_email'];
|
||||
$last_login_date = $result['last_login_date'];
|
||||
$display_sort = $result['display_sort'];
|
||||
|
||||
if($partner_email!='') {
|
||||
$partner_email = explode("@", $partner_email);
|
||||
$partner_email1 = $partner_email[0];
|
||||
$partner_email2 = $partner_email[1];
|
||||
}
|
||||
|
||||
if($partner_mobile!='') {
|
||||
$partner_mobile = explode("-", $partner_mobile);
|
||||
$partner_mobile1 = $partner_mobile[0];
|
||||
$partner_mobile2 = $partner_mobile[1];
|
||||
$partner_mobile3 = $partner_mobile[2];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '44';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$admin_type = $this->session->userdata('Adm_Type');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/member/columnist_reg_proc" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="mode" id="mode" value="<?=$mode?>">
|
||||
<input type="hidden" name="idx" id="idx" value="<?=$idx?>">
|
||||
<input type="hidden" name="sort" id="sort" value="<?=$sort?>">
|
||||
<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?>">
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>사진</th>
|
||||
<td class="tl"><input type="file" name="partner_img" id="partner_img" class="input00">
|
||||
<? if($partner_img!='') { ?>
|
||||
<input type="checkbox" name="is_del_partner_img" value="Y">삭제
|
||||
<input type="hidden" name="org_partner_img" value="<?=$partner_img?>">
|
||||
<img src="<?=$partner_img?>" width="100px">
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>칼럼명</th>
|
||||
<td class="tl">
|
||||
<? if($mode=='add' || $admin_type == '0') { ?>
|
||||
<input type="text" name="partner_name" id="partner_name" class="type02" size="30" value="<?=$partner_name?>">
|
||||
<? } else {?>
|
||||
<input type="hidden" name="partner_name" id="partner_name" class="type02" size="30" value="<?=$partner_name?>"><?=$partner_name?>
|
||||
|
||||
<? }?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td class="tl"><input type="text" name="partner_real_name" id="partner_real_name" class="type02" size="30" value="<?=$partner_real_name?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td class="tl">
|
||||
<? if($mode=='add') {?>
|
||||
<input type="text" name="partner_id" id="partner_id" class="type02" size="30" value="<?=$partner_id?>"> <button type="button" class="btn_black" style="width:100px" onclick="partner_id_check();" style="cursor: pointer;">중복체크</button>
|
||||
<? } else {?>
|
||||
<input type="hidden" name="partner_id" id="partner_id" class="input00" size="30" value="<?=$partner_id?>">
|
||||
<?=$partner_id?>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td class="tl"><input type="password" name="partner_pwd" id="partner_pwd" class="type02" size="30"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>비밀번호확인</th>
|
||||
<td class="tl"><input type="password" name="partner_re_pwd" id="partner_re_pwd" class="type02" size="30"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="partner_email1" id="partner_email1" class="type02" size="30" value="<?=$partner_email1?>">@<input type="text" name="partner_email2" id="partner_email2" class="type02" size="30" value="<?=$partner_email2?>">
|
||||
<select name="select_email2" onchange="change_email_domail(this.value);">
|
||||
<option name="직접입력" value="">직접입력</option>
|
||||
<option value="naver.com">네이버</option>
|
||||
<option value="daum.net">다음</option>
|
||||
<option value="nate.com">네이트</option>
|
||||
<option value="gmail.com">지메일</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>성별</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="partner_gender" id="partner_gender1" value="1" class="input00" <? if($partner_gender=='1') { echo 'checked';}?>> 남자
|
||||
<input type="radio" name="partner_gender" id="partner_gender2" value="2" class="input00" <? if($partner_gender=='2') { echo 'checked';}?>> 여자
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>모바일폰</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="partner_mobile1" id="partner_mobile1" size="10" class="type02" value="<?=$partner_mobile1?>">-
|
||||
<input type="text" name="partner_mobile2" id="partner_mobile2" size="10" class="type02" value="<?=$partner_mobile2?>">-
|
||||
<input type="text" name="partner_mobile3" id="partner_mobile3" size="10" class="type02" value="<?=$partner_mobile3?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>출력순위</th>
|
||||
<td class="tl">
|
||||
<? if($admin_type=='0') {?>
|
||||
<input type="text" name="display_sort" id="display_sort" size="10" class="type02" value="<?=$display_sort?>">
|
||||
<? } else { ?>
|
||||
<input type="hidden" name="display_sort" id="display_sort" size="10" class="type02" value="<?=$display_sort?>"><?=$display_sort?>
|
||||
<? }?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<? if($mode=='edit') {?>
|
||||
<h2 class="subtitle">기타정보</h2>
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<th>작성글수</th>
|
||||
<td class="tl"><?=number_format($write_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>받은조회수</th>
|
||||
<td class="tl"><?=number_format($hit_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>방문수</th>
|
||||
<td class="tl"><?=number_format($visit_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>최종방문일</th>
|
||||
<td class="tl"><?=$last_login_date?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<? }?>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:columnist_reg_proc();">저장하기</a>
|
||||
<? if($admin_type == '0') { ?>
|
||||
<a href="/admin/member/columnist_list/4/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>">목록으로</a>
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function partner_id_check(){
|
||||
if($("#partner_id").val()=='') {
|
||||
alert("아이디를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
var form_data = {
|
||||
"partner_id" : $("#partner_id").val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/member/partner_id_check_proc',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
if(rtn_json.result_code!='0000') {
|
||||
alert("사용할수없는 아이디입니다.");
|
||||
$("#partner_id").val('');
|
||||
return false;
|
||||
} else {
|
||||
alert("사용가능한 아이디입니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function change_email_domail(val){
|
||||
$("#partner_email2").val(val);
|
||||
}
|
||||
|
||||
function columnist_reg_proc(){
|
||||
if($("#partner_write_name").val()=='') {
|
||||
alert("칼럼명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#partner_name").val()=='') {
|
||||
alert("이름을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#partner_id").val()=='') {
|
||||
alert("아이디를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
<? if($mode=='add') {?>
|
||||
|
||||
var idReg = /^[A-za-z0-9]/g;
|
||||
if( !idReg.test( $("#partner_id").val() ) ) {
|
||||
alert("아이디는 영문자 또는 숫자여여 합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#partner_pwd").val()=='') {
|
||||
alert("비밀번호를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
<? }?>
|
||||
if($("#partner_pwd").val()!='') {
|
||||
if($("#partner_pwd").val()!=$("#partner_re_pwd").val()) {
|
||||
alert("비밀번호를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var partner_email = $("#partner_email1").val()+"@"+$("#partner_email2").val();
|
||||
if(checkEmail(partner_email)==false) {
|
||||
alert("이메일을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var mobile = $("#partner_mobile1").val()+$("#partner_mobile2").val()+$("#partner_mobile3").val();
|
||||
if(mobile !='') {
|
||||
if(checkNumber(mobile)==false) {
|
||||
alert("모바일폰을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
245
application/views/admin/member/editor_list.php
Executable file
245
application/views/admin/member/editor_list.php
Executable file
@@ -0,0 +1,245 @@
|
||||
<?
|
||||
$menu_code = '43';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
foreach ($arr_category1 as $key=>$val) {
|
||||
$arr_category_add1[] = array('category_code'=>$val['idx'], 'category_name'=>$val['category_name']);
|
||||
}
|
||||
|
||||
foreach ($arr_category2 as $key=>$val) {
|
||||
$arr_category_add2[$val['category_idx']][] = array('category_code'=>$val['idx'], 'category_name'=>$val['channel_name']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/member/editor_list/4">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="member_group_idx" name="member_group_idx" value="<?=$member_group_idx?>">
|
||||
<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="partner_name" <? if($search_type=='partner_name'){ echo 'selected';}?>>에디터명</option>
|
||||
<option value="partner_real_name" <? if($search_type=='partner_real_name'){ 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" style="margin-top: 30px">
|
||||
<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>
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_category_code1" onchange="check_search()" class="type01">
|
||||
<option value="">카테고리</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="check_search()" class="type01">
|
||||
<option value="">채널</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<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>
|
||||
<th>최종방문</th>
|
||||
<th>순위</th>
|
||||
<th>작성글수</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="12">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$partner_img = $val['partner_img'];
|
||||
$category_name = $val['category_name'];
|
||||
$channel_name = $val['channel_name'];
|
||||
$partner_real_name = $val['partner_real_name'];
|
||||
$partner_id = $val['partner_id'];
|
||||
$partner_name = $val['partner_name'];
|
||||
$partner_gender = $val['partner_gender'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$last_login_date = $val['last_login_date'];
|
||||
$display_sort = $val['display_sort'];
|
||||
$article_count = $val['article_count'];
|
||||
$partner_gender_txt = '여';
|
||||
if($partner_gender == 1) $partner_gender_txt = '남';
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$partner_img?>" width="40"></td>
|
||||
<td><a href="/admin/life/life_category_list/5?search_type=category_name&search_keyword=<?=$category_name?>"><?=$category_name?></a></td>
|
||||
<td><a href="/admin/life/life_channel_list/5?search_type=channel_name&search_keyword=<?=$channel_name?>"><?=$channel_name?></a></td>
|
||||
<td><a href="/admin/life/life_list/5?search_type=editor_name&search_keyword=<?=$partner_name?>"><?=$partner_name?></a></td>
|
||||
<td><?=$partner_real_name?></td>
|
||||
<td><?=$partner_gender_txt?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$last_login_date?></td>
|
||||
<td><?=$display_sort?></td>
|
||||
<td><?=number_format($article_count)?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="javascript:partner_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:partner_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
<a href="javascript:partner_article_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>전체게시글삭제</a>
|
||||
<a href="/admin/life/life_list/5?search_type=write_id&search_keyword=<?=$partner_id?>"><i class="fa fa-file"></i>전체게시글보기</a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:partner_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:partner_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 partner_add(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/member/editor_reg/4");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 수정페이지
|
||||
function partner_edit(idx){
|
||||
$("#mode").val('edit');
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/editor_reg/4");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function partner_del_proc(idx) {
|
||||
$("#idx").val(idx);
|
||||
if(confirm("에디터가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#partner_idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/partner_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 복수 삭제
|
||||
function partner_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("에디터가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/member/partner_del_arr_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//글 모두 삭제
|
||||
function partner_article_del_proc(idx) {
|
||||
if(confirm("에디터의 글이 모두 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/partner_article_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>
|
||||
386
application/views/admin/member/editor_reg.php
Executable file
386
application/views/admin/member/editor_reg.php
Executable file
@@ -0,0 +1,386 @@
|
||||
<?php
|
||||
|
||||
|
||||
$partner_img = '';
|
||||
$partner_name = '';
|
||||
$partner_id = '';
|
||||
$partner_gender = '';
|
||||
$partner_mobile1 = '';
|
||||
$partner_mobile2 = '';
|
||||
$partner_mobile3 = '';
|
||||
$sns_id1 = '';
|
||||
$sns_id2 = '';
|
||||
$sns_id3 = '';
|
||||
$sns_id4 = '';
|
||||
$sns_id5 = '';
|
||||
$partner_intro = '';
|
||||
$partner_real_name = '';
|
||||
$category_idx = '';
|
||||
$channel_idx = '';
|
||||
$display_sort = '';
|
||||
$partner_email1 = '';
|
||||
$partner_email2 = '';
|
||||
$write_count = 0;
|
||||
$hit_count = 0;
|
||||
$visit_count = 0;
|
||||
$last_login_date = '';
|
||||
$main_img = '';
|
||||
|
||||
if($mode=='edit') {
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/admin/main');
|
||||
exit;
|
||||
}
|
||||
|
||||
$partner_img = $result['partner_img'];
|
||||
$partner_name = $result['partner_name'];
|
||||
$partner_id = $result['partner_id'];
|
||||
$partner_gender = $result['partner_gender'];
|
||||
$partner_mobile = $result['partner_mobile'];
|
||||
$sns_id1 = $result['sns_id1'];
|
||||
$sns_id2 = $result['sns_id2'];
|
||||
$sns_id3 = $result['sns_id3'];
|
||||
$sns_id4 = $result['sns_id4'];
|
||||
$sns_id5 = $result['sns_id5'];
|
||||
$partner_intro = $result['partner_intro'];
|
||||
$partner_real_name = $result['partner_real_name'];
|
||||
$category_idx = $result['category_idx'];
|
||||
$channel_idx = $result['channel_idx'];
|
||||
$display_sort = $result['display_sort'];
|
||||
$partner_email = $result['partner_email'];
|
||||
$last_login_date = $result['last_login_date'];
|
||||
$main_img = $result['main_img'];
|
||||
|
||||
$partner_email = explode("@", $partner_email);
|
||||
$partner_email1 = $partner_email[0];
|
||||
$partner_email2 = $partner_email[1];
|
||||
|
||||
$partner_mobile = explode("-", $partner_mobile);
|
||||
$partner_mobile1 = $partner_mobile[0];
|
||||
$partner_mobile2 = $partner_mobile[1];
|
||||
$partner_mobile3 = $partner_mobile[2];
|
||||
|
||||
}
|
||||
|
||||
$arr_channel_reg = array();
|
||||
foreach ($arr_channel as $val) {
|
||||
$arr_channel_reg[$val['category_idx']][] = array('idx'=>$val['idx'], 'channel_name'=>$val['channel_name']);
|
||||
}
|
||||
|
||||
$menu_code = '43';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$admin_type = $this->session->userdata('Adm_Type');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/member/editor_reg_proc" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="mode" id="mode" value="<?=$mode?>">
|
||||
<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_channel" name="search_channel" value="<?=$search_channel?>">
|
||||
<input type="hidden" id="sort" name="sort" value="<?=$sort?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>사진</th>
|
||||
<td class="tl"><input type="file" name="partner_img" id="partner_img" class="input00">
|
||||
<? if($partner_img!='') { ?>
|
||||
<input type="checkbox" name="is_del_partner_img" value="Y">삭제
|
||||
<input type="hidden" name="org_partner_img" value="<?=$partner_img?>">
|
||||
<img src="<?=$partner_img?>" width="100px">
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category_idx" id="category_idx" onchange="change_category(this.value)">
|
||||
<option value="">선택</option>
|
||||
<? foreach($arr_category as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($category_idx==$val['idx']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널</th>
|
||||
<td class="tl">
|
||||
<select name="channel_idx" id="channel_idx">
|
||||
<option value="">선택</option>
|
||||
<? foreach($arr_channel_reg[$category_idx] as $val) {
|
||||
|
||||
?>
|
||||
<option value="<?=$val['idx']?>" <? if($channel_idx==$val['idx']) { echo 'selected'; }?>><?=$val['channel_name']?></option>
|
||||
|
||||
<? }?>
|
||||
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>에디터명</th>
|
||||
<td class="tl">
|
||||
<? if($mode=='add' || $admin_type == '0') { ?>
|
||||
<input type="text" name="partner_name" id="partner_name" class="type02" size="30" value="<?=$partner_name?>">
|
||||
<? } else { ?>
|
||||
<input type="hidden" name="partner_name" id="partner_name" class="type02" size="30" value="<?=$partner_name?>"><?=$partner_name?>
|
||||
|
||||
<? }?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>한줄소개</th>
|
||||
<td class="tl"><input type="text" name="partner_intro" id="partner_intro" class="input00" size="30" value="<?=$partner_intro?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>대문이미지</th>
|
||||
<td class="tl">
|
||||
<input type="file" name="main_img" id="main_img" class="input00">
|
||||
<? if($main_img!='') { ?>
|
||||
<input type="checkbox" name="is_del_main_img" value="Y">삭제
|
||||
<input type="hidden" name="org_main_img" value="<?=$main_img?>">
|
||||
<img src="<?=$main_img?>" width="100px">
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>출력순위</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="display_sort" id="display_sort" class="type03" size="30" value="<?=$display_sort?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>SNS공유ID</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="sns_id1" id="sns_id1" class="type02" size="30" placeholder="페이스북" value="<?=$sns_id1?>"></br>
|
||||
<input type="text" name="sns_id2" id="sns_id2" class="type02" size="30" placeholder="인스타" value="<?=$sns_id2?>"></br>
|
||||
<input type="text" name="sns_id3" id="sns_id3" class="type02" size="30" placeholder="밴드" value="<?=$sns_id3?>"></br>
|
||||
<input type="text" name="sns_id4" id="sns_id4" class="type02" size="30" placeholder="카카오스토리채널" value="<?=$sns_id4?>"></br>
|
||||
<input type="text" name="sns_id5" id="sns_id5" class="type02" size="30" placeholder="카카오스토리" value="<?=$sns_id5?>"></br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td class="tl"><input type="text" name="partner_real_name" id="partner_real_name" class="type02" size="30" value="<?=$partner_real_name?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td class="tl">
|
||||
<? if($mode=='add') {?>
|
||||
<input type="text" name="partner_id" id="partner_id" class="type02" size="30" value="<?=$partner_id?>"> <button type="button" class="btn_black" style="width:100px" onclick="partner_id_check();" style="cursor: pointer;">중복체크</button>
|
||||
<? } else {?>
|
||||
<input type="hidden" name="partner_id" id="partner_id" class="input00" size="30" value="<?=$partner_id?>">
|
||||
<?=$partner_id?>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td class="tl"><input type="password" name="partner_pwd" id="partner_pwd" class="type02" size="30"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>비밀번호확인</th>
|
||||
<td class="tl"><input type="password" name="partner_re_pwd" id="partner_re_pwd" class="type02" size="30"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="partner_email1" id="partner_email1" class="type02" size="30" value="<?=$partner_email1?>">@<input type="text" name="partner_email2" id="partner_email2" class="type02" size="30" value="<?=$partner_email2?>">
|
||||
<select name="select_email2" onchange="change_email_domail(this.value);">
|
||||
<option name="직접입력" value="">직접입력</option>
|
||||
<option value="naver.com">네이버</option>
|
||||
<option value="daum.net">다음</option>
|
||||
<option value="nate.com">네이트</option>
|
||||
<option value="gmail.com">지메일</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>성별</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="partner_gender" id="partner_gender1" value="1" class="input00" <? if($partner_gender=='1') { echo 'checked';}?>> 남자
|
||||
<input type="radio" name="partner_gender" id="partner_gender2" value="2" class="input00" <? if($partner_gender=='2') { echo 'checked';}?>> 여자
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>모바일폰</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="partner_mobile1" id="partner_mobile1" size="10" class="type02" value="<?=$partner_mobile1?>">-
|
||||
<input type="text" name="partner_mobile2" id="partner_mobile2" size="10" class="type02" value="<?=$partner_mobile2?>">-
|
||||
<input type="text" name="partner_mobile3" id="partner_mobile3" size="10" class="type02" value="<?=$partner_mobile3?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<? if($mode=='edit') {?>
|
||||
|
||||
<h2 class="subtitle">기타정보</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>작성글수</th>
|
||||
<td class="tl"><?=number_format($write_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>받은조회수</th>
|
||||
<td class="tl"><?=number_format($hit_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>방문수</th>
|
||||
<td class="tl"><?=number_format($visit_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>최종방문일</th>
|
||||
<td class="tl"><?=$last_login_date?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:editor_reg_proc();">저장하기</a>
|
||||
<? if($admin_type == '0') { ?>
|
||||
<a href="/admin/member/editor_list/4/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_channel=<?=$search_channel?>">목록으로</a>
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function partner_id_check(){
|
||||
if($("#partner_id").val()=='') {
|
||||
alert("아이디를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
var form_data = {
|
||||
"partner_id" : $("#partner_id").val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/member/partner_id_check_proc',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
if(rtn_json.result_code!='0000') {
|
||||
alert("사용할수없는 아이디입니다.");
|
||||
$("#partner_id").val('');
|
||||
return false;
|
||||
} else {
|
||||
alert("사용가능한 아이디입니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function change_category(val){
|
||||
var json_category = '<?=json_encode($arr_channel)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#channel_idx').empty();
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#channel_idx').append(option);
|
||||
for(key in json_category) {
|
||||
if(json_category[key]['category_idx'] == val) {
|
||||
option = $("<option value='"+json_category[key]['idx']+"'>"+json_category[key]['channel_name']+"</option>");
|
||||
$('#channel_idx').append(option);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function change_email_domail(val){
|
||||
$("#partner_email2").val(val);
|
||||
}
|
||||
|
||||
function editor_reg_proc(){
|
||||
if($("#category_idx").val()=='') {
|
||||
alert("카테고리를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#channel_idx").val()=='') {
|
||||
alert("채널을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#partner_name").val()=='') {
|
||||
alert("에디터명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
<? if($mode=='add') {?>
|
||||
if($("#partner_id").val()=='') {
|
||||
alert("아이디를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var idReg = /^[A-za-z0-9]/g;
|
||||
if( !idReg.test( $("#partner_id").val() ) ) {
|
||||
alert("아이디는 영문자 또는 숫자여여 합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#partner_pwd").val()=='') {
|
||||
alert("비밀번호를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
<? }?>
|
||||
if($("#partner_pwd").val()!='') {
|
||||
if($("#partner_pwd").val()!=$("#partner_re_pwd").val()) {
|
||||
alert("비밀번호를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var partner_email = $("#partner_email1").val()+"@"+$("#partner_email2").val();
|
||||
if(checkEmail(partner_email)==false) {
|
||||
alert("이메일을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#display_sort").val()!='') {
|
||||
if(checkNumber($("#display_sort").val())==false) {
|
||||
alert("출력순위를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var mobile = $("#partner_mobile1").val()+$("#partner_mobile2").val()+$("#partner_mobile3").val();
|
||||
if(mobile !='') {
|
||||
if(checkNumber(mobile)==false) {
|
||||
alert("모바일폰을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
86
application/views/admin/member/member_comment_list.php
Executable file
86
application/views/admin/member/member_comment_list.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<? require_once ("./static_data/code.php");?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/member/member_comment_list/4">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="member_idx" name="member_idx">
|
||||
<input type="hidden" id="member_id" name="member_id">
|
||||
|
||||
|
||||
<div class="common_table" style="width:600px">
|
||||
<h2 class="subtitle">회원별 전체 댓글리스트</h2>
|
||||
<table style="width:600px">
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>게시판명</th>
|
||||
<th>내용</th>
|
||||
<th>좋아요</th>
|
||||
<th>별로에요</th>
|
||||
<th>등록일</th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="6">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$content_type = $val['content_type'];
|
||||
$comment = $val['comment'];
|
||||
$like_count = $val['like_count'];
|
||||
$bad_count = $val['bad_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
|
||||
$content_type_name = $def_arr_content[$content_type];
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td style="width:50px"><?=number_format($dataNumber)?></td>
|
||||
<td style="width:50px"><?=$content_type_name?></td>
|
||||
<td><?=$comment?></td>
|
||||
<td style="width:50px"><?=number_format($like_count, 0);?></td>
|
||||
<td style="width:50px"><?=number_format($bad_count, 0);?></td>
|
||||
<td style="width:100px"><?=$reg_date?></td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
BODY {
|
||||
scrollbar-face-color:#FFFFFF;
|
||||
scrollbar-highlight-color: #6365CE;
|
||||
scrollbar-3dlight-color: #FFFFFF;
|
||||
scrollbar-shadow-color: #6365CE;
|
||||
scrollbar-darkshadow-color: #FFFFFF;
|
||||
scrollbar-track-color: #FFFFFF;
|
||||
scrollbar-arrow-color: #6365CE;
|
||||
overflow-x:hidden
|
||||
}
|
||||
</style>
|
||||
270
application/views/admin/member/member_edit.php
Executable file
270
application/views/admin/member/member_edit.php
Executable file
@@ -0,0 +1,270 @@
|
||||
<?php
|
||||
$member_idx = $result['idx'];
|
||||
$member_img = $result['member_img'];
|
||||
$member_name = $result['member_name'];
|
||||
$member_id = $result['member_id'];
|
||||
$member_group_idx = $result['member_group_idx'];
|
||||
$member_email = $result['member_email'];
|
||||
$member_nickname = $result['member_nickname'];
|
||||
$member_birth = $result['member_birth'];
|
||||
$member_calendar = $result['member_calendar'];
|
||||
$member_gender = $result['member_gender'];
|
||||
$member_mobile = $result['member_mobile'];
|
||||
$is_member_auth = $result['is_member_auth'];
|
||||
$member_church = $result['member_church'];
|
||||
$etc1 = $result['etc1'];
|
||||
$etc2 = $result['etc2'];
|
||||
$etc3 = $result['etc3'];
|
||||
$etc4 = $result['etc4'];
|
||||
$etc5 = $result['etc5'];
|
||||
$is_agree_sms = $result['is_agree_sms'];
|
||||
$is_agree_mail = $result['is_agree_mail'];
|
||||
$is_agree_info_open = $result['is_agree_info_open'];
|
||||
$last_login_date = $result['last_login_date'];
|
||||
$visit_count = $result['visit_count'];
|
||||
$bbs_write_count = $result['bbs_write_count'];
|
||||
$reply_write_count = $result['reply_write_count'];
|
||||
$sns_type = $result['sns_type'];
|
||||
|
||||
$member_email = explode("@", $member_email);
|
||||
$member_email1 = $member_email[0];
|
||||
$member_email2 = $member_email[1];
|
||||
|
||||
$member_birth = explode("-", $member_birth);
|
||||
$member_birth1 = $member_birth[0];
|
||||
$member_birth2 = $member_birth[1];
|
||||
$member_birth3 = $member_birth[2];
|
||||
|
||||
$member_mobile = explode("-", $member_mobile);
|
||||
$member_mobile1 = $member_mobile[0];
|
||||
$member_mobile2 = $member_mobile[1];
|
||||
$member_mobile3 = $member_mobile[2];
|
||||
|
||||
$menu_code = '42';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/member/member_edit_proc" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="member_idx" id="member_idx" value="<?=$member_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_member_group" name="search_member_group" value="<?=$search_member_group?>">
|
||||
<input type="hidden" id="search_member_gender" name="search_member_gender" value="<?=$search_member_gender?>">
|
||||
<input type="hidden" id="search_member_age" name="search_member_age" value="<?=$search_member_age?>">
|
||||
<input type="hidden" id="search_member_new" name="search_member_new" value="<?=$search_member_new?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<table>
|
||||
<tr>
|
||||
<th>사진</th>
|
||||
<td class="tl"><input type="file" name="member_img" id="member_img" class="input00">
|
||||
<? if($member_img!='') { ?>
|
||||
<input type="checkbox" name="is_del_member_img" value="Y">삭제
|
||||
<input type="hidden" name="org_member_img" value="<?=$member_img?>">
|
||||
<img src="<?=$member_img?>" width="100px">
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td class="tl"><?=$member_name?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td class="tl"><?=$member_id?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="member_email1" id="member_email1" class="type02" size="30" value="<?=$member_email1?>">@<input type="text" name="member_email2" id="member_email2" class="type02" size="30" value="<?=$member_email2?>">
|
||||
<select name="select_member_email2" onchange="change_email_domail(this.value);">
|
||||
<option name="직접입력" value="">직접입력</option>
|
||||
<option value="naver.com">네이버</option>
|
||||
<option value="daum.net">다음</option>
|
||||
<option value="nate.com">네이트</option>
|
||||
<option value="gmail.com">지메일</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>생년월일</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="member_birth1" id="member_birth1" class="type02" size="10" value="<?=$member_birth1?>">년 <input type="text" name="member_birth2" id="member_birth2" class="type03" size="10" value="<?=$member_birth2?>">월 <input type="text" name="member_birth3" id="member_birth3" class="type03" size="10" value="<?=$member_birth3?>">일
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>음력/양력</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="member_calendar" id="member_calendar" value="1" class="input00" <? if($member_calendar=='1') { echo 'checked';}?>> 양력
|
||||
<input type="radio" name="member_calendar" id="member_calendar" value="2" class="input00" <? if($member_calendar=='2') { echo 'checked';}?>> 음력
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>성별</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="member_gender" id="member_gender" value="1" class="input00" <? if($member_gender=='1') { echo 'checked';}?>> 남자
|
||||
<input type="radio" name="member_gender" id="member_gender" value="2" class="input00" <? if($member_gender=='2') { echo 'checked';}?>> 여자
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>모바일폰</th>
|
||||
<td class="tl">
|
||||
<?=$member_mobile1?>-<?=$member_mobile2?>-<?=$member_mobile3?>
|
||||
<? if($is_member_auth=='Y') { echo '(본인인증완료)'; } else { echo '(본인인증)'; }?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<h2 class="subtitle">옵션정보</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>출석교회</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="member_church" id="member_church" class="type01" size="40" value="<?=$member_church?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? for($i=10;$i<=14;$i++) {
|
||||
if($member_setting_list[$i]['is_use'] == 'Y' ) {
|
||||
$field_value = ${"".$member_setting_list[$i]['item_field_name']};
|
||||
?>
|
||||
<tr>
|
||||
<th><?=$member_setting_list[$i]['item_title']?></th>
|
||||
<td class="tl">
|
||||
<input type="text" name="<?=$member_setting_list[$i]['item_field_name']?>" id="<?=$member_setting_list[$i]['item_field_name']?>" class="type01" size="40" value="<?=$field_value?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? }
|
||||
}?>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="subtitle">동의설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>SMS수신</th>
|
||||
<td class="tl">
|
||||
<input type="checkbox" name="is_agree_sms" id="is_agree_sms" class="input00" value="Y" <? if($is_agree_sms=='Y'){ echo 'checked';}?>> SMS 수신을 동의합니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일수신</th>
|
||||
<td class="tl">
|
||||
<input type="checkbox" name="is_agree_mail" id="is_agree_mail" class="input00" value="Y" <? if($is_agree_mail=='Y'){ echo 'checked';}?>> 이메일 수신을 동의합니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>정보공개</th>
|
||||
<td class="tl">
|
||||
<input type="checkbox" name="is_agree_info_open" id="is_agree_info_open" class="input00" value="Y" <? if($is_agree_info_open=='Y'){ echo 'checked';}?>> 정보를 공개합니다.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="subtitle">기타정보</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>작성글수</th>
|
||||
<td class="tl"><?=number_format($bbs_write_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>작성댓글수</th>
|
||||
<td class="tl"><?=number_format($reply_write_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>방문수</th>
|
||||
<td class="tl"><?=number_format($visit_count)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>최종방문일</th>
|
||||
<td class="tl"><?=$last_login_date?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>회원그룹</th>
|
||||
<td class="tl">
|
||||
<select name="member_group_idx" id="member_group_idx" onchange="chk_member_group();">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($group_list as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($member_group_idx==$val['idx']) { echo 'selected';}?>><?=$val['member_group_name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:member_edit_proc();">저장하기</a>
|
||||
<a href="/admin/member/member_list/4/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_member_group=<?=$search_member_group?>&search_member_gender=<?=$search_member_gender?>&search_member_age=<?=$search_member_age?>&search_member_new=<?=$search_member_new?>">목록으로</a>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_email_domail(val){
|
||||
$("#member_email2").val(val);
|
||||
}
|
||||
|
||||
function chk_member_group() {
|
||||
var now_member_group_idx = "<?=$member_group_idx?>";
|
||||
if(now_member_group_idx == '2' || now_member_group_idx == '4' || now_member_group_idx == '5') { // 2:sns회원, 4:탈퇴회원, 5:영구회원 는 수정 안되게
|
||||
alert("현재 그룹은 변경할 수 없습니다.");
|
||||
$("#member_group_idx").val(now_member_group_idx).prop("selected", true);
|
||||
return false;
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
function member_edit_proc(){
|
||||
var member_email = $("#member_email1").val()+"@"+$("#member_email2").val();
|
||||
if(checkEmail(member_email)==false) {
|
||||
alert("이메일을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var member_birth = $("#member_birth1").val()+$("#member_birth2").val()+$("#member_birth3").val();
|
||||
if(checkNumber(member_birth)==false) {
|
||||
alert("생년월일을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#member_group_idx").val()=='') {
|
||||
alert("회원그룹을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
var now_member_group_idx = "<?=$member_group_idx?>";
|
||||
var member_group_idx = $("#member_group_idx").val();
|
||||
if(chk_member_group()==false) {
|
||||
alert("현재 그룹은 변경할 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
if(now_member_group_idx != '4' && now_member_group_idx != '5') {
|
||||
if(member_group_idx == '4' || member_group_idx == '5') { // 4:탈퇴회원, 5:영구회원로 변경할때 알림창
|
||||
if(confirm("탈퇴회원으로 변경하겠습니까?") == false) { //확인
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
210
application/views/admin/member/member_group_list.php
Executable file
210
application/views/admin/member/member_group_list.php
Executable file
@@ -0,0 +1,210 @@
|
||||
<?
|
||||
$menu_code = '412';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" method="post">
|
||||
<input type="hidden" name="member_type" value="<?=$member_type?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="mode" id="mode">
|
||||
|
||||
|
||||
<div class="common_tep clearfix type01" style="margin-bottom: 30px">
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/member/member_group_list/4/1?member_type=1" <? if($member_type=='1') { echo 'class="on"';}?>>일반</a></li>
|
||||
<li><a href="/admin/member/member_group_list/4/1?member_type=2" <? if($member_type=='2') { echo 'class="on"';}?>>파트너</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
- 회원그룹관리에서 생성된 회원그룹의 레벨을 설정합니다.</br>
|
||||
- 레벨업 설정값은 자유롭게 입력이 가능하며 회원의 활동이 설정 조건에 일치할때 해당하는 레벨에 적용되어 레벨업 됩니다.</br>
|
||||
- 사용안함을 체크하시면 체크된 레벨에 해당하는 회원은 다른 레벨로의 이동이나 변경이 불가능하며 다른레벨에서 체크된 레벨로 이동/변경도 차단됩니다.</br>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="allCheck"></th>
|
||||
<th>회원그룹명</th>
|
||||
<th>사용안함</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="4">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
} else {
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$member_group_name = $val['member_group_name'];
|
||||
$member_group_status= $val['member_group_status'];
|
||||
$is_default = $val['is_default'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<? if($is_default == 'N') { ?>
|
||||
<input type="checkbox" name="is_del[]" value="<?=$idx?>">
|
||||
<? } ?>
|
||||
</td>
|
||||
<td><?=$member_group_name?><input type="hidden" name="member_group_name_<?=$idx?>" id="member_group_name_<?=$idx?>" value="<?=$member_group_name?>"></td>
|
||||
<td>
|
||||
<? if($is_default == 'N') { ?>
|
||||
<input type="checkbox" name="member_group_status[]" value="<?=$idx?>" <? if($member_group_status=='2'){ echo 'checked';}?>>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:member_group_menu_auth('<?=$idx?>');"><i class="fa fa-pencil"></i>권한</a>
|
||||
<a href="javascript:member_group_edit('<?=$idx?>');"><i class="fa fa-pencil"></i>수정</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="/admin/member/member_group_menu_auth_reg/4/<?=$page?>?member_type=0&member_group_idx=8">비회원 권한설정</a>
|
||||
<a href="javascript:member_group_del_proc();">삭제</a>
|
||||
<a href="javascript:member_group_status_proc();">저장</a>
|
||||
<a href="javascript:member_group_add();">그룹생성</a>
|
||||
</div>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="member_group_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('member_group_reg_layer')" class="pop_close">x</a>
|
||||
<h2>회원그룹추가</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>그룹명</th>
|
||||
<td>
|
||||
<input type="text" name="member_group_name" id="member_group_name" class="input00" size="30">
|
||||
<input type="hidden" name="member_group_idx" id="member_group_idx">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:member_group_reg_proc('add')" id="member_group_add">신규등록</a>
|
||||
<a href="javascript:member_group_reg_proc('edit')" id="member_group_edit">수정</a>
|
||||
<a href="javascript:commonLayerClose('member_group_reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// 삭제
|
||||
function member_group_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("그룹이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/member/member_group_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 상태변경
|
||||
function member_group_status_proc(){
|
||||
if($("input:checkbox[name='member_group_status[]']").is(":checked") == false) {
|
||||
alert("저장할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").attr("action", "/admin/member/member_group_status_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
function member_group_menu_auth(idx){
|
||||
if(idx == '6' || idx == '7') {
|
||||
alert("파트너회원은 권한을 수정하실수 없습니다.");
|
||||
return false;
|
||||
}
|
||||
location.href='/admin/member/member_group_menu_auth_reg/4/<?=$page?>?member_type=<?=$member_type?>&member_group_idx='+idx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 회원그룹추가
|
||||
function member_group_reg_proc(mode){
|
||||
var member_group_name = $("#member_group_name").val();
|
||||
var member_group_idx = $("#member_group_idx").val();
|
||||
if(member_group_name=='') {
|
||||
alert("그룹명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#mode").val(mode);
|
||||
|
||||
$("#input_form").attr("action", "/admin/member/member_group_reg_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 회원그룹등록 - layer열기
|
||||
function member_group_add(){
|
||||
$("#member_group_edit").hide();
|
||||
$("#member_group_add").show();
|
||||
$("#member_group_idx").val('');
|
||||
$("#member_group_name").val('');
|
||||
commonLayerOpen('member_group_reg_layer');
|
||||
}
|
||||
|
||||
// 회원그룹수정 - layer열기
|
||||
function member_group_edit(idx){
|
||||
$("#member_group_edit").show();
|
||||
$("#member_group_add").hide();
|
||||
$("#member_group_idx").val(idx);
|
||||
$("#member_group_name").val($("#member_group_name_"+idx).val());
|
||||
commonLayerOpen('member_group_reg_layer');
|
||||
}
|
||||
|
||||
|
||||
// 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>
|
||||
70
application/views/admin/member/member_group_menu_auth_reg.php
Executable file
70
application/views/admin/member/member_group_menu_auth_reg.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
if(isset($result[0]['member_group_name'])==false) {
|
||||
gf_alert("잘못된 접근입니다.", '/admin/main');
|
||||
exit;
|
||||
}
|
||||
|
||||
$menu_code = '41';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<script src="<?=DIR_JS?>/admin/jquery.multi-select.js"></script>
|
||||
<link href="<?=DIR_CSS?>/admin/multi-select.css" rel="stylesheet">
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/member/member_group_menu_auth_reg_proc" method="post">
|
||||
<input type="hidden" name="member_type" value="<?=$member_type?>">
|
||||
<input type="hidden" name="member_group_idx" value="<?=$member_group_idx?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- 회원그룹관리에서 생성된 회원그룹의 레벨을 설정합니다.</br>
|
||||
- 레벨업 설정값은 자유롭게 입력이 가능하며 회원의 활동이 설정 조건에 일치할때 해당하는 레벨에 적용되어 레벨업 됩니다.</br>
|
||||
- 사용안함을 체크하시면 체크된 레벨에 해당하는 회원은 다른 레벨로의 이동이나 변경이 불가능하며 다른레벨에서 체크된 레벨로 이동/변경도 차단됩니다.</br>
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<h2 class="subtitle"><?=$result[0]['member_group_name']?> 회원그룹 메뉴권한 설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>메뉴</br>접속권한설정</th>
|
||||
<td class="tl">
|
||||
<select id="menu_auth_status" name="menu_auth_status[]" multiple="multiple" style="width:200px;height:300px">
|
||||
<? foreach($result as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($val['menu_auth_status']=='2') { echo 'selected';}?>><?=$val['menu_name']?></option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:member_group_menu_auth_reg_proc();">저장하기</a>
|
||||
<a href="/admin/member/member_group_list/4/<?=$page?>?member_type=<?=$member_type?>">목록으로</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#menu_auth_status').multiSelect({
|
||||
selectableHeader: "<div>사용가능 메뉴목록</div>",
|
||||
selectionHeader: "<div>사용불가능 메뉴목록</div>"
|
||||
});
|
||||
function member_group_menu_auth_reg_proc(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
256
application/views/admin/member/member_list.php
Executable file
256
application/views/admin/member/member_list.php
Executable file
@@ -0,0 +1,256 @@
|
||||
<?php
|
||||
$arr_default_member_age = array(array('code'=>10, 'txt'=>'10대'), array('code'=>20, 'txt'=>'20대'), array('code'=>30, 'txt'=>'30대'), array('code'=>40, 'txt'=>'40대'), array('code'=>50, 'txt'=>'50대'), array('code'=>60, 'txt'=>'60대'), array('code'=>70, 'txt'=>'70대'), array('code'=>80, 'txt'=>'80대이상'));
|
||||
$arr_default_member_gendar = array(array('code'=>1, 'txt'=>'남'), array('code'=>2, 'txt'=>'여'));
|
||||
$arr_default_member_group = array(array('code'=>'3', 'txt'=>'불량회원'), array('code'=>'5', 'txt'=>'영구탈퇴'));
|
||||
|
||||
$menu_code = '42';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/member/member_list/4">
|
||||
<input type="hidden" id="search_member_gender" name="search_member_gender" value="<?=$search_member_gender?>">
|
||||
<input type="hidden" id="search_member_age" name="search_member_age" value="<?=$search_member_age?>">
|
||||
<input type="hidden" id="search_member_new" name="search_member_new" value="<?=$search_member_new?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="member_idx" name="member_idx">
|
||||
<input type="hidden" id="search_member_group" name="search_member_group" value="<?=$search_member_group?>">
|
||||
<input type="hidden" id="member_id" name="member_id">
|
||||
|
||||
<div class="common_tep clearfix type01">
|
||||
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/member/member_list/4" <? if($search_member_group=='') { echo 'class="on"';} ?>>전체</a></li>
|
||||
<? foreach ($group_list as $val) {
|
||||
$css = '';
|
||||
if($search_member_group == $val['idx']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/member/member_list/4?search_member_group=<?=$val['idx']?>" <?=$css?>><?=$val['member_group_name']?></a></li>
|
||||
<?
|
||||
}?>
|
||||
</ul>
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="">선택</option>
|
||||
<option value="member_nickname" <? if($search_type=='member_nickname'){ echo 'selected';}?>>닉네임</option>
|
||||
<option value="member_id" <? if($search_type=='member_id'){ echo 'selected';}?>>아이디</option>
|
||||
<option value="member_name" <? if($search_type=='member_name'){ echo 'selected';}?>>이름</option>
|
||||
<option value="member_church" <? if($search_type=='member_church'){ echo 'selected';}?>>출석교회</option>
|
||||
<option value="etc2" <? if($search_type=='etc2'){ 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" style="margin-top: 30px">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
|
||||
<span style="margin-left:20px">
|
||||
<?
|
||||
foreach ($arr_default_member_gendar as $val) {
|
||||
$member_gender_count = 0;
|
||||
if(isset($arr_member_gender[$val['code']])==true) {
|
||||
$member_gender_count = $arr_member_gender[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_gender', '<?=$val['code']?>');"><?=number_format($member_gender_count)?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px">
|
||||
<?
|
||||
foreach ($arr_default_member_group as $val) {
|
||||
$member_group_count = 0;
|
||||
if(isset($arr_member_group[$val['code']])==true) {
|
||||
$member_group_count = $arr_member_group[$val['code']];
|
||||
}
|
||||
echo '<b>'.$val['txt'].':</b> '.number_format($member_group_count).' ';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span style="margin-left:20px"><b>오늘신규가입:</b> <a href="javascript:click_search('search_member_new', 'today');"><?=number_format($member_new_count);?></a></span>
|
||||
</ul>
|
||||
<ul style="text-align:left; padding-top:10px; padding-bottom:10px;">
|
||||
<span>
|
||||
<?
|
||||
foreach ($arr_default_member_age as $val) {
|
||||
$member_age_count = 0;
|
||||
if(isset($arr_member_age[$val['code']])==true) {
|
||||
$member_age_count = $arr_member_age[$val['code']];
|
||||
}
|
||||
?>
|
||||
<b><?=$val['txt']?>:</b> <a href="javascript:click_search('search_member_age', '<?=$val['code']?>');"><?=number_format($member_age_count)?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</th>
|
||||
<th>사진</th>
|
||||
<th>구분</th>
|
||||
<th>닉네임</th>
|
||||
<th>아이디</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="13">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
$dataNumber = ($total_rows + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$member_img = $val['member_img'];
|
||||
$member_name = $val['member_name'];
|
||||
$member_id = $val['member_id'];
|
||||
$member_group_name = $val['member_group_name'];
|
||||
$member_nickname = $val['member_nickname'];
|
||||
$member_gender = $val['member_gender'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$last_login_date = $val['last_login_date'];
|
||||
$visit_count = $val['visit_count'];
|
||||
$member_church = $val['member_church'];
|
||||
$etc2 = $val['etc2'];
|
||||
|
||||
$member_gender_txt = '여';
|
||||
if($member_gender == 1) $member_gender_txt = '남';
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><img src="<?=$member_img?>" width="40"></td>
|
||||
<td><?=$member_group_name?></td>
|
||||
<td><?=$member_nickname?></td>
|
||||
<td><?=$member_id?></td>
|
||||
<td><?=$member_name?></td>
|
||||
<td><?=$member_gender_txt?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$last_login_date?></td>
|
||||
<td><?=number_format($visit_count)?></td>
|
||||
<td><?=$member_church?></td>
|
||||
<td><?=$etc2?></td>
|
||||
<td style="width:200px" class="tool_btn">
|
||||
<a href="javascript:member_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:member_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>탈퇴</a>
|
||||
<a href="javascript:member_comment_del_proc('<?=$member_id?>')"><i class="fa fa-close"></i>전체글삭제</a>
|
||||
<a href="javascript:popup_member_comment_view('<?=$member_id?>')"><i class="fa fa-file"></i>전체댓글보기</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</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;
|
||||
} else {
|
||||
$("#input_form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
function click_search(id, code){
|
||||
$("#search_type").val('');
|
||||
$("#search_keyword").val('');
|
||||
$("#search_member_group").val('');
|
||||
$("#search_member_gender").val('');
|
||||
$("#search_member_age").val('');
|
||||
$("#search_member_new").val('');
|
||||
|
||||
$("#"+id).val(code);
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// 회원수정페이지로
|
||||
function member_edit(idx){
|
||||
$("#member_idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/member_edit/4");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 회원탈퇴
|
||||
function member_del_proc(idx) {
|
||||
if(confirm("회원이 탈퇴처리됩니다. 진행하시겠습니까?") == true) { //확인
|
||||
$("#member_idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/member/member_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 회원의 모든 댓글 삭제
|
||||
function member_comment_del_proc(member_id) {
|
||||
if(confirm("회원의 모든 댓글이 삭제됩니다. 진행하시겠습니까?") == true) { //확인
|
||||
$("#member_id").val(member_id);
|
||||
$("#input_form").attr("action", "/admin/member/member_comment_all_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 전체글보기
|
||||
function popup_member_comment_view(member_id){
|
||||
window.open("/admin/member/member_comment_list/4?member_id="+member_id, "", "width=650, height=600, resizable=no, scrollbars=no, status=no;");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
65
application/views/admin/member/member_setting_reg.php
Executable file
65
application/views/admin/member/member_setting_reg.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?
|
||||
$menu_code = '411';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/member/member_setting_reg_proc/4">
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<th>항목</th>
|
||||
<th>기능사용여부</th>
|
||||
<th>필수체크</th>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr><td colspan="3">등록된 내용이 없습니다.</td></tr>
|
||||
<?
|
||||
} else {
|
||||
foreach($list as $key=>$val) {
|
||||
$idx = $val['idx'];
|
||||
$item_title = $val['item_title'];
|
||||
$is_use = $val['is_use'];
|
||||
$is_required = $val['is_required'];
|
||||
$is_default = $val['is_default'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<? if($is_default == 'N') { ?>
|
||||
<input type="hidden" name="idx[<?=$key?>]" class="input00" size="30" value="<?=$idx?>">
|
||||
<?}?>
|
||||
<td><? if($idx > 10) { ?><input type="text" name="item_title[<?=$key?>]" class="input00" size="30" value="<?=$item_title?>"> <? } else { ?><?=$item_title?><? if($is_default == 'N') { ?><input type="hidden" name="item_title[<?=$key?>]" value="<?=$item_title?>"><? }?><?}?></td>
|
||||
<td><? if($is_default == 'N') { ?><input type="checkbox" name="is_use[<?=$key?>]" value="Y" <? if($is_use == 'Y') { echo 'checked';}?>><? }?></td>
|
||||
<td><? if($is_default == 'N') { ?><input type="checkbox" name="is_required[<?=$key?>]" value="Y" <? if($is_required == 'Y') { echo 'checked';}?>><? }?></td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:member_setting_reg_proc()">저장하기</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function member_setting_reg_proc(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
</script>
|
||||
191
application/views/admin/news/news_comment_list.php
Executable file
191
application/views/admin/news/news_comment_list.php
Executable file
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
if($search_comment_type == 'Y') {
|
||||
$menu_code = '262';
|
||||
} else {
|
||||
$menu_code = '261';
|
||||
}
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/news/news_comment_list/2">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_comment_type" name="search_comment_type" value="<?=$search_comment_type?>">
|
||||
<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="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_news_type" onchange="check_search();">
|
||||
<option value="">기능별</option>
|
||||
<? foreach ($def_arr_news_type as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_news_type==$key){ echo 'selected';}?>><?=$val?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
|
||||
|
||||
<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'];
|
||||
$title = $val['title'];
|
||||
$press_name = $val['press_name'];
|
||||
$reporter_name = $val['reporter_name'];
|
||||
$news_type = $val['news_type'];
|
||||
$theme_types = $val['theme_types'];
|
||||
$comment = $val['comment'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_name2 = $val['category_name2'];
|
||||
$category_name3 = $val['category_name3'];
|
||||
$content_idx = $val['content_idx'];
|
||||
$is_best = $val['is_best'];
|
||||
$best_txt = '';
|
||||
if($is_best == 'Y') {
|
||||
$best_txt = '[best]';
|
||||
}
|
||||
|
||||
|
||||
$category_name = $category_name1;
|
||||
if($category_name2!='') $category_name.= '> '.$category_name2;
|
||||
if($category_name3!='') $category_name.= '> '.$category_name3;
|
||||
|
||||
$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="news_comment_del_proc('<?=$idx?>');" style="cursor: pointer;">삭제</button>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<a href="/web/news/news_view/<?=$content_idx?>" target="_blank">[<?=$category_name?>]</br><?=$title?></a>
|
||||
</td>
|
||||
<td style="text-align:right"><?=$def_arr_news_type[$news_type]?> | <?=$press_name?> | <?=$reporter_name?>기자</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 news_comment_del_proc(idx) {
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/news/news_comment_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
356
application/views/admin/news/news_list.php
Executable file
356
application/views/admin/news/news_list.php
Executable file
@@ -0,0 +1,356 @@
|
||||
<?php
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
$arr_category_add3 = array();
|
||||
foreach ($arr_category as $key=>$val) {
|
||||
if($val['depth'] == '1') {
|
||||
$arr_category_add1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '2') {
|
||||
$arr_category_add2[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '3') {
|
||||
$arr_category_add3[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
}
|
||||
}
|
||||
|
||||
$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'];
|
||||
|
||||
|
||||
$menu_code = '23';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$colspan = '14';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/news/news_list/2">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_news_type" name="search_news_type" value="<?=$search_news_type?>">
|
||||
<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_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/news/news_list/2" <? if($search_news_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<li><a href="/admin/news/news_list/2?search_news_type=1" <? if($search_news_type=='1') { echo 'class="on"';}?>>일반뉴스</a></li>
|
||||
<li><a href="/admin/news/news_list/2?search_news_type=2" <? if($search_news_type=='2') { echo 'class="on"';}?>>포토뉴스</a></li>
|
||||
<li><a href="/admin/news/news_list/2?search_news_type=3" <? if($search_news_type=='3') { echo 'class="on"';}?>>동영상뉴스</a></li>
|
||||
<li><a href="/admin/news/news_list/2?search_news_type=4" <? if($search_news_type=='4') { echo 'class="on"';}?>>영상링크뉴스</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="press_name" <? if($search_type=='press_name'){ echo 'selected';}?>>언론사</option>
|
||||
<option value="reporter_name" <? if($search_type=='reporter_name'){ 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>
|
||||
|
||||
<!-- 20190226추가 -->
|
||||
<div class="write_btn">
|
||||
<a href="javascript:news_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:news_add();">뉴스등록</a>
|
||||
</div>
|
||||
<!-- -->
|
||||
|
||||
<div class="common_table" style="margin-top: 30px">
|
||||
<? 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>
|
||||
<div class="searh_area">
|
||||
<select name="search_category_code1" onchange="category_search()" class="type01">
|
||||
<option value="">1차섹션</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()" class="type01">
|
||||
<option value="">2차섹션</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<select name="search_category_code3" onchange="category_search()" class="type01">
|
||||
<option value="">3차섹션</option>
|
||||
<? if(isset($arr_category_add3[$search_category_code2])==true) {
|
||||
foreach ($arr_category_add3[$search_category_code2] as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code3==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<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>등록일시</br>(예약일시)</th>
|
||||
<th>상태</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<? if($search_type=='tag' && $search_keyword!='' ) {
|
||||
$colspan="15";
|
||||
?>
|
||||
<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'];
|
||||
$category_code = $val['category_code'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$news_type = $val['news_type'];
|
||||
$press_name = $val['press_name'];
|
||||
$reporter_name = $val['reporter_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['review_count1'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$is_display = $val['is_display'];
|
||||
$display_date = $val['display_date'];
|
||||
$tag = $val['tag'];
|
||||
|
||||
switch ($news_type) {
|
||||
case '1': $news_type_txt = '일반뉴스'; break;
|
||||
case '2': $news_type_txt = '포토뉴스'; break;
|
||||
case '3': $news_type_txt = '동영상뉴스'; break;
|
||||
case '4': $news_type_txt = '영상링크뉴스'; break;
|
||||
}
|
||||
|
||||
$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/news/news_list/2?search_type=tag&search_keyword='.$val.'" class="text_blue">'.$val.'</a>';
|
||||
if($key==2) break;
|
||||
}
|
||||
|
||||
if($tag_count > 3) {
|
||||
$tag_txt.=' 외 '.($tag_count-3).'개';
|
||||
}
|
||||
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
|
||||
|
||||
$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/news/news_list/2?search_category_code1=<?=$category_code1?>"><?=$category_name1?></a></td>
|
||||
<td><?=$news_type_txt?></td>
|
||||
<td style="text-align:left;" class="title"><a href="javascript:news_edit('<?=$idx?>')"><?=$new?><?=$title?></a></td>
|
||||
<td><?=$press_name?></td>
|
||||
<td><?=$reporter_name?></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></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>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
<? if($search_type=='tag' && $search_keyword!='' ) {?>
|
||||
<td class="text_blue"><?=$tag_txt?></td>
|
||||
<? }?>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:news_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:news_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:news_arr_del_proc();">삭제</a>
|
||||
<a href="javascript:news_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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function news_add(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/news/news_reg/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function news_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#mode").val('edit');
|
||||
$("#input_form").attr("action", "/admin/news/news_reg/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function news_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/news/news_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function news_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/news/news_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/news/news_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>
|
||||
145
application/views/admin/news/news_ranking_edit.php
Executable file
145
application/views/admin/news/news_ranking_edit.php
Executable file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
|
||||
$head_title = $result['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$sub_content = $result['sub_content'];
|
||||
$sub_content = htmlspecialchars($sub_content);
|
||||
$content_idx = $result['content_idx'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$review_count1 = $result['review_count1'];
|
||||
$comment_count = $result['comment_count'];
|
||||
$main_img = $result['main_img'];
|
||||
$ranking_type = $result['ranking_type'];
|
||||
$rank = $result['rank'];
|
||||
$press_name = $result['press_name'];
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
|
||||
$menu_code = '25';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
$rowspan='6';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/news/news_ranking_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_ranking_type" value="<?=$search_ranking_type?>">
|
||||
<input type="hidden" id="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_category_code3" name="search_category_code3" value="<?=$search_category_code3?>">
|
||||
<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="ranking_type" value="<?=$ranking_type?>">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<h2 class="subtitle"><?=$def_arr_ranking[$ranking_type]['name']?></h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$rank?>위(썸네일)</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx" id="content_idx" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title" id="head_title" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>"> <input type="text" name="title" id="title" class="type00" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<textarea id="sub_content" name="sub_content" placeholder="기사 간략 노출(2줄)" rows="2" cols="80"><?=$sub_content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view"><?=$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="main_img" id="main_img" class="input00" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="press_name" id="press_name" class="type03" placeholder="언론사명" value="<?=$press_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<? if($ranking_type == '1') {?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count" id="hit_count" class="type03" size="20" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? } else if($ranking_type == '2') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="comment_count" id="comment_count" class="type03" size="20" placeholder="댓글수" value="<?=$comment_count?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? } else if($ranking_type == '3') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="review_count" id="review_count" class="type03" size="20" placeholder="공감수" value="<?=$review_count1?>">
|
||||
</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:news_ranking_list_reg_proc();">저장하기</a>
|
||||
<a href="/admin/news/news_ranking_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_ranking_type=<?=$search_ranking_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_category_code3=<?=$search_category_code3?>&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 news_ranking_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>
|
||||
270
application/views/admin/news/news_ranking_list.php
Executable file
270
application/views/admin/news/news_ranking_list.php
Executable file
@@ -0,0 +1,270 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
$arr_category_add3 = array();
|
||||
foreach ($arr_category as $key=>$val) {
|
||||
if($val['depth'] == '1') {
|
||||
$arr_category_add1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '2') {
|
||||
$arr_category_add2[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '3') {
|
||||
$arr_category_add3[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
}
|
||||
}
|
||||
|
||||
$menu_code = '251';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/news/news_ranking_list/2">
|
||||
<input type="hidden" id="search_ranking_type" name="search_ranking_type" value="<?=$search_ranking_type?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_click1" name="search_click1" value="<?=$search_click1?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
|
||||
|
||||
<div class="common_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/news/news_ranking_list/2" <? if($search_ranking_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<? foreach($def_arr_ranking as $val) {
|
||||
$css = '';
|
||||
if($search_ranking_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/news/news_ranking_list/2?search_ranking_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="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="press_name" <? if($search_type=='press_name'){ echo 'selected';}?>>언론사</option>
|
||||
<option value="reporter_name" <? if($search_type=='reporter_name'){ 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" style="margin-top: 30px">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_category_code1" onchange="category_search()">
|
||||
<option value="">1차섹션</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()">
|
||||
<option value="">2차섹션</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<select name="search_category_code3" onchange="category_search()">
|
||||
<option value="">3차섹션</option>
|
||||
<? if(isset($arr_category_add3[$search_category_code2])==true) {
|
||||
foreach ($arr_category_add3[$search_category_code2] as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code3==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="14">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$now_date = date("Y-m-d");
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$title = $val['title'];
|
||||
$main_img = $val['main_img'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_code = $val['category_code'];
|
||||
$ranking_type = $val['ranking_type'];
|
||||
$press_name = $val['press_name'];
|
||||
$reporter_name = $val['reporter_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$display_date = $val['display_date'];
|
||||
$is_display = $val['is_display'];
|
||||
$rank = $val['rank'];
|
||||
$content_idx = $val['content_idx'];
|
||||
|
||||
$ranking_type_txt = $def_arr_ranking[$ranking_type]['name'];
|
||||
|
||||
$display_date_txt = '';
|
||||
if($is_display == 'N') {
|
||||
$display_date_txt = '</br><span class="text_green">('.$display_date.')</span>';
|
||||
}
|
||||
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><img src="<?=$main_img?>" width="35"></td>
|
||||
<td><a href="/admin/news/news_ranking_list/2?search_category_code1=<?=$category_code1?>"><?=$category_name1?></a></td>
|
||||
<td><?=$ranking_type_txt?></td>
|
||||
<td style="text-align:left;" class="title"><a href="/admin/news/news_reg/2?mode=edit&idx=<?=$content_idx?>"><?=$title?></a></td>
|
||||
<td><?=$press_name?></td>
|
||||
<td><?=$reporter_name?></td>
|
||||
<td><?=$reg_date?><?=$display_date_txt?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
<td class="tool_btn">
|
||||
<a href="javascript:news_ranking_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:news_ranking_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:news_ranking_reg_arr_del_proc()">삭제</a>
|
||||
<a href="javascript:news_ranking_list_reg()">송출관리</a>
|
||||
<a href="/admin/news/news_reg/2?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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function click_search(type, id){
|
||||
$("#"+id).val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function news_ranking_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/news/news_ranking_list_reg/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function news_ranking_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/news/news_ranking_edit/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function news_ranking_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/news/news_ranking_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function news_ranking_reg_arr_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/news/news_ranking_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>
|
||||
181
application/views/admin/news/news_ranking_list_reg.php
Executable file
181
application/views/admin/news/news_ranking_list_reg.php
Executable file
@@ -0,0 +1,181 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_ranking_list = array();
|
||||
foreach ($arr_ranking as $val) {
|
||||
$arr_ranking_list[$val['rank']] = array('content_idx'=> $val['content_idx'], 'head_title'=>$val['head_title'], 'title'=>$val['title'], 'sub_content'=>$val['sub_content'], 'main_img'=>$val['main_img'], 'hit_count'=>$val['hit_count'], 'comment_count'=>$val['comment_count'], 'review_count1'=>$val['review_count1'], 'press_name'=>$val['press_name']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '25';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/news/news_ranking_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_ranking_type" name="search_ranking_type" value="<?=$search_ranking_type?>">
|
||||
<input type="hidden" id="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_category_code3" name="search_category_code3" value="<?=$search_category_code3?>">
|
||||
<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">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<th>테마</th>
|
||||
<td class="tl">
|
||||
|
||||
<? foreach($def_arr_ranking as $val) {?>
|
||||
<input type="radio" name="ranking_type" value="<?=$val['code']?>" onclick="change_ranking_type('<?=$val['code']?>')" <? if($search_ranking_type==$val['code']) { echo 'checked';}?>> <?=$val['name']?>
|
||||
<? }?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
for($i=1;$i<=$def_arr_ranking[$search_ranking_type]['count'];$i++) {
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$sub_content = '';
|
||||
$main_img = '';
|
||||
$main_img_txt = '';
|
||||
$content_idx = '';
|
||||
$hit_count = '';
|
||||
$review_count1 = '';
|
||||
$comment_count = '';
|
||||
$press_name = '';
|
||||
if(isset($arr_ranking_list[$i])== true) {
|
||||
$head_title = $arr_ranking_list[$i]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_ranking_list[$i]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$sub_content = $arr_ranking_list[$i]['sub_content'];
|
||||
$sub_content = htmlspecialchars($sub_content);
|
||||
$content_idx = $arr_ranking_list[$i]['content_idx'];
|
||||
$hit_count = $arr_ranking_list[$i]['hit_count'];
|
||||
$review_count1 = $arr_ranking_list[$i]['review_count1'];
|
||||
$comment_count = $arr_ranking_list[$i]['comment_count'];
|
||||
$main_img = $arr_ranking_list[$i]['main_img'];
|
||||
$press_name = $arr_ranking_list[$i]['press_name'];
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
}
|
||||
|
||||
$rowspan='6';
|
||||
?>
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$i?>위(썸네일)</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx<?=$i?>" id="content_idx<?=$i?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title<?=$i?>" id="head_title<?=$i?>" class="type02" placeholder="말머리" value="<?=$head_title?>"> <input type="text" name="title<?=$i?>" id="title<?=$i?>" class="type00" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<textarea id="content<?=$i?>" name="content<?=$i?>" placeholder="기사 간략 노출(2줄)" rows="2" cols="80"><?=$sub_content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view<?=$i?>"><?=$main_img_txt?></div>
|
||||
<input type="hidden" name="img<?=$i?>" id="img<?=$i?>">
|
||||
<input type="hidden" name="org_img<?=$i?>" id="org_img<?=$i?>" value="<?=$main_img?>">
|
||||
<input type="file" name="main_img<?=$i?>" id="main_img<?=$i?>" class="input00" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="press_name<?=$i?>" id="press_name<?=$i?>" class="type03" placeholder="언론사명" value="<?=$press_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<? if($search_ranking_type == '1') {?>
|
||||
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count<?=$i?>" id="hit_count<?=$i?>" class="type03" placeholder="조회수" value="<?=$hit_count?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? } else if($search_ranking_type == '2') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="comment_count<?=$i?>" id="comment_count<?=$i?>" class="type03" size="20" placeholder="댓글수" value="<?=$comment_count?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? } else if($search_ranking_type == '3') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="review_count<?=$i?>" id="review_count<?=$i?>" class="type03" size="20" placeholder="공감수" value="<?=$review_count1?>">
|
||||
</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:news_ranking_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/news/news_ranking_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_ranking_type=<?=$search_ranking_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_category_code3=<?=$search_category_code3?>&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_ranking_type(ranking_code){
|
||||
$("#search_ranking_type").val(ranking_code);
|
||||
$("#input_form").attr("action", "/admin/news/news_ranking_list_reg/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var ranking_count = "<?=$def_arr_ranking[$search_ranking_type]['count']?>";
|
||||
function news_ranking_list_reg_proc(){
|
||||
for(i=1;i<=ranking_count;i++) {
|
||||
if($("#title"+i).val()!='') {
|
||||
if($("#content_idx"+i).val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#main_img"+i).val()=='' && $("#img"+i).val()=='' && $("#org_img"+i).val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
208
application/views/admin/news/news_ranking_log_list.php
Executable file
208
application/views/admin/news/news_ranking_log_list.php
Executable file
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
$arr_category_add3 = array();
|
||||
foreach ($arr_category as $key=>$val) {
|
||||
if($val['depth'] == '1') {
|
||||
$arr_category_add1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '2') {
|
||||
$arr_category_add2[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '3') {
|
||||
$arr_category_add3[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '252';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/news/news_ranking_log_list/2">
|
||||
<input type="hidden" id="search_ranking_type" name="search_ranking_type" value="<?=$search_ranking_type?>">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
|
||||
|
||||
<div class="common_tep clearfix type01">
|
||||
<ul class="clearfix">
|
||||
<li><a href="/admin/news/news_ranking_log_list/2" <? if($search_ranking_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<? foreach($def_arr_ranking as $val) {
|
||||
$css = '';
|
||||
if($search_ranking_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/news/news_ranking_log_list/2?search_ranking_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="title" <? if($search_type=='title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="press_name" <? if($search_type=='press_name'){ echo 'selected';}?>>언론사</option>
|
||||
<option value="reporter_name" <? if($search_type=='reporter_name'){ 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" style="margin-top: 30px">
|
||||
<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>
|
||||
<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: 5px"><input type="radio" name="sort" value="5" <? if($sort=='5') { echo 'checked';}?> onclick="check_search();"> 공유순</span>
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_category_code1" onchange="category_search()" class="type01">
|
||||
<option value="">1차섹션</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()" class="type01">
|
||||
<option value="">2차섹션</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<select name="search_category_code3" onchange="category_search()" class="type01">
|
||||
<option value="">3차섹션</option>
|
||||
<? if(isset($arr_category_add3[$search_category_code2])==true) {
|
||||
foreach ($arr_category_add3[$search_category_code2] as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code3==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_year" onchange="check_search()" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? for ($i=2018;$i<=date("Y");$i++) {?>
|
||||
<option value="<?=$i?>" <? if($search_year==$i) { echo 'selected';}?>><?=$i?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<select name="search_month" onchange="check_search()" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? for ($i=1;$i<=12;$i++) {?>
|
||||
<option value="<?=sprintf('%02d',$i)?>" <? if($search_month==sprintf('%02d',$i)) { echo 'selected';}?>><?=sprintf('%02d',$i)?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<select name="search_day" onchange="check_search()" class="type01">
|
||||
<option value="">선택</option>
|
||||
<?
|
||||
$end_day = date("t", mktime(0, 0, 0, $search_month, 1, $search_year));
|
||||
for ($i=1;$i<=$end_day;$i++) {?>
|
||||
<option value="<?=sprintf('%02d',$i)?>" <? if($search_day==sprintf('%02d',$i)) { echo 'selected';}?>><?=sprintf('%02d',$i)?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순위</th>
|
||||
<th>썸네일</th>
|
||||
<th>섹션</th>
|
||||
<th>테마</th>
|
||||
<th>제목</th>
|
||||
<th>언론사</th>
|
||||
<th>기자</th>
|
||||
<th>등록일시</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="13">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$title = $val['title'];
|
||||
$main_img = $val['main_img'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$ranking_type = $val['ranking_type'];
|
||||
$press_name = $val['press_name'];
|
||||
$reporter_name = $val['reporter_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$share_count = $val['share_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$rank = $val['rank'];
|
||||
|
||||
$ranking_type_txt = $def_arr_ranking[$ranking_type]['name'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$rank?></td>
|
||||
<td><img src="<?=$main_img?>" width="35"></td>
|
||||
<td><?=$category_name1?></td>
|
||||
<td><?=$ranking_type_txt?></td>
|
||||
<td style="text-align:left;"> <?=$title?></td>
|
||||
<td><?=$press_name?></td>
|
||||
<td><?=$reporter_name?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$hit_count?></td>
|
||||
<td><?=$like_count?></td>
|
||||
<td><?=$comment_count?></td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
778
application/views/admin/news/news_reg.php
Executable file
778
application/views/admin/news/news_reg.php
Executable file
@@ -0,0 +1,778 @@
|
||||
<?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] = '';
|
||||
}
|
||||
|
||||
if($mode=='edit') {
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
|
||||
$content = htmlentities($result['content']);
|
||||
$category_code = $result['category_code'];
|
||||
$press_idx = $result['press_idx'];
|
||||
$reporter_name = $result['reporter_name'];
|
||||
$reporter_email = $result['reporter_email'];
|
||||
$sub_title = $result['sub_title'];
|
||||
$sub_title = htmlspecialchars($sub_title);
|
||||
|
||||
$tag = $result['tag'];
|
||||
$org_url = $result['org_url'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$review_count1 = $result['review_count1'];
|
||||
$review_count2 = $result['review_count2'];
|
||||
$review_count3 = $result['review_count3'];
|
||||
$review_count4 = $result['review_count4'];
|
||||
$review_count5 = $result['review_count5'];
|
||||
$is_auto_setting = $result['is_auto_setting'];
|
||||
$reg_date = $result['reg_date'];
|
||||
$display_date = $result['display_date'];
|
||||
$is_display = $result['is_display'];
|
||||
$main_img = $result['main_img'];
|
||||
$news_type = $result['news_type'];
|
||||
$video_url = $result['video_url'];
|
||||
$video_url = str_replace('https://www.youtube.com/embed/','', $video_url);
|
||||
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
$category_code2 = substr($category_code, 0, 4);
|
||||
$category_code3 = substr($category_code, 0, 6);
|
||||
|
||||
$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_news_style = "none";
|
||||
if($is_auto_setting=='N') {
|
||||
$relation_news_style = "block";
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$category_code1 = '';
|
||||
$category_code2 = '';
|
||||
$category_code3 = '';
|
||||
$title = '';
|
||||
$content = '';
|
||||
$press_idx = '';
|
||||
$reporter_name = '';
|
||||
$reporter_email = '';
|
||||
$sub_title = '';
|
||||
$tag = '';
|
||||
$org_url = '';
|
||||
$hit_count = 0;
|
||||
$review_count1 = 0;
|
||||
$review_count2 = 0;
|
||||
$review_count3 = 0;
|
||||
$review_count4 = 0;
|
||||
$review_count5 = 0;
|
||||
$is_auto_setting= 'Y';
|
||||
$display_date = '';
|
||||
$display_hour = '';
|
||||
$display_min = '';
|
||||
$display_sec = '';
|
||||
$main_img = '';
|
||||
$news_type = $search_news_type;
|
||||
$video_url = '';
|
||||
if($news_type == '') $news_type = '1';
|
||||
|
||||
$relation_news_style = "none";
|
||||
|
||||
}
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
$arr_category_add3 = array();
|
||||
foreach ($arr_category as $key=>$val) {
|
||||
if($val['depth'] == '1') {
|
||||
$arr_category_add1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '2') {
|
||||
$arr_category_add2[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '3') {
|
||||
$arr_category_add3[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/jquery-ui.min.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
<script src="<?=DIR_JS?>/admin/jquery.multiselect.js"></script>
|
||||
<link href="<?=DIR_CSS?>/admin/jquery.multiselect.css" rel="stylesheet">
|
||||
<script src="/ckeditor/ckeditor.js"></script>
|
||||
|
||||
|
||||
<?
|
||||
$menu_code = '23';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/news/news_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_news_type" name="search_news_type" value="<?=$search_news_type?>">
|
||||
<input type="hidden" id="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_category_code3" name="search_category_code3" value="<?=$search_category_code3?>">
|
||||
<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">
|
||||
<input type="radio" name="news_type" value="1" <? if($news_type=='1') { echo 'checked';}?>> 일반뉴스
|
||||
<input type="radio" name="news_type" value="2" <? if($news_type=='2') { echo 'checked';}?>> 포토뉴스
|
||||
<input type="radio" name="news_type" value="3" <? if($news_type=='3') { echo 'checked';}?>> 동영상뉴스
|
||||
<input type="radio" name="news_type" value="4" <? if($news_type=='4') { echo 'checked';}?>> 영상링크뉴스
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>언론사</th>
|
||||
<td class="tl">
|
||||
<select name="press_idx" id="press_idx" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($arr_press as $val) {?>
|
||||
<option value="<?=$val['idx']?>" <? if($press_idx==$val['idx']) { echo 'selected';}?>><?=$val['press_name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>기자</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="reporter_name" id="reporter_name" class="type01" value="<?=$reporter_name?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>기자이메일</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="reporter_email" id="reporter_email" class="type01" value="<?=$reporter_email?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>뉴스제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title" id="title" value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>부제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="sub_title" id="sub_title" value="<?=$sub_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>카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category1" id="category1" onchange="change_category(1, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="category2" id="category2" onchange="change_category(2, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category_add2) > 0) {
|
||||
foreach ($arr_category_add2 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="category3" id="category3" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? if(count($arr_category_add3) > 0) {
|
||||
foreach ($arr_category_add3 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($category_code3==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>태그</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="tag" id="tag" class="type01" value="<?php echo $tag ? $tag: str_replace('-', ',', cleanUrl($title))?>"> 최대 5개까지 입력 가능(,로 구분해주세요.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>기사원본주소</th>
|
||||
<td class="tl">
|
||||
기사의 원본 주소를 입력하면 기사 클릭시 기사원본의 주소로 이동합니다.</br>
|
||||
<input type="text" name="org_url" id="org_url" class="input00" value="<?=$org_url?>">
|
||||
</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 name="content" id="ir1" style="width:100%; height:500px;" /><?=$content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>조회수</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count" id="hit_count" class="type03" value=""> (관리자가 임의적으로 조회수를 설정할 수 있습니다.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>리뷰수</th>
|
||||
<td class="tl">
|
||||
<? $arr_review_txt = array('좋아요', '훈훈해요', '슬퍼요', '화나요', '후속기사원해요');
|
||||
for($i=1;$i<=5;$i++) { ?>
|
||||
<img style='vertical-align:middle;margin-right:7px;width:35px;margin-left:30px;border:2px solid #ded239;border-radius:50%;' src="/img/web/img_reaction<?=$i?>.png" alt="">
|
||||
<input type="text" name="review_count<?=$i?>" id="review_count<?=$i?>" value="<?=${"review_count".$i}?>" class="type03" placeholder="<?=$arr_review_txt[$i-1]?>">
|
||||
<? } ?>
|
||||
<br /> (관리자가 임의적으로 리뷰수를 설정할 수 있으나 리뷰 합산 수가 조회수 이상이 될 수는 없습니다)
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>관련뉴스</th>
|
||||
<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_news_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/news_view/<?=$val['relation_article_idx']?>" target="_blank"><?=$val['title']?></a></li>
|
||||
<?
|
||||
$i++;
|
||||
} ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="subtitle"><span>PC</span>뉴스테마설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>헤드라인뉴스<br />(모바일공통)</td>
|
||||
<td class="tl">
|
||||
|
||||
<div class="two_box_type01 clearfix headline">
|
||||
<div class="con thum_wrap">
|
||||
<div class="thumil on">
|
||||
<img src="/img/admin/news_1.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<? for($i=1;$i<=$def_arr_news_theme[1]['count'];$i++){?>
|
||||
<input type="radio" name="theme_type1" value="<?=$i?>" <? if($arr_theme_reg[1] == $i) { echo 'checked';}?>> <?=$i?>위
|
||||
<? }?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>주요뉴스</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="theme_type2" class="type01">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_news_theme[2]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[2] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/news_2.png" width="200px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이 시간 추천뉴스<br />(모바일공통)</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="theme_type3" class="type01">
|
||||
<option value="">순위선택</option>
|
||||
<? for($i=1;$i<=$def_arr_news_theme[3]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[3] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/news_3.png" width="400px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>오늘의 포토뉴스</th>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="theme_type4" class="type01">
|
||||
<option value="">순위선택</option>
|
||||
<? for($i=1;$i<=$def_arr_news_theme[4]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[4] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<img src="/img/admin/news_4.png" width="600px">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<h2 class="subtitle"><span>모바일</span>뉴스테마설정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>메인(빅원)</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="theme_type5" class="type01">
|
||||
<option value="">순위선택</option>
|
||||
<? for($i=1;$i<=$def_arr_news_theme[5]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[5] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/news_5.png" width="400px">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>뷰(추천기사)</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="theme_type6" class="type01">
|
||||
<option value="">순위설정</option>
|
||||
<? for($i=1;$i<=$def_arr_news_theme[6]['count'];$i++){?>
|
||||
<option value="<?=$i?>" <? if($arr_theme_reg[6] == $i) { echo 'selected';}?>><?=$i?>위</option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
<img src="/img/admin/news_6.png" width="400px">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<h2 class="subtitle">기타섹션 <span>(모바일공통)</span></h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>인기영상</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="section_type1" class="type01">
|
||||
<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/section1.png" width="300px">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>인기포토</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="section_type2" class="type01">
|
||||
<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/section1.png" width="300px">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>은혜로운영상<br />(모바일전용)</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
<select name="section_type3" class="type01">
|
||||
<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>카드뉴스</td>
|
||||
<td class="tl">
|
||||
<div class="opt_box">
|
||||
|
||||
<select name="section_type4" class="type01">
|
||||
<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:news_reg_proc();">저장하기</a>
|
||||
<a href="/admin/news/news_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_news_type=<?=$search_news_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_category_code3=<?=$search_category_code3?>&sort=<?=$sort?>&search_click1=<?=$search_click1?>&search_click2=<?=$search_click2?>">취소하기</a>
|
||||
<?if($mode=='edit') {?>
|
||||
<!-- <a class="del_news" href="javascript:news_del_proc();">삭제하기</a> -->
|
||||
<?}?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- <script type="text/javascript">
|
||||
function news_del_proc() {
|
||||
var link =`/admin/news/news_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_news_type=<?=$search_news_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_category_code3=<?=$search_category_code3?>&sort=<?=$sort?>&search_click1=<?=$search_click1?>&search_click2=<?=$search_click2?>`;
|
||||
let post_data = <?=$result['idx']?>;
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$.post({
|
||||
url:'/admin/news/news_del_proc_ajax',
|
||||
data:post_data,
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
// location.href=url;
|
||||
}
|
||||
});
|
||||
}else{ //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<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">
|
||||
function news_reg_proc(){
|
||||
oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
|
||||
|
||||
if($("#press_idx").val()=='') {
|
||||
alert("언론사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#reporter_name").val()=='') {
|
||||
alert("기자를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#title").val()=='') {
|
||||
alert("제목을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#main_img").val()=='' && $("#org_main_img").val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#category1").val()=='') {
|
||||
alert("1차 섹션을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
// if($("#category2").val()=='') {
|
||||
// alert("2차 섹션을 선택해주세요.");
|
||||
// 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 review_count = parseInt($("#review_count1").val()) + parseInt($("#review_count2").val()) + parseInt($("#review_count3").val()) + parseInt($("#review_count4").val()) + parseInt($("#review_count5").val());
|
||||
if(review_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 change_category(depth, val){
|
||||
if(depth == 1) {
|
||||
var json_category = '<?=json_encode($arr_category_add2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#category2').empty();
|
||||
$('#category3').empty();
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category2').append(option);
|
||||
$('#category3').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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
var json_category = '<?=json_encode($arr_category_add3)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
$('#category3').empty();
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category3').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>");
|
||||
$('#category3').append(option);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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_NEWS_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, '"');
|
||||
console.log(title);
|
||||
|
||||
$('#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/news_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/admin/btn_date.jpg",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
|
||||
});
|
||||
$('img.ui-datepicker-trigger').css({'cursor':'pointer', 'width':'30px'}); //아이콘(icon) 위치
|
||||
|
||||
</script>
|
||||
390
application/views/admin/news/news_section_list.php
Executable file
390
application/views/admin/news/news_section_list.php
Executable file
@@ -0,0 +1,390 @@
|
||||
<?php
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
$arr_category_add3 = array();
|
||||
foreach ($arr_category as $key=>$val) {
|
||||
if($val['depth'] == '1') {
|
||||
$arr_category_add1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '2') {
|
||||
$arr_category_add2[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '3') {
|
||||
$arr_category_add3[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
}
|
||||
}
|
||||
|
||||
$menu_code = '22';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/news/news_section_list/2">
|
||||
<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="mode" name="mode">
|
||||
<input type="hidden" id="org_category_code" name="org_category_code">
|
||||
<input type="hidden" id="search_type" name="search_type" value="category_name">
|
||||
|
||||
|
||||
<div class="common_tep 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" style="margin-top: 30px">
|
||||
<?
|
||||
foreach ($arr_depth_count as $val) {
|
||||
?>
|
||||
<span style="margin-right:10px;"><span style="font-weight:bold"><?=$val['depth']?>차: </span> <?=number_format($val['cnt']);?></span>
|
||||
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<span style="margin-right:10px;"><span style="font-weight:bold">Total:</span> <?=number_format($total_count);?></span>
|
||||
<span style="margin-right:10px;"><span style="font-weight:bold">전체글수:</span> <?=number_format($article_count);?></span>
|
||||
<span style="margin-right:10px;"><span style="font-weight:bold" class="text_blue">오늘글수:</span> <?=number_format($today_article_count);?></span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>번호</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 {
|
||||
|
||||
$ci=& get_instance();
|
||||
$ci->load->model('admin/news/m_news');
|
||||
|
||||
$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'];
|
||||
$display_sort = $val['display_sort'];
|
||||
$total_count = $val['total_count'];
|
||||
$today_count = $val['today_count'];
|
||||
$depth = $val['depth'];
|
||||
$reg_date = $val['reg_date'];
|
||||
|
||||
$reg_date = substr($reg_date, 0, 10);
|
||||
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
$category_code2 = substr($category_code, 0, 4);
|
||||
$category_code3 = substr($category_code, 0, 6);
|
||||
|
||||
$del_key = $category_code;
|
||||
$reply_icon = '';
|
||||
if($depth != 1) {
|
||||
for($i=1;$i<=$depth;$i++) {
|
||||
$reply_icon.= ' ';
|
||||
}
|
||||
$reply_icon.='<img style="vertical-align:middle;margin-top:-3px;" src="/img/admin/board/icon_reply.gif" border="0"> ';
|
||||
}
|
||||
|
||||
# 전체 글수
|
||||
$req_data = array();
|
||||
$req_data['category_code'] = ${"category_code".$depth};
|
||||
$total_count = $ci->m_news->news_section_code_count($req_data);
|
||||
|
||||
|
||||
# 오늘글
|
||||
$req_data = array();
|
||||
$req_data['category_code'] = ${"category_code".$depth};
|
||||
$req_data['display_date'] = date("Y-m-d").' 00:00:00';
|
||||
$today_count = $ci->m_news->news_section_code_count($req_data);
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td style="text-align: left">
|
||||
<input type="hidden" name="category_name_<?=$idx?>" id="category_name_<?=$idx?>" value="<?=$category_name?>">
|
||||
<input type="hidden" name="display_sort_<?=$idx?>" id="display_sort_<?=$idx?>" value="<?=$display_sort?>">
|
||||
<a href="/admin/news/news_list/2?search_category_code1=<?=$category_code1?>&search_category_code2=<?=$category_code2?>&search_category_code3=<?=$category_code3?>"><?=$reply_icon?><?=$category_name?></a>
|
||||
<? if($depth != 3) {?>
|
||||
<button type="button" class="btn_s_blue" style="width:110px" onclick="category_add('<?=$depth?>', '<?=$category_code?>');" style="cursor: pointer;"><?=$depth+1?>차 섹션등록</button>
|
||||
<? }?>
|
||||
</td>
|
||||
<td><?=$total_count?><button type="button" class="btn_s_blue" style="width:40px" onclick="category_article_move('<?=$category_code?>')" style="cursor: pointer;">이동</button></td>
|
||||
<td><?=$today_count?></td>
|
||||
<td><?=$display_sort?></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 class="write_btn">
|
||||
<a href="javascript:category_add('0', '');">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>
|
||||
<tr>
|
||||
<th>노출순서</th>
|
||||
<td><input type="text" name="display_sort" id="display_sort"></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>
|
||||
|
||||
|
||||
<div id="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('reg_layer')" class="pop_close">x</a>
|
||||
<h2>섹션이동</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>이동할 섹션</th>
|
||||
<td class="tl">
|
||||
<? if(count($arr_category_add1)>0){?>
|
||||
<select name="category1" id="category1" onchange="change_category(1, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>"><?=$val['category_name']?></option>
|
||||
<? }?>
|
||||
|
||||
</select>
|
||||
|
||||
<? }?>
|
||||
<select name="category2" id="category2" onchange="change_category(2, this.value)" class="type01">
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
<select name="category3" id="category3" class="type01">
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:category_article_move_proc('add')"">이동</a>
|
||||
<a href="javascript:commonLayerClose('reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// 등록 - layer 열기
|
||||
function category_add(depth, p_category_code) {
|
||||
$("#bnt_category_edit").hide();
|
||||
$("#btn_category_add").show();
|
||||
|
||||
$("#depth").val('');
|
||||
$("#category_idx").val('');
|
||||
$("#p_category_code").val('');
|
||||
$("#category_name").val('');
|
||||
|
||||
$("#depth").val(depth);
|
||||
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();
|
||||
|
||||
$("#depth").val('');
|
||||
$("#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){
|
||||
$("#mode").val(mode);
|
||||
if($("#category_name").val()=='') {
|
||||
alert("카테고리명을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").attr("action", "/admin/news/news_section_reg_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function category_del_proc(depth, del_key, category_code) {
|
||||
var form_data = {
|
||||
"depth" : depth,
|
||||
"category_code" : category_code
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/news/news_section_code_count',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'html',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml == 0) {
|
||||
if(depth == '3') {
|
||||
var msg = '카테고리가 삭제됩니다. 삭제하시겠습니까?';
|
||||
} else {
|
||||
var msg = '하위카테고리까지 모두 삭제됩니다. 삭제하시겠습니까?';
|
||||
}
|
||||
if(confirm(msg) == true) { //확인
|
||||
$("#del_key").val(del_key);
|
||||
$("#input_form").attr("action", "/admin/news/news_section_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
} else if(rtnHtml > 0) {
|
||||
alert("등록되어있는 글이 있으면 삭제할수 없습니다.");
|
||||
return false;
|
||||
} else {
|
||||
alert("삭제에 실패했습니다. 다시시도해주세요.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function category_article_move(org_category_code){
|
||||
$("#org_category_code").val(org_category_code);
|
||||
commonLayerOpen('reg_layer');
|
||||
}
|
||||
|
||||
function category_article_move_proc(){
|
||||
if(confirm("등록된 글이 모두 이동됩니다. 진행하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/news/news_section_article_move_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function change_category(depth, val){
|
||||
if(depth == '1') {
|
||||
$('#category2').empty();
|
||||
$('#category3').empty();
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category2').append(option);
|
||||
$('#category3').append(option);
|
||||
|
||||
var json_category = '<?=json_encode($arr_category_add2)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if(depth == '2') {
|
||||
$('#category3').empty();
|
||||
|
||||
var option = "<option value=''>선택</option>";
|
||||
$('#category3').append(option);
|
||||
|
||||
var json_category = '<?=json_encode($arr_category_add3)?>';
|
||||
json_category = eval(json_category);
|
||||
|
||||
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>");
|
||||
$('#category3').append(option);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
44
application/views/admin/news/news_setting_reg.php
Executable file
44
application/views/admin/news/news_setting_reg.php
Executable file
@@ -0,0 +1,44 @@
|
||||
<?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 = '211';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/news/news_setting_reg_proc" method="post">
|
||||
<input type="hidden" name="idx" value="<?=$idx?>">
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<th>언론사 노출</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="etc_char1" id="etc_char1" value="N" class="input00" <? if($etc_char1=='N') { echo 'checked';}?>> 언론사 노출 비허용
|
||||
<input type="radio" name="etc_char1" id="etc_char1" value="Y" class="input00" <? if($etc_char1=='Y') { echo 'checked';}?>> 언론사 노출 허용
|
||||
</br>* 뉴스 메인페이지와 뉴스랭킹페이지 메인 리스트상에서의 언론사명이 노출 되는 것에 대한 허용 여부를 설정합니다.
|
||||
</br>* 뷰 페이지에서는 무조건 노출하는 것을 기본으로 하며, 본 설정 기능과는 무관합니다.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:news_setting_reg_proc()">저장하기</a>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function news_setting_reg_proc(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
89
application/views/admin/news/news_tag_list.php
Executable file
89
application/views/admin/news/news_tag_list.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?
|
||||
$menu_code = '27';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/news/news_tag_list/2">
|
||||
<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/news/news_list/2?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>
|
||||
131
application/views/admin/news/news_theme_edit.php
Executable file
131
application/views/admin/news/news_theme_edit.php
Executable file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$head_title = $result['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $result['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$sub_content = $result['sub_content'];
|
||||
$sub_content = htmlspecialchars($sub_content);
|
||||
$content_idx = $result['content_idx'];
|
||||
$main_img = $result['theme_img'];
|
||||
$theme_type = $result['theme_type'];
|
||||
$rank = $result['rank'];
|
||||
$press_name = $result['press_name'];
|
||||
|
||||
|
||||
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
||||
|
||||
$menu_code = '24';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
$rowspan = "3";
|
||||
if($theme_type=='1' || $theme_type=='6' ) {
|
||||
$rowspan = "4";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/news/news_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="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_category_code3" name="search_category_code3" value="<?=$search_category_code3?>">
|
||||
<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?>">
|
||||
<input type="hidden" id="mode" name="mode" value="edit">
|
||||
|
||||
<div class="common_table news">
|
||||
<h2 class="subtitle"><?=$def_arr_news_theme[$theme_type]['name']?></h2>
|
||||
<?
|
||||
if($def_arr_news_theme[$theme_type]['display']=='all') {
|
||||
?>
|
||||
<span class="text_blue"><b>* 모바일과 공통 송출관리</b></span>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$rank?>위</th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx" id="content_idx" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title" id="head_title" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
||||
<input type="text" name="title" id="title" class="type00" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? if($theme_type == '1') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<textarea id="sub_content" name="sub_content" placeholder="기사 간략 노출(2줄)" rows="2" cols="80"><?=$sub_content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<? }?>
|
||||
<? if($theme_type == '6') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="press_name" id="press_name" class="type02" size="20" placeholder="언론사" value="<?=$press_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<? }?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<div id="img_view"><?=$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:news_theme_list_reg_proc();">저장하기</a>
|
||||
<a href="/admin/news/news_theme_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_theme_type=<?=$search_theme_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_category_code3=<?=$search_category_code3?>&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 news_theme_list_reg_proc(){
|
||||
if($("#title").val()!='') {
|
||||
if($("#content_idx").val()==''){
|
||||
alert("기사를 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
<? if($theme_type != '3') {?>
|
||||
if($("#theme_img").val()=='' && $("#img").val()=='' && $("#org_img").val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
<?}?>
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
315
application/views/admin/news/news_theme_list.php
Executable file
315
application/views/admin/news/news_theme_list.php
Executable file
@@ -0,0 +1,315 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$arr_category_add1 = array();
|
||||
$arr_category_add2 = array();
|
||||
$arr_category_add3 = array();
|
||||
foreach ($arr_category as $key=>$val) {
|
||||
if($val['depth'] == '1') {
|
||||
$arr_category_add1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '2') {
|
||||
$arr_category_add2[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
} else if($val['depth'] == '3') {
|
||||
$arr_category_add3[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'p_category_code'=> $val['p_category_code']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$menu_code = '24';
|
||||
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/news/news_theme_list/2">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_theme_type" 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/news/news_theme_list/2" <? if($search_theme_type=='') { echo 'class="on"';}?>>전체</a></li>
|
||||
<? foreach($def_arr_news_theme1 as $val) {
|
||||
$css = '';
|
||||
if($search_theme_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
|
||||
<li><a href="/admin/news/news_theme_list/2?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="a.title" <? if($search_type=='a.title'){ echo 'selected';}?>>제목</option>
|
||||
<option value="b.press_name" <? if($search_type=='b.press_name'){ echo 'selected';}?>>언론사</option>
|
||||
<option value="b.reporter_name" <? if($search_type=='b.reporter_name'){ 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_news_theme2 as $val) {
|
||||
$css = '';
|
||||
if($search_theme_type == $val['code']) {
|
||||
$css = ' class="on"';
|
||||
}
|
||||
?>
|
||||
<li><a href="/admin/news/news_theme_list/2?search_theme_type=<?=$val['code']?>" <?=$css?>><?=$val['name']?></a></li>
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="write_btn">
|
||||
<!-- <a href="javascript:news_theme_reg_arr_del_proc()">삭제</a> -->
|
||||
<a href="javascript:news_theme_list_reg()">송출관리</a>
|
||||
<!-- <a href="/admin/news/news_reg/2?mode=add">뉴스등록</a> -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_table clearfix" style="margin-top: 30px">
|
||||
<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>
|
||||
<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>
|
||||
<div class="searh_area">
|
||||
<select name="search_category_code1" onchange="category_search()">
|
||||
<option value="">1차섹션</option>
|
||||
<? if(count($arr_category_add1) > 0) {
|
||||
foreach ($arr_category_add1 as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code1==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
<select name="search_category_code2" onchange="category_search()">
|
||||
<option value="">2차섹션</option>
|
||||
<? if(isset($arr_category_add2[$search_category_code1])==true) {
|
||||
foreach ($arr_category_add2[$search_category_code1] as $val) {
|
||||
?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code2==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<select name="search_category_code3" onchange="category_search()">
|
||||
<option value="">3차섹션</option>
|
||||
<? if(isset($arr_category_add3[$search_category_code2])==true) {
|
||||
foreach ($arr_category_add3[$search_category_code2] as $val) {?>
|
||||
<option value="<?=$val['category_code']?>" <? if($search_category_code3==$val['category_code']) { echo 'selected'; }?>><?=$val['category_name']?></option>
|
||||
<? }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" name="allcheck" id="allcheck"></th>
|
||||
<th>번호</th>
|
||||
<th>썸네일</th>
|
||||
<th>섹션</th>
|
||||
<th>테마</th>
|
||||
<th>제목</th>
|
||||
<th>언론사</th>
|
||||
<th>기자</th>
|
||||
<th>등록일시</br>(예약일)</th>
|
||||
<th>출력순위</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요</th>
|
||||
<th>댓글수</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="14">등록된 내용이 없습니다.</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'];
|
||||
$category_name1 = $val['category_name1'];
|
||||
$category_code = $val['category_code'];
|
||||
$theme_type = $val['theme_type'];
|
||||
$press_name = $val['press_name'];
|
||||
$reporter_name = $val['reporter_name'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['review_count1'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$is_display = $val['is_display'];
|
||||
$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_news_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"> ';
|
||||
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
|
||||
?>
|
||||
|
||||
<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/news/news_theme_list/2?search_category_code1=<?=$category_code1?>"><?=$category_name1?></a></td>
|
||||
<td><?=$theme_type_txt?></td>
|
||||
<td class="title" style="text-align:left;"><a href="/admin/news/news_reg/2?mode=edit&idx=<?=$content_idx?>"><?=$new?><?=$title?></a></td>
|
||||
<td><?=$press_name?></td>
|
||||
<td><?=$reporter_name?></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:news_them_edit('<?=$idx?>')"><i class="fa fa-pencil"></i>수정</a>
|
||||
<a href="javascript:news_theme_del_proc('<?=$idx?>')"><i class="fa fa-close"></i>삭제</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="write_btn">
|
||||
<a href="javascript:news_theme_reg_arr_del_proc()">삭제</a>
|
||||
<a href="javascript:news_theme_list_reg()">송출관리</a>
|
||||
<a href="/admin/news/news_reg/2?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 category_search(){
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function click_search(type, id){
|
||||
$("#"+id).val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function news_theme_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/news/news_theme_list_reg/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// edit
|
||||
function news_them_edit(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/news/news_theme_edit/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function news_theme_del_proc(idx) {
|
||||
if(confirm("글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/news/news_theme_reg_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 복수 삭제
|
||||
function news_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/news/news_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>
|
||||
190
application/views/admin/news/news_theme_list_reg.php
Executable file
190
application/views/admin/news/news_theme_list_reg.php
Executable file
@@ -0,0 +1,190 @@
|
||||
<?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'], 'head_title'=>$val['head_title'], 'title'=>$val['title'], 'sub_content'=>$val['sub_content'], 'theme_img'=>$val['theme_img'], 'press_name'=>$val['press_name']);
|
||||
}
|
||||
|
||||
|
||||
$menu_code = '24';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/news/news_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="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
||||
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
||||
<input type="hidden" id="search_category_code3" name="search_category_code3" value="<?=$search_category_code3?>">
|
||||
<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_news_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_news_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_news_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_news_theme[$search_theme_type]['count'];$i++) {
|
||||
$title_txt = '';
|
||||
if($i==1 && $search_theme_type =='1') $title_txt = ' (탑헤드라인)';
|
||||
|
||||
$head_title = '';
|
||||
$title = '';
|
||||
$sub_content = '';
|
||||
$theme_img = '';
|
||||
$theme_img_txt = '';
|
||||
$content_idx = '';
|
||||
$press_name = '';
|
||||
if(isset($arr_theme_rank[$i])== true) {
|
||||
$head_title = $arr_theme_rank[$i]['head_title'];
|
||||
$head_title = htmlspecialchars($head_title);
|
||||
$title = $arr_theme_rank[$i]['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$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'];
|
||||
$press_name = $arr_theme_rank[$i]['press_name'];
|
||||
if($theme_img!='') $theme_img_txt = '<img src="'.$theme_img.'" width=250>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$rowspan = "3";
|
||||
if($search_theme_type=='1' || $search_theme_type=='6' ) {
|
||||
$rowspan = "4";
|
||||
}
|
||||
|
||||
if($search_theme_type=='1' && $i > 1) {
|
||||
$rowspan = "3";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th rowspan="<?=$rowspan?>"><?=$i?>위<?=$title_txt?></th>
|
||||
<td class="tl">
|
||||
<input type="hidden" name="content_idx<?=$i?>" id="content_idx<?=$i?>" value="<?=$content_idx?>">
|
||||
<input type="text" name="head_title<?=$i?>" id="head_title<?=$i?>" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>"> <input type="text" name="title<?=$i?>" id="title<?=$i?>" class="type00" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<? if($search_theme_type == '1') {
|
||||
$display = 'style="display:none"';
|
||||
if($i==1) $display = 'style="display:block"';
|
||||
?>
|
||||
<tr <?=$display?>>
|
||||
<td class="tl">
|
||||
<textarea id="sub_content<?=$i?>" name="sub_content<?=$i?>" placeholder="기사 간략 노출(2줄)" rows="2" cols="80"><?=$sub_content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<? }?>
|
||||
<? if($search_theme_type == '6') {?>
|
||||
<tr>
|
||||
<td class="tl">
|
||||
<input type="text" name="press_name<?=$i?>" id="press_name<?=$i?>" class="type02" size="20" placeholder="언론사" value="<?=$press_name?>" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<? }?>
|
||||
|
||||
<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:news_theme_list_reg_proc()">저장하기</a>
|
||||
<a href="/admin/news/news_theme_list/3/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_theme_type=<?=$search_theme_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_category_code3=<?=$search_category_code3?>&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/news/news_theme_list_reg/2");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
var theme_count = "<?=$def_arr_news_theme[$search_theme_type]['count']?>";
|
||||
function news_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 != '3') {?>
|
||||
if($("#theme_img"+i).val()=='' && $("#img"+i).val()=='' && $("#org_img"+i).val()=='') {
|
||||
alert("메인이미지를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
<? }?>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
109
application/views/admin/search/search_article_inc.php
Executable file
109
application/views/admin/search/search_article_inc.php
Executable file
@@ -0,0 +1,109 @@
|
||||
|
||||
<!-- 레이어팝업 : 기시검색 -->
|
||||
<section class="common_layer common_search" id="search_article">
|
||||
<div class="dim_area"></div>
|
||||
<div class="layer_box">
|
||||
<h2>컨텐츠 검색</h2>
|
||||
<button type="button" class="btn_close_layer" onclick="search_article_close();"><img src="/img/admin/btn_layer_close.gif" alt="레이어 팝업 닫기"></button>
|
||||
<fieldset>
|
||||
<p class="guide">컨텐츠를 검색해주세요.</p>
|
||||
<div class="input_box in_btn">
|
||||
<input type="text" id="article_keyword" name="article_keyword" placeholder="검색어 입력" onkeypress="if( event.keyCode==13 ){search_article();}">
|
||||
<a href="javascript:search_article();" class="btn">검색하기</a>
|
||||
</div>
|
||||
<!-- 검색결과 -->
|
||||
<div class="result" id="result"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// 기사 검색
|
||||
function search_article(){
|
||||
var article_keyword = $("#article_keyword").val();
|
||||
var sort = $(":input:radio[name=sort]:checked").val();
|
||||
var category1 = '';
|
||||
var category2 = '';
|
||||
var category3 = '';
|
||||
if($("#rank1").length > 0) {
|
||||
var rank1 = $("#rank1").val();
|
||||
if($("#category1_"+rank1).length > 0) category1 = $("#category1_"+rank1).val();
|
||||
if($("#category2_"+rank1).length > 0) category2 = $("#category2_"+rank1).val();
|
||||
if($("#category3_"+rank1).length > 0) category3 = $("#category3_"+rank1).val();
|
||||
}
|
||||
|
||||
if(article_keyword == '') {
|
||||
alert("검색어를 입력해주세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"content_type" : "<?=$content_type?>",
|
||||
"article_keyword" : article_keyword,
|
||||
"sort" : sort,
|
||||
"category1" : category1,
|
||||
"category2" : category2,
|
||||
"category3" : category3
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/search/search_article_list',
|
||||
async : false,
|
||||
type : 'POST',
|
||||
dataType : 'HTML',
|
||||
data : form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
$("#result").show();
|
||||
$("#result").html(rtnHtml);
|
||||
},
|
||||
error: function(jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function search_article_close(){
|
||||
$("#result").hide();
|
||||
commonLayerClose('search_article');
|
||||
}
|
||||
|
||||
|
||||
// 프로그램 선택
|
||||
function select_article(idx, name, img, share_cnt, review_cnt, comment_cnt, hit_cnt, column_name, sub_title, head_title, editor_name, like_count, content_name, content_type, video_url, editor_idx, press_name){
|
||||
var key = $("#key").val();
|
||||
$("#title"+key).val(name);
|
||||
$("#content_idx"+key).val(idx);
|
||||
$("#content"+key).val('');
|
||||
|
||||
var html = '';
|
||||
if(img!='') {
|
||||
html = '<img src="'+img+'" width="200">';
|
||||
}
|
||||
|
||||
$("#img_view"+key).html(html);
|
||||
$("#img"+key).val(img);
|
||||
$("#article_keyword").val("");
|
||||
$("#result").hide();
|
||||
|
||||
if($("#hit_count"+key).length > 0) $("#hit_count"+key).val(hit_cnt);
|
||||
if($("#share_count"+key).length > 0) $("#share_count"+key).val(share_cnt);
|
||||
if($("#review_count"+key).length > 0) $("#review_count"+key).val(review_cnt);
|
||||
if($("#comment_count"+key).length > 0) $("#comment_count"+key).val(comment_cnt);
|
||||
if($("#column_name"+key).length > 0) $("#column_name"+key).val(column_name);
|
||||
if($("#sub_title"+key).length > 0) $("#sub_title"+key).val(sub_title);
|
||||
if($("#head_title"+key).length > 0) $("#head_title"+key).val(head_title);
|
||||
if($("#editor_name"+key).length > 0) $("#editor_name"+key).val(editor_name);
|
||||
if($("#like_count"+key).length > 0) $("#like_count"+key).val(like_count);
|
||||
if($("#content_name"+key).length > 0) $("#content_name"+key).val(content_name);
|
||||
if($("#content_type"+key).length > 0) $("#content_type"+key).val(content_type);
|
||||
if($("#video_url"+key).length > 0) $("#video_url"+key).val(video_url);
|
||||
if($("#category3"+key).length > 0) $("#category3"+key).val(editor_idx).prop("selected", true);
|
||||
if($("#press_name"+key).length > 0) $("#press_name"+key).val(press_name);
|
||||
|
||||
|
||||
commonLayerClose('search_article');
|
||||
}
|
||||
</script>
|
||||
|
||||
68
application/views/admin/search/search_article_list.php
Executable file
68
application/views/admin/search/search_article_list.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<p class="info">총 <span class="mark"><?=number_format($count)?></span> 개의 검색결과가 있습니다. <input type="radio" name="sort" id="sort" value="1" onclick="search_article();" <? if($sort=='1') { echo 'checked';}?>> 최신순 <input type="radio" name="sort" id="sort" value="2" onclick="search_article();" <? if($sort=='2') { echo 'checked';}?>> 오래된순 </p>
|
||||
<ul class="list">
|
||||
<?
|
||||
|
||||
if(count($list)==0) {
|
||||
echo '<li><p class="name">검색된 컨텐츠가 없습니다.</p></li>';
|
||||
|
||||
} else {
|
||||
?>
|
||||
|
||||
<?
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$title = $val['title'];
|
||||
$title = htmlspecialchars($title);
|
||||
$title1 = str_replace("'", "\\'", $title);
|
||||
$main_img = $val['main_img'];
|
||||
$share_count = $val['share_count'];
|
||||
$comment_count = $val['comment_count'];
|
||||
$hit_count = $val['hit_count'];
|
||||
$like_count = $val['like_count'];
|
||||
|
||||
$content_name = '';$content_name_txt='';
|
||||
if(isset($val['content_name'])==true) {
|
||||
$content_name = $val['content_name'];
|
||||
$content_name_txt = '['.$content_name.']';
|
||||
}
|
||||
|
||||
|
||||
$content_type = '';
|
||||
if(isset($val['content_type'])==true) $content_type = $val['content_type'];
|
||||
|
||||
$column_name = '';
|
||||
if(isset($val['column_name'])==true) $column_name = $val['column_name'];
|
||||
|
||||
$sub_title = '';
|
||||
if(isset($val['sub_title'])==true) $sub_title = $val['sub_title'];
|
||||
|
||||
$head_title = '';
|
||||
if(isset($val['head_title'])==true) $head_title = $val['head_title'];
|
||||
|
||||
$editor_name = '';
|
||||
if(isset($val['editor_name'])==true) $editor_name = $val['editor_name'];
|
||||
|
||||
$editor_idx = '';
|
||||
if(isset($val['partner_idx'])==true) $editor_idx = $val['partner_idx'];
|
||||
|
||||
$video_url = '';
|
||||
if(isset($val['video_url'])==true) $video_url = $val['video_url'];
|
||||
|
||||
$press_name = '';
|
||||
if(isset($val['press_name'])==true) $press_name = $val['press_name'];
|
||||
|
||||
$review_count = '';
|
||||
if(isset($val['review_count1'])==true) $review_count = $val['review_count1'];
|
||||
|
||||
|
||||
?>
|
||||
<li>
|
||||
<p class="name"><?=$content_name_txt?> <?=$title?></p>
|
||||
<a href="javascript:;" class="btn_green" onclick="select_article('<?=$idx?>', '<?=$title1?>', '<?=$main_img?>', '<?=$share_count?>', '<?=$review_count?>', '<?=$comment_count?>', '<?=$hit_count?>', '<?=$column_name?>', '<?=$sub_title?>', '<?=$head_title?>', '<?=$editor_name?>', '<?=$like_count?>', '<?=$content_name?>', '<?=$content_type?>', '<?=$video_url?>', '<?=$editor_idx?>', '<?=$press_name?>');">선택</a>
|
||||
</li>
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
307
application/views/admin/setting/blind_limit_list.php
Executable file
307
application/views/admin/setting/blind_limit_list.php
Executable file
@@ -0,0 +1,307 @@
|
||||
<?
|
||||
include_once ("./static_data/code.php");
|
||||
$menu_code = '122';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
$arr_status = array();
|
||||
$arr_status[1] = '0';
|
||||
$arr_status[2] = '0';
|
||||
foreach ($status_list as $val) {
|
||||
$arr_status[$val['limit_status']] = $val['cnt'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/setting/blind_limit_list/1">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_type" name="search_type" value="member">
|
||||
<input type="hidden" id="search_is_today" name="search_is_today" value="<?=$search_is_today?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
|
||||
<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" style="margin-top: 30px">
|
||||
<a href="javascript:search_total();"><span><b>Total:</b> <?=number_format($total_count);?></span></a>
|
||||
<a href="javascript:search_today('Y');"><span style="margin-left:10px"><b>오늘신규:</b> <?=number_format($new_count);?></span></a>
|
||||
<a href="javascript:search_status(1);"><span style="margin-left:10px" class="text_red"><b>제재진행중:</b> <?=number_format($arr_status[1]);?></span></a>
|
||||
<a href="javascript:search_status(2);"><span style="margin-left:10px" class="text_blue"><b>제재완료:</b> <?=number_format($arr_status[2]);?></span></a>
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_limit_type" id="search_limit_type" onchange="check_search();" style="width:120px">
|
||||
<option value="" <? if($search_limit_type==""){ echo 'selected';}?>>제재내용</option>
|
||||
<? foreach ($def_arr_blind_limit_type as $key1=>$val1) {?>
|
||||
<option value="<?=$key1?>" <? if($search_limit_type==(string)$key1){ echo 'selected';}?>><?=$val1?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
<select name="search_status" id="search_status" onchange="check_search();" style="width:120px">
|
||||
<option value="" <? if($search_status==""){ echo 'selected';}?>>진행상태</option>
|
||||
<? foreach ($def_arr_blind_limit_status as $key2=>$val2) {?>
|
||||
<option value="<?=$key2?>" <? if($search_status==(string)$key2){ echo 'selected';}?>><?=$val2?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>아이디</th>
|
||||
<th>제재누적횟수</th>
|
||||
<th>내용</th>
|
||||
<th>진행상태</th>
|
||||
<th>처리(해제)일시</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="7">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
|
||||
} else {
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$limit_type = $val['limit_type'];
|
||||
$limit_status = $val['limit_status'];
|
||||
$member_id = $val['member_id'];
|
||||
$member_name = $val['member_name'];
|
||||
$start_date = $val['start_date'];
|
||||
$end_date = $val['end_date'];
|
||||
$limit_sum_count = $val['limit_sum_count'];
|
||||
|
||||
$limit_type_txt = $def_arr_blind_limit_type[$limit_type];
|
||||
$limit_status_txt = $def_arr_blind_limit_status[$limit_status];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$member_id?>(<?=$member_name?>)</td>
|
||||
<td><?=number_format($limit_sum_count)?>회</td>
|
||||
<td><?=$limit_type_txt?></td>
|
||||
<td><?=$limit_status_txt?></td>
|
||||
<td><?=$start_date?></br><span class="text_blue"><?=$end_date?></span></td>
|
||||
<td class="tool_btn">
|
||||
<? if($limit_status != '2') {?>
|
||||
<a href="javascript:blind_limit_edit('<?=$idx?>')"><i class="fa fa-close"></i>수정</a>
|
||||
<? }?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="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('reg_layer')" class="pop_close">x</a>
|
||||
<input type="hidden" name="start_date" id="start_date">
|
||||
<input type="hidden" name="blind_setting_idx" id="blind_setting_idx">
|
||||
<input type="hidden" name="blind_id" id="blind_id">
|
||||
<h2>제재 수정</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td class="tl"><div id="layer_member"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제재일</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="limit_day" id="limit_day" class="type03">일 동안
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제재내용</th>
|
||||
<td class="tl">
|
||||
<select name="limit_type" id="limit_type" style="width:120px">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($def_arr_blind_limit_type as $key1=>$val1) {?>
|
||||
<option value="<?=$key1?>"><?=$val1?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제재상태</th>
|
||||
<td class="tl">
|
||||
<select name="limit_status" id="limit_status" style="width:120px">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($def_arr_blind_limit_status as $key2=>$val2) {?>
|
||||
<option value="<?=$key2?>"><?=$val2?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>마지막수정일</th>
|
||||
<td class="tl"><div id="layer_update_date"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:blind_limit_edit_proc()">수정</a>
|
||||
<a href="javascript:commonLayerClose('reg_layer')">취소하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function search_status(type) {
|
||||
$("#search_status").val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function search_today(type) {
|
||||
$("#search_is_today").val(type);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function search_total() {
|
||||
$("#search_status").val('');
|
||||
$("#search_is_today").val('');
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function reset(){
|
||||
$("#idx").val('');
|
||||
$("#layer_member").empty();
|
||||
$("#limit_day").val('');
|
||||
$("#layer_update_date").empty();
|
||||
$("#limit_type").val("").prop("selected", true);
|
||||
$("#limit_status").val("").prop("selected", true);
|
||||
}
|
||||
|
||||
// 수정 - layer열기
|
||||
function blind_limit_edit(idx){
|
||||
reset();
|
||||
|
||||
$("#idx").val(idx);
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/admin/setting/blind_limit_detail',
|
||||
sync: false,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form_data,
|
||||
success: function (rtn_json) {
|
||||
if(rtn_json.result_code=='0000') {
|
||||
var result = rtn_json.result_data;
|
||||
|
||||
var member = result.member_id + "("+result.member_name+")";
|
||||
$("#layer_member").html(member);
|
||||
$("#blind_id").val(result.member_id);
|
||||
$("#limit_day").val(result.limit_day);
|
||||
$("#layer_update_date").html(result.update_date);
|
||||
$("#limit_type").val(result.limit_type).prop("selected", true);
|
||||
$("#start_date").val(result.start_date);
|
||||
$("#blind_setting_idx").val(result.blind_setting_idx);
|
||||
$("#limit_status").val(result.limit_status).prop("selected", true);
|
||||
|
||||
|
||||
|
||||
commonLayerOpen('reg_layer');
|
||||
} else {
|
||||
alert("데이터로드에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function blind_limit_edit_proc(){
|
||||
if($("#limit_day").val()=='') {
|
||||
alert("제재일을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_type").val()=='') {
|
||||
alert("제재내용을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_status").val()=='') {
|
||||
alert("제재상태를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#limit_type").val()=='0') {
|
||||
alert("경고메일은 발송할수 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").attr("action", "/admin/setting/blind_limit_edit_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function blind_limit_del_proc(idx) {
|
||||
if(confirm("제재내용이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/setting/blind_limit_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
236
application/views/admin/setting/blind_list.php
Executable file
236
application/views/admin/setting/blind_list.php
Executable file
@@ -0,0 +1,236 @@
|
||||
<?
|
||||
include_once ("./static_data/code.php");
|
||||
$menu_code = '121';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
$arr_status = array();
|
||||
foreach ($status_list as $val) {
|
||||
$arr_status[$val['blind_status']] = $val['cnt'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/setting/blind_list/1">
|
||||
<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="status" name="status">
|
||||
<input type="hidden" id="search_status" name="search_status" value="<?=$search_status?>">
|
||||
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="" <? if($search_type==''){ echo 'selected';}?>>선택</option>
|
||||
<option value="blind_comment" <? if($search_type=='blind_comment'){ echo 'selected';}?>>댓글내용</option>
|
||||
<option value="blind_id" <? if($search_type=='blind_id'){ echo 'selected';}?>>신고대상아이디</option>
|
||||
<option value="blind_name" <? if($search_type=='blind_name'){ 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" style="margin-top: 30px">
|
||||
<span><a href="/admin/setting/blind_list/1"><b>Total:</b> <?=number_format($total_count);?></a></span>
|
||||
<?
|
||||
foreach ($def_arr_blind_status as $key=>$val) {
|
||||
switch ($key) {
|
||||
case '0' : $class="text_green"; break;
|
||||
case '1' : $class="text_blue"; break;
|
||||
case '2' : $class="text_red"; break;
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
if(isset($arr_status[$key])==true) $count = $arr_status[$key];
|
||||
|
||||
?>
|
||||
<span style="margin-left:10px"><a href="/admin/setting/blind_list/1?search_status=<?=$key?>" class="<?=$class?>" ><b><?=$val?>:</b> <?=number_format($count);?></a></span>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<span style="margin-left:10px">본인삭제: <?=number_format($self_del_count)?></span>
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_spam_reason" onchange="check_search();" style="width:100px">
|
||||
<option value="">신고사유</option>
|
||||
<? foreach ($def_arr_spam_reason as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_spam_reason==$key){ echo 'selected';}?>><?=$val?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
<select name="search_content_type" onchange="check_search();" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<? foreach ($def_arr_content as $key=>$val) {?>
|
||||
<option value="<?=$key?>" <? if($search_content_type==$key){ echo 'selected';}?>><?=$val?></option>
|
||||
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>신고사유</th>
|
||||
<th>카테고리</th>
|
||||
<th>신고대상</th>
|
||||
<th>댓글내용</th>
|
||||
<th>신고수</th>
|
||||
<th>누적신고</th>
|
||||
<th>상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</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'];
|
||||
$reason_type = $val['reason_type'];
|
||||
$blind_status = $val['blind_status'];
|
||||
$blind_id = $val['blind_id'];
|
||||
$blind_name = $val['blind_name'];
|
||||
$blind_comment = $val['blind_comment'];
|
||||
$spam_count = $val['spam_count'];
|
||||
$admin_spam_count = $val['admin_spam_count'];
|
||||
$content_type = $val['content_type'];
|
||||
$blind_status = $val['blind_status'];
|
||||
|
||||
$arr_reason_type = explode(",", $reason_type);
|
||||
|
||||
$reason_txt = '';
|
||||
$reason_count = count($arr_reason_type);
|
||||
if($reason_type > 0 && $reason_count > 0) {
|
||||
$reason_txt = $def_arr_spam_reason[$arr_reason_type[0]];
|
||||
if($reason_count > 1) {
|
||||
$reason_txt.=' 외 '.($reason_count-1).'개';
|
||||
}
|
||||
}
|
||||
$content_txt = $def_arr_content[$content_type];
|
||||
|
||||
switch ($blind_status) {
|
||||
case '0': $blind_status_txt = '<span class="text_green">블라인드 해지</span>'; break;
|
||||
case '1': $blind_status_txt = '<span class="text_blue">블라인드</span>'; break;
|
||||
case '2': $blind_status_txt = '<span class="text_red">블라인드 승인</span>'; break;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$dataNumber?></td>
|
||||
<td><?=$reason_txt?></td>
|
||||
<td><?=$content_txt?></td>
|
||||
<td><?=$blind_id?>(<?=$blind_name?>)</td>
|
||||
<td class="title" style="text-align:left;">
|
||||
<a href="javascript:blind_view('<?=$idx?>')"><?=$blind_comment?></a>
|
||||
</td>
|
||||
<td><?=number_format($spam_count)?></td>
|
||||
<td><?=number_format($admin_spam_count)?></td>
|
||||
<td><?=$blind_status_txt?></td>
|
||||
<td class="tool_btn">
|
||||
<? if($blind_status == '1') {?>
|
||||
<a href="javascript:blind_status_proc('2', '<?=$idx?>')"><i class="fa fa-pencil"></i>블라인드승인</a>
|
||||
<a href="javascript:blind_status_proc('0', '<?=$idx?>')"><i class="fa fa-close"></i>블라인드해지</a>
|
||||
<? }?>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--// 카테고리 등록/수정 layer -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function media_list_reg(){
|
||||
$("#mode").val('add');
|
||||
$("#input_form").attr("action", "/admin/etc_section/media_list_reg/6");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// view
|
||||
function blind_view(idx){
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/setting/blind_view/1");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 블라인드 승인 / 해지
|
||||
function blind_status_proc(status, idx) {
|
||||
if(status == '0') {
|
||||
var msg = "블라인드를 해지하시겠습니까?";
|
||||
} else {
|
||||
var msg = "블라인드를 승인하시겠습니까?";
|
||||
}
|
||||
|
||||
if(confirm(msg) == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#status").val(status);
|
||||
$("#input_form").attr("action", "/admin/setting/blind_status_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
165
application/views/admin/setting/blind_setting_reg.php
Executable file
165
application/views/admin/setting/blind_setting_reg.php
Executable file
@@ -0,0 +1,165 @@
|
||||
<?
|
||||
include_once ("./static_data/code.php");
|
||||
$menu_code = '123';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
$arr_blind_setting = array();
|
||||
foreach ($list as $val) {
|
||||
$arr_blind_setting[$val['idx']] = array('limit_count'=>$val['limit_count'], 'limit_type'=>$val['limit_type'], 'limit_status'=>$val['limit_status'], 'limit_day'=>$val['limit_day'], 'limit_content'=>$val['limit_content']);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/setting/blind_setting_reg_proc" method="post">
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<th>블라인드제재</br>알림설정</th>
|
||||
<td class="tl">
|
||||
<b>블라인드 누적으로 제재를 당할 경우 알림내용을 설정 합니다.</b></br>
|
||||
- 사용가능 추출태그</br>
|
||||
{{제재내용}} , {{제재만료일시}}</br></br>
|
||||
1) 페이지 접근시 경고창 내용 (게시글 작성, 열람 불가시 또는 로그인 불가시)</br>
|
||||
|
||||
<div style="border:1px solid #ccc; width:500px;padding:10px;background-color:#ebebeb;margin-bottom: 10px">
|
||||
블라인드 누적으로 인해 기능이 제한 되었습니다.</br></br>
|
||||
|
||||
제제내용 : {{제재내용}}</br>
|
||||
제제기간 : {{제재만료일시}} 까지</br>
|
||||
</div>
|
||||
|
||||
2) 게시판 리스트에 출력할 내용(게시판 이용 불가시) </br>
|
||||
<div style="border:1px solid #ccc; width:500px;padding:10px;background-color:#ebebeb">
|
||||
블라인드 누적으로 인해 <br>
|
||||
<span class="red">{{제재만료일시}}</span> 까지<br>
|
||||
게시글 보기가 제한되었습니다.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>블라인드제재</br>단계별 설정</th>
|
||||
<td class="tl">
|
||||
<b>블라인드 회수에 따른 제재방식 및 기간 등을 설정합니다.</b></br>
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>횟수</th>
|
||||
<th>제재내용</th>
|
||||
<th>기간</th>
|
||||
<th>경고메일내용</th>
|
||||
</tr>
|
||||
<? for ($i=1;$i<=5;$i++) {
|
||||
$limit_count = $arr_blind_setting[$i]['limit_count'];
|
||||
$limit_type = $arr_blind_setting[$i]['limit_type'];
|
||||
|
||||
$limit_day = $arr_blind_setting[$i]['limit_day'];
|
||||
$limit_content = $arr_blind_setting[$i]['limit_content'];
|
||||
|
||||
$disabled = '';
|
||||
if($limit_type == '0' || $limit_type == '3' || $limit_type == '4') {
|
||||
$disabled = 'disabled'; $limit_day = '-';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th><?=$i?>단계</th>
|
||||
<td><input type="text" name="limit_count<?=$i?>" id="limit_count<?=$i?>" value="<?=$limit_count?>" class="type03">회</td>
|
||||
<td>
|
||||
<select name="limit_type<?=$i?>" id="limit_type<?=$i?>" style="width:120px" onchange="change_limit_type('<?=$i?>', this.value);">
|
||||
<option value="">선택</option>
|
||||
<? foreach ($def_arr_blind_limit_type as $key1=>$val1) {?>
|
||||
<option value="<?=$key1?>" <? if($limit_type==(string)$key1) { echo 'selected';}?>><?=$val1?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" name="limit_day<?=$i?>" id="limit_day<?=$i?>" value="<?=$limit_day?>" class="type03" <?=$disabled?>>일</td>
|
||||
<td style="width:250px">
|
||||
<textarea name="limit_content<?=$i?>" id="limit_content<?=$i?>" cols="2"><?=$limit_content?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? }?>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:blind_setting_reg_proc()">저장하기</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function blind_setting_reg_proc(){
|
||||
|
||||
if(checkNumber($("#limit_count1").val())==false) {
|
||||
alert("횟수를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_count1").val()==0) {
|
||||
alert("횟수를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_type1").val()=='') {
|
||||
alert("재제내용을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_day1").val()=='') {
|
||||
alert("재제일을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#limit_content1").val()=='') {
|
||||
alert("경고메일내용을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
for(var i=2;i<=5;i++) {
|
||||
if($("#limit_count"+i).val() > 0) {
|
||||
if(checkNumber($("#limit_count2").val())==false) {
|
||||
alert("횟수를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_type"+i).val()=='') {
|
||||
alert("재제내용을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_day"+i).val()=='') {
|
||||
alert("재제일을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
if($("#limit_content"+i).val()=='') {
|
||||
alert("경고메일내용을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function change_limit_type(key, val){
|
||||
if(val == '0' || val == '3' || val == '4' ) {
|
||||
$('#limit_day'+key).val('-');
|
||||
$('#limit_day'+key).attr('disabled', true);
|
||||
} else {
|
||||
$('#limit_day'+key).val('');
|
||||
$('#limit_day'+key).removeAttr('disabled');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
135
application/views/admin/setting/blind_view.php
Executable file
135
application/views/admin/setting/blind_view.php
Executable file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
$menu_code = '121';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
|
||||
|
||||
$arr_reason_type = array();
|
||||
foreach ($reason_type_list as $val) {
|
||||
$arr_reason_type[$val['reason_type']] = $val['cnt'];
|
||||
}
|
||||
|
||||
$blind_name = $result['blind_name'];
|
||||
$blind_id = $result['blind_id'];
|
||||
$blind_comment = $result['blind_comment'];
|
||||
$write_date = $result['write_date'];
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="common_table clearfix">
|
||||
<a href="/admin/setting/blind_view/1?idx=<?=$idx?>"><span style="font-weight:bold">Total:</span> <?=number_format($total_count);?></a>
|
||||
|
||||
<?
|
||||
foreach ($def_arr_spam_reason as $key=>$val) {
|
||||
|
||||
$count = 0;
|
||||
if(isset($arr_reason_type[$key])==true) $count = $arr_reason_type[$key];
|
||||
|
||||
?>
|
||||
<a href="/admin/setting/blind_view/1?idx=<?=$idx?>&search_reason_type=<?=$key?>"><span style="margin-left:10px"><b><?=$val?>:</b> <?=number_format($count);?></span></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="text-align: left">
|
||||
<?=$blind_name?>(<?=$blind_id?>) <?=$write_date?>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;vertical-align: top" colspan="2"><?=$blind_comment?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="common_table news">
|
||||
<h2>신고리스트</h2>
|
||||
|
||||
|
||||
<?
|
||||
if(count($spam_list)==0) {
|
||||
?>
|
||||
<table><tr><td>신고내역이 없습니다.</td></tr></table>
|
||||
<?
|
||||
} else {
|
||||
|
||||
foreach($spam_list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$write_name = $val['write_name'];
|
||||
$write_id = $val['write_id'];
|
||||
$reason_type = $val['reason_type'];
|
||||
$reason_content = $val['reason_content'];
|
||||
if($reason_type > 0) {
|
||||
$reason_type_txt = $def_arr_spam_reason[$reason_type];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>신고사유</th>
|
||||
<td style="text-align: left">
|
||||
<? if($reason_type > 0) { ?>
|
||||
<?=$reason_type_txt?>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>신고자</th>
|
||||
<td style="text-align: left">
|
||||
<?=$write_name?> (<?=$write_id?>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>신고내용</th>
|
||||
<td style="text-align: left"><?=$reason_content?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</br>
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="write_btn tc">
|
||||
<a href="/admin/setting/blind_list/1/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_status=<?=$search_status?>&search_spam_reason=<?=$search_spam_reason?>&search_content_type=<?=$search_content_type?>">목록으로</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function news_comment_del_proc(idx) {
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/news/news_comment_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
209
application/views/admin/setting/realtime_keyword_list.php
Executable file
209
application/views/admin/setting/realtime_keyword_list.php
Executable file
@@ -0,0 +1,209 @@
|
||||
<?
|
||||
$menu_code = '132';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post">
|
||||
|
||||
- 메인화면에 출력되고 있는 실시간인기검색어의 검색어를 등록합니다. </br>
|
||||
- 통합검색창에서 검색어를 입력할경우 자동으로 횟수가 합산되어 인기검색어에 등록 되지만 관리자가 임의로 지정할 수 도 있습니다.</br>
|
||||
- 검색어 및 검색횟수를 관리자 임의대로 설정해줄수있습니다. 똑같은 검색어를 입력하는경우 상위에 있는검색어에 횟수가 + 포함되며 중복됐던 두번째 검색어는 자동 삭제됩니다. </br>
|
||||
- 개별 삭제 및 다중삭제가 가능하고, 순위변동을 임의대로 조절할 수도 있습니다.</br>
|
||||
|
||||
<!-- 테이블 시작-->
|
||||
<div class="common_table">
|
||||
<table>
|
||||
<thead>
|
||||
<th>순위</th>
|
||||
<th>순위변동</th>
|
||||
<th>검색어</th>
|
||||
<th>검색횟수</th>
|
||||
<th><input type="checkbox" name="all_check" id="all_check">전체</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="5">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$rank = $val['rank'];
|
||||
$last_rank = $val['last_rank'];
|
||||
$keyword = $val['keyword'];
|
||||
$search_count = $val['search_count'];
|
||||
$rank_diff = $last_rank - $rank;
|
||||
|
||||
$rank_diff_txt = '';
|
||||
if($last_rank == 0) {
|
||||
$rank_diff_txt = '<span class="txt_red">new</span>';
|
||||
} else {
|
||||
if($rank_diff == 0) {
|
||||
$rank_diff_txt = '-';
|
||||
} else if($rank_diff > 0) {
|
||||
$rank_diff_txt = "▲ ".$rank_diff;
|
||||
} else {
|
||||
$rank_diff_txt = "▼ ".abs($rank_diff);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- 리스트출력 -->
|
||||
<input type="hidden" name="idx[]" value="<?=$idx?>">
|
||||
<tr>
|
||||
<td><?=$rank?></td>
|
||||
<td><?=$rank_diff_txt?></td>
|
||||
<td><input type="text" name="edit_keyword[]" id="keyword_<?=$idx?>" class="input00" size="30" value="<?=$keyword?>"></td>
|
||||
<td><input type="text" name="edit_search_count[]" id="search_count_<?=$idx?>" class="input00" size="10" value="<?=$search_count?>"></td>
|
||||
<td><input type="checkbox" name="is_del[]" value="<?=$idx?>"> 삭제</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="write_btn">
|
||||
<a href="javascript:realtime_keyword_edit_proc()">일괄수정</a>
|
||||
<a href="javascript:realtime_keyword_del_proc()">삭제</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<h2 class="subtitle">실시간 인기검색어 랭킹정보 추가</h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>검색어</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="keyword" id="keyword">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>검색횟수</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="search_count" id="search_count" class="type02" onkeypress="if( event.keyCode==13 ){realtime_keyword_add_proc();}"> 회
|
||||
</br>- 검색횟수 조절시 정확한 숫자로 업데이트 되지 않을수 있습니다.
|
||||
</br>- 최대 2,147,483,647까지 입력 가능합니다.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:realtime_keyword_add_proc()">저장하기</a>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// 랭킹정보 추가
|
||||
function realtime_keyword_add_proc(){
|
||||
if($("#keyword").val()==''){
|
||||
alert('검색어를 입력하세요.');
|
||||
return false;
|
||||
}
|
||||
if($("#search_count").val()==''){
|
||||
alert('검색횟수를 입력하세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#search_count").val() > 2147483647) {
|
||||
alert("검색횟수가 너무 큽니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(checkNumber($("#search_count").val())==false) {
|
||||
alert("검색횟수를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var input1 = $("input:text[name='edit_keyword[]']");
|
||||
var count1 = 0;
|
||||
for(var i = 0; i < input1.length; i ++){
|
||||
if($(input1[i]).val()==$("#keyword").val()) {
|
||||
count1++;
|
||||
}
|
||||
}
|
||||
if(count1 > 0) {
|
||||
alert("이미 동일한 검색어가 있습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").attr("action", "/admin/setting/realtime_keyword_add_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// 삭제
|
||||
function realtime_keyword_del_proc() {
|
||||
if($("input:checkbox[name='is_del[]']").is(":checked") == false) {
|
||||
alert("삭제할 내용이 없습니다.");
|
||||
return false;
|
||||
}
|
||||
if(confirm("실시간검색어가 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#input_form").attr("action", "/admin/setting/realtime_keyword_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 수정
|
||||
function realtime_keyword_edit_proc() {
|
||||
var input1 = $("input:text[name='edit_keyword[]']");
|
||||
var count1 = 0;
|
||||
for(var i = 0; i < input1.length; i ++){
|
||||
if($(input1[i]).val()=='') {
|
||||
count1++;
|
||||
}
|
||||
}
|
||||
if(count1 > 0) {
|
||||
alert("검색어를 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var input2 = $("input:text[name='edit_search_count[]']");
|
||||
var count2 = 0;
|
||||
for(var i = 0; i < input2.length; i ++){
|
||||
if($(input2[i]).val()=='') {
|
||||
count2++;
|
||||
}
|
||||
if(checkNumber($(input2[i]).val())==false) {
|
||||
count2++;
|
||||
}
|
||||
}
|
||||
if(count2 > 0) {
|
||||
alert("검색횟수를 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").attr("action", "/admin/setting/realtime_keyword_edit_proc");
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
// checkbox all checked/unchecked
|
||||
$(function(){
|
||||
$("#all_check").click(function(){
|
||||
if($("#all_check").prop("checked")) {
|
||||
$("input:checkbox[name='is_del[]']").prop('checked', true); // 전체선택하기
|
||||
} else {
|
||||
$("input:checkbox[name='is_del[]']").prop("checked", false);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
166
application/views/admin/setting/realtime_keyword_log_list.php
Executable file
166
application/views/admin/setting/realtime_keyword_log_list.php
Executable file
@@ -0,0 +1,166 @@
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/jquery-ui.min.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
|
||||
<?
|
||||
$menu_code = '133';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" method="post">
|
||||
|
||||
|
||||
|
||||
<div class="big_search clearfix common_table">
|
||||
<ul class="tl moth">
|
||||
<a href="javascript:;" onclick="setting_date(this,'0');" id="s_btn_date1" class="on">1일</a>
|
||||
<a href="javascript:;" onclick="setting_date(this,'7');" id="s_btn_date2">7일</a>
|
||||
<a href="javascript:;" onclick="setting_date(this,'1');" id="s_btn_date3">1개월</a>
|
||||
<a href="javascript:;" onclick="setting_date(this,'3');" id="s_btn_date4">3개월</a>
|
||||
<a href="javascript:;" onclick="setting_date(this,'6');" id="s_btn_date5">6개월</a>
|
||||
<a href="javascript:;" onclick="setting_date(this,'12');" id="s_btn_date6">1년</a>
|
||||
<input type="text" name="start_date" id="start_date" class="type02" value="<?=$start_date?>" /> ~ <input type="text" name="end_date" id="end_date" class="type02" value="<?=$end_date?>" />
|
||||
<button type="button" class="btn_black" style="width:80px" onclick="check_search();" style="cursor: pointer;">검색</button> <button type="button" class="btn_green" style="width:80px" onclick="excel_downlaod();" style="cursor: pointer;">엑셀다운</button>
|
||||
</ul>
|
||||
</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>
|
||||
<th>검색횟수</th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="5">등록된 내용이 없습니다.</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$rank = $val['rank'];
|
||||
$last_rank = $val['last_rank'];
|
||||
$keyword = $val['keyword'];
|
||||
$search_count = $val['search_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$rank_diff = $last_rank - $rank;
|
||||
|
||||
$rank_diff_txt = '';
|
||||
if($last_rank == 0) {
|
||||
$rank_diff_txt = '<span class="txt_red">new</span>';
|
||||
} else {
|
||||
if($rank_diff == 0) {
|
||||
$rank_diff_txt = '-';
|
||||
} else if($rank_diff > 0) {
|
||||
$rank_diff_txt = "▲ ".$rank_diff;
|
||||
} else {
|
||||
$rank_diff_txt = "▼ ".abs($rank_diff);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="hidden" name="idx[]" value="<?=$idx?>">
|
||||
<tr>
|
||||
<td><?=$rank?></td>
|
||||
<td><?=$rank_diff_txt?></td>
|
||||
<td><?=$reg_date?></td>
|
||||
<td><?=$keyword?></td>
|
||||
<td><?=$search_count?></td>
|
||||
</tr>
|
||||
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// 검색
|
||||
function check_search(){
|
||||
$("#input_form").attr("action", "/admin/setting/realtime_keyword_log_list/1");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
// 일자 계산
|
||||
function setting_date(t, termVal){
|
||||
|
||||
$(t).parent().children("a").removeClass("on");
|
||||
$(t).addClass("on");
|
||||
|
||||
var nowDate = new Date();
|
||||
if(termVal == '') {
|
||||
$("#start_date").val('');
|
||||
$("#end_date").val('');
|
||||
} else {
|
||||
if(termVal!='0') {
|
||||
if(termVal=='7') {
|
||||
nowDate.setDate(nowDate.getDate() - 7);
|
||||
} else {
|
||||
nowDate.setMonth(nowDate.getMonth() - parseInt(termVal));
|
||||
}
|
||||
}
|
||||
var newDate = new Date(nowDate);
|
||||
var sDate = newDate.format("yyyy-MM-dd");
|
||||
var eDate = new Date().format("yyyy-MM-dd");
|
||||
|
||||
$("#start_date").val(sDate);
|
||||
$("#end_date").val(eDate);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 엑셀다운로드
|
||||
function excel_downlaod(){
|
||||
if($("#start_date").val()==''){
|
||||
alert('일자를 선택해주세요.');
|
||||
return false;
|
||||
}
|
||||
if($("#end_date").val()==''){
|
||||
alert('일자를 선택해주세요.');
|
||||
return false;
|
||||
}
|
||||
$("#input_form").attr("action", "/admin/setting/realtime_keyword_excel_download_proc");
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
// jquery datepicker
|
||||
$("#start_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/btn_date.png",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
|
||||
});
|
||||
$("#end_date").datepicker({
|
||||
inline: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
buttonImage:"/img/btn_date.png",
|
||||
showOn: "both",
|
||||
buttonImageOnly: true
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
51
application/views/admin/setting/realtime_keyword_setting_reg.php
Executable file
51
application/views/admin/setting/realtime_keyword_setting_reg.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?
|
||||
$menu_code = '131';
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
|
||||
<form name="input_form" id="input_form" action="/admin/setting/realtime_keyword_setting_reg_proc" method="post">
|
||||
<div class="common_table">
|
||||
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
|
||||
<tr>
|
||||
<th>기준시간선정</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="base_hour" id="base_hour" value="<?=$base_hour?>" class="type02"> 시간
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>검색어저장여부</th>
|
||||
<td class="tl">
|
||||
<div>검색결과가 없는 검색어도 저장할지 여부를 설정합니다.</div>
|
||||
<input type="checkbox" name="is_no_result_keyword" id="is_no_result_keyword" class="input00" value="Y" <? if($is_no_result_keyword =='Y') { echo 'checked'; }?>> 전부저장
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="write_btn tc">
|
||||
<a href="javascript:realtime_keyword_setting_reg_proc()">저장하기</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// 저장하기
|
||||
function realtime_keyword_setting_reg_proc(){
|
||||
if($("#base_hour").val()=='') {
|
||||
alert("기준시간을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
if(checkNumber($("#base_hour").val())==false) {
|
||||
alert("기준시간을 확인해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#input_form").submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user