Files
2020-06-10 06:19:03 +09:00

300 lines
10 KiB
PHP
Executable File

<?
$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>