SEND0001.js
4.91 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
function del_chk(){
if (confirm("アラーム設定を解除します。\nよろしいですか?")){
document.Frm.alarm_flg.value="";
document.Frm.alarm_yyyy.value="";
document.Frm.alarm_mm.value="";
document.Frm.alarm_dd.value="";
document.Frm.alarm_hh.value="";
document.Frm.alarm_time_mm.value="";
if(!document.Frm.alarm_id.length){
document.Frm.alarm_id.checked=false;
}else{
for(i=0;i<document.Frm.alarm_id.length;i++){
document.Frm.alarm_id[i].checked=false;
}
}
document.Frm.action="SEND0000.php";
document.Frm.submit();
}
}
function input_chk(){
if(isNaN(document.Frm.alarm_yyyy.value)){
window.alert("年は数値で入力してください。");
document.Frm.alarm_yyyy.focus();
return false;
}else if(!document.Frm.alarm_yyyy.value){
window.alert("年を入力してください。");
document.Frm.alarm_yyyy.focus();
return false;
}else if(document.Frm.alarm_mm.value==""){
window.alert("月を選択して下さい");
document.Frm.alarm_mm.focus();
return false;
}else if(document.Frm.alarm_dd.value==""){
window.alert("日を選択して下さい");
document.Frm.alarm_dd.focus();
return false;
}else if(document.Frm.alarm_hh.value==""){
window.alert("時を選択して下さい");
document.Frm.alarm_hh.focus();
return false;
}else if(document.Frm.alarm_time_mm.value==""){
window.alert("分を選択して下さい");
document.Frm.alarm_time_mm.focus();
return false;
}else if(document.Frm.date_yyyy.value < document.Frm.alarm_yyyy.value){
window.alert("開催日時よりも後の日時に、アラームを設定することはできません。");
document.Frm.alarm_yyyy.focus();
return false;
}else if(document.Frm.date_yyyy.value == document.Frm.alarm_yyyy.value){
if(document.Frm.date_mm.value < document.Frm.alarm_mm.value){
window.alert("開催日時よりも後の日時に、アラームを設定することはできません。");
document.Frm.alarm_mm.focus();
return false;
}else if(document.Frm.date_mm.value == document.Frm.alarm_mm.value){
if(document.Frm.date_dd.value < document.Frm.alarm_dd.value){
window.alert("開催日時よりも後の日時に、アラームを設定することはできません。");
document.Frm.alarm_dd.focus();
return false;
}else if(document.Frm.date_dd.value == document.Frm.alarm_dd.value){
if(document.Frm.time_hh.value!=""){
if(document.Frm.time_hh.value < document.Frm.alarm_hh.value){
window.alert("開催日時よりも後の日時に、アラームを設定することはできません。");
document.Frm.alarm_hh.focus();
return false;
}else if(document.Frm.time_hh.value == document.Frm.alarm_hh.value){
if(document.Frm.time_mm.value <= document.Frm.alarm_time_mm.value){
window.alert("開催日時よりも後の日時に、アラームを設定することはできません。");
document.Frm.alarm_time_mm.focus();
return false;
}
}
}
}
}
}
chkCnt = 0;
if (document.Frm.alarm_id.length >= 2) {
for (i=0; i< document.Frm.alarm_id.length;i++){
if (document.Frm.alarm_id[i].checked) {
chkCnt++;
}
}
if (chkCnt==0) {
alert("チェックがされていません");
return false;
}
}else{
if (document.Frm.alarm_id.checked==false) {
alert("チェックがされていません");
return false;
}
}
if (confirm("この内容でアラーム設定します。\nよろしいですか?")){
document.Frm.alarm_flg.value=1;
document.Frm.action="SEND0000.php";
document.Frm.submit();
}
}
function DayMax(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.alarm_dd.options[cnt].text = "--";
document.Frm.alarm_dd.options[cnt].value = "";
for(intCount = 0; intCount < DAY_MAX; intCount++){
cnt++;
document.Frm.alarm_dd.length = cnt+1;
if(cnt>=10){
document.Frm.alarm_dd.options[cnt].text = cnt;
document.Frm.alarm_dd.options[cnt].value = cnt;
}else{
document.Frm.alarm_dd.options[cnt].text = "0"+cnt;
document.Frm.alarm_dd.options[cnt].value = "0"+cnt;
}
}
}
function POP_Calendar(frm,yyyy,mm,dd,sele_year,sele_mon,sele_date) {
window.open("./include/calendar.php?frm="+frm+"&yyyy="+yyyy+"&mm="+mm+"&dd="+dd+"&main_year="+sele_year+"&main_mon="+sele_mon+"&strMainDate="+sele_date,"カレンダー",'width=350,height=230');
}
//カレンダー表示
function cal_get(strDate, divid)
{
arrYMD = strDate.split("/");
if(divid == "calid1")
{
objY = document.Frm.alarm_yyyy;
objM = document.Frm.alarm_mm;
objD = document.Frm.alarm_dd;
}
//年
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;
}
}
cal1 = new JKL.Calendar("calid1","Frm","colname1");
}
var cal1 = new JKL.Calendar("calid1","Frm","colname1");