first commit
This commit is contained in:
101
application/views/adm/church.php
Executable file
101
application/views/adm/church.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">데이터관리 > 교회정보관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>네이버번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>이름</th>
|
||||
<th>주소</th>
|
||||
<th>연락처</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->Id?></td>
|
||||
<td><?php echo $r->NId?></td>
|
||||
<td><?php echo $r->Category?></td>
|
||||
<td><?php echo $r->Name?></td>
|
||||
<td><?php if($r->RoadAddress) echo $r->RoadAddress.'<br />'?><?php echo $r->CommonAddress?> <?php echo $r->Address?></td>
|
||||
<td><?php echo $r->Phone?></td>
|
||||
<td><?php echo $r->CreatedAt?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->Id?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function(){
|
||||
$('.cm-display-select').on('change', function(){
|
||||
if(confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N': selectVal;
|
||||
$.post('/adm/content/display', {'is_display': is_display, 'postid': postid}, function(res){
|
||||
selectVal == 'R' ? location.href='/adm/content/reserve?list='+postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
137
application/views/adm/comment.php
Executable file
137
application/views/adm/comment.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">회원관리 > 코멘트관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<div class="col-md-12" style="margin-bottom:10px;">
|
||||
<select name="category" class="form-control" data-width="200">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" data-width="200">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group" style="display:inline-block;width:350px;vertical-align: middle;">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" style="display:inline-block;width:300px;"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-reserve btn-list-selected disabled"
|
||||
data-list-reserve-url="/adm/content/reserve?">선택예약</button>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled"
|
||||
data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>글번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>에디터</th>
|
||||
<th>코멘트</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->commentId?></td>
|
||||
<td><?php echo $r->idx?></td>
|
||||
<td><?php echo $r->categoryName?></td>
|
||||
<td><?php echo $r->editorName?></td>
|
||||
<td><?php echo '<i style="color:#bbb">'.$r->title.'</i><br />'.$r->comment?></td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<form action="" method="get">
|
||||
<select name="category" class="form-control" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:100px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function(){
|
||||
$('.cm-display-select').on('change', function(){
|
||||
if(confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N': selectVal;
|
||||
$.post('/adm/content/display', {'is_display': is_display, 'postid': postid}, function(res){
|
||||
selectVal == 'R' ? location.href='/adm/content/reserve?list='+postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
160
application/views/adm/content.php
Executable file
160
application/views/adm/content.php
Executable file
@@ -0,0 +1,160 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">기본관리 > 컨텐츠관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<div class="col-md-12" style="margin-bottom:10px;">
|
||||
<select name="category" class="form-control" data-width="200">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" data-width="200">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group" style="display:inline-block;width:350px;vertical-align: middle;">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" style="display:inline-block;width:300px;" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-reserve btn-list-selected disabled"
|
||||
data-list-reserve-url="/adm/content/reserve?">선택예약</button>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled"
|
||||
data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>카테고리 / 에디터 / 제목</th>
|
||||
<th>메인이미지</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요수</th>
|
||||
<th>댓글수</th>
|
||||
<th>공개여부</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
<td><span style="color:red"><?php echo $r->categoryName?></span> / <span style="color:blue"><?php echo $r->editorName?></span><br /><a href="#"
|
||||
class="cm-title-link"><?php echo convertEmoji($r->title)?></a></td>
|
||||
<td><img src="<?php echo imgSrc($r->mainImg)?>" height="50"></td>
|
||||
<td><?php echo $r->views?></td>
|
||||
<td><?php echo $r->likes?></td>
|
||||
<td><?php echo $r->comments?></td>
|
||||
<td><select <?php if(strtotime($r->display_date) > time()) echo 'disabled';?> class="cm-display-select" data-width="80">
|
||||
<?php if($r->is_del == 'Y') {?>
|
||||
<option value="D" selected>삭제</option>
|
||||
<option value="N">비공개</option>
|
||||
<option value="Y">공개</option>
|
||||
<option value="R">예약</option>
|
||||
<?php } else {?>
|
||||
<option value="N" <?php if($r->is_display == 'N') echo ' selected';?>>비공개</option>
|
||||
<option value="Y" <?php if($r->is_display == 'Y') echo ' selected';?>>공개</option>
|
||||
<option value="R" <?php if(strtotime($r->display_date) > time()) echo ' selected';?>>예약</option>
|
||||
<?php }?>
|
||||
</select></td>
|
||||
<td><span
|
||||
style="color:blue"><?php echo $r->reg_date?></span><?php if(strtotime($r->display_date) > time()) echo '<br /><span style="color:red">'. $r->display_date.'</span>'?>
|
||||
</td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<form action="" method="get">
|
||||
<select name="category" class="form-control" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:100px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-display-select').on('change', function() {
|
||||
if (confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N' : selectVal;
|
||||
$.post('/adm/content/display', {
|
||||
'is_display': is_display,
|
||||
'postid': postid
|
||||
}, function(res) {
|
||||
selectVal == 'R' ? location.href = '/adm/content/reserve?list=' + postid : location.reload();
|
||||
})
|
||||
}else {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
105
application/views/adm/contentcategory.php
Executable file
105
application/views/adm/contentcategory.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">기본관리 > 카테고리관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<a href="/adm/content/categoryedit" class="btn btn-outline btn-default btn-sm">신규등록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled"
|
||||
data-list-delete-url="/adm/content/categorydelete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>등록일</th>
|
||||
<th>변경일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
<td><?php echo $r->category_fullpath?></td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><?php echo $r->update_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="/adm/content/categoryedit" class="btn btn-outline btn-default btn-sm">신규등록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-display-select').on('change', function() {
|
||||
if (confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N' : selectVal;
|
||||
$.post('/adm/content/display', {
|
||||
'is_display': is_display,
|
||||
'postid': postid
|
||||
}, function(res) {
|
||||
selectVal == 'R' ? location.href = '/adm/content/reserve?list=' + postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
68
application/views/adm/contentcategoryedit.php
Executable file
68
application/views/adm/contentcategoryedit.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">기본관리 > 카테고리 정보 업데이트</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('HTTP_REFERER')?>">
|
||||
<input type="hidden" name="idx" class="form-control" value="<?php if(isset($category)) echo $category->idx?>">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>상위 카테고리</th>
|
||||
<td>
|
||||
<select name="parent" class="form-control" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $c) { echo '<option value="'.$c->idx.'" '.(!empty($category) && $category->parent == $c->idx ? 'selected':'').'>'. $c->category_name. '</option>';}?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>카테고리명</th>
|
||||
<td>
|
||||
<input type="text" name="category_name" class="form-control" value="<?php if(isset($category->category_name)) echo $category->category_name?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>설명</th>
|
||||
<td>
|
||||
<input type="text" name="description" class="form-control" value="<?php if(isset($category->description)) echo $category->description?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
181
application/views/adm/contentwrite.php
Executable file
181
application/views/adm/contentwrite.php
Executable file
@@ -0,0 +1,181 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">컨텐츠관리 > 등록</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table" style="overflow:visible">
|
||||
<form method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="contentId" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="150">카테고리</th>
|
||||
<td>
|
||||
<select name="category" class="form-control" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.($post->category_idx == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>에디터</th>
|
||||
<td>
|
||||
<select name="editor" class="form-control" style="width:200px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.($post->partner_idx == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title" class="form-control" value="<?php if(isset($post)) echo convertEmoji($post->title)?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<input type="hidden" name="main_img" value="<?php if(isset($post)) echo $post->main_img?>">
|
||||
<input type="file" class="cm-main-img" name="uploadfile">
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->mainImg)?>" width="200" style="margin-top:5px;<?php if(isset($post)) echo $post ? '':'display:none;'?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>본문</th>
|
||||
<td>
|
||||
<!-- <textarea id="content" name="content"></textarea> -->
|
||||
<textarea name="content" class="js-st-instance"
|
||||
style="width:100%; height:500px;"><?php if(isset($post)) echo contentImgSrc(convertEmoji($post->content))?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>공개설정</th>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<select name="is_display" style="width:200px" class="cm-display-select">
|
||||
<option value="">공개설정</option>
|
||||
<option value="N" <?php if(isset($post) && $post->is_display == 'N') echo ' selected';?>>비공개</option>
|
||||
<option value="Y" <?php if(isset($post) && $post->is_display == 'Y') echo ' selected';?>>공개</option>
|
||||
<option value="R" <?php if(isset($post) && $post->is_display == 'N' && strtotime($post->display_date) > time()) echo ' selected';?>>예약</option>
|
||||
</select>
|
||||
<div style="margin-top:5px;">
|
||||
<input type="text" name="display_time" class="datetimepicker form-control cm-reserve-datetime"
|
||||
value="<?php if(isset($post->display_date)) echo $post->display_date?>"
|
||||
style="width:200px;display:<?php if(isset($post) && $post->is_display == 'N' && strtotime($post->display_date) > time()) echo 'block'; else echo 'none';?>;">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger cm-contentedit-cancel">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
tinyMCE.init({
|
||||
selector: '.js-st-instance',
|
||||
plugins: ['link image code fullscreen lineheight',
|
||||
'autolink lists link anchor table',
|
||||
'textcolor colorpicker textpattern'
|
||||
],
|
||||
file_browser_callback: RoxyFileBrowser,
|
||||
language: 'ko_KR',
|
||||
image_advtab: true,
|
||||
toolbar: 'codesample | bold italic sizeselect fontselect fontsizeselect | hr alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | insertfile undo redo | forecolor backcolor emoticons | code | lineheightselect | table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol',
|
||||
fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt",
|
||||
font_formats: '나눔고딕=나눔고딕코딩,NanumGothicCoding,sans-serif; Andale Mono=andale mono,times; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Book Antiqua=book antiqua,palatino; Comic Sans MS=comic sans ms,sans-serif; Courier New=courier new,courier; Georgia=georgia,palatino; Helvetica=helvetica; Impact=impact,chicago; Symbol=symbol; Tahoma=tahoma,arial,helvetica,sans-serif; Terminal=terminal,monaco; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva; Webdings=webdings; Wingdings=wingdings,zapf dingbats',
|
||||
lineheight_formats: "1pt 2pt 3pt 4pt 5pt 6pt 7pt 8pt 9pt 10pt 11pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 26pt 36pt 48pt",
|
||||
setup: function(ed) {
|
||||
ed.on('init', function() {
|
||||
// this.getDoc().body.style.fontSize = '12';
|
||||
this.getDoc().body.style.fontFamily = '나눔고딕';
|
||||
});
|
||||
ed.on('Change', function(e) {
|
||||
contentEdited = true;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function RoxyFileBrowser(field_name, url, type, win) {
|
||||
var roxyFileman = '/fileman/index.html?integration=tinymce4';
|
||||
if (roxyFileman.indexOf("?") < 0) {
|
||||
roxyFileman += "?type=" + type;
|
||||
} else {
|
||||
roxyFileman += "&type=" + type;
|
||||
}
|
||||
roxyFileman += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
|
||||
if (tinyMCE.activeEditor.settings.language) {
|
||||
roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
|
||||
}
|
||||
tinyMCE.activeEditor.windowManager.open({
|
||||
file: roxyFileman,
|
||||
title: 'Crossmap File Manager',
|
||||
width: 850,
|
||||
height: 650,
|
||||
resizable: "yes",
|
||||
plugins: "media",
|
||||
inline: "yes",
|
||||
close_previous: "no"
|
||||
}, {
|
||||
window: win,
|
||||
input: field_name
|
||||
});
|
||||
return false;
|
||||
}
|
||||
$('.datetimepicker').datetimepicker({
|
||||
format: 'YYYY-MM-DD HH:mm:ss'
|
||||
});
|
||||
|
||||
$('.cm-display-select').on('change', function() {
|
||||
$('.cm-reserve-datetime').hide();
|
||||
if (this.value == 'R') {
|
||||
$('.cm-reserve-datetime').show();
|
||||
}
|
||||
})
|
||||
|
||||
var contentEdited = false;
|
||||
$(function() {
|
||||
$('input,select').on('change', function() {
|
||||
contentEdited = true;
|
||||
})
|
||||
|
||||
$('.cm-contentedit-cancel').on('click', function() {
|
||||
if (contentEdited) {
|
||||
if (confirm('정말로 취소하시겠습니까?')) {
|
||||
location.href = '/adm/content'
|
||||
}
|
||||
} else location.href = '/adm/content';
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
118
application/views/adm/editor.php
Executable file
118
application/views/adm/editor.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">회원관리 > 에디터관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group" style="display:inline-block;width:350px;vertical-align: middle;">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" style="display:inline-block;width:300px;"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a class="btn btn-outline btn-default btn-sm" href="/adm/member/editoredit">신규등록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/member/editordelete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>아이콘/채널명/아이디</th>
|
||||
<th>이름/이메일</th>
|
||||
<th>활성/비활성</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
|
||||
<td><img src="<?php echo imgSrc($r->partner_img)?>" height="50" style="float:left;margin:5px"><a href="/adm/member/editoredit/<?php echo $r->idx?>"
|
||||
style="font-weight:bold"><?php echo $r->partner_name?> (<?php echo $r->partner_id?>)</a><br /><i
|
||||
style="color:#bbb"><?php echo $r->partner_intro?></i></td>
|
||||
<td><?php echo $r->partner_real_name?><br /><?php echo $r->partner_email?></td>
|
||||
|
||||
<td><select class="cm-display-select" data-width="80">
|
||||
<option value="N" <?php if($r->is_del == 'N') echo ' selected';?>>활성</option>
|
||||
<option value="Y" <?php if($r->is_del == 'Y') echo ' selected';?>>비활성</option>
|
||||
</select></td>
|
||||
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled"
|
||||
data-list-delete-url="/adm/member/editordelete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-display-select').on('change', function() {
|
||||
if (confirm('에디터를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N' : selectVal;
|
||||
$.post('/adm/member/editoractive', {
|
||||
'is_display': is_display,
|
||||
'postid': postid
|
||||
}, function(res) {
|
||||
selectVal == 'R' ? location.href = '/adm/content/reserve?list=' + postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
146
application/views/adm/fileman.php
Executable file
146
application/views/adm/fileman.php
Executable file
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
RoxyFileman - web based file manager. Ready to use with CKEditor, TinyMCE.
|
||||
Can be easily integrated with any other WYSIWYG editor or CMS.
|
||||
|
||||
Copyright (C) 2013, RoxyFileman.com - Lyubomir Arsov. All rights reserved.
|
||||
For licensing, see LICENSE.txt or http://RoxyFileman.com/license
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
|
||||
-->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Roxy file manager</title>
|
||||
<link href="/assets/adm/fileman/css/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/assets/adm/fileman/css/main.min.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/adm/fileman/js/jquery-ui-1.10.4.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/adm/fileman/js/custom.js"></script>
|
||||
<script type="text/javascript" src="/assets/adm/fileman/js/main.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/adm/fileman/js/jquery-dateFormat.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<table cellpadding="0" cellspacing="0" id="wraper">
|
||||
<tr>
|
||||
<td valign="top" class="pnlDirs" id="dirActions">
|
||||
<div class="actions">
|
||||
<input type="button" id="btnAddDir" value="Create" title="Create new directory" onclick="addDir()" data-lang-v="CreateDir" data-lang-t="T_CreateDir" />
|
||||
<input type="button" id="btnRenameDir" value="Rename" title="Rename directory" onclick="renameDir()" data-lang-v="RenameDir" data-lang-t="T_RenameDir" />
|
||||
<input type="button" id="btnDeleteDir" value="Delete" title="Delete selected directory" onclick="deleteDir()" data-lang-v="DeleteDir" data-lang-t="T_DeleteDir" />
|
||||
</div>
|
||||
<div id="pnlLoadingDirs">
|
||||
<span>Loading directories...</span><br>
|
||||
<img src="images/loading.gif" title="Loading directory tree, please wait...">
|
||||
</div>
|
||||
<div class="scrollPane">
|
||||
<ul id="pnlDirList"></ul>
|
||||
</div>
|
||||
</td>
|
||||
<td valign="top" id="fileActions">
|
||||
<input type="hidden" id="hdViewType" value="list">
|
||||
<input type="hidden" id="hdOrder" value="asc">
|
||||
<div class="actions">
|
||||
<input type="button" id="btnAddFile" value="Add file" title="Upload files" onclick="addFileClick()" data-lang-v="AddFile" data-lang-t="T_AddFile" />
|
||||
<input type="button" id="btnPreviewFile" value="Preview" title="Preview selected file" onclick="previewFile()" data-lang-v="Preview" data-lang-t="T_Preview" />
|
||||
<input type="button" id="btnRenameFile" value="Rename" title="Rename selected file" onclick="renameFile()" data-lang-v="RenameFile" data-lang-t="T_RenameFile" />
|
||||
<input type="button" id="btnDownloadFile" value="Download" title="Download selected file" onclick="downloadFile()" data-lang-v="DownloadFile" data-lang-t="T_DownloadFile" />
|
||||
<input type="button" id="btnDeleteFile" value="Delete" title="Delete selected file" onclick="deleteFile()" data-lang-v="DeleteFile" data-lang-t="T_DeleteFile" />
|
||||
<input type="button" id="btnSelectFile" value="Select" title="Select highlighted file" onclick="setFile()" data-lang-v="SelectFile" data-lang-t="T_SelectFile" />
|
||||
<br>
|
||||
<span data-lang="OrderBy">Order by</span>:
|
||||
<select id="ddlOrder" onchange="sortFiles()">
|
||||
<option value="name" data-lang="Name_asc">↑ Name</option>
|
||||
<option value="size" data-lang="Size_asc">↑ Size</option>
|
||||
<option value="time" data-lang="Date_asc">↑ Date</option>
|
||||
<option value="name_desc" data-lang="Name_desc">↓ Name</option>
|
||||
<option value="size_desc" data-lang="Size_desc">↓ Size</option>
|
||||
<option value="time_desc" data-lang="Date_desc">↓ Date</option>
|
||||
</select>
|
||||
<input type="button" id="btnListView" class="btnView" value=" " title="List view" onclick="switchView('list')" data-lang-t="T_ListView" />
|
||||
<input type="button" id="btnThumbView" class="btnView" value=" " title="Thumbnails view" onclick="switchView('thumb')" data-lang-t="T_ThumbsView" />
|
||||
<input type="text" id="txtSearch" onkeyup="filterFiles()" onchange="filterFiles()" />
|
||||
</div>
|
||||
<div class="pnlFiles">
|
||||
<div class="scrollPane">
|
||||
<div id="pnlLoading">
|
||||
<span data-lang="LoadingFiles">Loading files...</span><br>
|
||||
<img src="images/loading.gif" title="Loading files, please wait...">
|
||||
</div>
|
||||
<div id="pnlEmptyDir" data-lang="DirIsEmpty">
|
||||
This folder is empty
|
||||
</div>
|
||||
<div id="pnlSearchNoFiles" data-lang="NoFilesFound">
|
||||
No files found
|
||||
</div>
|
||||
<ul id="pnlFileList"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bottomLine"> CROSSMAP.CO.KR
|
||||
</td>
|
||||
<td class="bottomLine">
|
||||
<div id="pnlStatus">Status bar</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Forms and other components -->
|
||||
<iframe name="frmUploadFile" width="0" height="0" style="display:none;border:0;"></iframe>
|
||||
<div id="dlgAddFile">
|
||||
<form name="addfile" id="frmUpload" method="post" target="frmUploadFile" enctype="multipart/form-data">
|
||||
<input type="hidden" name="d" id="hdDir" />
|
||||
<div class="form"><br />
|
||||
<input type="file" name="files[]" id="fileUploads" onchange="listUploadFiles(this.files)" multiple="multiple" />
|
||||
<div id="uploadResult"></div>
|
||||
<div class="uploadFilesList">
|
||||
<div id="uploadFilesList"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="menuFile" class="contextMenu">
|
||||
<a href="#" onclick="setFile()" data-lang="SelectFile" id="mnuSelectFile">Select</a><hr>
|
||||
<a href="#" onclick="previewFile()" data-lang="Preview" id="mnuPreview">Preview</a><hr>
|
||||
<a href="#" onclick="downloadFile()" data-lang="DownloadFile" id="mnuDownload">Download</a><hr>
|
||||
<a href="#" onclick="return pasteToFiles(event, this)" data-lang="Paste" class="paste pale" id="mnuFilePaste">Paste</a><hr>
|
||||
<a href="#" onclick="cutFile()" data-lang="Cut" id="mnuFileCut">Cut</a><hr>
|
||||
<a href="#" onclick="copyFile()" data-lang="Copy" id="mnuFileCopy">Copy</a><hr>
|
||||
<a href="#" onclick="renameFile()" data-lang="RenameFile" id="mnuRenameFile">Rename</a><hr>
|
||||
<a href="#" onclick="deleteFile()" data-lang="DeleteFile" id="mnuDeleteFile">Delete</a><!-- hr>
|
||||
<a href="#" onclick="fileProperties()" id="mnuProp">Properties</a -->
|
||||
</div>
|
||||
<div id="menuDir" class="contextMenu">
|
||||
<a href="#" onclick="downloadDir()" data-lang="Download" id="mnuDownloadDir">Download</a><hr>
|
||||
<a href="#" onclick="addDir()" data-lang="T_CreateDir" id="mnuCreateDir">Create new</a><hr>
|
||||
<a href="#" onclick="return pasteToDirs(event, this)" data-lang="Paste" class="paste pale" id="mnuDirPaste">Paste</a><hr>
|
||||
<a href="#" onclick="cutDir()" data-lang="Cut" id="mnuDirCut">Cut</a><hr>
|
||||
<a href="#" onclick="copyDir()" data-lang="Copy" id="mnuDirCopy">Copy</a><hr>
|
||||
<a href="#" onclick="renameDir()" data-lang="RenameDir" id="mnuRenameDir">Rename</a><hr>
|
||||
<a href="#" onclick="deleteDir()" data-lang="DeleteDir" id="mnuDeleteDir">Delete</a>
|
||||
</div>
|
||||
<div id="pnlRenameFile" class="dialog">
|
||||
<span class="name"></span><br>
|
||||
<input type="text" id="txtFileName">
|
||||
</div>
|
||||
<div id="pnlDirName" class="dialog">
|
||||
<span class="name"></span><br>
|
||||
<input type="text" id="txtDirName">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
37
application/views/adm/layout/footer.php
Executable file
37
application/views/adm/layout/footer.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<footer class="footer">
|
||||
© 2020 <a>crossmap.co.kr</a>
|
||||
<span class="btn_top"><a href="#">Top <i class="fa fa-arrow-circle-o-up fa-lg"></i></a></span>
|
||||
</footer>
|
||||
<form class="cm-hidden-form" method="post" action="/admin/life/life_list/5" target="_blank" style="display:none">
|
||||
<input type="hidden" name="idx">
|
||||
<input type="hidden" name="mode">
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
$('#fsearch').validate({
|
||||
rules: {
|
||||
skeyword: {
|
||||
required: true,
|
||||
minlength: 2
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.cm-title-link').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var link = $(this);
|
||||
var idx = link.parent().parent().find('td:first').text();
|
||||
var frm = $('.cm-hidden-form').get(0)
|
||||
frm.action = '/adm/content/write/' + idx;
|
||||
frm.submit();
|
||||
})
|
||||
|
||||
$('.cm-main-img').on('change', function() {
|
||||
$(this).next().attr('src', URL.createObjectURL(this.files[0])).show();
|
||||
})
|
||||
changemenu('<?php echo $this->uri->segment(2) ? $this->uri->segment(2) : 'content'?>');
|
||||
$('select').select2();
|
||||
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
26
application/views/adm/layout/head.php
Executable file
26
application/views/adm/layout/head.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Crossmap Admin</title>
|
||||
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/assets/adm/css/admin.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/assets/adm/css/nadm.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/earlyaccess/nanumgothic.css" />
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/adm/js/jquery.validate.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/adm/js/jquery.validate.extension.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"
|
||||
integrity="sha256-4iQZ6BVL4qNKlQ27TExEhBN1HFPvAvAMbFavKKosSWQ=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/adm/js/common.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
|
||||
22
application/views/adm/layout/header.php
Executable file
22
application/views/adm/layout/header.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<div class="row header">
|
||||
<div class="navbar-minimalize"><a href="#" class="btn btn-primary btn-mini"><i class="fa fa-bars"></i></a></div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).on('click', '.navbar-minimalize>a', function() {
|
||||
if ($('.nav-default').is(':visible') === true) {
|
||||
$('.nav-default').hide();
|
||||
$('.content_wrapper').css('margin-left', '0px');
|
||||
} else {
|
||||
$('.nav-default').show();
|
||||
$('.content_wrapper').css('margin-left', '220px');
|
||||
}
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
<ul class="nav-top">
|
||||
<li>
|
||||
<a href="/" target="_blank">홈페이지로 이동</a>
|
||||
</li>
|
||||
<li><a href="/admin/login/logout_proc"><i class="fa fa-sign-out"></i> Log out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
103
application/views/adm/layout/nav.php
Executable file
103
application/views/adm/layout/nav.php
Executable file
@@ -0,0 +1,103 @@
|
||||
<nav class="nav-default">
|
||||
<h1 class="nav-header"><a href="/adm"><img src="/assets/adm/images/logo.svg" height="25"></a></h1>
|
||||
<ul class="nav">
|
||||
<li class="nav-first-level nav_menuname_content ">
|
||||
<a data-toggle="menu_collapse" href="#collapsecontent" aria-expanded="false" aria-controls="menu_collapsecontent" onClick="changemenu('content');" class="collapsed">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<span class="nav-label">기본관리</span>
|
||||
<i class="fa fa-angle-left menu-arrow-icon content"></i>
|
||||
</a>
|
||||
<ul class="nav nav-second-level menu_collapse collapse " id="menu_collapsecontent">
|
||||
<li><a href="/adm/content">컨텐츠관리</a></li>
|
||||
<li><a href="/adm/content/category">카테고리관리</a></li>
|
||||
<li><a href="/adm/content/write">컨텐츠등록</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-first-level nav_menuname_news ">
|
||||
<a data-toggle="menu_collapse" href="#collapsenews" aria-expanded="false" aria-controls="menu_collapsenews" onClick="changemenu('news');" class="collapsed">
|
||||
<i class="fa fa-copy"></i>
|
||||
<span class="nav-label">뉴스관리</span>
|
||||
<i class="fa fa-angle-left menu-arrow-icon news"></i>
|
||||
</a>
|
||||
<ul class="nav nav-second-level menu_collapse collapse " id="menu_collapsenews">
|
||||
<li><a href="/adm/news">기사관리</a></li>
|
||||
<li><a href="/adm/news/category">카테고리관리</a></li>
|
||||
<li><a href="/adm/news/company">제휴관리</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-first-level nav_menuname_pageset ">
|
||||
<a data-toggle="menu_collapse" href="#collapsepageset" aria-expanded="false" aria-controls="menu_collapsepageset" onClick="changemenu('pageset');" class="collapsed">
|
||||
<i class="fa fa-laptop"></i>
|
||||
<span class="nav-label">페이지설정</span>
|
||||
<i class="fa fa-angle-left menu-arrow-icon pageset"></i>
|
||||
</a>
|
||||
<ul class="nav nav-second-level menu_collapse collapse " id="menu_collapsepageset" style="height:0;">
|
||||
<li>
|
||||
<a class="collapsed">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
<span class="nav-label">메인</span>
|
||||
</a>
|
||||
<ul class="nav nav-third-level collapse in" aria-expanded="true">
|
||||
<li><a href="/adm/setmain/homenews">상단뉴스</a></li>
|
||||
<li><a href="/adm/setmain/dailyqt">데일리큐티</a></li>
|
||||
<li><a href="/adm/setmain/todayword">오늘의말씀</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="collapsed">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
<span class="nav-label">은혜충전</span>
|
||||
</a>
|
||||
<ul class="nav nav-third-level collapse in" aria-expanded="true">
|
||||
<li><a href="/adm/setgrace/hometop">홈 - 상단</a></li>
|
||||
<!-- <li><a href="/adm/setgrace/homekeyword">홈 - 크맵키워드</a></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a class="collapsed">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
<span class="nav-label">크맵TV</span>
|
||||
</a>
|
||||
<ul class="nav nav-third-level collapse in" aria-expanded="true">
|
||||
<li><a href="/adm/setcmtv/homehot">홈 - 최신HOT영상</a></li>
|
||||
<li><a href="/adm/setcmtv/categorylatest">카테고리 - 최신영상</a></li>
|
||||
<li><a href="/adm/setcmtv/channellatest">채널홈 - 상단영상</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-first-level nav_menuname_member ">
|
||||
<a data-toggle="menu_collapse" href="#collapsemember" aria-expanded="false" aria-controls="menu_collapsemember" onClick="changemenu('member');" class="collapsed">
|
||||
<i class="fa fa-users"></i>
|
||||
<span class="nav-label">회원관리</span>
|
||||
<i class="fa fa-angle-left menu-arrow-icon member"></i>
|
||||
</a>
|
||||
<ul class="nav nav-second-level menu_collapse collapse " id="menu_collapsemember" style="height:0;">
|
||||
<li><a href="/adm/member">사용자관리</a></li>
|
||||
<li><a href="/adm/member/editor">에디터관리</a></li>
|
||||
<li><a href="/adm/member/comment">코멘트관리</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-first-level nav_menuname_dataman ">
|
||||
<a data-toggle="menu_collapse" href="#collapsedataman" aria-expanded="false" aria-controls="menu_collapsedataman" onClick="changemenu('dataman');" class="collapsed">
|
||||
<i class="fa fa-database"></i>
|
||||
<span class="nav-label">데이터관리</span>
|
||||
<i class="fa fa-angle-left menu-arrow-icon dataman"></i>
|
||||
</a>
|
||||
<ul class="nav nav-second-level menu_collapse collapse " id="menu_collapsedataman" style="height:0;">
|
||||
<li><a href="/adm/dataman/church">교회정보관리</a></li>
|
||||
<li><a href="/adm/dataman/ytchannel">YT채널관리</a></li>
|
||||
<li><a href="/adm/dataman/podbbang">팟빵관리</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-first-level nav_menuname_dataman ">
|
||||
<a href="/admin/life/life_list/5" aria-expanded="false" class="collapsed">
|
||||
<i class="fa fa-gears"></i>
|
||||
<span class="nav-label">기존 관리자</span>
|
||||
<i class="fa fa-angle-left menu-arrow-icon dataman"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
123
application/views/adm/member.php
Executable file
123
application/views/adm/member.php
Executable file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">회원관리 > 사용자관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group" style="display:inline-block;width:350px;vertical-align: middle;">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" style="display:inline-block;width:300px;"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/member/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>아이디</th>
|
||||
<th>이름</th>
|
||||
<th>이메일</th>
|
||||
<th>닉네임</th>
|
||||
<th>생일</th>
|
||||
<th>전화</th>
|
||||
<th>상태</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
<td><img src="<?php echo imgSrc($r->member_img)?>" height="15" style="float:left;margin:5px"><?php echo $r->member_id?></td>
|
||||
<td><?php echo $r->member_name?></td>
|
||||
<td><?php echo $r->member_email?></td>
|
||||
<td><?php echo $r->member_nickname?></td>
|
||||
<td><?php echo $r->member_birth?></td>
|
||||
<td><?php echo $r->member_mobile?></td>
|
||||
<td>
|
||||
<select class="cm-display-select" data-width="70">
|
||||
<option value="1" <?php if($r->member_status == 1) echo ' selected';?>>사용</option>
|
||||
<option value="2" <?php if($r->member_status == 2) echo ' selected';?>>탈퇴</option>
|
||||
</select>
|
||||
|
||||
</td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/member/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-display-select').on('change', function() {
|
||||
if (confirm('회원 상태를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N' : selectVal;
|
||||
$.post('/adm/member/active', {
|
||||
'is_display': is_display,
|
||||
'postid': postid
|
||||
}, function(res) {
|
||||
selectVal == 'R' ? location.href = '/adm/content/reserve?list=' + postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
120
application/views/adm/membereditoredit.php
Executable file
120
application/views/adm/membereditoredit.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">회원관리 > 에디터관리 > 등록</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table" style="overflow:visible">
|
||||
<form method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="contentId" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="partner_id" class="form-control" value="<?php if(isset($post)) echo $post->partner_id?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td>
|
||||
<input type="text" name="partner_real_name" class="form-control" value="<?php if(isset($post)) echo convertEmoji($post->partner_real_name)?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>채널명</th>
|
||||
<td>
|
||||
<input type="text" name="partner_name" class="form-control" value="<?php if(isset($post)) echo convertEmoji($post->partner_name)?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>설명</th>
|
||||
<td>
|
||||
<input type="text" name="partner_intro" class="form-control" value="<?php if(isset($post)) echo convertEmoji($post->partner_intro)?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>홈페이지</th>
|
||||
<td>
|
||||
<input type="text" name="partner_homepage" class="form-control" value="<?php if(isset($post)) echo $post->partner_homepage?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>아이콘</th>
|
||||
<td>
|
||||
<input type="hidden" name="partner_img" value="<?php if(isset($post)) echo $post->partner_img?>">
|
||||
<input type="file" class="cm-main-img" name="uploadfile">
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->partner_img)?>" width="200"
|
||||
style="margin-top:5px;<?php if(isset($post)) echo $post ? '':'display:none;'?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<input type="hidden" name="main_img" value="<?php if(isset($post)) echo $post->main_img?>">
|
||||
<input type="file" class="cm-main-img" name="uploadfile2">
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->main_img)?>"
|
||||
style="max-width:800px;margin-top:5px;<?php if(isset($post)) echo $post ? '':'display:none;'?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>활성/비활성</th>
|
||||
<td>
|
||||
<select name="is_del" data-width="80">
|
||||
<option value="N" <?php if(isset($post) && $post->is_del == 'N') echo ' selected';?>>활성</option>
|
||||
<option value="Y" <?php if(isset($post) && $post->is_del == 'Y') echo ' selected';?>>비활성</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger cm-contentedit-cancel">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
var contentEdited = false;
|
||||
$(function() {
|
||||
$('input,select').on('change', function() {
|
||||
contentEdited = true;
|
||||
})
|
||||
|
||||
$('.cm-contentedit-cancel').on('click', function() {
|
||||
if (contentEdited) {
|
||||
if (confirm('정말로 취소하시겠습니까?')) {
|
||||
location.href = '/adm/member/editor'
|
||||
}
|
||||
} else location.href = '/adm/member/editor';
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
258
application/views/adm/modal/cmtv.php
Executable file
258
application/views/adm/modal/cmtv.php
Executable file
@@ -0,0 +1,258 @@
|
||||
<!-- common -->
|
||||
<div id="loginModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Sign In</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
<p>Your session has expired, please use the form below to sign back in!</p>
|
||||
</div>
|
||||
<div id="loginError" class='alert alert-danger'>The Username of Password entered is incorrect.
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" value="" id="username" class="form-control"
|
||||
placeholder="Username" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" name="password" value="" id="password" class="form-control"
|
||||
placeholder="Password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="ajaxLoginbtn" class="btn btn-primary">Sign In</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- grace content list -->
|
||||
<div class="modal fade cm-submenuchange-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenuchange-modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content modal-lg">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">컨텐츠 서브메뉴 변경</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="row">
|
||||
<div class="form-group col-md-10">
|
||||
<label class="col-form-label col-md-2">서브메뉴:</label>
|
||||
<select class="btn btn-default col-md-4 cm-subchg-category-select">
|
||||
<option value="">서브메뉴</option>
|
||||
<?php foreach ($cmtvCategories as $category) {echo '<option value="' . $category->idx . '">' . $category->category_name . '</option>';}?>
|
||||
</select>
|
||||
<label class="col-form-label col-md-2">에디터:</label>
|
||||
<select class="btn btn-default col-md-4 cm-subchg-editor-select">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach ($cmtvEditors as $editor) {echo '<option value="' . $editor->editorId . '">' . $editor->editorName . '</option>';}?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary cm-submenuchange-save">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- grace category -->
|
||||
<div class="modal fade cm-submenu-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenu-modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">서브메뉴 추가</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<input type="hidden" name="id" class="cm-submenu-cateogryid">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">카테고리명:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">출력순서:</label>
|
||||
<input type="number" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary cm-submenu-save">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-editdp-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href=".cm-set-content-dptime" aria-controls="home"
|
||||
role="tab" data-toggle="tab">예약관리</a></li>
|
||||
<li role="presentation"><a href=".cm-set-content-display" aria-controls="profile" role="tab"
|
||||
data-toggle="tab" data-name="cmtv">송출관리</a></li>
|
||||
<li role="presentation"><a href=".cm-reg-content-cmtv" aria-controls="profile" role="tab"
|
||||
data-toggle="tab">크맵TV 등록</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content cm-tab-content">
|
||||
<div role="tabpanel" class="tab-pane active cm-set-content-dptime">
|
||||
<form action="/adm/support/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠:</label>
|
||||
<input type="text" class="form-control cm-set-dptime-content-title" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">예약시간:</label>
|
||||
<input type="text" class="form-control cm-set-dptime">
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane cm-set-content-display">
|
||||
<form action="/adm/content/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group row">
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="home" class="cm-set-content-dp-part"
|
||||
name="dp_part" checked> 홈
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="submenu-top" class="cm-set-content-dp-part"
|
||||
name="dp_part" checked> 서브메뉴 상단
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="editor-home-top" class="cm-set-content-dp-part"
|
||||
name="dp_part"> 에디터 홈상단
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group row cm-config-display cm-config-add">
|
||||
<div style="margin-left:15px">
|
||||
<i class="glyphicon glyphicon-edit cm-saved-config-dp-edit-icon"></i>
|
||||
<select class="btn btn-default cm-saved-config-dp-edit-btn">
|
||||
<option value="">선택</option>
|
||||
<option value="edit">수정</option>
|
||||
<option value="delete">삭제</option>
|
||||
</select>
|
||||
<input type="number" class="form-control cm-set-content-order">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" class="form-control cm-set-content-title-head" placeholder="말머리">
|
||||
</div>
|
||||
<div class="col-md-6" style="padding:0">
|
||||
<input type="text" class="form-control cm-set-content-title" placeholder="제목">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div><img src="" class="cm-uploaded-img"></div>
|
||||
<input type="file" name="userfile" class="cm-upload-file">
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane cm-reg-content-cmtv">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-displayhome-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">표시 제목:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">이미지:</label>
|
||||
<input type="text" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠 검색:</label>
|
||||
<input type="button" class="btn btn-info">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-displaysection-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">표시 제목:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">이미지:</label>
|
||||
<input type="text" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠 검색:</label>
|
||||
<input type="button" class="btn btn-info">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
258
application/views/adm/modal/grace.php
Executable file
258
application/views/adm/modal/grace.php
Executable file
@@ -0,0 +1,258 @@
|
||||
<!-- common -->
|
||||
<div id="loginModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Sign In</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
<p>Your session has expired, please use the form below to sign back in!</p>
|
||||
</div>
|
||||
<div id="loginError" class='alert alert-danger'>The Username of Password entered is incorrect.
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" value="" id="username" class="form-control"
|
||||
placeholder="Username" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" name="password" value="" id="password" class="form-control"
|
||||
placeholder="Password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="ajaxLoginbtn" class="btn btn-primary">Sign In</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- grace content list -->
|
||||
<div class="modal fade cm-submenuchange-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenuchange-modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content modal-lg">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">컨텐츠 서브메뉴 변경</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="row">
|
||||
<div class="form-group col-md-10">
|
||||
<label class="col-form-label col-md-2">서브메뉴:</label>
|
||||
<select class="btn btn-default col-md-4 cm-subchg-category-select">
|
||||
<option value="">서브메뉴</option>
|
||||
<?php foreach ($graceCategories as $category) {echo '<option value="' . $category->idx . '">' . $category->category_name . '</option>';}?>
|
||||
</select>
|
||||
<label class="col-form-label col-md-2">에디터:</label>
|
||||
<select class="btn btn-default col-md-4 cm-subchg-editor-select">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach ($graceEditors as $editor) {echo '<option value="' . $editor->editorId . '">' . $editor->editorName . '</option>';}?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary cm-submenuchange-save">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- grace category -->
|
||||
<div class="modal fade cm-submenu-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenu-modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">서브메뉴 추가</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<input type="hidden" name="id" class="cm-submenu-cateogryid">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">카테고리명:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">출력순서:</label>
|
||||
<input type="number" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary cm-submenu-save">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-editdp-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href=".cm-set-content-dptime" aria-controls="home"
|
||||
role="tab" data-toggle="tab">예약관리</a></li>
|
||||
<li role="presentation"><a href=".cm-set-content-display" aria-controls="profile" role="tab"
|
||||
data-toggle="tab" data-name="grace">송출관리</a></li>
|
||||
<li role="presentation"><a href=".cm-reg-content-grace" aria-controls="profile" role="tab"
|
||||
data-toggle="tab">은혜충전 등록</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content cm-tab-content">
|
||||
<div role="tabpanel" class="tab-pane active cm-set-content-dptime">
|
||||
<form action="/adm/support/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠:</label>
|
||||
<input type="text" class="form-control cm-set-dptime-content-title" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">예약시간:</label>
|
||||
<input type="text" class="form-control cm-set-dptime">
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane cm-set-content-display">
|
||||
<form action="/adm/content/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group row">
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="home" class="cm-set-content-dp-part"
|
||||
name="dp_part" checked> 홈
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="submenu-top" class="cm-set-content-dp-part"
|
||||
name="dp_part" checked> 서브메뉴 상단
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="home-dailyqt" class="cm-set-content-dp-part"
|
||||
name="dp_part"> 데일리QT
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group row cm-config-display cm-config-add">
|
||||
<div style="margin-left:15px">
|
||||
<i class="glyphicon glyphicon-edit cm-saved-config-dp-edit-icon"></i>
|
||||
<select class="btn btn-default cm-saved-config-dp-edit-btn">
|
||||
<option value="">선택</option>
|
||||
<option value="edit">수정</option>
|
||||
<option value="delete">삭제</option>
|
||||
</select>
|
||||
<input type="number" class="form-control cm-set-content-order">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" class="form-control cm-set-content-title-head" placeholder="말머리">
|
||||
</div>
|
||||
<div class="col-md-6" style="padding:0">
|
||||
<input type="text" class="form-control cm-set-content-title" placeholder="제목">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div><img src="" class="cm-uploaded-img"></div>
|
||||
<input type="file" name="userfile" class="cm-upload-file">
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane cm-reg-content-grace">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-displayhome-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">표시 제목:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">이미지:</label>
|
||||
<input type="text" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠 검색:</label>
|
||||
<input type="button" class="btn btn-info">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-displaysection-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">표시 제목:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">이미지:</label>
|
||||
<input type="text" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠 검색:</label>
|
||||
<input type="button" class="btn btn-info">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
497
application/views/adm/modal/life.php
Executable file
497
application/views/adm/modal/life.php
Executable file
@@ -0,0 +1,497 @@
|
||||
<!-- common -->
|
||||
<div id="loginModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Sign In</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
<p>Your session has expired, please use the form below to sign back in!</p>
|
||||
</div>
|
||||
<div id="loginError" class='alert alert-danger'>The Username of Password entered is incorrect.
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" value="" id="username" class="form-control"
|
||||
placeholder="Username" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" name="password" value="" id="password" class="form-control"
|
||||
placeholder="Password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="ajaxLoginbtn" class="btn btn-primary">Sign In</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- grace content list -->
|
||||
<div class="modal fade cm-submenuchange-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenuchange-modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content modal-lg">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">컨텐츠 서브메뉴 변경</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="row">
|
||||
<div class="form-group col-md-10">
|
||||
<label class="col-form-label col-md-2">서브메뉴:</label>
|
||||
<select class="btn btn-default col-md-4 cm-subchg-category-select">
|
||||
<option value="">서브메뉴</option>
|
||||
<?php foreach ($lifeCategories as $category) {echo '<option value="' . $category->idx . '">' . $category->category_name . '</option>';}?>
|
||||
</select>
|
||||
<label class="col-form-label col-md-2">에디터:</label>
|
||||
<select class="btn btn-default col-md-4 cm-subchg-editor-select">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach ($graceEditors as $editor) {echo '<option value="' . $editor->editorId . '">' . $editor->editorName . '</option>';}?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary cm-submenuchange-save">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- grace category -->
|
||||
<div class="modal fade cm-submenu-modal" tabindex="-1" role="dialog" aria-labelledby="cm-submenu-modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">서브메뉴 추가</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<input type="hidden" name="id" class="cm-submenu-cateogryid">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">카테고리명:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">출력순서:</label>
|
||||
<input type="number" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary cm-submenu-save">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-editdp-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href=".cm-set-content-dptime" aria-controls="home"
|
||||
role="tab" data-toggle="tab">예약관리</a></li>
|
||||
<li role="presentation"><a href=".cm-set-content-display" aria-controls="profile" role="tab"
|
||||
data-toggle="tab" data-name="grace">송출관리</a></li>
|
||||
<li role="presentation"><a href=".cm-reg-content-grace" aria-controls="profile" role="tab"
|
||||
data-toggle="tab">은혜충전 등록</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content cm-tab-content">
|
||||
<div role="tabpanel" class="tab-pane active cm-set-content-dptime">
|
||||
<form action="/adm/support/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠:</label>
|
||||
<input type="text" class="form-control cm-set-dptime-content-title" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">예약시간:</label>
|
||||
<input type="text" class="form-control cm-set-dptime">
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane cm-set-content-display">
|
||||
<form action="/adm/content/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group row">
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="home" class="cm-set-content-dp-part"
|
||||
name="dp_part" checked> 홈
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="submenu-top" class="cm-set-content-dp-part"
|
||||
name="dp_part" checked> 서브메뉴 상단
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="radio" value="editor-home-top" class="cm-set-content-dp-part"
|
||||
name="dp_part"> 에디터 홈상단
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group row cm-config-display cm-config-add">
|
||||
<div style="margin-left:15px">
|
||||
<i class="glyphicon glyphicon-edit cm-saved-config-dp-edit-icon"></i>
|
||||
<select class="btn btn-default cm-saved-config-dp-edit-btn">
|
||||
<option value="">선택</option>
|
||||
<option value="edit">수정</option>
|
||||
<option value="delete">삭제</option>
|
||||
</select>
|
||||
<input type="number" class="form-control cm-set-content-order">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" class="form-control cm-set-content-title-head" placeholder="말머리">
|
||||
</div>
|
||||
<div class="col-md-6" style="padding:0">
|
||||
<input type="text" class="form-control cm-set-content-title" placeholder="제목">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div><img src="" class="cm-uploaded-img"></div>
|
||||
<input type="file" name="userfile" class="cm-upload-file">
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane cm-reg-content-grace">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-displayhome-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">표시 제목:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">이미지:</label>
|
||||
<input type="text" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠 검색:</label>
|
||||
<input type="button" class="btn btn-info">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade cm-displaysection-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">표시 제목:</label>
|
||||
<input type="text" class="form-control cm-submenu-categoryname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">이미지:</label>
|
||||
<input type="text" class="form-control cm-submenu-dporder">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">컨텐츠 검색:</label>
|
||||
<input type="button" class="btn btn-info">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal fade cm-register-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">홈페이지 구성요소 관리</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="fw500">기능</th>
|
||||
<td class="tl">
|
||||
<input type="radio" name="life_type" value="1" checked=""> 일반라이프
|
||||
<input type="radio" name="life_type" value="2"> 포토라이프
|
||||
<input type="radio" name="life_type" value="3"> 동영상라이프
|
||||
<input type="radio" name="life_type" value="4"> 영상링크라이프
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">카테고리</th>
|
||||
<td class="tl">
|
||||
<select name="category1" id="category1" onchange="change_category(1, this.value)"
|
||||
class="type01">
|
||||
<option value="">선택</option>
|
||||
<option value="5">말씀과 묵상</option>
|
||||
<option value="8">감동</option>
|
||||
<option value="10">지식</option>
|
||||
<option value="11">오피니언</option>
|
||||
<option value="17">책</option>
|
||||
<option value="22">크맵TV</option>
|
||||
<option value="24">자료실</option>
|
||||
<option value="26">기도공감</option>
|
||||
<option value="28">은혜충전</option>
|
||||
<option value="29">라이프</option>
|
||||
<option value="30">말씀엽서</option>
|
||||
<option value="31">크맵북스</option>
|
||||
<option value="32">데일리QT</option>
|
||||
<option value="33">영어묵상</option>
|
||||
<option value="34">지식충전</option>
|
||||
<option value="35">grace-category</option>
|
||||
<option value="36">crossmaptv-category</option>
|
||||
<option value="37">알쓸신학</option>
|
||||
<option value="38">찬양</option>
|
||||
<option value="39">소셜</option>
|
||||
<option value="40">말씀/QT</option>
|
||||
<option value="41">TV방송</option>
|
||||
<option value="46">grace</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">채널</th>
|
||||
<td class="tl">
|
||||
<select name="category2" id="category2" onchange="change_category(2, this.value)"
|
||||
class="type01">
|
||||
<option value="">선택</option>
|
||||
<option value="3">말씀엽서</option>
|
||||
<option value="4">찬양콘티나눔</option>
|
||||
<option value="5">맘 울리는 이야기</option>
|
||||
<option value="6">운율이 있는 묵상</option>
|
||||
<option value="7">영어 한 컷</option>
|
||||
<option value="8">성경지식인</option>
|
||||
<option value="9">열방을 위한 기도</option>
|
||||
<option value="18">기도&STORY</option>
|
||||
<option value="21">해외통신</option>
|
||||
<option value="25">그림 묵상</option>
|
||||
<option value="26">책 읽는 크리스천</option>
|
||||
<option value="27">묵상의 바다</option>
|
||||
<option value="42">말씀영상</option>
|
||||
<option value="43">찬양영상</option>
|
||||
<option value="44">간증</option>
|
||||
<option value="45">토크쇼</option>
|
||||
<option value="46">순교자의 소리</option>
|
||||
<option value="47">Open door</option>
|
||||
<option value="48">데일리 QT</option>
|
||||
<option value="49">기도24365</option>
|
||||
<option value="50">모퉁이돌 선교회</option>
|
||||
<option value="52">C포스트</option>
|
||||
<option value="51">자료실</option>
|
||||
<option value="53">신앙과 아이</option>
|
||||
<option value="54">말씀엽서채널</option>
|
||||
<option value="55">도서채널</option>
|
||||
<option value="56">데일리QT채널</option>
|
||||
<option value="57">영어묵상채널</option>
|
||||
<option value="58">Q&A채널</option>
|
||||
<option value="59">찬양채널</option>
|
||||
<option value="60">소셜채널</option>
|
||||
<option value="61">말씀QT채널</option>
|
||||
<option value="62">TV방송채널</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">에디터</th>
|
||||
<td class="tl">
|
||||
<select name="category3" id="category3" class="type01">
|
||||
<option value="">선택</option>
|
||||
<option value="1">오여정</option>
|
||||
<option value="2">숨은진주</option>
|
||||
<option value="3">하늘소</option>
|
||||
<option value="5">주님찬양해</option>
|
||||
<option value="6">하늘시인</option>
|
||||
<option value="7">노네임드</option>
|
||||
<option value="8">Lizzy</option>
|
||||
<option value="9">최성윤</option>
|
||||
<option value="10">바울과야고보</option>
|
||||
<option value="21">아침을 여는 기도</option>
|
||||
<option value="24">해외통신</option>
|
||||
<option value="43">하니</option>
|
||||
<option value="44">책벌레</option>
|
||||
<option value="46">은혜</option>
|
||||
<option value="49">하늘바보</option>
|
||||
<option value="50">탕자 아버지</option>
|
||||
<option value="60">말씀영상</option>
|
||||
<option value="61">찬양영상</option>
|
||||
<option value="62">간증</option>
|
||||
<option value="63">토크쇼</option>
|
||||
<option value="64">사랑이</option>
|
||||
<option value="65">은혜의 한줄</option>
|
||||
<option value="66">겨울</option>
|
||||
<option value="67">은혜의 감동</option>
|
||||
<option value="68">좋은 하루</option>
|
||||
<option value="69">주님 사랑</option>
|
||||
<option value="70">순교자의 소리</option>
|
||||
<option value="71">오픈도어선교회</option>
|
||||
<option value="72">콰이엇타임</option>
|
||||
<option value="73">기도24365</option>
|
||||
<option value="74">모퉁이돌</option>
|
||||
<option value="76">자료실지기</option>
|
||||
<option value="77">오피니언</option>
|
||||
<option value="79">알쓸신학</option>
|
||||
<option value="80">제이어스</option>
|
||||
<option value="81">MARKERS WORSHIP</option>
|
||||
<option value="82">CCM Factory 찬양공방</option>
|
||||
<option value="83">양치기 소년</option>
|
||||
<option value="84">worthking</option>
|
||||
<option value="85">말씀의검</option>
|
||||
<option value="86">C채널설교</option>
|
||||
<option value="87">말씀노트</option>
|
||||
<option value="88">말씀충전</option>
|
||||
<option value="89">크리스천투데이</option>
|
||||
<option value="90">CTS기독교TV</option>
|
||||
<option value="91">극동방송</option>
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">말머리</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="head_title" id="head_title" class="type02" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="title" id="title" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">부제목</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="sub_title" id="sub_title" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">메인이미지</th>
|
||||
<td class="tl">
|
||||
|
||||
<input type="file" name="main_img" id="main_img" class="input00" size="100">
|
||||
|
||||
<input type="hidden" name="org_main_img" id="org_main_img" value="">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">태그</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="tag" id="tag" class="type01" value=""> 최대 5개까지 입력 가능(,로
|
||||
구분해주세요.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">원본주소</th>
|
||||
<td class="tl">
|
||||
기사의 원본 주소를 입력하면 기사 클릭시 기사원본의 주소로 이동합니다.<br>
|
||||
<input type="text" name="org_url" id="org_url" class="input00" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">youtube 주소</th>
|
||||
<td class="tl">
|
||||
https://youtu.be/<input type="text" name="video_url" id="video_url" class="input00"
|
||||
value="" style="width:200px"> (키만 넣어주세요.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">본문</th>
|
||||
<td>
|
||||
<!-- <textarea id="content" name="content"></textarea> -->
|
||||
<textarea name="content" id="ir1" style="width:100%; height:500px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">조회수</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="hit_count" id="hit_count" class="type03" value="0"> (관리자가 임의적으로
|
||||
조회수를 설정할 수 있습니다.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="fw500">좋아요수</th>
|
||||
<td class="tl">
|
||||
<input type="text" name="like_count" id="like_count" class="type03" value="0"> (관리자가
|
||||
임의적으로 좋아요수를 설정할 수 있으나 조회수 이상이 될 수는 없습니다)
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
156
application/views/adm/news.php
Executable file
156
application/views/adm/news.php
Executable file
@@ -0,0 +1,156 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">뉴스관리 > 기사관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<div class="col-md-12" style="margin-bottom:10px;">
|
||||
<select name="category" class="form-control" data-width="200">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" data-width="200">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group" style="display:inline-block;width:350px;vertical-align: middle;">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" style="display:inline-block;width:300px;" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-reserve btn-list-selected disabled"
|
||||
data-list-reserve-url="/adm/content/reserve?">선택예약</button>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/news/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>제목</th>
|
||||
<th>이미지</th>
|
||||
<th>제휴처</th>
|
||||
<th>기자</th>
|
||||
<th>공개여부</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
<td><?php echo $r->category_code?></td>
|
||||
<td><?php echo $r->title. '<br />'. $r->sub_title?></td>
|
||||
<td><?php echo ($r->main_img ? '<img src="'.imgSrc($r->main_img). '" width="90"><br />':''). ($r->video_url ? '<iframe src="'.$r->video_url.'" frameborder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen></iframe>':'')?></td>
|
||||
<td><?php echo $r->press_name?></td>
|
||||
<td><?php echo $r->reporter_name?></td>
|
||||
<td><select <?php if(strtotime($r->display_date) > time()) echo 'disabled';?> class="cm-display-select" data-width="80">
|
||||
<?php if($r->is_del == 'Y') {?>
|
||||
<option value="D" selected>삭제</option>
|
||||
<option value="N">비공개</option>
|
||||
<option value="Y">공개</option>
|
||||
<?php } else {?>
|
||||
<option value="N" <?php if($r->is_display == 'N') echo ' selected';?>>비공개</option>
|
||||
<option value="Y" <?php if($r->is_display == 'Y') echo ' selected';?>>공개</option>
|
||||
<?php }?>
|
||||
</select></td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<form action="" method="get">
|
||||
<select name="category" class="form-control" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:100px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/news/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-display-select').on('change', function() {
|
||||
if (confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N' : selectVal;
|
||||
$.post('/adm/news/display', {
|
||||
'is_display': is_display,
|
||||
'postid': postid
|
||||
}, function(res) {
|
||||
selectVal == 'R' ? location.href = '/adm/content/reserve?list=' + postid : location.reload();
|
||||
})
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
103
application/views/adm/newscategory.php
Executable file
103
application/views/adm/newscategory.php
Executable file
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">뉴스관리 > 카테고리관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<a href="/adm/news/categoryedit" class="btn btn-outline btn-default btn-sm">신규등록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled"
|
||||
data-list-delete-url="/adm/news/categorydelete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>카테고리</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
<td><?php echo $r->category_fullpath?></td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="/adm/news/categoryedit" class="btn btn-outline btn-default btn-sm">신규등록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/news/categorydelete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-display-select').on('change', function() {
|
||||
if (confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N' : selectVal;
|
||||
$.post('/adm/content/display', {
|
||||
'is_display': is_display,
|
||||
'postid': postid
|
||||
}, function(res) {
|
||||
selectVal == 'R' ? location.href = '/adm/content/reserve?list=' + postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
62
application/views/adm/newscategoryedit.php
Executable file
62
application/views/adm/newscategoryedit.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">기본관리 > 카테고리 정보 업데이트</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('HTTP_REFERER')?>">
|
||||
<input type="hidden" name="idx" class="form-control" value="<?php if(isset($category)) echo $category->idx?>">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>상위 카테고리</th>
|
||||
<td>
|
||||
<select name="parent" class="form-control" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($newsCategories as $c) { echo '<option value="'.$c->category_code.'" '.(!empty($category) && $category->p_category_code == $c->category_code && $category->category_code != $c->category_code ? 'selected':'').'>'. $c->category_name. '</option>';}?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>카테고리명</th>
|
||||
<td>
|
||||
<input type="text" name="category_name" class="form-control" value="<?php if(isset($category->category_name)) echo $category->category_name?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
134
application/views/adm/newscompany.php
Executable file
134
application/views/adm/newscompany.php
Executable file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">뉴스관리 > 제휴관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<form action="" method="get" name="flist" id="flist">
|
||||
<input type="hidden" name="list">
|
||||
<input type="hidden" name="acttype">
|
||||
<select name="category" class="form-control" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:100px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-reserve btn-list-selected disabled" data-list-reserve-url="/adm/content/reserve?">선택예약</button>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>제휴처</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
|
||||
<td><?php echo ($r->logo_img ? '<img src="'.imgSrc($r->logo_img). '" style="max-height:90px;max-width:90px;margin-right:10px" align="left">':''). '<a href="'.$r->homepage.'" target="_blank">'. $r->press_name. '</a>'?></td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<form action="" method="get">
|
||||
<select name="category" class="form-control" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:100px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="term" value="<?php echo param('term')?>" placeholder="검색어를 입력하세요" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.cm-display-select').on('change', function() {
|
||||
if (confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N' : selectVal;
|
||||
$.post('/adm/content/display', {
|
||||
'is_display': is_display,
|
||||
'postid': postid
|
||||
}, function(res) {
|
||||
selectVal == 'R' ? location.href = '/adm/content/reserve?list=' + postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
162
application/views/adm/pageset/cmtv/categorylatest.php
Executable file
162
application/views/adm/pageset/cmtv/categorylatest.php
Executable file
@@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 크맵TV 카테고리 최신영상</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('REQUEST_URI') ?>">
|
||||
<?php foreach ($posts as $post) {?>
|
||||
<table class="table table-bordered cm-hometopnews-setbox">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색</th>
|
||||
<td>
|
||||
<select name="category" class="form-control category" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach ($lifeCategories as $category) {echo '<option value="' . $category->idx . '" ' . ($categoryNo == $category->idx ? 'selected' : '') . '>' . $category->category_name . '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control editor" style="width:200px;display:none">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach ($graceEditors as $editor) {echo '<option value="' . $editor->editorId . '" ' . (param('editor') == $editor->editorId ? 'selected' : '') . '>' . $editor->editorName . '</option>';}?>
|
||||
</select>
|
||||
<select name="limit" class="form-control limit" style="width:100px">
|
||||
<option value="">검색결과수</option>
|
||||
<option value="5" selected>5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<input type="text" name="keyword" class="form-control keyword" style="width:200px">
|
||||
<a class="btn btn-info btn-sm cm-pageset-searchbtn">검색</a>
|
||||
<a class="btn btn-warning btn-sm cm-pageset-addsetbox">추가</a>
|
||||
<div class="cm-search-result" style="margin-top:3px">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid[]" class="form-control postid" value="<?php if (isset($post)) {
|
||||
echo $post->idx;
|
||||
}
|
||||
?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title[]" class="form-control title" value="<?php if (isset($post)) {
|
||||
echo convertEmoji($post->title);
|
||||
}
|
||||
?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<img src="<?php if (isset($post)) {
|
||||
echo imgSrc($post->main_img);
|
||||
}
|
||||
?>" width="150" name="main_img[]" class="main_img">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<td>
|
||||
<input type="number" name="display_sort[]" class="form-control display_sort" value="<?php if (isset($post)) {
|
||||
echo $post->display_sort;
|
||||
}
|
||||
?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><?php }?>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER') ?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function() {
|
||||
|
||||
$('.cm-pageset-addsetbox').on('click', function() {
|
||||
var dd = $('.cm-hometopnews-setbox');
|
||||
dd.last().after(dd.eq(0).clone(true));
|
||||
|
||||
})
|
||||
|
||||
$('.cm-pageset-rmsetbox').on('click', function(){
|
||||
$(this).parent().parent().parent().parent().remove();
|
||||
})
|
||||
|
||||
$('.category').change('change', function() {
|
||||
location.href = '/adm/setcmtv/categorylatest/' + this.value;
|
||||
})
|
||||
|
||||
$('.cm-pageset-searchbtn').on('click', function(e) {
|
||||
var searchBtn = $(this);
|
||||
var frm = searchBtn.parent()
|
||||
var params = {
|
||||
category: frm.find('.category').val(),
|
||||
editor: frm.find('.editor').val(),
|
||||
term: frm.find('.keyword').val(),
|
||||
pageset: 1,
|
||||
limit: frm.find('.limit').val()
|
||||
}
|
||||
|
||||
|
||||
$.get('/adm/content', params, function(res) {
|
||||
result = res.data.rows
|
||||
var resultBox = searchBtn.parent().find('.cm-search-result').empty();
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="' + i + '">' + result[i].title + '</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function() {
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = searchBtn.parent().parent().parent().next();
|
||||
console.log(frm)
|
||||
frm.find('.postid').val(item.idx)
|
||||
frm.find('.title').val(item.title)
|
||||
frm.find('.main_img').attr('src', item.mainImg)
|
||||
$('.cm-result-item').remove();
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
162
application/views/adm/pageset/cmtv/channellatest.php
Executable file
162
application/views/adm/pageset/cmtv/channellatest.php
Executable file
@@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 크맵TV 채널홈 상단영상</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('REQUEST_URI') ?>">
|
||||
<?php foreach ($posts as $post) {?>
|
||||
<table class="table table-bordered cm-hometopnews-setbox">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색</th>
|
||||
<td>
|
||||
<select name="category" class="form-control category" style="width:200px;display:none">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach ($lifeCategories as $category) {echo '<option value="' . $category->idx . '" ' . ($categoryNo == $category->idx ? 'selected' : '') . '>' . $category->category_name . '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control editor" style="width:300px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach ($graceEditors as $editor) {echo '<option value="' . $editor->editorId . '" ' . ($categoryNo == $editor->editorId ? 'selected' : '') . '>' . $editor->editorName . '</option>';}?>
|
||||
</select>
|
||||
<select name="limit" class="form-control limit" style="width:100px">
|
||||
<option value="">검색결과수</option>
|
||||
<option value="5" selected>5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<input type="text" name="keyword" class="form-control keyword" style="width:200px">
|
||||
<a class="btn btn-info btn-sm cm-pageset-searchbtn">검색</a>
|
||||
<a class="btn btn-warning btn-sm cm-pageset-addsetbox">추가</a>
|
||||
<div class="cm-search-result" style="margin-top:3px">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid[]" class="form-control postid" value="<?php if (isset($post)) {
|
||||
echo $post->idx;
|
||||
}
|
||||
?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title[]" class="form-control title" value="<?php if (isset($post)) {
|
||||
echo convertEmoji($post->title);
|
||||
}
|
||||
?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<img src="<?php if (isset($post)) {
|
||||
echo imgSrc($post->main_img);
|
||||
}
|
||||
?>" width="150" name="main_img[]" class="main_img">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none">
|
||||
<th>순서</th>
|
||||
<td>
|
||||
<input type="number" name="display_sort[]" class="form-control display_sort" value="<?php if (isset($post)) {
|
||||
echo $post->display_sort;
|
||||
}
|
||||
?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><?php }?>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER') ?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function() {
|
||||
|
||||
$('.cm-pageset-addsetbox').on('click', function() {
|
||||
var dd = $('.cm-hometopnews-setbox');
|
||||
dd.last().after(dd.eq(0).clone(true));
|
||||
|
||||
})
|
||||
|
||||
$('.cm-pageset-rmsetbox').on('click', function(){
|
||||
$(this).parent().parent().parent().parent().remove();
|
||||
})
|
||||
|
||||
$('.editor').change('change', function() {
|
||||
location.href = '/adm/setcmtv/channellatest/' + this.value;
|
||||
})
|
||||
|
||||
$('.cm-pageset-searchbtn').on('click', function(e) {
|
||||
var searchBtn = $(this);
|
||||
var frm = searchBtn.parent()
|
||||
var params = {
|
||||
category: frm.find('.category').val(),
|
||||
editor: frm.find('.editor').val(),
|
||||
term: frm.find('.keyword').val(),
|
||||
pageset: 1,
|
||||
limit: frm.find('.limit').val()
|
||||
}
|
||||
|
||||
|
||||
$.get('/adm/content', params, function(res) {
|
||||
result = res.data.rows
|
||||
var resultBox = searchBtn.parent().find('.cm-search-result').empty();
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="' + i + '">' + result[i].title + '</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function() {
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = searchBtn.parent().parent().parent().next();
|
||||
console.log(frm)
|
||||
frm.find('.postid').val(item.idx)
|
||||
frm.find('.title').val(item.title)
|
||||
frm.find('.main_img').attr('src', item.mainImg)
|
||||
$('.cm-result-item').remove();
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
149
application/views/adm/pageset/cmtv/homehot.php
Executable file
149
application/views/adm/pageset/cmtv/homehot.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 크맵TV 홈HOT영상</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('REQUEST_URI')?>">
|
||||
<?php foreach($posts as $post) { ?>
|
||||
<table class="table table-bordered cm-hometopnews-setbox">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색</th>
|
||||
<td>
|
||||
<select name="category" class="form-control category" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(36 == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control editor" style="width:200px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<select name="limit" class="form-control limit" style="width:100px">
|
||||
<option value="">검색결과수</option>
|
||||
<option value="5" selected>5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<input type="text" name="keyword" class="form-control keyword" style="width:200px">
|
||||
<a class="btn btn-info btn-sm cm-pageset-searchbtn">검색</a>
|
||||
<a class="btn btn-warning btn-sm cm-pageset-addsetbox">추가</a>
|
||||
<div class="cm-search-result" style="margin-top:3px">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid[]" class="form-control postid" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title[]" class="form-control title" value="<?php if(isset($post)) echo convertEmoji($post->title)?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->main_img)?>" width="150" name="main_img[]" class="main_img">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<td>
|
||||
<input type="number" name="display_sort[]" class="form-control display_sort" value="<?php if(isset($post)) echo $post->display_sort?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><?php }?>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function(){
|
||||
|
||||
$('.cm-pageset-addsetbox').on('click', function(){
|
||||
var dd = $('.cm-hometopnews-setbox');
|
||||
dd.last().after(dd.eq(0).clone(true));
|
||||
|
||||
})
|
||||
|
||||
$('.cm-pageset-rmsetbox').on('click', function(){
|
||||
$(this).parent().parent().parent().parent().remove();
|
||||
})
|
||||
|
||||
$('.cm-pageset-searchbtn').on('click', function(e){
|
||||
var searchBtn = $(this);
|
||||
var frm = searchBtn.parent()
|
||||
var c = frm.find('.category').val();
|
||||
if(!c) {
|
||||
c = [];
|
||||
frm.find('.category option').each(function(k,op) {
|
||||
if(op.value)
|
||||
c.push(op.value)
|
||||
})
|
||||
}else c = [c]
|
||||
var params = {category: c.join('-'), editor: frm.find('.editor').val(),
|
||||
term:frm.find('.keyword').val(), pageset: 1, limit: frm.find('.limit').val()}
|
||||
|
||||
|
||||
$.get('/adm/content', params, function(res){
|
||||
result = res.data.rows
|
||||
var resultBox = searchBtn.parent().find('.cm-search-result').empty();
|
||||
for(var i=0; i<result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="'+i+'">'+result[i].title+'</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function(){
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = searchBtn.parent().parent().parent().next();
|
||||
console.log(frm)
|
||||
frm.find('.postid').val(item.idx)
|
||||
frm.find('.title').val(item.title)
|
||||
frm.find('.main_img').attr('src', item.mainImg)
|
||||
$('.cm-result-item').remove();
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
119
application/views/adm/pageset/grace/homekeyword.php
Executable file
119
application/views/adm/pageset/grace/homekeyword.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 은혜충전 홈 크맵키워드</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('HTTP_REFERER')?>">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색</th>
|
||||
<td>
|
||||
<select name="category" class="form-control" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:200px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<select name="limit" class="form-control" style="width:100px">
|
||||
<option value="">검색결과수</option>
|
||||
<option value="5" selected>5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<input type="text" name="keyword" class="form-control" style="width:200px">
|
||||
<a class="btn btn-info btn-sm cm-pageset-searchbtn">검색</a>
|
||||
<div class="cm-search-result" style="margin-top:3px">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid" class="form-control" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title" class="form-control" value="<?php if(isset($post)) echo $post->title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->main_img)?>" width="150" name="main_img">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function(){
|
||||
$('.cm-pageset-searchbtn').on('click', function(e){
|
||||
var frm = $('.cm-pageset-form')[0]
|
||||
var params = {category: frm.category.value,
|
||||
editor: frm.editor.value,
|
||||
term:frm.keyword.value, pageset: 1, limit: frm.limit.value}
|
||||
$.get('/adm/content', params, function(res){
|
||||
result = res.data.rows
|
||||
var resultBox = $('.cm-search-result').empty();
|
||||
for(var i=0; i<result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="'+i+'">'+result[i].title+'</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function(){
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = $('.cm-pageset-form')[0]
|
||||
frm.postid.value = item.idx
|
||||
frm.title.value = item.title
|
||||
frm.main_img.src = item.mainImg
|
||||
console.log(item)
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
142
application/views/adm/pageset/grace/hometop.php
Executable file
142
application/views/adm/pageset/grace/hometop.php
Executable file
@@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 은혜충전 홈 상단</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('REQUEST_URI')?>">
|
||||
<?php foreach($posts as $post) { ?>
|
||||
<table class="table table-bordered cm-hometopnews-setbox">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색</th>
|
||||
<td>
|
||||
<select name="category" class="form-control category" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control editor" style="width:200px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<select name="limit" class="form-control limit" style="width:100px">
|
||||
<option value="">검색결과수</option>
|
||||
<option value="5" selected>5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<input type="text" name="keyword" class="form-control keyword" style="width:200px">
|
||||
<a class="btn btn-info btn-sm cm-pageset-searchbtn">검색</a>
|
||||
<a class="btn btn-warning btn-sm cm-pageset-addsetbox">추가</a>
|
||||
<a class="btn btn-danger btn-sm cm-pageset-rmsetbox">삭제</a>
|
||||
<div class="cm-search-result" style="margin-top:3px">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid[]" class="form-control postid" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title[]" class="form-control title" value="<?php if(isset($post)) echo convertEmoji($post->title)?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->main_img)?>" width="150" name="main_img[]" class="main_img">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<td>
|
||||
<input type="number" name="display_sort[]" class="form-control display_sort" value="<?php if(isset($post)) echo $post->display_sort?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><?php }?>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function(){
|
||||
|
||||
$('.cm-pageset-addsetbox').on('click', function(){
|
||||
var dd = $('.cm-hometopnews-setbox');
|
||||
dd.last().after(dd.eq(0).clone(true));
|
||||
|
||||
})
|
||||
|
||||
$('.cm-pageset-rmsetbox').on('click', function(){
|
||||
$(this).parent().parent().parent().parent().remove();
|
||||
})
|
||||
|
||||
$('.cm-pageset-searchbtn').on('click', function(e){
|
||||
var searchBtn = $(this);
|
||||
var frm = searchBtn.parent()
|
||||
var params = {category: frm.find('.category').val(), editor: frm.find('.editor').val(),
|
||||
term:frm.find('.keyword').val(), pageset: 1, limit: frm.find('.limit').val()}
|
||||
|
||||
|
||||
$.get('/adm/content', params, function(res){
|
||||
result = res.data.rows
|
||||
var resultBox = searchBtn.parent().find('.cm-search-result').empty();
|
||||
for(var i=0; i<result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="'+i+'">'+result[i].title+'</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function(){
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = searchBtn.parent().parent().parent().next();
|
||||
console.log(frm)
|
||||
frm.find('.postid').val(item.idx)
|
||||
frm.find('.title').val(item.title)
|
||||
frm.find('.main_img').attr('src', item.mainImg)
|
||||
$('.cm-result-item').remove();
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
154
application/views/adm/pageset/main/dailyqt.php
Executable file
154
application/views/adm/pageset/main/dailyqt.php
Executable file
@@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 데일리큐티</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('REQUEST_URI')?>">
|
||||
<?php foreach($posts as $post) {?>
|
||||
<table class="table table-bordered cm-hometopnews-setbox">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색</th>
|
||||
<td>
|
||||
<select name="category" class="form-control category" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control editor" style="width:200px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<select name="limit" class="form-control limit" style="width:100px">
|
||||
<option value="">검색결과수</option>
|
||||
<option value="5" selected>5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<input type="text" name="keyword" class="form-control term" style="width:200px">
|
||||
<a class="btn btn-info btn-sm cm-pageset-searchbtn">검색</a>
|
||||
<a class="btn btn-warning btn-sm cm-pageset-addsetbox">추가</a>
|
||||
<a class="btn btn-danger btn-sm cm-pageset-rmsetbox">삭제</a>
|
||||
<div class="cm-search-result" style="margin-top:3px">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid[]" class="form-control postid" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title[]" class="form-control title" value="<?php if(isset($post)) echo $post->title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->main_img)?>" width="150" name="main_img" class="main_img">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>날짜</th>
|
||||
<td>
|
||||
<input type="text" name="dptime[]" class="form-control datetimepicker" value="<?php if(isset($post->DpTime)) echo $post->DpTime; else echo date('Y-m-d H:i:s');?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="cm-sample" style="display:none">
|
||||
<th>날짜</th>
|
||||
<td>
|
||||
<input type="text" class="form-control">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody><?php }?>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function(){
|
||||
$('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss' });
|
||||
|
||||
$('.cm-pageset-addsetbox').on('click', function(){
|
||||
var dd = $('.cm-hometopnews-setbox');
|
||||
var b = dd.eq(0).clone(true);
|
||||
b.find('.datetimepicker').parent().parent().remove();
|
||||
dd.last().after(b);
|
||||
var s = b.find('.cm-sample').clone();
|
||||
b.find('tbody').append(s);
|
||||
s.find('input').attr('name', 'dptime[]')
|
||||
s.find('input').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss' });
|
||||
s.show();
|
||||
|
||||
})
|
||||
|
||||
$('.cm-pageset-rmsetbox').on('click', function(){
|
||||
$(this).parent().parent().parent().parent().remove();
|
||||
})
|
||||
|
||||
$('.cm-pageset-searchbtn').on('click', function(e){
|
||||
var searchBtn = $(this);
|
||||
var frm = searchBtn.parent()
|
||||
var params = {category: frm.find('.category').val(),editor: frm.find('.editor').val(),
|
||||
term:frm.find('.keyword').val(), pageset: 1, limit: frm.find('.limit').val()}
|
||||
$.get('/adm/content', params, function(res){
|
||||
result = res.data.rows
|
||||
var resultBox = searchBtn.parent().find('.cm-search-result').empty();
|
||||
for(var i=0; i<result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="'+i+'">'+result[i].title+'</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function(){
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = searchBtn.parent().parent().parent().next();
|
||||
console.log(frm)
|
||||
frm.find('.postid').val(item.idx)
|
||||
frm.find('.title').val(item.title)
|
||||
frm.find('.main_img').attr('src', item.mainImg)
|
||||
$('.cm-result-item').remove();
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
120
application/views/adm/pageset/main/todayword.php
Executable file
120
application/views/adm/pageset/main/todayword.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 오늘의말씀</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('REQUEST_URI')?>">
|
||||
<?php foreach($posts as $dailyqt) {?>
|
||||
<table class="table table-bordered cm-hometopnews-setbox">
|
||||
<tbody>
|
||||
<tr><td colspan="2"><a class="btn btn-warning btn-sm cm-pageset-addsetbox">추가</a>
|
||||
<a class="btn btn-danger btn-sm cm-pageset-rmsetbox">삭제</a></td></tr>
|
||||
<tr>
|
||||
<th>말씀</th>
|
||||
<td>
|
||||
<input type="text" name="title[]" class="form-control" value="<?php if(isset($dailyqt)) echo $dailyqt->Title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>구절</th>
|
||||
<td>
|
||||
<input type="text" name="headline[]" class="form-control" value="<?php if(isset($dailyqt)) echo $dailyqt->Headline?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>날짜</th>
|
||||
<td>
|
||||
<input type="text" name="dptime[]" class="form-control datetimepicker" value="<?php if(isset($dailyqt->DpTime)) echo $dailyqt->DpTime; else echo date('Y-m-d H:i:s');?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="cm-sample" style="display:none">
|
||||
<th>날짜</th>
|
||||
<td>
|
||||
<input type="text" class="form-control">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><?php }?>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function(){
|
||||
|
||||
$('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss' });
|
||||
|
||||
$('.cm-pageset-addsetbox').on('click', function(){
|
||||
var dd = $('.cm-hometopnews-setbox');
|
||||
var b = dd.eq(0).clone(true);
|
||||
b.find('.datetimepicker').parent().parent().remove();
|
||||
dd.last().after(b);
|
||||
var s = b.find('.cm-sample').clone();
|
||||
b.find('tbody').append(s);
|
||||
s.find('input').attr('name', 'dptime[]')
|
||||
s.find('input').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss' });
|
||||
s.show();
|
||||
|
||||
})
|
||||
|
||||
$('.cm-pageset-rmsetbox').on('click', function(){
|
||||
$(this).parent().parent().parent().parent().remove();
|
||||
})
|
||||
|
||||
$('.cm-pageset-searchbtn').on('click', function(e){
|
||||
var frm = $('.cm-pageset-form')[0]
|
||||
var params = {category: frm.category.value,
|
||||
editor: frm.editor.value,
|
||||
term:frm.keyword.value, pageset: 1, limit: frm.limit.value}
|
||||
$.get('/adm/content', params, function(res){
|
||||
result = res.data.rows
|
||||
var resultBox = $('.cm-search-result').empty();
|
||||
for(var i=0; i<result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="'+i+'">'+result[i].title+'</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function(){
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = $('.cm-pageset-form')[0]
|
||||
frm.postid.value = item.idx
|
||||
frm.title.value = item.title
|
||||
frm.main_img.src = item.mainImg
|
||||
console.log(item)
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
135
application/views/adm/pageset/main/topnews.php
Executable file
135
application/views/adm/pageset/main/topnews.php
Executable file
@@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">페이지설정 > 메인상단뉴스</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data" class="cm-pageset-form">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('REQUEST_URI')?>">
|
||||
<?php foreach($posts as $post) { ?>
|
||||
<table class="table table-bordered cm-hometopnews-setbox">
|
||||
<thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="80">검색</th>
|
||||
<td>
|
||||
<select name="category" class="form-control category" style="width:200px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($newsCategories as $category) { echo '<option value="'.$category->category_code.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="limit" class="form-control limit" style="width:100px">
|
||||
<option value="">검색결과수</option>
|
||||
<option value="5" selected>5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<input type="text" name="keyword" class="form-control keyword" style="width:200px">
|
||||
<a class="btn btn-info btn-sm cm-pageset-searchbtn">검색</a>
|
||||
<a class="btn btn-warning btn-sm cm-pageset-addsetbox">추가</a>
|
||||
<a class="btn btn-danger btn-sm cm-pageset-rmsetbox">삭제</a>
|
||||
<div class="cm-search-result" style="margin-top:3px">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid[]" class="form-control postid" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title[]" class="form-control title" value="<?php if(isset($post)) echo $post->title?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인이미지</th>
|
||||
<td>
|
||||
<img src="<?php if(isset($post)) echo imgSrc($post->main_img)?>" width="150" name="main_img[]" class="main_img">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<td>
|
||||
<input type="number" name="display_sort[]" class="form-control display_sort" value="<?php if(isset($post)) echo $post->display_sort?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><?php }?>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
var result;
|
||||
$(function(){
|
||||
$('.cm-pageset-addsetbox').on('click', function(){
|
||||
var dd = $('.cm-hometopnews-setbox');
|
||||
dd.last().after(dd.eq(0).clone(true));
|
||||
|
||||
})
|
||||
|
||||
$('.cm-pageset-rmsetbox').on('click', function(){
|
||||
$(this).parent().parent().parent().parent().remove();
|
||||
})
|
||||
|
||||
$('.cm-pageset-searchbtn').on('click', function(e){
|
||||
var searchBtn = $(this);
|
||||
var frm = searchBtn.parent()
|
||||
var params = {category: frm.find('.category').val(),
|
||||
term:frm.find('.keyword').val(), pageset: 1, limit: frm.find('.limit').val()}
|
||||
$.get('/adm/news', params, function(res){
|
||||
result = res.data.rows
|
||||
var resultBox = searchBtn.parent().find('.cm-search-result').empty();
|
||||
for(var i=0; i<result.length; i++) {
|
||||
resultBox.append('<a class="btn btn-sm form-control cm-result-item" style="margin-bottom:3px" tabindex="'+i+'">'+result[i].title+'</a>')
|
||||
}
|
||||
$('.cm-result-item').on('click', function(){
|
||||
var item = result[$(this).attr('tabindex')]
|
||||
var frm = searchBtn.parent().parent().parent().next();
|
||||
console.log(frm)
|
||||
frm.find('.postid').val(item.idx)
|
||||
frm.find('.title').val(item.title)
|
||||
frm.find('.main_img').attr('src', item.main_img)
|
||||
$('.cm-result-item').remove();
|
||||
})
|
||||
}, 'json')
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
29
application/views/adm/partial/bottom.php
Executable file
29
application/views/adm/partial/bottom.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<form class="cm-hidden-form hide" method="post" action="/admin/life/life_list/5" target="_blank">
|
||||
<input type="hidden" name="idx">
|
||||
<input type="hidden" name="mode">
|
||||
</form>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"
|
||||
integrity="sha256-4iQZ6BVL4qNKlQ27TExEhBN1HFPvAvAMbFavKKosSWQ=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"
|
||||
integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/js/select2.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.16.0/bootstrap-table.min.js"
|
||||
integrity="sha256-JFzlEUS2cZGdNFhVNH3GSFuqZFLjzWIjOqG5BY+Yhvw=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.16.0/locale/bootstrap-table-ko-KR.min.js"
|
||||
integrity="sha256-VQ1uZxOBAIoPvZoJ4al100ZGU830uTg22G9BXx5jV4Y=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"
|
||||
integrity="sha256-bqVeqGdJ7h/lYPq6xrPv/YGzMEb6dNxlfiTUHSgRCp8=" crossorigin="anonymous"></script>
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js">
|
||||
</script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/5.4.0/bootbox.min.js"
|
||||
integrity="sha256-sfG8c9ILUB8EXQ5muswfjZsKICbRIJUG/kBogvvV5sY=" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha256-2Pjr1OlpZMY6qesJM68t2v39t+lMLvxwpa8QlRjJroA=" crossorigin="anonymous"></script>
|
||||
<script src="/assets/adm/js/jq.flot.js"></script>
|
||||
<script src="/assets/adm/js/jq.flot.tooltip.js"></script>
|
||||
<script src="/assets/adm/js/jq.flot.resize.js"></script>
|
||||
<script src="/assets/adm/js/jq.flot.pie.js"></script>
|
||||
<script src="/assets/adm/js/cm-adm-Fm5tZ263ZtdEmbvT.js"></script>
|
||||
9
application/views/adm/partial/footer.php
Executable file
9
application/views/adm/partial/footer.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<div class="footer">
|
||||
<div class="footer-inner pull-right hidden-xs">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12"> © 2020 <a>crossmap.co.kr</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
17
application/views/adm/partial/head.php
Executable file
17
application/views/adm/partial/head.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Crossmap Admin - 크리스천포털 크로스맵</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/css/select2.min.css" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i">
|
||||
<link href="/assets/adm/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/assets/adm/css/sb-admin.css" rel="stylesheet">
|
||||
<link href="/assets/adm/css/crossmap-adm.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"
|
||||
type="text/css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.16.0/bootstrap-table.min.css"
|
||||
integrity="sha256-cCxZ912RWIYqgo3Di4S0U4rdHxVGoqE23gqVU4XNABE=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css"
|
||||
integrity="sha256-siyOpF/pBWUPgIcQi17TLBkjvNgNQArcmwJB8YvkAgg=" crossorigin="anonymous" />
|
||||
80
application/views/adm/partial/header.php
Executable file
80
application/views/adm/partial/header.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/adm"><img src="/assets/adm/images/logo.svg"
|
||||
class="logo-icon" alt="Hoosk CMS"></a>
|
||||
</div>
|
||||
<!-- Top Menu Items -->
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<li>
|
||||
<a href="/" target="_blank"><i class="fa fa-home"></i></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i>
|
||||
crossmap <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="/admin/login/logout_proc"><i class="fa fa-fw fa-power-off"></i>
|
||||
Logout</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav side-nav">
|
||||
<li class="dropdown<?php echo $this->uri->segment(2) == 'life' ? ' active':''?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target=".cm-life-menu"> <i
|
||||
class="fa fa-newspaper-o"></i>
|
||||
<span>라이프관리</span> <b class="caret"></b></a>
|
||||
<ul class="collapse cm-life-menu<?php echo $this->uri->segment(2) == 'life' ? ' in':''?>">
|
||||
<li>
|
||||
<a href="/adm/life/category">서브메뉴관리</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/adm/life">콘텐츠관리</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown<?php echo $this->uri->segment(2) == 'grace' ? ' active':''?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target=".cm-grace-menu"> <i
|
||||
class="fa fa-newspaper-o"></i>
|
||||
<span>은혜충전관리</span> <b class="caret"></b></a>
|
||||
<ul class="collapse cm-grace-menu<?php echo $this->uri->segment(2) == 'grace' ? ' in':''?>">
|
||||
<li>
|
||||
<a href="/adm/grace/category">서브메뉴관리</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/adm/grace">콘텐츠관리</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown<?php echo $this->uri->segment(2) == 'cmtv' ? ' active':''?>">
|
||||
<a href="javascript:;" data-toggle="collapse" data-target=".cm-cmtv-menu"> <i
|
||||
class="fa fa-newspaper-o"></i>
|
||||
<span>크로스맵TV관리</span> <b class="caret"></b></a>
|
||||
<ul class="collapse cm-cmtv-menu<?php echo $this->uri->segment(2) == 'cmtv' ? ' in':''?>">
|
||||
<li>
|
||||
<a href="/adm/cmtv/category">서브메뉴관리</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/adm/cmtv">콘텐츠관리</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="<?php echo $this->uri->segment(2) == 'comment' ? 'active':''?>">
|
||||
<a href="/adm/comment"> <i class="fa fa-newspaper-o"></i> <span>코멘트 관리</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/main"> <i class="fa fa-newspaper-o"></i> <span>관리자(구버전)</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
101
application/views/adm/podbbang.php
Executable file
101
application/views/adm/podbbang.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">데이터관리 > 팟빵관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>이미지</th>
|
||||
<th>제목/설명</th>
|
||||
<th width="80">업데이트</th>
|
||||
<th width="50">좋아요</th>
|
||||
<th width="50">구독</th>
|
||||
<th width="70">카테고리</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->Id?></td>
|
||||
<td><img src="<?php echo $r->Image?>" width="90"></td>
|
||||
<td><a href="http://www.podbbang.com<?php echo $r->Link?>" target="_blank"><?php echo $r->Title?></a><br /><i style="color:#aaa"><?php echo $r->Description?></i></td>
|
||||
<td><?php echo $r->UpdatedAtStr?></td>
|
||||
<td><?php echo $r->Likes?></td>
|
||||
<td><?php echo $r->Subscribes?></td>
|
||||
<td><?php echo $r->Category?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->Id?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function(){
|
||||
$('.cm-display-select').on('change', function(){
|
||||
if(confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N': selectVal;
|
||||
$.post('/adm/content/display', {'is_display': is_display, 'postid': postid}, function(res){
|
||||
selectVal == 'R' ? location.href='/adm/content/reserve?list='+postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
70
application/views/adm/reserve.php
Executable file
70
application/views/adm/reserve.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">기본관리 > 컨텐츠관리 > 예약설정</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<form method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="redirect" value="<?php echo $this->input->server('HTTP_REFERER')?>">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<input type="text" name="postid" class="form-control" value="<?php if(isset($post)) echo $post->idx?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제목</th>
|
||||
<td>
|
||||
<input type="text" name="title" class="form-control" value="<?php if(isset($post)) echo convertEmoji($post->title)?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>예약시간</th>
|
||||
<td>
|
||||
<input type="text" name="dptime" class="form-control datetimepicker" value="<?php if(isset($post->reserve_time)) echo $post->reserve_time?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
<a class="btn btn-danger" href="<?php echo $this->input->server('HTTP_REFERER')?>">취소</a>
|
||||
<button type="submit" class="btn btn-success">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script src="/assets/adm/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
$('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss' });
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
127
application/views/adm/template.php
Executable file
127
application/views/adm/template.php
Executable file
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">컨텐츠관리 > 전체리스트</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<form action="" method="get">
|
||||
<select name="category" class="form-control" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:100px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="term" value="" placeholder="검색어를 입력하세요" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled"
|
||||
data-list-delete-url="/adm/board/post/listdelete/?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>에디터</th>
|
||||
<th>제목</th>
|
||||
<th>카테고리</th>
|
||||
<th>메인이미지</th>
|
||||
<th>조회수</th>
|
||||
<th>좋아요수</th>
|
||||
<th>댓글수</th>
|
||||
<th>등록일</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->idx?></td>
|
||||
<td><?php echo $r->editorName?></td>
|
||||
<td><a href="#" class="cm-title-link"><?php echo $r->title?></a></td>
|
||||
<td><?php echo $r->categoryName?></td>
|
||||
<td><img src="<?php echo imgSrc($r->mainImg)?>" height="50"></td>
|
||||
<td><?php echo $r->views?></td>
|
||||
<td><?php echo $r->likes?></td>
|
||||
<td><?php echo $r->comments?></td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->idx?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<form action="" method="get">
|
||||
<select name="category" class="form-control" style="width:100px">
|
||||
<option value="">카테고리</option>
|
||||
<?php foreach($lifeCategories as $category) { echo '<option value="'.$category->idx.'" '.(param('category') == $category->idx ? 'selected':'').'>'. $category->category_name. '</option>';}?>
|
||||
</select>
|
||||
<select name="editor" class="form-control" style="width:100px">
|
||||
<option value="">에디터</option>
|
||||
<?php foreach($graceEditors as $editor) { echo '<option value="'.$editor->editorId.'" '.(param('editor') == $editor->editorId ? 'selected':'').'>'. $editor->editorName. '</option>';}?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="term" value="" placeholder="검색어를 입력하세요" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled"
|
||||
data-list-delete-url="/adm/board/post/listdelete/?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
101
application/views/adm/ytchannel.php
Executable file
101
application/views/adm/ytchannel.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<?php $this->load->view('adm/layout/head')?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- start wrapper -->
|
||||
<div class="wrapper">
|
||||
<!-- start nav -->
|
||||
<?php $this->load->view('adm/layout/nav')?>
|
||||
<!-- end nav -->
|
||||
<!-- start content_wrapper -->
|
||||
<div class="content_wrapper">
|
||||
<!-- start header -->
|
||||
<?php $this->load->view('adm/layout/header')?>
|
||||
<!-- end header -->
|
||||
<div class="contents">
|
||||
<h3 style="font-size:17px;font-weight:bold;color:#aaa">데이터관리 > YT채널관리</h3>
|
||||
<!-- 여기까지 레이아웃 상단입니다 -->
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<div class="box-table-header cm-bottom-control">
|
||||
<div class="col-md-6 cm-top-pagination"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo $table['total']?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>카테고리</th>
|
||||
<th>에디터</th>
|
||||
<th>등록일</th>
|
||||
<th>최근수집일</th>
|
||||
<th>수집건수</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach ($table['rows'] as $r) {?>
|
||||
<tr>
|
||||
<td><?php echo $r->Id?></td>
|
||||
<td><?php echo $r->Title?></td>
|
||||
<td><?php echo $r->CategoryId?></td>
|
||||
<td><?php echo $r->editorId?></td>
|
||||
<td><?php echo $r->reg_date?></td>
|
||||
<td><?php echo $r->sync_date?></td>
|
||||
<td><?php echo $r->contentCount?></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo $r->Id?>" /></td>
|
||||
</tr> <?php }?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info row cm-bottom-control">
|
||||
<div class="col-md-6"><?php echo $paging ?></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo explode('?', get_instance()->input->server('REQUEST_URI'))[0]?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url="/adm/content/delete?">선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 여기부터 레이아웃 하단입니다 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end content_wrapper -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
<?php $this->load->view('adm/layout/footer')?>
|
||||
<script>
|
||||
$(function(){
|
||||
$('.cm-display-select').on('change', function(){
|
||||
if(confirm('공개여부를 ' + this.options[this.selectedIndex].text + '로 변경할까요?')) {
|
||||
var postid = $(this).parent().parent().find('td:first').text();
|
||||
var selectVal = this.value;
|
||||
var is_display = selectVal == 'R' ? 'N': selectVal;
|
||||
$.post('/adm/content/display', {'is_display': is_display, 'postid': postid}, function(res){
|
||||
selectVal == 'R' ? location.href='/adm/content/reserve?list='+postid : location.reload();
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
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>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user