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
302
303
304
305
306
307
|
<?php $sub_menu = '950100'; include_once('./_common.php'); include_once(G5_EDITOR_LIB); include_once(G5_LIB_PATH.'/iteminfo.lib.php');
auth_check($auth[$sub_menu], "w");
$html_title = "벤더 ";
if ($w == "") { $html_title .= "입력";
} else if ($w == "u") { $html_title .= "수정";
$sql = " select * from {$g5['vender_member']} where vm_id = '$vm_id' "; $vm = sql_fetch($sql);
$vm_saupja = explode("-",$vm['vm_saupja']);
$vv = ",".$vm['vm_goods_auth'];
if(strpos($vv,"R")>0){ $goods_auth1 = " checked"; } if(strpos($vv,"M")>0){ $goods_auth2 = " checked"; } if(strpos($vv,"D")>0){ $goods_auth3 = " checked"; }
if(!$vm) alert('벤더정보가 존재하지 않습니다.');
} else { alert(); }
$frm_submit = '<div class="btn_confirm01 btn_confirm"> <input type="submit" value="확인" class="btn_submit" accesskey="s"> <a href="./vendermember_list.php?'.$qstr.'">목록</a>'; $frm_submit .= '</div>';
$qstr = $qstr.'&sca='.$sca.'&page='.$page;
$g5['title'] = $html_title; include_once (G5_ADMIN_PATH.'/admin.head.php');
$pg_anchor ='<ul class="anchor"> <li><a href="#anc_sitfrm_basic">벤더 기본정보</a></li> <li><a href="#anc_sitfrm_setting">벤더 설정</a></li> </ul> ';
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js ?>
<form name="fvenderform" action="./vendermember_formupdate.php" method="post" enctype="MULTIPART/FORM-DATA" autocomplete="off" onsubmit="return fitemformcheck(this)">
<input type="hidden" name="codedup" value="<?php echo $default['de_code_dup_use']; ?>"> <input type="hidden" name="w" value="<?php echo $w; ?>"> <input type="hidden" name="sca" value="<?php echo $sca; ?>"> <input type="hidden" name="sst" value="<?php echo $sst; ?>"> <input type="hidden" name="sod" value="<?php echo $sod; ?>"> <input type="hidden" name="sfl" value="<?php echo $sfl; ?>"> <input type="hidden" name="stx" value="<?php echo $stx; ?>"> <input type="hidden" name="page" value="<?php echo $page; ?>"> <input type="hidden" name="vm_id" value="<?php echo $vm_id; ?>"> <input type="hidden" name="vm_user_id_ck" id='vm_user_id_ck' value="">
<section id="anc_sitfrm_basic"> <h2 class="h2_frm">벤더 기본정보</h2> <?php echo $pg_anchor; ?> <div class="local_desc02 local_desc"> <p>벤더의 기본정보를 입력하세요.</p> </div>
<div class="tbl_frm01 tbl_wrap"> <table> <caption>상품분류 입력</caption> <colgroup> <col class="grid_4"> <col> </colgroup> <tbody> <tr> <th scope="row"><label for="vm_user_id">벤더 ID</label></th> <td> <?php if($w=='u'){?> <input type="hidden" name="vm_user_id" value="<?php echo $vm['vm_user_id']?>" id="vm_user_id" required class="frm_input required" size="20" > <?php echo $vm['vm_user_id']?> <?php } else {?> <?php echo help("쇼핑몰 회원 아이디를 입력하세요."); ?> <input type="text" name="vm_user_id" value="<?php echo $vm['vm_user_id']?>" id="vm_user_id" required class="frm_input required" size="20" > <input type='button' value='회원확인' id='mem_vender' onclick='' class='btn_frmline'> <?php } ?> </td> </tr> <tr> <th scope="row"><label for="vm_company">업체명</label></th> <td> <input type="text" name="vm_company" value="<?php echo $vm['vm_company']?>" id="vm_company" required class="frm_input required" size="50" > </td> </tr> <tr> <th scope="row"><label for="vm_ceo">대표자명</label></th> <td> <input type="text" name="vm_ceo" value="<?php echo $vm['vm_ceo']?>" id="vm_ceo" required class="frm_input required" size="20" > </td> </tr> <tr> <th scope="row"><label for="vm_name">담당자명</label></th> <td> <input type="text" name="vm_name" value="<?php echo $vm['vm_name']?>" id="vm_name" required class="frm_input required" size="20" > </td> </tr> <tr> <th scope="row"><label for="vm_tel">전화번호</label></th> <td> <input type="text" name="vm_tel" value="<?php echo $vm['vm_tel']?>" id="vm_tel" required class="frm_input required" size="20" > </td> </tr> <tr> <th scope="row"><label for="vm_hp">핸드폰번호</label></th> <td> <input type="text" name="vm_hp" value="<?php echo $vm['vm_hp']?>" id="vm_hp" required class="frm_input required" size="20" > </td> </tr> <tr> <th scope="row"><label for="vm_fax">팩스</label></th> <td> <input type="text" name="vm_fax" value="<?php echo $vm['vm_fax']?>" id="vm_fax" required class="frm_input required" size="20" > </td> </tr> <tr> <th scope="row"><label for="vm_saupja1">사업자 번호</label></th> <td> <input type="text" name="vm_saupja1" value="<?php echo $vm_saupja[0];?>" id="vm_saupja1" required class="frm_input required" size="4" maxlength=3> - <input type="text" name="vm_saupja2" value="<?php echo $vm_saupja[1];?>" id="vm_saupja2" required class="frm_input required" size="3" maxlength=2> - <input type="text" name="vm_saupja3" value="<?php echo $vm_saupja[2];?>" id="vm_saupja3" required class="frm_input required" size="6" maxlength=5> </td> </tr> <tr> <th scope="row"><label for="vm_zip">우편번호</label></th> <td> <?php echo help("구번호는 가운데 - 빼고 6자리, 신번호는 그냥 5자리만 입력"); ?> <input type="text" name="vm_zip" value="<?php echo $vm['vm_zip']?>" id="vm_zip" required class="frm_input required" size="10" maxlength=6> <button type="button" class="btn_frmline" onclick="win_zip('fvenderform', 'vm_zip', '', 'vm_addr1', 'vm_addr2', 'vm_addr2', '');">주소 검색</button><br> </td> </tr> <tr> <th scope="row"><label for="vm_addr1">주소</label></th> <td> <input type="text" name="vm_addr1" value="<?php echo $vm['vm_addr1']?>" id="vm_addr1" required class="frm_input required" size="60" style='margin-bottom:5px;'><br> <input type="text" name="vm_addr2" value="<?php echo $vm['vm_addr2']?>" id="vm_addr2" required class="frm_input required" size="60" > </td> </tr> <tr> <th scope="row"><label for="vm_email">이메일</label></th> <td> <input type="text" name="vm_email" value="<?php echo $vm['vm_email']?>" id="vm_email" required class="frm_input required" size="40" > </td> </tr> <tr> <th scope="row"><label for="vm_uptae">업태</label></th> <td> <input type="text" name="vm_uptae" value="<?php echo $vm['vm_uptae']?>" id="vm_uptae" required class="frm_input required" size="20" > </td> </tr> <tr> <th scope="row"><label for="vm_jongmok">종목</label></th> <td> <input type="text" name="vm_jongmok" value="<?php echo $vm['vm_jongmok']?>" id="vm_jongmok" required class="frm_input required" size="20" > </td> </tr> </tbody> </table> </div> </section>
<?php echo $frm_submit; ?>
<section id="anc_sitfrm_setting"> <h2 class="h2_frm">벤더 설정</h2> <?php echo $pg_anchor; ?> <div class="local_desc02 local_desc"> <p>벤더의 설정값을 세팅할수 있습니다.</p> </div>
<div class="tbl_frm01 tbl_wrap"> <table> <caption>벤더 설정 입력</caption> <colgroup> <col class="grid_4"> <col> </colgroup> <tbody> <tr> <th scope="row"><label for="vm_goods_auth1">상품 처리 권한</label></th> <td> <input type="checkbox" name="vm_goods_auth1" value="R" id="vm_goods_auth1" <?php echo $goods_auth1;?>>등록 <input type="checkbox" name="vm_goods_auth2" value="M" id="vm_goods_auth2" <?php echo $goods_auth2;?>>수정 <input type="checkbox" name="vm_goods_auth3" value="D" id="vm_goods_auth3" <?php echo $goods_auth3;?>>삭제 </td> </tr> <tr> <th scope="row"><label for="vm_goods_count">벤더 상품수 제한</label></th> <td> <input type="text" name="vm_goods_count" value="<?php echo $vm['vm_goods_count']?>" id="vm_goods_count" required class="frm_input required" size="5" > 개 </td> </tr> <tr> <th scope="row"><label for="vm_sell_commission">판매 수수료</label></th> <td> <input type="text" name="vm_sell_commission" value="<?php echo $vm['vm_sell_commission']?>" id="vm_sell_commission" required class="frm_input required" size="3" > % </td> </tr> <tr> <th scope="row"><label for="vm_bank">정산계좌 정보</label></th> <td> <?php echo help("은행명, 계좌번호, 예금주를 모두 입력하세요."); ?> <input type="text" name="vm_bank" value="<?php echo $vm['vm_bank']?>" id="vm_bank" required class="frm_input required" size="60" > </td> </tr> <tr> <th scope="row"><label for="vm_able">벤더 승인 여부</label></th> <td> <input type="radio" name="vm_able" value="1" id="vm_able" <?php if($vm['vm_able']=='1'){?>checked<?php }?>>승인 <input type="radio" name="vm_able" value="0" id="vm_able" <?php if($vm['vm_able']=='0'){?>checked<?php }?> >비승인 </td> </tr> <?php if($w=='u'){?> <tr> <th scope="row"><label for="vm_able">사업자 등록증 사본</label></th> <td> <?php if($vm['vm_file']!=''){?> <a href='<?php echo G5_DATA_URL."/member/{$vm['vm_user_id']}/{$vm['vm_file']}";?>' target='_blank'>[다운로드]</a> <?php } ?> </td> </tr> <?php }?> </tbody> </table> </div> </section>
<?php echo $frm_submit; ?> </form>
<script> var f = document.fitemform;
<?php if ($w == 'u') { ?>
<?php } ?>
function fitemformcheck(f) {
/*if($("#vm_user_id").val()=='' || $("#vm_user_id_ck").val()!='1'){ alert('벤더 ID를 입력하시고 회원확인을 하시기 바랍니다.'); return false; }*/
return true; }
$(function(){ $("#mem_vender").click(function(){ if($("#vm_user_id_ck").val()=='1'){ $("#vm_user_id_ck").val(''); $("#mem_vender").val('회원확인'); $("#vm_user_id").attr("readonly",false); } else { if($("#vm_user_id").val()==''){ alert('벤더ID를 입력하세요.'); return; } url = "get_vm_user_id_ck.php"; $.get(url,{"vm_user_id":$("#vm_user_id").val(),"vm_id":"<?php echo $vm_id?>"}, function(rtn){ if(rtn=='UM'){ alert('사용하셔도 되는 벤더 아이디 입니다.'); $("#vm_user_id_ck").val('1'); $("#mem_vender").val('확인취소'); $("#vm_user_id").attr("readonly",true); } else if(rtn=='AL'){ alert('이미 등록된 ID 입니다.'); } else if(rtn=='NM'){ alert('존재하지 않는 회원 아이디 입니다.'); } }); } }); });
</script>
<?php include_once (G5_ADMIN_PATH.'/admin.tail.php'); ?>
|