first commit
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user