SEND2000.js
13.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
var SFlg = false; //サブミットフラグを定義
function DoubleSubmit(){ //ダブルサブミットチェック関数
if (SFlg){ //ダブルサブミットの場合
alert("応答中です"); //メッセージを出力
return false;
}
SFlg = true; //サブミットフラグを設定
return true; //戻り値を設定
}
document.onclick=function(){
if(document.getElementById("calid0") != null) {
document.getElementById("calid0").style.display="none";
document.getElementById("calid0").innerHTML="";
}
for(i=1;i<=10;i++){
if(document.getElementById("calidS"+i) != null) {
document.getElementById("calidS"+i).style.display="none";
document.getElementById("calidS"+i).innerHTML="";
}
if(document.getElementById("calidE"+i) != null) {
document.getElementById("calidE"+i).style.display="none";
document.getElementById("calidE"+i).innerHTML="";
}
}
}
function onLoad_chk(){
window.alert("回答パターンが登録されていない為、メール配信は出来ません");
document.Frm.action="./MST1410.php";
document.Frm.submit();
}
function send_change(){
if(document.Frm.radSendPtn[1].checked){
document.Frm.sousin_sentaku.disabled = true;
if(document.Frm.group_dat){
if(document.Frm.group_dat.length > 0){
for(i=0;i<document.Frm.group_dat.length;i++){
document.Frm.group_dat[i].disabled = false;
}
}else{
document.Frm.group_dat.disabled = false;
}
}
}else{
document.Frm.sousin_sentaku.disabled = false;
if(document.Frm.group_dat){
if(document.Frm.group_dat.length > 0){
for(i=0;i<document.Frm.group_dat.length;i++){
document.Frm.group_dat[i].disabled = true;
}
}else{
document.Frm.group_dat.disabled = true;
}
}
}
}
function menuBack(){
if (confirm("入力内容は破棄してメニュー画面に戻ります\nよろしいですか?")){
//location="./MAIN0000.php?strMainDate=<?PHP echo $strMainDate ?>";
location="./MAIN0000.php";
}
}
function haisin(db_flg,strName,strKenmei){
if(document.Frm.radSendPtn[1].checked){
intflg=0;
strData="/";
if(document.Frm.group_dat){
intlength = document.Frm.group_dat.length;
var intGroupCount=0;
if(!document.Frm.group_dat.length){
if(document.Frm.group_dat.checked==true){
intflg=1;
strData=strData+document.Frm.group_dat.value+"/";
intGroupCount=eval(document.Frm.group_count.value);
}
}else{
for(intCount = 0; intCount < intlength; intCount++){
if(document.Frm.group_dat[intCount].checked==true){
intflg=1;
strData=strData+document.Frm.group_dat[intCount].value+"/";
intGroupCount+=eval(document.Frm.group_count[intCount].value);
}
}
}
}
document.Frm.group_id.value=strData;
if(intflg==0){
window.alert(strName+"を最低1件選択してください");
return false;
}
}else{
intGroupCount = document.Frm.userCNT.value;
if(intGroupCount==0){
window.alert("送信先を最低1件選択してください");
return false;
}
}
if(document.Frm.kenmei.value==""){
window.alert(strKenmei + "を入力して下さい");
Frm.kenmei.focus();
return false;
}
if(document.Frm.text.value==""){
window.alert("本文を入力して下さい");
Frm.text.focus();
return false;
}
//候補
for(i=1;i<=document.Frm.kouho.value;i++){
SY = document.getElementById("kouhoS_yyyy"+i);
if(SY.value==""){
window.alert("回答を入力してください");
SY.focus();
return false;
}
}
if(document.Frm.limit_mm.value!="" || document.Frm.limit_dd.value!="" || document.Frm.limit_time_hh.value!="" || document.Frm.limit_time_mm.value!=""){
if(!document.Frm.limit_yyyy.value){
window.alert("回答期限を入力してください。");
document.Frm.limit_yyyy.focus();
return false;
}
}
var strGroupCount="";
if(db_flg != 6 || intGroupCount==0 || (eval(document.Frm.total_max_point.value) >=1000)){
strGroupCount = "";
}else{
strGroupCount = "\nこのメールを配信するには"+intGroupCount+"ポイント必要です";
if((eval(document.Frm.total_point.value)-intGroupCount) < 0){
window.alert("ポイントが足りません"+strGroupCount);
return false;
}
}
if (DoubleSubmit()) {
if (confirm("この内容で情報を配信しますか?"+strGroupCount)){
document.Frm.action = "SEND2010.php";
document.Frm.method="POST";
document.Frm.submit();
return false;
}
}
}
function DayMax(t,n){
objYYYY = document.getElementById("kouho"+t+"_yyyy"+n);
objMM = document.getElementById("kouho"+t+"_mm"+n);
objDD = document.getElementById("kouho"+t+"_dd"+n);
DATE_YYYY = eval(objYYYY.value);
DATE_MM = eval(objMM.value);
if(DATE_MM==1 || DATE_MM==3 || DATE_MM==5 || DATE_MM==7 || DATE_MM==8 || DATE_MM==10 || DATE_MM==12){
DAY_MAX=31;
}else if(DATE_MM==4 || DATE_MM==6 || DATE_MM==9 || DATE_MM==11){
DAY_MAX=30;
}else if(DATE_MM==2){
if((DATE_YYYY%4)==0){
DAY_MAX=29;
}else{
DAY_MAX=28;
}
}
cnt = 0;
objDD.options[cnt].text = "--";
objDD.options[cnt].value = "";
for(intCount = 0; intCount < DAY_MAX; intCount++){
cnt++;
objDD.length = cnt+1;
if(cnt>=10){
objDD.options[cnt].text = cnt;
objDD.options[cnt].value = cnt;
}else{
objDD.options[cnt].text = "0"+cnt;
objDD.options[cnt].value = "0"+cnt;
}
}
}
function DayMax5(DATE_YYYY,DATE_MM,DAY_MAX,cnt){
DATE_MM=eval(DATE_MM);
if(DATE_MM==1 || DATE_MM==3 || DATE_MM==5 || DATE_MM==7 || DATE_MM==8 || DATE_MM==10 || DATE_MM==12){
DAY_MAX=31;
}else if(DATE_MM==4 || DATE_MM==6 || DATE_MM==9 || DATE_MM==11){
DAY_MAX=30;
}else if(DATE_MM==2){
if((DATE_YYYY%4)==0){
DAY_MAX=29;
}else{
DAY_MAX=28;
}
}
document.Frm.limit_dd.options[cnt].text = "--";
document.Frm.limit_dd.options[cnt].value = "";
for(intCount = 0; intCount < DAY_MAX; intCount++){
cnt++;
document.Frm.limit_dd.length = cnt+1;
if(cnt>=10){
document.Frm.limit_dd.options[cnt].text = cnt;
document.Frm.limit_dd.options[cnt].value = cnt;
}else{
document.Frm.limit_dd.options[cnt].text = "0"+cnt;
document.Frm.limit_dd.options[cnt].value = "0"+cnt;
}
}
}
function Year_UruChk(DATE_YYYY,DATE_MM,DAY_MAX,cnt){
if((DATE_YYYY%4)==0){
if(DATE_MM==2){
if((DATE_YYYY%4)==0){
DAY_MAX=29;
}else{
DAY_MAX=28;
}
document.Frm.date_dd.options[cnt].text = "--";
document.Frm.date_dd.options[cnt].value = "";
for(intCount = 0; intCount < DAY_MAX; intCount++){
cnt++;
document.Frm.date_dd.length = cnt+1;
if(cnt>=10){
document.Frm.date_dd.options[cnt].text = cnt;
document.Frm.date_dd.options[cnt].value = cnt;
}else{
document.Frm.date_dd.options[cnt].text = "0"+cnt;
document.Frm.date_dd.options[cnt].value = "0"+cnt;
}
}
}
}
}
function alarm_set(strName){
if(document.Frm.radSendPtn[1].checked){
intflg=0;
strData="/";
if(document.Frm.group_dat){
intlength = document.Frm.group_dat.length;
if(!document.Frm.group_dat.length){
if(document.Frm.group_dat.checked==true){
intflg=1;
strData=strData+document.Frm.group_dat.value+"/";
}
}else{
for(intCount = 0; intCount < intlength; intCount++){
if(document.Frm.group_dat[intCount].checked==true){
intflg=1;
strData=strData+document.Frm.group_dat[intCount].value+"/";
}
}
}
}
document.Frm.group_id.value=strData;
if(intflg==0){
window.alert(strName+"を最低1件選択してください");
return false;
}
}
intlength = document.Frm.pattern_code.length;
if(!document.Frm.pattern_code.length){
if(document.Frm.pattern_code.value==document.Frm.pattern_id.value){
if (document.Frm.pattern_cnt.value==0){
window.alert("回答パターンが選択肢0個の場合は、\nアラームを設定できません");
return false;
}
}
}else{
for(intCount = 0; intCount < intlength; intCount++){
if(document.Frm.pattern_code[intCount].value==document.Frm.pattern_id.value){
if (document.Frm.pattern_cnt[intCount].value==0){
window.alert("回答パターンが選択肢0個の場合は、\nアラームを設定できません");
return false;
}
}
}
}
if(document.Frm.date_mm.value=="" && document.Frm.date_dd.value==""){
window.alert("開催日時未設定の場合は、\nアラームを設定できません");
return false;
}
if(isNaN(document.Frm.date_yyyy.value)){
window.alert("年は数値で入力してください。");
Frm.date_yyyy.focus();
return false;
}else if(!document.Frm.date_yyyy.value){
window.alert("年を入力してください。");
Frm.date_yyyy.focus();
return false;
}else if(document.Frm.date_mm.value==""){
window.alert("月を選択して下さい");
Frm.date_mm.focus();
return false;
}else if(document.Frm.date_dd.value==""){
window.alert("日を選択して下さい");
Frm.date_dd.focus();
return false;
}else if(document.Frm.time_hh.value){
if(document.Frm.time_mm.value==""){
window.alert("分を選択して下さい");
Frm.time_mm.focus();
return false;
}
}else if(document.Frm.time_mm.value){
if(document.Frm.time_hh.value==""){
window.alert("時を選択して下さい");
Frm.time_hh.focus();
return false;
}
}
document.Frm.action="SEND1001.php";
document.Frm.submit();
}
function pattern_chk(selectedPtn){
if(document.Frm.alarm_flg.value=="1"){
window.alert("アラーム設定解除後変更してください");
document.Frm.pattern_id.value=selectedPtn;
Frm.pattern_id.focus();
return false;
}
}
function Cheng_Send(){
if(document.Frm.NowSend.checked){
document.Frm.send_yyyy.disabled = false;
document.Frm.send_mm.disabled = false;
document.Frm.send_dd.disabled = false;
document.Frm.send_hh.disabled = false;
document.Frm.send_time_mm.disabled = false;
}else{
document.Frm.send_yyyy.disabled = true;
document.Frm.send_mm.disabled = true;
document.Frm.send_dd.disabled = true;
document.Frm.send_hh.disabled = true;
document.Frm.send_time_mm.disabled = true;
document.Frm.send_yyyy.selectedIndex = 0;
document.Frm.send_mm.selectedIndex = 0;
document.Frm.send_dd.selectedIndex = 0;
document.Frm.send_hh.selectedIndex = 0;
document.Frm.send_time_mm.selectedIndex = 0;
}
}
function Select(){
document.Frm.action="SEND2002.php";
document.Frm.submit();
}
function kouhoChange(){
for(i=1;i<=10;i++){
if(i <= document.Frm.kouho.value){
document.getElementById("div_k"+i).style.display="block";
}else{
document.getElementById("div_k"+i).style.display="none";
}
}
}
//カレンダー表示
function cal_get(strDate, divid)
{
arrYMD = strDate.split("/");
if(divid == "calid0"){
objY = document.Frm.limit_yyyy;
objM = document.Frm.limit_mm;
objD = document.Frm.limit_dd;
}else{
n = divid.substr(6);
t = divid.substr(5,1);
objY = document.getElementById("kouho"+t+"_yyyy"+n);
objM = document.getElementById("kouho"+t+"_mm"+n);
objD = document.getElementById("kouho"+t+"_dd"+n);
}
//年
objY.value=arrYMD[0];
//月
for(i=0;i<objM.options.length;i++){
if(objM.options[i].value == arrYMD[1]){
objM.selectedIndex = i;
break;
}
}
//日
for(i=0;i<objD.options.length;i++){
if(objD.options[i].value == arrYMD[2]){
objD.selectedIndex = i;
break;
}
}
cal0 = new JKL.Calendar("calid0","Frm","colname0");
calS1 = new JKL.Calendar("calidS1","Frm","colnameS1");
calS2 = new JKL.Calendar("calidS2","Frm","colnameS2");
calS3 = new JKL.Calendar("calidS3","Frm","colnameS3");
calS4 = new JKL.Calendar("calidS4","Frm","colnameS4");
calS5 = new JKL.Calendar("calidS5","Frm","colnameS5");
calS6 = new JKL.Calendar("calidS6","Frm","colnameS6");
calS7 = new JKL.Calendar("calidS7","Frm","colnameS7");
calS8 = new JKL.Calendar("calidS8","Frm","colnameS8");
calS9 = new JKL.Calendar("calidS9","Frm","colnameS9");
calS10 = new JKL.Calendar("calidS10","Frm","colnameS10");
calE1 = new JKL.Calendar("calidE1","Frm","colnameE1");
calE2 = new JKL.Calendar("calidE2","Frm","colnameE2");
calE3 = new JKL.Calendar("calidE3","Frm","colnameE3");
calE4 = new JKL.Calendar("calidE4","Frm","colnameE4");
calE5 = new JKL.Calendar("calidE5","Frm","colnameE5");
calE6 = new JKL.Calendar("calidE6","Frm","colnameE6");
calE7 = new JKL.Calendar("calidE7","Frm","colnameE7");
calE8 = new JKL.Calendar("calidE8","Frm","colnameE8");
calE9 = new JKL.Calendar("calidE9","Frm","colnameE9");
calE10 = new JKL.Calendar("calidE10","Frm","colnameE10");
}
function Calendar_dsp(){
if(document.Frm.NowSend.checked)
{
document.Frm.action="javascript:cal3.write()";
document.Frm.submit();
}
}
var cal0 = new JKL.Calendar("calid0","Frm","colname0");
var calS1 = new JKL.Calendar("calidS1","Frm","colnameS1");
var calS2 = new JKL.Calendar("calidS2","Frm","colnameS2");
var calS3 = new JKL.Calendar("calidS3","Frm","colnameS3");
var calS4 = new JKL.Calendar("calidS4","Frm","colnameS4");
var calS5 = new JKL.Calendar("calidS5","Frm","colnameS5");
var calS6 = new JKL.Calendar("calidS6","Frm","colnameS6");
var calS7 = new JKL.Calendar("calidS7","Frm","colnameS7");
var calS8 = new JKL.Calendar("calidS8","Frm","colnameS8");
var calS9 = new JKL.Calendar("calidS9","Frm","colnameS9");
var calS10 = new JKL.Calendar("calidS10","Frm","colnameS10");
var calE1 = new JKL.Calendar("calidE1","Frm","colnameE1");
var calE2 = new JKL.Calendar("calidE2","Frm","colnameE2");
var calE3 = new JKL.Calendar("calidE3","Frm","colnameE3");
var calE4 = new JKL.Calendar("calidE4","Frm","colnameE4");
var calE5 = new JKL.Calendar("calidE5","Frm","colnameE5");
var calE6 = new JKL.Calendar("calidE6","Frm","colnameE6");
var calE7 = new JKL.Calendar("calidE7","Frm","colnameE7");
var calE8 = new JKL.Calendar("calidE8","Frm","colnameE8");
var calE9 = new JKL.Calendar("calidE9","Frm","colnameE9");
var calE10 = new JKL.Calendar("calidE10","Frm","colnameE10");