ADR000.inc
25.1 KB
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
<script type="text/javascript" src="xmlhttp.js"></script>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
//*********************************************
// アドレス帳共通画面遷移処理
//*********************************************
//ダブルサブミット
var SFlg = false;
function DoubleSubmit(){
if (SFlg){
alert("応答中です");
return false;
}
SFlg = true;
return true;
}
//社内アドレス帳遷移
var DispLocate ;
var DispMenue ;
var DispGroup ;
var DispCode ;
var Disp_TanID;
function syanai_disp(){
DispMenue=1 ;
disp_inp_off();
syanai_info("head") ;
syanai_info("data") ;
}
function syanai_info($fLocate){
DispLocate =$fLocate ;
if(document.getElementById("adr"+$fLocate).innerHTML !=""){
document.getElementById("adr"+$fLocate).innerHTML = "";
}
if($fLocate=="head"){
loadHTMLFile_SUB_head("ADR001-1.php",$fLocate);
}else{
loadHTMLFile_SUB_data("ADR001-2.php",$fLocate);
}
}
7
//取引先アドレス帳遷移
function torihiki_disp(){
DispMenue=2 ;
disp_inp_off();
torihiki_info("head") ;
torihiki_info("data") ;
}
function disp_head_off(){
if(document.getElementById("adrhead").innerHTML !=""){
document.getElementById("adrhead").innerHTML = "";
}
}
function disp_inp_off(){
if(document.getElementById("kojin_inp").innerHTML !=""){
document.getElementById("kojin_inp").innerHTML = "";
}
}
function disp_data_off(){
if(document.getElementById("adrdata").innerHTML !=""){
document.getElementById("adrdata").innerHTML = "";
}
}
function disp_shousai_off(seq){
if(document.getElementById("adr"+seq).innerHTML !=""){
document.getElementById("adr"+seq).innerHTML = "";
}
}
function torihiki_info($fLocate){
DispLocate =$fLocate ;
if(document.getElementById("adr"+$fLocate).innerHTML !=""){
document.getElementById("adr"+$fLocate).innerHTML = "";
}
if($fLocate=="head"){
loadHTMLFile_SUB_head("ADR002-1.php",$fLocate);
}else{
loadHTMLFile_SUB_data("ADR002-2.php",$fLocate);
}
}
//個人アドレス帳遷移
function kojin_info(add_search){
DispMenue=3 ;
disp_inp_off();
disp_head_off() ;
disp_data_off() ;
loadHTMLFile_SUB_data("ADR005.php?add_search="+add_search,DispLocate);
}
function loadHTMLFile_SUB_head(fName,fLocate){
httpObj = createXMLHttpRequest(displayData_head);
if (httpObj)
{
httpObj.open(Get_BName(),fName,true);
httpObj.send(null);
}
}
function loadHTMLFile_SUB_data(fName,fLocate){
httpObj2 = createXMLHttpRequest(displayData_data);
if (httpObj2)
{
httpObj2.open(Get_BName(),fName,true);
httpObj2.send(null);
}
}
function loadHTMLFile_SUB_shousai(fName,fLocate){
httpObj2 = createXMLHttpRequest(displayData_shousai);
if (httpObj2)
{
httpObj2.open(Get_BName(),fName,true);
httpObj2.send(null);
}
}
function displayData_head()
{
if ((httpObj.readyState == 4) && (httpObj.status == 200))
{
document.getElementById("adrhead").innerHTML = httpObj.responseText;
}else{
document.getElementById("adrhead").innerHTML = "<b>Loading...</b>";
}
}
function displayData_data()
{
if ((httpObj2.readyState == 4) && (httpObj2.status == 200))
{
document.getElementById("adrdata").innerHTML = httpObj2.responseText;
}else{
document.getElementById("adrdata").innerHTML = "<b>Loading...</b>";
}
}
function displayData_shousai()
{
if ((httpObj2.readyState == 4) && (httpObj2.status == 200))
{
document.getElementById("adr"+DispCode).innerHTML = httpObj2.responseText;
}else{
document.getElementById("adr"+DispCode).innerHTML = "<b>Loading...</b>";
}
}
//*********************************************
// 社内アドレス帳処理
//*********************************************
//50音検索
function search(add_search){
DispLocate ="data" ;
DispGroup=document.e_gru.bumon.value ;
if(document.getElementById("adrdata").innerHTML !=""){
document.getElementById("adrdata").innerHTML = "";
}
if(DispMenue==1){
loadHTMLFile_SUB_data("ADR001-2.php?add_search="+add_search+"&bumon="+DispGroup,DispLocate);
}
if(DispMenue==2){
loadHTMLFile_SUB_data("ADR002-2.php?add_search="+add_search+"&tori_group="+DispGroup,DispLocate);
}
}
//グループ表示処理
function grp_chk(){
DispLocate ="data" ;
DispGroup=document.e_gru.bumon.value ;
if(document.getElementById("adrdata").innerHTML !=""){
document.getElementById("adrdata").innerHTML = "";
}
if(DispMenue==1){
loadHTMLFile_SUB_data("ADR001-2.php?bumon="+DispGroup,DispLocate);
}
if(DispMenue==2){
loadHTMLFile_SUB_data("ADR002-2.php?tori_group="+DispGroup,DispLocate);
}
}
//簡易メール処理
function mailchk(pstrmail){
if (DoubleSubmit()) {
document.e_gru.mailadr.value=pstrmail;
document.e_gru.action = "FRM001.php";
document.e_gru.method="POST"
document.e_gru.submit();
}
}
//アドレス詳細画面
function syanai(syain_cd){
DispCode=syain_cd ;
if(document.getElementById("adr"+syain_cd).innerHTML !=""){
document.getElementById("adr"+syain_cd).innerHTML = "";
}else{
loadHTMLFile_SUB_shousai("ADR003.php?syain_cd="+syain_cd,DispLocate);
}
}
//*********************************************
// 取引先アドレス帳処理
//*********************************************
//*** 取引先詳細 ***
function torihiki(seq){
DispCode=seq ;
if(document.getElementById("adr"+seq).innerHTML !=""){
document.getElementById("adr"+seq).innerHTML = "";
}else{
LoadToriSyousai("ADR004.php?seq="+seq,DispLocate);
}
function LoadToriSyousai(fName,fLocate){
httpObj4 = createXMLHttpRequest(DispTroiShousai);
if (httpObj4){
httpObj4.open(Get_BName(),fName,true);
httpObj4.send(null);
}
}
function DispTroiShousai(){
if ((httpObj4.readyState == 4) && (httpObj4.status == 200)){
document.getElementById("adr"+DispCode).innerHTML = httpObj4.responseText;
TantoList(DispCode);
}else{
document.getElementById("adr"+DispCode).innerHTML = "<b>Loading...</b>";
}
}
}
//*** 取引先担当者一覧 ***
function TantoList(ToriSeq){
DispCode=ToriSeq;
fName="ADR013.php?ToriSeq="+ToriSeq;
httpObj13 = createXMLHttpRequest(DispTantoList);
if (httpObj13){
httpObj13.open(Get_BName(),fName,true);
httpObj13.send(null);
}
function DispTantoList(){
if ((httpObj13.readyState == 4) && (httpObj13.status == 200)){
document.getElementById("TantoItiran"+DispCode).innerHTML = httpObj13.responseText;
}else{
document.getElementById("TantoItiran"+DispCode).innerHTML = "<b>Loading...</b>";
}
}
}
//*** 取引先登録 ***
function torihiki_toroku(intSeq){
fName="ADR050.php?seq="+intSeq;
httpObj50 = createXMLHttpRequest(DispTorihiki_inp);
if (httpObj50)
{
httpObj50.open(Get_BName(),fName,true);
httpObj50.send(null);
}
function DispTorihiki_inp(){
if ((httpObj50.readyState == 4) && (httpObj50.status == 200))
{
document.getElementById("kojin_inp").innerHTML = httpObj50.responseText;
}else{
document.getElementById("kojin_inp").innerHTML = "<b>Loading...</b>";
}
}
}
//*** 登録 ***
function torihiki_chk(intSeq){
if (hissu_chk("会社名",document.e_gru.kaisya_kj.value)==false) {
document.e_gru.kaisya_kj.focus();
return false;
}
if (script_chk("会社名",document.e_gru.kaisya_kj.value)==false) {
document.e_gru.kaisya_kj.focus();
return false;
}
if (hissu_chk("会社名(フリガナ)",document.e_gru.kaisya_kn.value)==false) {
document.e_gru.kaisya_kn.focus();
return false;
}
if (kana_chk("会社名(フリガナ)",document.e_gru.kaisya_kn.value)==false) {
document.e_gru.kaisya_kn.focus();
return false;
}
if (script_chk("代表者名",document.e_gru.dai_sei_kj.value)==false) {
document.e_gru.dai_sei_kj.focus();
return false;
}
if (script_chk("代表者名",document.e_gru.dai_mei_kj.value)==false) {
document.e_gru.dai_mei_kj.focus();
return false;
}
if (kana_chk("代表者名(フリガナ)",document.e_gru.dai_sei_kn.value)==false) {
document.e_gru.dai_sei_kn.focus();
return false;
}
if (kana_chk("代表者名(フリガナ)",document.e_gru.dai_mei_kn.value)==false) {
document.e_gru.dai_mei_kn.focus();
return false;
}
if (suchi_chk("資本金",document.e_gru.sihonkin.value)==false) {
document.e_gru.sihonkin.focus();
return false;
}
if (mailadr_chk(document.e_gru.email1.value,document.e_gru.email2.value)==false) {
document.e_gru.email1.focus();
return false;
}
if (script_chk("メモ",document.e_gru.kaisya_memo.value)==false) {
document.e_gru.kaisya_memo.focus();
return false;
}
if (yuubin_chk(document.e_gru.yubin_no1.value,document.e_gru.yubin_no2.value)==false) {
document.e_gru.yubin_no1.focus();
return false;
}
if (script_chk("住所",document.e_gru.address2.value)==false) {
document.e_gru.address2.focus();
return false;
}
if (script_chk("住所",document.e_gru.address3.value)==false) {
document.e_gru.address3.focus();
return false;
}
if (script_chk("住所",document.e_gru.address4.value)==false) {
document.e_gru.address4.focus();
return false;
}
if (tel_chk("電話番号",document.e_gru.telno1.value,document.e_gru.telno2.value,document.e_gru.telno3.value)==false) {
document.e_gru.telno1.focus();
return false;
}
if (tel_chk("FAX番号",document.e_gru.faxno1.value,document.e_gru.faxno2.value,document.e_gru.faxno3.value)==false) {
document.e_gru.faxno1.focus();
return false;
}
//20081006 Get→Post修正
prm="ToriSeq="+intSeq;
//prm=prm+"&kaisya_kj="+subRepURI(document.e_gru.kaisya_kj.value)+" ";
prm=prm+"&kaisya_kj="+encodeURIComponent(document.e_gru.kaisya_kj.value);
//prm=prm+"&kaisya_kn="+subRepURI(document.e_gru.kaisya_kn.value)+" ";
prm=prm+"&kaisya_kn="+encodeURIComponent(document.e_gru.kaisya_kn.value);
//prm=prm+"&dai_sei_kj="+subRepURI(document.e_gru.dai_sei_kj.value)+" ";
prm=prm+"&dai_sei_kj="+encodeURIComponent(document.e_gru.dai_sei_kj.value);
//prm=prm+"&dai_mei_kj="+subRepURI(document.e_gru.dai_mei_kj.value)+" ";
prm=prm+"&dai_mei_kj="+encodeURIComponent(document.e_gru.dai_mei_kj.value);
//prm=prm+"&dai_sei_kn="+subRepURI(document.e_gru.dai_sei_kn.value)+" ";
prm=prm+"&dai_sei_kn="+encodeURIComponent(document.e_gru.dai_sei_kn.value);
//prm=prm+"&dai_mei_kn="+subRepURI(document.e_gru.dai_mei_kn.value)+" ";
prm=prm+"&dai_mei_kn="+encodeURIComponent(document.e_gru.dai_mei_kn.value);
prm=prm+"&gruop_tori="+document.e_gru.gruop_tori.value;
prm=prm+"&sihonkin="+document.e_gru.sihonkin.value;
prm=prm+"&hp_adr="+document.e_gru.hp_adr.value;
prm=prm+"&email1="+document.e_gru.email1.value;
prm=prm+"&email2="+document.e_gru.email2.value;
//prm=prm+"&kaisya_memo="+subRepURI(document.e_gru.kaisya_memo.value)+" ";
prm=prm+"&kaisya_memo="+encodeURIComponent(document.e_gru.kaisya_memo.value);
prm=prm+"&yubin_no1="+document.e_gru.yubin_no1.value;
prm=prm+"&yubin_no2="+document.e_gru.yubin_no2.value;
//prm=prm+"&address1="+subRepURI(document.e_gru.address1.value);
prm=prm+"&address1="+encodeURIComponent(document.e_gru.address1.value);
//prm=prm+"&address2="+subRepURI(document.e_gru.address2.value)+" ";
prm=prm+"&address2="+encodeURIComponent(document.e_gru.address2.value);
//prm=prm+"&address3="+subRepURI(document.e_gru.address3.value)+" ";
prm=prm+"&address3="+encodeURIComponent(document.e_gru.address3.value);
//prm=prm+"&address4="+subRepURI(document.e_gru.address4.value)+" ";
prm=prm+"&address4="+encodeURIComponent(document.e_gru.address4.value);
prm=prm+"&telno1="+document.e_gru.telno1.value;
prm=prm+"&telno2="+document.e_gru.telno2.value;
prm=prm+"&telno3="+document.e_gru.telno3.value;
prm=prm+"&faxno1="+document.e_gru.faxno1.value;
prm=prm+"&faxno2="+document.e_gru.faxno2.value;
prm=prm+"&faxno3="+document.e_gru.faxno3.value;
//InsertTorihiki("ADR091.php?"+prm);
InsertTorihiki("ADR091.php", prm);
//function InsertTorihiki(fName){
function InsertTorihiki(fName,prm){
httpObj91 = createXMLHttpRequest(DispInsTorihiki);
if (httpObj91){
//httpObj91.open(Get_BName(),fName,true);
//httpObj91.send(null);
httpObj91.open("POST",fName,true);
httpObj91.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpObj91.send(prm);
}
}
function DispInsTorihiki(){
if ((httpObj91.readyState == 4) && (httpObj91.status == 200)){
// alert(httpObj91.responseText);
document.getElementById("kojin_inp").innerHTML = "";
grp_chk();
}
}
}
//*** 削除 ***
function torihiki_del(intSeq){
if (confirm("取引先を削除します\nよろしいですか?")){
prm="ToriSeq="+intSeq;
DeleteTorihiki("ADR092.php?"+prm);
}
function DeleteTorihiki(fName){
httpObj92 = createXMLHttpRequest(DispDelTorihiki);
if (httpObj92){
httpObj92.open(Get_BName(),fName,true);
httpObj92.send(null);
}
}
function DispDelTorihiki(){
if ((httpObj92.readyState == 4) && (httpObj92.status == 200)){
document.getElementById("kojin_inp").innerHTML = "";
grp_chk();
}
}
}
//*** 取引先担当者詳細表示 ***
function TantoSyousai(ToriSeq,TantoSeq){
DispCode=ToriSeq;
Disp_TanID=TantoSeq;
if(document.getElementById("TantoSyousai"+DispCode+"-"+Disp_TanID).innerHTML !=""){
document.getElementById("TantoSyousai"+DispCode+"-"+Disp_TanID).innerHTML ="";
}else{
fName="ADR011.php?ToriSeq="+ToriSeq;
fName=fName+"&TantoSeq="+TantoSeq;
httpObj11 = createXMLHttpRequest(DispTanto);
if (httpObj11){
httpObj11.open(Get_BName(),fName,true);
httpObj11.send(null);
}
}
function DispTanto(){
if ((httpObj11.readyState == 4) && (httpObj11.status == 200)){
document.getElementById("TantoSyousai"+DispCode+"-"+Disp_TanID).innerHTML = httpObj11.responseText;
}else{
document.getElementById("TantoSyousai"+DispCode+"-"+Disp_TanID).innerHTML = "<b>Loading...</b>";
}
}
}
//*** 取引先担当者登録画面 ***
function TantoIns(ToriSeq,TantoSeq){
DispCode=ToriSeq;
Disp_TanID=TantoSeq;
if (TantoSeq==0){
if(document.getElementById("TantoWrite"+DispCode).innerHTML !=""){
document.getElementById("TantoWrite"+DispCode).innerHTML ="";
}else{
fName="ADR012.php?ToriSeq="+ToriSeq;
fName=fName+"&TantoSeq="+TantoSeq;
httpObj12 = createXMLHttpRequest(DispTantoIns);
if (httpObj12){
httpObj12.open(Get_BName(),fName,true);
httpObj12.send(null);
}
}
}else{
fName="ADR012.php?ToriSeq="+ToriSeq;
fName=fName+"&TantoSeq="+TantoSeq;
httpObj12 = createXMLHttpRequest(DispTantoIns);
if (httpObj12){
httpObj12.open(Get_BName(),fName,true);
httpObj12.send(null);
}
}
function DispTantoIns(){
if ((httpObj12.readyState == 4) && (httpObj12.status == 200)){
document.getElementById("TantoWrite"+DispCode).innerHTML = httpObj12.responseText;
}else{
document.getElementById("TantoWrite"+DispCode).innerHTML = "<b>Loading...</b>";
}
}
}
//*** 取引先担当者登録登録 ***
function TantoTouroku(ToriSeq,TantoSeq){
DispCode=ToriSeq;
Disp_TanID=TantoSeq;
if (hissu_chk("担当者名(漢字)",document.e_gru.tan_sei_kj.value)==false) {
document.e_gru.tan_sei_kj.focus();
return false;
}
if (zen_chk("担当者名(漢字)",document.e_gru.tan_sei_kj.value)==false) {
document.e_gru.tan_sei_kj.focus();
return false;
}
if (hissu_chk("担当者名(漢字)",document.e_gru.tan_mei_kj.value)==false) {
document.e_gru.tan_mei_kj.focus();
return false;
}
if (zen_chk("担当者名(漢字)",document.e_gru.tan_mei_kj.value)==false) {
document.e_gru.tan_mei_kj.focus();
return false;
}
if (hissu_chk("担当者名(フリガナ)",document.e_gru.tan_sei_kn.value)==false) {
document.e_gru.tan_sei_kn.focus();
return false;
}
if (kana_chk("担当者名(フリガナ)",document.e_gru.tan_sei_kn.value)==false) {
document.e_gru.tan_sei_kn.focus();
return false;
}
if (hissu_chk("担当者名(フリガナ)",document.e_gru.tan_mei_kn.value)==false) {
document.e_gru.tan_mei_kn.focus();
return false;
}
if (kana_chk("担当者名(フリガナ)",document.e_gru.tan_mei_kn.value)==false) {
document.e_gru.tan_mei_kn.focus();
return false;
}
if (script_chk("所属部門",document.e_gru.syozoku.value)==false) {
document.e_gru.syozoku.focus();
return false;
}
if (script_chk("役職",document.e_gru.yakusyoku.value)==false) {
document.e_gru.yakusyoku.focus();
return false;
}
strdata1=document.e_gru.email.value;
if (strdata1 !=""){
if (!strdata1.match(/.*@.*\..*/i)){
alert("不正なメールアドレスがあります\n["+strdata1+"]");
document.e_gru.email.focus();
return false;
}
}
if (script_chk("メモ",document.e_gru.memo.value)==false) {
document.e_gru.memo.focus();
return false;
}
// if (tel_chk("電話番号",document.e_gru.telno1.value,document.e_gru.telno2.value,document.e_gru.telno3.value)==false) {
// document.e_gru.telno1.focus();
// return false;
// }
// if (tel_chk("携帯番号",document.e_gru.keitaiNo1.value,document.e_gru.keitaiNo2.value,document.e_gru.keitaiNo3.value)==false) {
// document.e_gru.keitaiNo1.focus();
// return false;
// }
//
//200810074 GET→POST変更
prm="ToriSeq="+ToriSeq;
prm=prm+"&TantoSeq="+TantoSeq;
//prm=prm+"&tan_sei_kj="+subRepURI(document.e_gru.tan_sei_kj.value)+" ";
prm=prm+"&tan_sei_kj="+encodeURIComponent(document.e_gru.tan_sei_kj.value);
//prm=prm+"&tan_mei_kj="+subRepURI(document.e_gru.tan_mei_kj.value)+" ";
prm=prm+"&tan_mei_kj="+encodeURIComponent(document.e_gru.tan_mei_kj.value);
//prm=prm+"&tan_sei_kn="+subRepURI(document.e_gru.tan_sei_kn.value);
prm=prm+"&tan_sei_kn="+encodeURIComponent(document.e_gru.tan_sei_kn.value);
//prm=prm+"&tan_mei_kn="+subRepURI(document.e_gru.tan_mei_kn.value);
prm=prm+"&tan_mei_kn="+encodeURIComponent(document.e_gru.tan_mei_kn.value);
if (document.e_gru.sex[0].checked==true){
prm=prm+"&sex=true";
}else{
prm=prm+"&sex=false";
}
//prm=prm+"&syozoku="+subRepURI(document.e_gru.syozoku.value)+" ";
prm=prm+"&syozoku="+encodeURIComponent(document.e_gru.syozoku.value);
//prm=prm+"&yakusyoku="+subRepURI(document.e_gru.yakusyoku.value)+" ";
prm=prm+"&yakusyoku="+encodeURIComponent(document.e_gru.yakusyoku.value);
prm=prm+"&email="+encodeURIComponent(document.e_gru.email.value);
//prm=prm+"&memo="+subRepURI(document.e_gru.memo.value)+" ";
prm=prm+"&memo="+encodeURIComponent(document.e_gru.memo.value);
//prm=prm+"&telno="+subRepURI(document.e_gru.telno.value);
prm=prm+"&telno="+encodeURIComponent(document.e_gru.telno.value);
//prm=prm+"&keitaiNo="+subRepURI(document.e_gru.keitaiNo.value);
prm=prm+"&keitaiNo="+encodeURIComponent(document.e_gru.keitaiNo.value);
//InsertTorihiki("ADR093.php?"+prm);
InsertTorihiki("ADR093.php", prm);
//function InsertTorihiki(fName){
function InsertTorihiki(fName,prm){
httpObj93 = createXMLHttpRequest(DispInsTanto);
if (httpObj93){
//httpObj93.open(Get_BName(),fName,true);
//httpObj93.send(null);
httpObj93.open("POST",fName,true);
httpObj93.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpObj93.send(prm);
}
}
function DispInsTanto(){
if ((httpObj93.readyState == 4) && (httpObj93.status == 200)){
//alert(httpObj93.responseText);
document.getElementById("TantoWrite"+DispCode).innerHTML ="";
TantoList(DispCode);
}
}
}
//*** 取引先担当者削除 ***
function TantoDel(ToriSeq,TantoSeq){
DispCode=ToriSeq;
Disp_TanID=TantoSeq;
if (confirm("取引先担当者を削除します\nよろしいですか?")){
prm="ToriSeq="+ToriSeq;
prm=prm+"&TantoSeq="+TantoSeq;
DeleteTanto("ADR094.php?"+prm);
}
function DeleteTanto(fName){
httpObj94 = createXMLHttpRequest(DispDelTanto);
if (httpObj94){
httpObj94.open(Get_BName(),fName,true);
httpObj94.send(null);
}
}
function DispDelTanto(){
if ((httpObj94.readyState == 4) && (httpObj94.status == 200)){
TantoList(DispCode);
}
}
}
//簡易メール処理
function mailchk(pstrmail){
if (DoubleSubmit()) {
document.e_gru.mailadr.value=pstrmail;
document.e_gru.action = "FRM001.php";
document.e_gru.method="POST"
document.e_gru.submit();
}
}
//*********************************************
// 個人アドレス帳処理
//*********************************************
//チェックボックス一括チェック処理
function All_chk(){
var intFlg = 0; //一括チェックFLG
if (document.e_gru.del_seq.length){
//未チェックがあるか
for(i = 0 ; i <= document.e_gru.del_seq.length-1; i++ ){
if (document.e_gru.del_seq[i].checked==false){
intFlg=1;
}
}
if (intFlg==1){
//未チェックがある場合
for(i = 0 ; i <= document.e_gru.del_seq.length-1; i++ ){
document.e_gru.del_seq[i].checked=true;
}
}else{
//未チェックがない場合
for(i = 0 ; i <= document.e_gru.del_seq.length-1; i++ ){
document.e_gru.del_seq[i].checked=false;
}
}
}else{
//チェックボックス1個の場合
if (document.e_gru.del_seq.checked==false){
document.e_gru.del_seq.checked=true;
}else{
document.e_gru.del_seq.checked=false;
}
}
}
//個人アドレス削除処理
function del_chk(){
if (confirm("個人アドレスを削除します\nよろしいですか?")){
if (DoubleSubmit()) {
//チェックボックスリスト作成
strChkDat="";
if (document.e_gru.del_seq.length){
for(i = 0 ; i <= document.e_gru.del_seq.length-1; i++ ){
if (document.e_gru.del_seq[i].checked==true){
strChkDat=strChkDat+document.e_gru.del_seq[i].value+"#";
}
}
}else{
if (document.e_gru.del_seq.checked==true){
strChkDat=document.e_gru.del_seq.value+"#";
}
}
prm="strChkDat="+strChkDat;
prm=prm+"&kind_flg=3";
DeleteKojin("ADR095.php?"+prm);
}
}
function DeleteKojin(fName){
httpObj95 = createXMLHttpRequest(DispDelKojin);
if (httpObj95){
httpObj95.open(Get_BName(),fName,true);
httpObj95.send(null);
}
}
function DispDelKojin(){
if ((httpObj95.readyState == 4) && (httpObj95.status == 200)){
kojin_info(document.e_gru.add_search.value);
}
}
}
//個人アドレス登録処理
function KojinToroku(PhpSeq){
if (hissu_chk("氏名(表示名)",document.e_gru.view_name.value)==false) {
document.e_gru.view_name.focus();
return false;
}
if (script_chk("氏名(表示名)",document.e_gru.view_name.value)==false) {
document.e_gru.view_name.focus();
return false;
}
if (hissu_chk("氏名(フリガナ)",document.e_gru.name_furi.value)==false) {
document.e_gru.name_furi.focus();
return false;
}
if (script_chk("氏名(フリガナ)",document.e_gru.name_furi.value)==false) {
document.e_gru.name_furi.focus();
return false;
}
if (kana_chk("氏名(フリガナ)",document.e_gru.name_furi.value)==false) {
document.e_gru.name_furi.focus();
return false;
}
if (hissu_chk("メールアドレス",document.e_gru.e_mail.value)==false) {
document.e_gru.e_mail.focus();
return false;
}
if (script_chk("メールアドレス",document.e_gru.e_mail.value)==false) {
document.e_gru.e_mail.focus();
return false;
}
if (checkEmail(document.e_gru.e_mail.value)==false) {
document.e_gru.e_mail.focus();
return false;
}
//20081006 GET→POST 修正
/*
fname = "ADR095.php?kind_flg=0";
fname += "&name_furi=" + subRepURI(document.e_gru.name_furi.value);
fname += "&e_mail=" + document.e_gru.e_mail.value;
fname += "&seq=" + PhpSeq;
fname += "&view_name=" + subRepURI(document.e_gru.view_name.value)+" ";
*/
prm = "kind_flg=0";
prm += "&name_furi=" + encodeURIComponent(document.e_gru.name_furi.value);
prm += "&e_mail=" + document.e_gru.e_mail.value;
prm += "&seq=" + PhpSeq;
prm += "&view_name=" + encodeURIComponent(document.e_gru.view_name.value);
//loadHTMLFile(fname);
loadHTMLFile("ADR095.php",prm);
//function loadHTMLFile(fName){
function loadHTMLFile(fName,prm){
httpObj = createXMLHttpRequest(displayData);
if (httpObj){
//httpObj.open(Get_BName(),fName,true);
//httpObj.send(null);
httpObj.open("POST",fName,true);
httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpObj.send(prm);
}
}
function displayData(){
if ((httpObj.readyState == 4) && (httpObj.status == 200)){
kojin_info(document.e_gru.add_search.value);
document.getElementById("kojin_inp").innerHTML = ""
}
}
}
//個人アドレス追加画面へ
function mail_add(KojinSeq){
fName="ADR006.php?seq="+KojinSeq;
httpObj6 = createXMLHttpRequest(DispKojinInp);
if (httpObj6){
httpObj6.open(Get_BName(),fName,true);
httpObj6.send(null);
}
function DispKojinInp(){
if ((httpObj6.readyState == 4) && (httpObj6.status == 200)){
document.getElementById("kojin_inp").innerHTML = httpObj6.responseText;
}else{
document.getElementById("kojin_inp").innerHTML = "<b>Loading...</b>";
}
}
}
//WEBメール画面へ
function modoru_mail(){
location.href = 'MIL001.php';
}
//WEBメール画面へ
function modoru_mail2(){
location.href = 'MIL001.php';
}
//メールアドレスチェック
function checkEmail(checkString){
var newstr = "";
var at = false;
var dot = false;
if (checkString.indexOf("@") != -1) {
at = true;
} else if (checkString.indexOf(".") != -1) {
dot = true;
}
for (var i = 0; i < checkString.length; i++) {
ch = checkString.substring(i, i + 1)
if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
|| (ch == "@") || (ch == ".") || (ch == "_")
|| (ch == "-") || (ch >= "0" && ch <= "9")) {
newstr += ch;
if (ch == "@") {
at=true;
}
if (ch == ".") {
dot=true;
}
}
}
if ((at == true) && (dot == true)) {
return newstr;
} else {
alert ("入力されたメールアドレスは\n不正なアドレスのようです。\n再度入力し直してください。");
return false;
}
}
//以下、未使用????
//戻る処理
function modoru(){
document.location = "ADR001.php";
}
//戻る処理
function modoru2(){
document.location = "ADR002.php";
}
//50音検索
function search2(add_search){
if (DoubleSubmit()) {
document.e_gru.add_search.value =add_search;
document.e_gru.action = "ADR005.php";
document.e_gru.method="POST";
document.e_gru.submit();
}
}
//個人アドレス一覧画面へ
function modoru_addr(){
location.href = 'ADR005.php';
}
//*********************************************
// アドレス帳CSV出力
//*********************************************
function CSVDownLoad(){
document.e_gru.action = "ADR901.php";
document.e_gru.method="GET";
document.e_gru.submit();
}
-->
</SCRIPT>