1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
<?php $sub_menu = "600400"; include("./_common.php"); include("./auth_check.php"); // 관리자 권한 체크 include($j3_adm_path."/shop_header.php");
if($code!=''){ $sql = "select * from shop_popup a where 1=1 and idx = '{$code}'"; $res = mysql_query($sql,$connect_j3); $cinfo = mysql_fetch_array($res); } else { $cinfo['pu_left'] = 10; $cinfo['pu_top'] = 10; $cinfo['pu_width'] = 450; $cinfo['pu_height'] = 500; $cinfo['pu_sdate'] = date("Y-m-d H:i:s",time()); $cinfo['pu_edate'] = date("Y-m-d H:i:s",time()+(60*60*24*30)); }
$qstr = $_SERVER['QUERY_STRING'];
?> <?php if($shop_du_size>$limit_mbyte){ ?> <script src="<?php echo $j3_lib_url?>/ckeditor-nf/ckeditor.js"></script> <?php } else { ?> <script src="<?php echo $j3_lib_url?>/ckeditor/ckeditor.js"></script> <?php }?> <div id="wrap" class='container_wrap'> <div id="sub-title"> <h2>팝업레이어 등록/수정</h2> <div class="sub-location"> <a href="./index.php" class="home"><span class="screen_out">홈</span></a> <span class="location-gt"></span> <a>게시판관리</a> <span class="location-gt"></span> <a>팝업레이어 등록/수정</a> </div> </div> <style> .cust_modal1, .cust_modal2 { border:0px solid #e1e1e1; width:1200px; padding:10px; font-size:13px } .cust_modal1 h4, .cust_modal2 h4 { position:relative; top:-5px; font-size:14px; font-weight:bold; } .cust_modal2 { margin-top:0px; } .table-top-border tbody { border-top:1px solid #e1e1e1;} .cust_modal1 table tbody td, .cust_modal2 table tbody td { text-align:left; padding-left:5px; } .cust_modal1 table tbody td input, .cust_modal2 table tbody td input{ border:1px solid #e9e9e9; } .input_readonly {background:#E9E9E9; } .width_500 { width:500px !important; } .width_80 { width:80px !important; } .width_120 { width:120px !important; } </style> <form name='popup_reg_form' method='post' action='' enctype="multipart/form-data"> <input type='hidden' name='qstr' value=''> <input type='hidden' name='code' value='<?php echo $cinfo['idx'];?>'> <br><br> <div class='cust_modal1'> <h4>기본정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">기본정보</caption> <colgroup> <col style="width:150px;"><col style="width:1050px;"> </colgroup>
<tbody> <tr> <th>위치구분</th> <td colspan=3> <select name='pu_pos'> <option value='all' <?php if($cinfo['pu_pos']=='all'){?>selected<?php }?>>PC와 모바일</option> <option value='pc' <?php if($cinfo['pu_pos']=='pc'){?>selected<?php }?>>PC만</option> <option value='mo' <?php if($cinfo['pu_pos']=='mo'){?>selected<?php }?>>모바일만</option> </select> </td> </tr> <tr> <th>시작일시</th> <td colspan=3><input type='text' name='pu_sdate' class='width_200' value='<?php echo $cinfo['pu_sdate'];?>'></td> </tr> <tr> <th>종료일시</th> <td colspan=3><input type='text' name='pu_edate' class='width_200' value='<?php echo $cinfo['pu_edate'];?>'></td> </tr> <tr> <th>좌측 위치</th> <td colspan=3><input type='text' name='pu_left' class='width_60' value='<?php echo $cinfo['pu_left'];?>'> px</td> </tr> <tr> <th>상단 위치</th> <td colspan=3><input type='text' name='pu_top' class='width_60' value='<?php echo $cinfo['pu_top'];?>'> px</td> </tr> <tr> <th>팝업 가로크기</th> <td colspan=3><input type='text' name='pu_width' class='width_60' value='<?php echo $cinfo['pu_width'];?>'> px</td> </tr> <tr> <th>팝업 세로크기</th> <td colspan=3><input type='text' name='pu_height' class='width_60' value='<?php echo $cinfo['pu_height'];?>'> px</td> </tr> <tr> <th>팝업 제목</th> <td colspan=3><input type='text' name='pu_subject' class='width_500' value='<?php echo $cinfo['pu_subject'];?>'></td> </tr> <tr> <th>팝업내용</th> <td colspan=3 style='padding:5px;'> <textarea name='pu_content' id='pu_content'><?php echo $cinfo['pu_content'];?></textarea> </td> </tr> </table> </div> <div id="sub-contents-area" style='padding-left:500px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="lignt-blue-btn" id='btn_popup_save'>저장</a> <a class="gray-btn" id='btn_cancel_save'>취소</a> </div> </div> </div> </form> <script> $(function(){ $("#btn_cancel_save").click(function(){ // 취소 버튼 document.location.href='popup.php?<?php echo $_COOKIE['qstr'];?>'; });
$("#btn_popup_save").click(function(){ // 저장 버튼 form_save(); }); });
function form_save(){ var form_obj = $("form[name='popup_reg_form']"); if($(form_obj).find("input[name='pu_subject']").val()==''){ alert('제목을 입력하세요.'); return; } v = CKEDITOR.instances.pu_content.getData(); $(form_obj).find("textarea[name='pu_content']").val(v); if($(form_obj).find("textarea[name='pu_content']").val()==''){ alert('내용을을 입력하세요.'); return; } $(form_obj).find("input[name='qstr']").val('<?php echo $qstr;?>'); if(confirm('저장하시겠습니까?')){ var form_data = $(form_obj).serialize();
$.ajax({type:"post", url:"ajax.popup_reg_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); var v_after_add = $(xml).find("after_add").text(); if(v_mode_ok!='Y'){ alert(v_msg); } else { document.location.reload(); } }, error:function(rtn,status,error){ alert(error); } }); } }
<?php if($shop_du_size>$limit_mbyte){ ?> CKEDITOR.replace( 'pu_content', { height: 270, filebrowserUploadUrl:"" } ); <?php } else { ?> CKEDITOR.replace( 'pu_content', { height: 270 } ); <?php } ?>
</script>
<?php include($j3_adm_path."/shop_footer.php"); ?> <div id="modal_member_box" title="거래처수정" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;"></div>
|