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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
<?php include("./_common.php"); include($j3_adm_path."/shop_header.php");
if($code!=''){ $sql = "select * from shop_bbs a where 1=1 and a.idx = '{$code}' "; $res = mysql_query($sql,$connect_j3); $cinfo = mysql_fetch_array($res); } if($cinfo['b_file_cnt']==''){ $cinfo['b_file_cnt'] = 0; } if($cinfo['b_file_size']==''){ $cinfo['b_file_size'] = 10485760; } if($cinfo['b_seq']==''){ $cinfo['b_seq'] = 0; } if($cinfo['b_subj_size']==''){ $cinfo['b_subj_size'] = 60; } if($cinfo['b_subj_size_m']==''){ $cinfo['b_subj_size_m'] = 15; } if($cinfo['b_cont_img_size']==''){ $cinfo['b_cont_img_size'] = 0; } if($cinfo['b_list_row']==''){ $cinfo['b_list_row'] = 15; } if($cinfo['b_list_row_m']==''){ $cinfo['b_list_row_m'] = 15; }
?> <?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>게시판 <?php if($code==''){?>신규<?php } else {?>수정<?php }?></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>
<form name='bbs_reg_form' method='post' action=''> <input type='hidden' name='qstr' value=''> <input type='hidden' name='code' value='<?php echo $code;?>'>
<div class='cust_modal1'> <h4>기본 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">기본정보</caption> <colgroup> <col style="width:120px;"><col style="width:220px;"> <col style="width:100px;"><col style="width:230px;"> <col style="width:100px;"><col style="width:220px;"> </colgroup>
<tbody> <?php if($code!=''){ ?> <tr> <th>링크(PC/모바일겸용)</th> <td colspan=5><?php echo "./board.php?b_table={$cinfo['b_table']}";?></td> </tr> <tr> <th>링크(PC전용)</th> <td colspan=5><?php echo "../shop/board.php?b_table={$cinfo['b_table']}";?></td> </tr> <tr> <th>링크(모바일전용)</th> <td colspan=5><?php echo "../shopm/board.php?b_table={$cinfo['b_table']}";?></td> </tr> <tr> <th>게시판 풀링크</th> <td colspan=5><?php echo "{$j3_shop_url}/board.php?b_table={$cinfo['b_table']}";?> <a href='<?php echo "{$j3_shop_url}/board.php?b_table={$cinfo['b_table']}";?>' target='_blank'>[새창열기]</a></td> </tr> <?php } ?> <tr> <th>게시판 코드</th> <td colspan=5> <input type='text' name='b_table' class='<?php if($code!=''){?>input_readonly<?php }?> width_120' value='<?php echo $cinfo['b_table'];?>' maxlength=10> <span class='help_info'>게시판을 구분할수 있는 영문자,숫자,_로 이루어진 코드를 입력하세요. 한번넣으면 수정되지 않습니다. 특수문자 및 공백불가 20자이내</span> </td> </tr> <tr> <th>게시판 제목</th> <td><input type='text' name='b_title' class='width_200' value='<?php echo $cinfo['b_title'];?>'></td> <th>게시판 분류</th> <td colspan=3> <input type='text' name='b_cate' class='width_250' value='<?php echo $cinfo['b_cate'];?>'> <span class='help_info'>분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])</span> </td> </tr> <tr> <th>리스트 권한<?php echo $cinfo['b_list_lv'];?></th> <td> <select name='b_list_lv' class='width_40'> <?php echo bbs_lv_option($cinfo['b_list_lv']);?> </select> </td> <th>보기 권한</th> <td> <select name='b_view_lv' class='width_40'> <?php echo bbs_lv_option($cinfo['b_view_lv']);?> </select> </td> <th>쓰기 권한</th> <td> <select name='b_write_lv' class='width_40'> <?php echo bbs_lv_option($cinfo['b_write_lv']);?> </select> </td> </tr> <tr> <th>답변 권한</th> <td> <select name='b_reply_lv' class='width_40'> <?php echo bbs_lv_option($cinfo['b_reply_lv']);?> </select> </td> <th>코멘트 권한</th> <td> <select name='b_comt_lv' class='width_40'> <?php echo bbs_lv_option($cinfo['b_comt_lv']);?> </select> </td> <th>업로드 권한</th> <td> <select name='b_uload_lv' class='width_40'> <?php echo bbs_lv_option($cinfo['b_uload_lv']);?> </select> </td> </tr> <tr> <th>다운로드 권한</th> <td> <select name='b_dload_lv' class='width_40'> <?php echo bbs_lv_option($cinfo['b_dload_lv']);?> </select> </td> <th><!--비밀글 사용 : 나중에 필요시 사용함--></th> <td> <!--<input type='checkbox' name='b_secret' value='1' <?php if($cinfo['b_secret']=='1'){?>checked<?php }?>> --> </td> <th>보기에서 리스트표시</th> <td> <input type='checkbox' name='b_view_list' value='1' <?php if($cinfo['b_view_list']=='1'){?>checked<?php }?>> </td> </tr> <tr> <th>파일 업로드 갯수</th> <td> <input type='text' name='b_file_cnt' class='width_60 number_class' value='<?php echo $cinfo['b_file_cnt'];?>' maxlength=1> <span class='help_info'>최대 9</span> </td> <th>파일당 사이즈</th> <td> <input type='text' name='b_file_size' class='width_100 number_class' value='<?php echo number_format($cinfo['b_file_size']);?>'> bytes <span class='help_info'>최대 <?php echo ini_get("upload_max_filesize")."메가 이하 세팅";?></span> </td> <th>게시판 순번</th> <td> <input type='text' name='b_seq' class='width_60' value='<?php echo $cinfo['b_seq'];?>'> <span class='help_info'>숫자가 낮을수록 앞에 표시</span> </td> </tr> <tr> <th>게시판 상단내용</th> <td colspan=5 style='padding:5px 5px;'> <textarea name='b_top_cont' id='b_top_cont'><?php echo $cinfo['b_top_cont'];?></textarea> </td> </tr> <tr> <th>게시판 하단내용</th> <td colspan=5 style='padding:5px 5px;'> <textarea name='b_bot_cont' id='b_bot_cont'><?php echo $cinfo['b_bot_cont'];?></textarea> </td> </tr> <tr> <th>제목 길이</th> <td> <input type='text' name='b_subj_size' class='width_60' value='<?php echo $cinfo['b_subj_size'];?>'> </td> <th>제목 길이(모)</th> <td> <input type='text' name='b_subj_size_m' class='width_60' value='<?php echo $cinfo['b_subj_size_m'];?>'> </td> <th>내용 이미지 폭</th> <td> <input type='text' name='b_cont_img_size' class='width_60' value='<?php echo $cinfo['b_cont_img_size'];?>'>px <span class='help_info'>내용의 이미지가 큰경우 설정 폭으로 줄임</span> </td> </tr> <tr> <th>게시판 리스트수</th> <td> <input type='text' name='b_list_row' class='width_60' value='<?php echo $cinfo['b_list_row'];?>'> </td> <th>게시판 리스트(모)</th> <td colspan=3> <input type='text' name='b_list_row_m' class='width_60' value='<?php echo $cinfo['b_list_row_m'];?>'> </td> </tr> </table> </div>
</form> <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_bbs_save'>저장</a> <a class="gray-btn" id='btn_cancel_save'>취소</a> </div> </div> </div> </div> <!-- wrap end--> <script> function form_save(){ // 거래처 저장/수정 var form_obj = $("form[name='bbs_reg_form']"); if($(form_obj).find("input[name='b_table']").val()==''){ alert('게시판 코드를 입력하세요.'); return; }
if($(form_obj).find("input[name='b_title']").val()==''){ alert('게시판 제목을 입력하세요.'); return; }
v1 = CKEDITOR.instances.b_top_cont.getData(); $("#b_top_cont").val(v1); v2 = CKEDITOR.instances.b_bot_cont.getData(); $("#b_bot_cont").val(v2);
$(form_obj).find("input[name='qstr']").val('<?php echo $qstr;?>'); if(confirm('저장하시겠습니까?')){ var form_data = $(form_obj).serialize();
$.ajax({type:"post", url:"ajax.bbs_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_code = $(xml).find("code").text(); if(v_mode_ok!='Y'){ alert(v_msg); } else { //alert(v_mode); document.location.href='?<?php echo $qstr."&time=".time();?>&code='+v_code; } }, error:function(rtn,status,error){ alert(error); } }); } //$(form_obj).submit(); }
$(function(){ if('<?php echo $cinfo['biztype']?>'=='0'){ $(".biztype0").show(); $(".biztype1").hide(); } if('<?php echo $cinfo['biztype']?>'=='1' || '<?php echo $cinfo['biztype']?>'==''){ $(".biztype0").hide(); $(".biztype1").show(); } $(".input_readonly").attr("readonly",true); $("input[name='comp_name']").focus();
$("input[name='email1']").change(function(){ $("input[name='tax_charge_email1']").val($(this).val()); }); $("input[name='email2']").change(function(){ $("input[name='tax_charge_email2']").val($(this).val()); });
$(document).on("click","input[name='code_auto']",function(){ // 코드자동 선택시 if($(this).is(":checked")){ $("input[name='code1']").addClass("input_readonly").attr("readonly",true).val("");
} else { $("input[name='code1']").removeClass("input_readonly").attr("readonly",false); } });
$("#btn_bbs_save").click(function(){ form_save(); });
$("#btn_cancel_save").click(function(){ // 취소 버튼 document.location.href='bbs_list.php?<?php echo $_COOKIE['qstr'];?>'; });
$(document).on("click",".zip_search",function(){ // 주소오픈 postSearch3("zipcode","","addr_m"); });
setTimeout(function(){ $("input[name='comp_name']").focus(); },500); })
CKEDITOR.replace( 'b_top_cont', { height: 250 } ); CKEDITOR.replace( 'b_bot_cont', { height: 250 } ); </script> <?php include($j3_adm_path."/shop_footer.php"); ?> <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script> <div id="daum_juso_rayer" style="background:#fff;border: 5px solid currentColor; left: 50%; top: 50%; width: 300px; height: 460px; overflow: hidden; margin-top: -235px; margin-left: -155px; display:none ; position: fixed; z-index: 10000; -webkit-overflow-scrolling: touch;"><input type='button' onclick="$('#daum_juso_rayer').hide();" value='close' style='top:0px;width:40px;height:20px;right:0px;padding:0px;'> <iframe src="about:blank" frameborder="0" style="margin: 0px;margin-top:30px; padding: 0px; border: 0px currentColor; left: 0px; top: 0px; width: 100%; height: 90%; overflow: hidden; position: absolute; min-width: 300px;"></iframe> </div>
|