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
|
<?php $dir = "."; include_once($dir."/_common.php"); include('./include/header.php');
if($eid==''){ alert('e천년경영 로그인 후에 이용가능합니다.',"index.php"); exit; }
$taxno_exists = "N";
$amts = 0; $vats = 0; $tot_amts = 0; $qtys = 0;
$sql = "select * from offices where code = 1 "; $res = mysql_query($sql,$connect_e1000y); while($minfo = mysql_fetch_array($res)){ $code = $minfo['code']; $comp_sn = $minfo['comp_sn']; $telno1 = $minfo['telno1']; $hpno = $minfo['hpno']; $faxno = $minfo['faxno']; $sub_comp_sn = $minfo['sub_comp_sn']; $biz_status = $minfo['biz_status']; $biz_item = $minfo['biz_item']; $comp_name = $minfo['comp_name']; $ceo_name = $minfo['ceo_name']; $email = $minfo['email']; $zipcode = $minfo['zipcode']; $addr_m = $minfo['addr_m']; $addr_d = $minfo['addr_d'];
$tax_charge_name = $minfo['tax_charge_name']; $tax_charge_hpno = $minfo['tax_charge_hpno']; $tax_charge_email = $minfo['tax_charge_email'];
$buy_array[] = $minfo; }
$sql = "select * from bankbook where 1=1 order by nidx limit 1"; $res = mysql_query($sql,$connect_e1000y); $bankinfo = mysql_fetch_array($res);
$sql = "select * from bank where hidden = 0 order by code"; $res = mysql_query($sql,$connect_e1000y); while($info = mysql_fetch_array($res)){ $bank[] = $info; }
?> <style> .cust_modal2 { border:0px solid #e1e1e1; width:700px; padding:10px; font-size:13px } </style>
<div id="contents" style="height:2px;border-bottom:1px solid #eee;background:#2f6ba9"> <span class="screen_out">header 하단 선</span> </div>
<div id="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>
<div class="item_tab"> <div class="item_tab_navi"> <a value='0' class="on"><span>사업장 정보</span></a> <a value='1'><span>메일설정</span></a> </div> </div><!--//item_tab--> <form name='office_form' id="office_form" method='post' action="ajax.office_reg_process.php" enctype="multipart/form-data"> <input type='hidden' name='sel_del' value=''> <input type='hidden' name='all_del' value=''> <input type='hidden' name='sel_del_list' value=''>
<div class="sub-write-area" style='display:block;width:1200px;'> <h4 style='font-size:14px; font-weight:bold;margin-top:10px;'>기본 정보</h4> <div class="order-sheet-area" style='width:1200px;'> <table class="order-sheet"> <caption class="screen_out">사업장 정보</caption> <colgroup> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> </colgroup>
<tbody> <tr> <th>코드</th> <td class='linetxt'><input type='text' name='code' value='<?php echo $code;?>' class='input_readonly width_80'></td> <th >상호명</th> <td colspan=3 class='linetxt'><input type='text' name='comp_name' value='<?php echo $comp_name;?>' class='width_500 customer-sel-btn2' ></td> </tr> <tr> <th>대표자명</th> <td class='linetxt'><input type='text' name='ceo_name' value='<?php echo $ceo_name;?>' class='width_200'></td> <th>사업자번호</th> <td class='linetxt'><input type='text' name='comp_sn' value='<?php echo $comp_sn;?>' class='width_200 comp_sn_class_office' maxlength=12></td> <th>종 사업자번호</th> <td class='linetxt'><input type='text' name='sub_comp_sn' value='<?php echo $sub_comp_sn;?>' class='width_200' maxlength=4></td> </tr> <tr> <th>업태</th> <td class='linetxt'><input type='text' name='biz_status' value='<?php echo $biz_status;?>' class='width_120'></td> <th>종목</th> <td class='linetxt'><input type='text' name='biz_item' value='<?php echo $biz_item;?>' class='width_120'></td> <th>우편번호</th> <td class='linetxt'><input type='text' name='zipcode' value='<?php echo $zipcode;?>' class='width_120'></td> <tr> <th>주소</th> <td colspan=5 class='linetxt'> <input type='text' name='addr_m' value='<?php echo $addr_m;?>' class='width_400'> <input type='text' name='addr_d' value='<?php echo $addr_d;?>' class='width_500'> </td> </tr> </table> </div>
<h4 style='font-size:14px; font-weight:bold;margin-top:10px;'>연락처 정보</h4> <div class="order-sheet-area" style='width:1200px;'> <table class="order-sheet"> <caption class="screen_out">연락처 정보</caption> <colgroup> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> </colgroup>
<tbody> <tr> <th>회사전화</th> <td class='linetxt'><input type='text' name='telno1' value='<?php echo $telno1;?>' class='width_120 telno_class'></td> <th >핸드폰번호</th> <td class='linetxt'><input type='text' name='hpno' value='<?php echo $hpno;?>' class='width_120 telno_class' ></td> <th >팩스번호</th> <td class='linetxt'><input type='text' name='faxno' value='<?php echo $faxno;?>' class='width_120 telno_class' ></td> </tr> <tr> <th>이메일</th> <td colspan=5 class='linetxt'> <input type='text' name='email' value='<?php echo $email;?>' class='width_200'> </td> </tr> </table> </div>
<h4 style='font-size:14px; font-weight:bold;margin-top:10px;'>은행 정보</h4> <div class="order-sheet-area" style='width:1200px;'> <table class="order-sheet"> <caption class="screen_out">은행 정보</caption> <colgroup> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> </colgroup>
<tbody> <tr> <th>은행명</th> <td class='linetxt'> <select name='bankcode'> <?php foreach($bank as $key=>$val){ if($bankinfo['bankcode']==$val['code']){ $stk = "selected"; } else { $stk = ""; } echo "<option value='{$val['code']}' {$stk}>{$val['name']}</option>"; } ?> </select> </td> <th >계좌명</th> <td class='linetxt'><input type='text' name='bankname' value='<?php echo $bankinfo['name'];?>' class='width_120' ></td> <th >계좌번호</th> <td class='linetxt'><input type='text' name='acntnumber' value='<?php echo $bankinfo['acntnumber'];?>' class='width_120 telno_class' ></td> </tr> </table> </div>
<h4 style='font-size:14px; font-weight:bold;margin-top:10px;'>세금계산서 정보</h4> <div class="order-sheet-area" style='width:1200px;'> <table class="order-sheet"> <caption class="screen_out">세금계산서 정보</caption> <colgroup> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> <col style="width:130px;"><col style="width:260px;"> </colgroup>
<tbody> <tr> <th>담당자명</th> <td class='linetxt'><input type='text' name='tax_charge_name' value='<?php echo $tax_charge_name;?>' class='width_120'></td> <th >담당자 핸드폰</th> <td class='linetxt'><input type='text' name='tax_charge_hpno' value='<?php echo $tax_charge_hpno;?>' class='width_120' ></td> <th >이메일</th> <td class='linetxt'><input type='text' name='tax_charge_email' value='<?php echo $tax_charge_email;?>' class='width_20' ></td> </tr> <tr> <th>도장이미지</th> <td class='linetxt' colspan=5><input type='file' name='seal' value=''> gif이미지만 올릴수 있습니다. <img src='http://mjsoft.co/seal/<?php echo $comp_sn;?>.gif' onerror="this.style.display='none';"> </td> </tr> </table> </div> </div> </form> <div id="sub-contents-area" style='padding-left:560px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="lignt-blue-btn" id='btn_office_save'>저장</a> </div> </div> </div> </div> <script> $(function(){
$(".item_tab_navi a").click(function(){ //네비게이션 탭 처리 v = $(this).attr("value"); if(v==0){ document.location.href="./office.php"; } else if(v==1){ document.location.href="./email.php"; } });
$("#btn_office_save").click(function(){
$("#office_form").action = "ajax.office_reg_process.php"; $("#office_form").submit();
return; // 파일업로드때문에 ajax불가 var form_data = $("form[name='office_form']").serialize();
$.ajax({type:"post", url:"ajax.office_reg_process.php", data:form_data, mimeType:"multipart/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(); if(v_mode_ok!='Y'){ alert(v_msg); } else { document.location.reload(); } }, error:function(rtn,status,error){ alert(error); } }); }); }); </script> <?php include('./include/footer.php'); ?>
|