MET020.inc
13.6 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
<script language="javascript">
<!--//
var SFlg = false; //サブミットフラグを定義
function DoubleSubmit(){ //ダブルサブミットチェック関数
if (SFlg){ //ダブルサブミットの場合
alert("応答中です"); //メッセージを出力
return false;
}
SFlg = true; //サブミットフラグを設定
return true; //戻り値を設定
}
function chk_modi(flg){
var stradd;
var stradd2;
if(flg==1){
if (hissu_chk("会議テーマ",document.e_gru.txtTheme.value)==false) {
document.e_gru.txtTheme.focus();
return false;
}
if (script_chk("会議テーマ",document.e_gru.txtTheme.value)==false) {
document.e_gru.txtTheme.focus();
return false;
}
// if (hissu_chk("議案",document.e_gru.txtMeasure.value)==false) {
// document.e_gru.txtMeasure.focus();
// return false;
// }
// if (script_chk("議案",document.e_gru.txtMeasure.value)==false) {
// document.e_gru.txtMeasure.focus();
// return false;
// }
if (script_chk("会議のルール",document.e_gru.txtRule.value)==false) {
document.e_gru.txtRule.focus();
return false;
}
if (script_chk("その他特記事",document.e_gru.txtEtc.value)==false) {
document.e_gru.txtEtc.focus();
return false;
}
//期間
var temp = document.e_gru.selSY.value;
if(document.e_gru.selSM.value.length == 1){
temp += "0" + document.e_gru.selSM.value;
}else{
temp += document.e_gru.selSM.value;
}
if(document.e_gru.selSD.value.length == 1){
temp += "0" + document.e_gru.selSD.value;
}else{
temp += document.e_gru.selSD.value;
}
if(document.e_gru.selSH.value.length == 1){
temp += "0" + document.e_gru.selSH.value;
}else{
temp += document.e_gru.selSH.value;
}
var temp2 = document.e_gru.selEY.value;
if(document.e_gru.selEM.value.length == 1){
temp2 += "0" + document.e_gru.selEM.value;
}else{
temp2 += document.e_gru.selEM.value;
}
if(document.e_gru.selED.value.length == 1){
temp2 += "0" + document.e_gru.selED.value;
}else{
temp2 += document.e_gru.selED.value;
}
if(document.e_gru.selEH.value.length == 1){
temp2 += "0" + document.e_gru.selEH.value;
}else{
temp2 += document.e_gru.selEH.value;
}
if(temp.length != 0 && temp.length != 10){
alert("開始期間を正しく入力してください");
return false;
}
if(temp2.length != 0 && temp2.length != 10){
alert("終了期間を正しく入力してください");
return false;
}
if (date_chk(document.e_gru.selSY.value,document.e_gru.selSM.value,document.e_gru.selSD.value) == false){
return false;
}
if (date_chk(document.e_gru.selEY.value,document.e_gru.selEM.value,document.e_gru.selED.value) == false){
return false;
}
if(temp > temp2){
alert("終了期間>開始期間になっています");
return false;
}
var obj = new Date();
var yyyy = String(obj.getFullYear());
var mm = String(obj.getMonth()+1);
if(mm.length == 1){
mm = "0" + mm;
}
var dd = String(obj.getDate());
if(dd.length == 1){
dd = "0" + dd;
}
var hh = String(obj.getHours());
if(hh.length == 1){
hh = "0" + hh;
}
if(temp.length != 0 && yyyy+mm+dd+hh >= temp2){
alert("設定された終了日時は既に過ぎています");
return false;
}
document.e_gru.action = "MET921.php";
}else{
document.e_gru.action = "MET030.php";
}
stradd="/";
for (i=0; i<document.e_gru.lstSecSPADD.options.length; i++){
stradd = stradd+document.e_gru.lstSecSPADD.options[i].value+"/";
}
stradd=stradd.replace("//","/");
stradd2="/";
for (i=0; i<document.e_gru.lstSecOBADD.options.length; i++){
stradd2 = stradd2+document.e_gru.lstSecOBADD.options[i].value+"/";
}
stradd2=stradd2.replace("//","/");
if (DoubleSubmit()) {
document.e_gru.hidSPADD.value=stradd;
document.e_gru.hidOBADD.value=stradd2;
document.e_gru.method="POST";
document.e_gru.submit();
return false;
}
}
function HanZen(obj) {
hanary = new Array("0","1","2","3","4","5","6","7","8","9","−","(",")");
zenary = new Array("0","1","2","3","4","5","6","7","8","9","-","(",")");
var i ;
for (i=0; i< zenary.length; i++) {
tmpary = obj.split(zenary[i]) ;
obj = tmpary.join(hanary[i]) ;
}
obj.value = obj ;
}
function chk(){
var stradd;
var stradd2;
if (hissu_chk("会議テーマ",document.e_gru.txtTheme.value)==false) {
document.e_gru.txtTheme.focus();
return false;
}
if (script_chk("会議テーマ",document.e_gru.txtTheme.value)==false) {
document.e_gru.txtTheme.focus();
return false;
}
if (hissu_chk("議案",document.e_gru.txtMeasure.value)==false) {
document.e_gru.txtMeasure.focus();
return false;
}
if (script_chk("議案",document.e_gru.txtMeasure.value)==false) {
document.e_gru.txtMeasure.focus();
return false;
}
if (script_chk("会議のルール",document.e_gru.txtRule.value)==false) {
document.e_gru.txtRule.focus();
return false;
}
//期間
var temp = document.e_gru.selSY.value;
if(document.e_gru.selSM.value.length == 1){
temp += "0" + document.e_gru.selSM.value;
}else{
temp += document.e_gru.selSM.value;
}
if(document.e_gru.selSD.value.length == 1){
temp += "0" + document.e_gru.selSD.value;
}else{
temp += document.e_gru.selSD.value;
}
if(document.e_gru.selSH.value.length == 1){
temp += "0" + document.e_gru.selSH.value;
}else{
temp += document.e_gru.selSH.value;
}
var temp2 = document.e_gru.selEY.value;
if(document.e_gru.selEM.value.length == 1){
temp2 += "0" + document.e_gru.selEM.value;
}else{
temp2 += document.e_gru.selEM.value;
}
if(document.e_gru.selED.value.length == 1){
temp2 += "0" + document.e_gru.selED.value;
}else{
temp2 += document.e_gru.selED.value;
}
if(document.e_gru.selEH.value.length == 1){
temp2 += "0" + document.e_gru.selEH.value;
}else{
temp2 += document.e_gru.selEH.value;
}
if(temp.length != 0 && temp.length != 10){
alert("開始期間を正しく入力してください");
return false;
}
if(temp2.length != 0 && temp2.length != 10){
alert("終了期間を正しく入力してください");
return false;
}
if (date_chk(document.e_gru.selSY.value,document.e_gru.selSM.value,document.e_gru.selSD.value) == false){
return false;
}
if (date_chk(document.e_gru.selEY.value,document.e_gru.selEM.value,document.e_gru.selED.value) == false){
return false;
}
if(temp > temp2){
alert("終了期間>開始期間になっています");
return false;
}
var obj = new Date();
var yyyy = String(obj.getFullYear());
var mm = String(obj.getMonth()+1);
if(mm.length == 1){
mm = "0" + mm;
}
var dd = String(obj.getDate());
if(dd.length == 1){
dd = "0" + dd;
}
var hh = String(obj.getHours());
if(hh.length == 1){
hh = "0" + hh;
}
if(temp.length != 0 && yyyy+mm+dd+hh >= temp2){
alert("設定された終了日時は既に過ぎています");
return false;
}
if (script_chk("その他特記事",document.e_gru.txtEtc.value)==false) {
document.e_gru.txtEtc.focus();
return false;
}
stradd="/";
for (i=0; i<document.e_gru.lstSecSPADD.options.length; i++){
stradd = stradd+document.e_gru.lstSecSPADD.options[i].value+"/";
}
stradd=stradd.replace("//","/");
if (document.e_gru.radSP[1].checked == true) {
if (stradd == "/"){
alert("発言者を1人以上選択してください");
return false;
}
}
stradd2="/";
for (i=0; i<document.e_gru.lstSecOBADD.options.length; i++){
stradd2 = stradd2+document.e_gru.lstSecOBADD.options[i].value+"/";
}
stradd2=stradd2.replace("//","/");
// if (document.e_gru.radOB[1].checked == true) {
// if (stradd2 == "/"){
// alert("オブザーバを1人以上選択してください");
// return false;
// }
// }
// strArr1=document.e_gru.upfile1.value.split("\\");
// strFName1=strArr1[strArr1.length-1].toUpperCase();
// strArr2=document.e_gru.upfile2.value.split("\\");
// strFName2=strArr2[strArr2.length-1].toUpperCase();
// strArr3=document.e_gru.upfile3.value.split("\\");
// strFName3=strArr3[strArr3.length-1].toUpperCase();
if (DoubleSubmit()) {
document.e_gru.hidSPADD.value=stradd;
document.e_gru.hidOBADD.value=stradd2;
// document.e_gru.file_name1.value=strFName1;
// document.e_gru.file_name2.value=strFName2;
// document.e_gru.file_name3.value=strFName3;
document.e_gru.action = "MET920.php";
document.e_gru.method="POST";
document.e_gru.submit();
return false;
}
}
function add(intaddsts,flg){
var strsel;
var stradd;
var inti;
var intchk;
var intPt;
var strArray = new Array();
var intflg=0;
document.e_gru.intaddsts.value=intaddsts;
if (flg == 1){
document.e_gru.radSP[1].checked=true;
}
//追加
if (intaddsts==1){
inti=document.e_gru.lstSecSPADD.length-1;
for(i=0;i<document.e_gru.lstSecSP.length;i++){
if(document.e_gru.lstSecSP.options[i].selected){
//データ存在チェック
for(intchk=0;intchk<document.e_gru.lstSecSPADD.length;intchk++){
if (document.e_gru.lstSecSP.options[i].value==document.e_gru.lstSecSPADD.options[intchk].value){
intflg=1;
break;
}
}
//配信リスト設定
if (intflg==0){
document.e_gru.lstSecSPADD.options[inti]=new Option(document.e_gru.lstSecSP.options[i].text,document.e_gru.lstSecSP.options[i].value);
inti=inti+1;
}
intflg=0;
}
}
//最終行空文字
document.e_gru.lstSecSPADD.options[inti]=new Option(" ","");
}
//削除
else{
//削除選択データ取得
inti=0;
for(i=0;i<document.e_gru.lstSecSPADD.length;i++){
if(document.e_gru.lstSecSPADD.options[i].selected){
strArray[inti]=document.e_gru.lstSecSPADD.options[i].value;
inti=inti+1;
}
}
for(i=0;i<strArray.length;i++){
for(intchk=0;intchk<document.e_gru.lstSecSPADD.length;intchk++){
if (strArray[i]==document.e_gru.lstSecSPADD.options[intchk].value){
if (document.e_gru.lstSecSPADD.options[intchk].value!=""){
document.e_gru.lstSecSPADD.options[intchk]=null;
break;
}
}
}
}
}
}
function add2(intaddsts,flg){
var strsel;
var stradd;
var inti;
var intchk;
var intPt;
var strArray = new Array();
var intflg=0;
document.e_gru.intaddsts.value=intaddsts;
if (flg == 1){
document.e_gru.radOB[1].checked=true;
}
//追加
if (intaddsts==1){
inti=document.e_gru.lstSecOBADD.length-1;
for(i=0;i<document.e_gru.lstSecOB.length;i++){
if(document.e_gru.lstSecOB.options[i].selected){
//データ存在チェック
for(intchk=0;intchk<document.e_gru.lstSecOBADD.length;intchk++){
//alert(intchk);
if (document.e_gru.lstSecOB.options[i].value==document.e_gru.lstSecOBADD.options[intchk].value){
intflg=1;
break;
}
}
//配信リスト設定
if (intflg==0){
document.e_gru.lstSecOBADD.options[inti]=new Option(document.e_gru.lstSecOB.options[i].text,document.e_gru.lstSecOB.options[i].value);
inti=inti+1;
}
intflg=0;
}
}
//最終行空文字
document.e_gru.lstSecOBADD.options[inti]=new Option(" ","");
}
//削除
else{
//削除選択データ取得
inti=0;
for(i=0;i<document.e_gru.lstSecOBADD.length;i++){
if(document.e_gru.lstSecOBADD.options[i].selected){
strArray[inti]=document.e_gru.lstSecOBADD.options[i].value;
inti=inti+1;
}
}
for(i=0;i<strArray.length;i++){
for(intchk=0;intchk<document.e_gru.lstSecOBADD.length;intchk++){
if (strArray[i]==document.e_gru.lstSecOBADD.options[intchk].value){
if (document.e_gru.lstSecOBADD.options[intchk].value!=""){
document.e_gru.lstSecOBADD.options[intchk]=null;
break;
}
}
}
}
}
}
function MultiSelector( list_target, max ){
this.list_target = list_target;
this.count = 0;
this.id = 0;
if( max ){
this.max = max;
} else {
this.max = -1;
};
this.addElement = function( element ){
if( element.tagName == 'INPUT' && element.type == 'file' ){
element.name = 'file[]';
element.multi_selector = this;
element.onchange = function(){
var new_element = document.createElement( 'input' );
new_element.type = 'file';
this.parentNode.insertBefore( new_element, this );
this.multi_selector.addElement( new_element );
this.multi_selector.addListRow( this );
this.style.position = 'absolute';
this.style.left = '-1000px';
};
if( this.max != -1 && this.count >= this.max ){
element.disabled = true;
};
this.count++;
this.current_element = element;
} else {
alert( 'Error: not a file input element' );
};
};
this.addListRow = function( element ){
var new_row = document.createElement( 'div' );
var new_row_button = document.createElement( 'input' );
new_row_button.type = 'button';
new_row_button.value = '削除';
new_row.element = element;
new_row_button.onclick= function(){
this.parentNode.element.parentNode.removeChild( this.parentNode.element );
this.parentNode.parentNode.removeChild( this.parentNode );
this.parentNode.element.multi_selector.count--;
this.parentNode.element.multi_selector.current_element.disabled = false;
return false;
};
new_row.innerHTML = element.value;
new_row.appendChild( new_row_button );
this.list_target.appendChild( new_row );
};
};
function cal_get(strDate, divid){
arrYMD = strDate.split("/");
if(divid == "calid"){
objY = document.e_gru.selSY;
objM = document.e_gru.selSM;
objD = document.e_gru.selSD;
}else if(divid == "calid2"){
objY = document.e_gru.selEY;
objM = document.e_gru.selEM;
objD = document.e_gru.selED;
}
//年
for(i=0;i<objY.options.length;i++){
if(objY.options[i].value == eval(arrYMD[0])){
objY.selectedIndex = i;
break;
}
}
//月
for(i=0;i<objM.options.length;i++){
if(objM.options[i].value == eval(arrYMD[1])){
objM.selectedIndex = i;
break;
}
}
//日
for(i=0;i<objD.options.length;i++){
if(objD.options[i].value == eval(arrYMD[2])){
objD.selectedIndex = i;
break;
}
}
cal1 = new JKL.Calendar("calid","e_gru","colname");
cal2 = new JKL.Calendar("calid2","e_gru","colname2");
}
var cal1 = new JKL.Calendar("calid","e_gru","colname");
var cal2 = new JKL.Calendar("calid2","e_gru","colname2");
//-->
</script>