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