TIM001.inc
4.73 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
<script type="text/javascript" src="xmlhttp.js"></script>
<script language="javascript">
function disp_main(){
prm = "sid="+document.e_gru.syain.value;
prm += "&y="+document.e_gru.selY.value;
prm += "&m="+document.e_gru.selM.value;
document.getElementById("time_base").innerHTML = "";
loadHTMLFile("TIM002.php", prm);
function loadHTMLFile(fName, prm){
httpObj = createXMLHttpRequest(displayData);
if (httpObj)
{
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))
{
document.getElementById("time_base").innerHTML = httpObj.responseText;
document.getElementById("sts").innerHTML = "";
}else{
document.getElementById("sts").innerHTML = "<b>Loading...</b>";
}
}
}
function chk(pstr){
prm = "mode=" + pstr;
prm += "&sid=" + document.e_gru.syain.value;
prm += "&y="+document.e_gru.selY.value;
prm += "&m="+document.e_gru.selM.value;
if(pstr == "999"){
for(i=0;i<document.e_gru.elements["sH[]"].length;i++){
if(suchi_chk("時間",document.e_gru.elements["sH[]"][i].value) == false){
return false;
}
if(suchi_chk("時間",document.e_gru.elements["sM[]"][i].value) == false){
return false;
}
if(suchi_chk("時間",document.e_gru.elements["eH[]"][i].value) == false){
return false;
}
if(suchi_chk("時間",document.e_gru.elements["eM[]"][i].value) == false){
return false;
}
if(script_chk("備考",document.e_gru.elements["com[]"][i].value) == false){
return false;
}
prm += "&sH[]="+document.e_gru.elements["sH[]"][i].value;
prm += "&sM[]="+document.e_gru.elements["sM[]"][i].value;
prm += "&eH[]="+document.e_gru.elements["eH[]"][i].value;
prm += "&eM[]="+document.e_gru.elements["eM[]"][i].value;
prm += "&com[]="+encodeURIComponent(document.e_gru.elements["com[]"][i].value);
}
}else{
if(suchi_chk("時間",document.e_gru.elements["sH[]"][pstr-1].value) == false){
return false;
}
if(suchi_chk("時間",document.e_gru.elements["sM[]"][pstr-1].value) == false){
return false;
}
if(suchi_chk("時間",document.e_gru.elements["eH[]"][pstr-1].value) == false){
return false;
}
if(suchi_chk("時間",document.e_gru.elements["eM[]"][pstr-1].value) == false){
return false;
}
if(script_chk("備考",document.e_gru.elements["com[]"][pstr-1].value) == false){
return false;
}
prm += "&sH="+document.e_gru.elements["sH[]"][pstr-1].value;
prm += "&sM="+document.e_gru.elements["sM[]"][pstr-1].value;
prm += "&eH="+document.e_gru.elements["eH[]"][pstr-1].value;
prm += "&eM="+document.e_gru.elements["eM[]"][pstr-1].value;
prm += "&com="+encodeURIComponent(document.e_gru.elements["com[]"][pstr-1].value);
}
//選択と表示が同じかチェック
if(document.e_gru.syain.value != document.e_gru.disp_sid.value){
alert("問題が発生したため、更新処理を中断します。\nはじめからやり直してください。");
disp_main();
exit;
}
loadHTMLFileCHK("TIM900.php", prm);
function loadHTMLFileCHK(fName, prm){
httpObjCHK = createXMLHttpRequest(displayDataCHK);
if (httpObjCHK)
{
httpObjCHK.open("POST",fName,true);
httpObjCHK.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpObjCHK.send(prm);
}
}
function displayDataCHK()
{
if ((httpObjCHK.readyState == 4) && (httpObjCHK.status == 200))
{
//alert(httpObjCHK.responseText);
alert("更新しました");
document.getElementById("sts").innerHTML = "";
}else{
document.getElementById("sts").innerHTML = "<b>Loading...</b>";
}
}
}
function chg(flg){
DD = new Date();
prm = "flg="+flg;
loadHTMLFileCHG("TIM901.php", prm);
function loadHTMLFileCHG(fName, prm){
httpObjCHG = createXMLHttpRequest(displayDataCHG);
if (httpObjCHG)
{
httpObjCHG.open("POST",fName,true);
httpObjCHG.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpObjCHG.send(prm);
}
}
function displayDataCHG()
{
if ((httpObjCHG.readyState == 4) && (httpObjCHG.status == 200))
{
//alert(httpObjCHG.responseText);
alert("更新しました");
disp_main();
//document.getElementById("sts").innerHTML = "";
}else{
document.getElementById("sts").innerHTML = "<b>Loading...</b>";
}
}
}
function print_tim() {
prm = "?sid="+document.e_gru.syain.value;
prm += "&y="+document.e_gru.selY.value;
prm += "&m="+document.e_gru.selM.value;
window.open("TIM003.php"+prm,null,"width=600,height=800,left=200,top=200,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,favorites=no,resizable=yes");
}
function csv_tim() {
window.open("TIM004.php",null,"width=600,height=600,left=200,top=200,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,favorites=no,resizable=yes");
}
</script>