001.
<!doctype html>
002.
<html lang=
"TH"
>
003.
<head>
004.
<meta charset=
"utf-8"
>
005.
<link rel=
"stylesheet"
href=
"//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css"
>
006.
<script src=
"//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"
></script>
007.
<script src=
"//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"
></script>
008.
<link rel=
"stylesheet"
href=
"jqueryui/style.css"
>
009.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
010.
</head>
011.
012.
<table><tr>
013.
<td>
014.
<form method=
"post"
>
015.
016.
<font color=
""
>Model</font>
017.
018.
<select neam=
"pagelist"
id=
"pagelist"
onchange=
"submit()"
>
019.
<option value=
""
>-Select model-</option>
020.
<option value=
"LEE1.php"
>LEE</option>
021.
<option value=
"PCM1.php"
>PCM</option>
022.
<option value=
"LHA1.php"
>LHA</option>
023.
</select>
024.
025.
<script language=
"javascript"
>
026.
$(
"#pagelist"
).change(
function
(){
027.
028.
window.location.replace( this.value,
'_blank'
).focus();
029.
});
030.
</script>
031.
032.
</form></td>
033.
<td>
034.
<form method=
"post"
>
035.
036.
<font color=
""
>Machine</font>
037.
<select neam=
"top"
id=
"top"
class
=
"search_box"
onchange=
"submit()"
>
038.
<option value=
""
>-Select Top-</option>
039.
040.
<option value=
"Top2E.php"
>Top2</option>
041.
<option value=
"Top3E.php"
>Top3</option>
042.
<option value=
"Top4E.php"
>Top4</option>
043.
<option value=
"Top5E.php"
>Top5</option>
044.
<option value=
"Top6E.php"
>Top6</option>
045.
<option value=
"Top7E.php"
>Top7</option>
046.
<option value=
"Top8E.php"
>Top8</option>
047.
<option value=
"Top9E.php"
>Top9</option>
048.
<option value=
"Top10E.php"
>Top10</option>
049.
<option value=
"Top11E.php"
>Top11</option>
050.
<option value=
"Top12E.php"
>Top12</option>
051.
<option value=
"Top13E.php"
>Top13</option>
052.
</select>
053.
054.
<script >
055.
$(
"#top"
).change(
function
(){
056.
window.location.replace( this.value,
'_blank'
).focus();
057.
058.
});
059.
</script>
060.
</form></td>
061.
<td>
062.
<form name=
"frm_search"
method=
"post"
>
063.
064.
??????
065.
<input name=
"from"
type=
"text"
id=
"from"
value=
"<?php echo $_POST["
from
"];?>"
onchange=
"submit(this.form)"
>
066.
067.
068.
069.
</form></td>
070.
<script>
071.
$(
function
() {
072.
$(
"#from"
).datepicker({
073.
074.
defaultDate:
"+1w"
,
075.
changeMonth: true,
076.
numberOfMonths: 1,
077.
onClose:
function
( selectedDate ) {
078.
$(
"#to"
).datepicker(
"option"
,
"minDate"
, selectedDate );
079.
}
080.
});
081.
$(
"#to"
).datepicker({
082.
defaultDate:
"+1w"
,
083.
changeMonth: true,
084.
numberOfMonths: 1,
085.
onClose:
function
( selectedDate ) {
086.
$(
"#from"
).datepicker(
"option"
,
"maxDate"
, selectedDate );
087.
}
088.
});
089.
});
090.
</script>
091.
</head>
092.
<body>
093.
094.
<?php
095.
$tep
=
""
;
096.
if
(
$_POST
[
"from"
] !=
""
)
097.
{
098.
$dir
=
'DATA/'
;
099.
$exclude
=
array
(
'.'
,
'..'
,
'.htaccess'
);
100.
$from
= (isset(
$_POST
[
'from'
]))?
strtolower
(
$_POST
[
'from'
]) :
''
;
101.
$MT
= opendir(
$dir
);
102.
103.
104.
while
(false!== (
$file
= readdir(
$MT
))) {
105.
$parts
=
explode
(
"."
,
$file
);
106.
if
(
is_array
(
$parts
) &&
count
(
$parts
) > 1) {
107.
$extension
=
end
(
$parts
);
108.
109.
if
(
$extension
==
"LEE"
)
110.
{
111.
$T
=
substr
(
$file
,8);
112.
$B
=
chunk_split
(
$T
,
"2"
,
"/"
);
113.
$R
=
str_replace
(
"H0/"
,
"2021MC#"
,
$B
);
114.
$E
=
str_replace
(
"/E."
,
" - "
,
$R
);
115.
$C
=
str_replace
(
"/LE/E/"
,
" LEE "
,
$E
);
116.
$U
=
str_replace
(
"/LH/A/"
,
" LHA "
,
$C
);
117.
$P
=
str_replace
(
"/PC/M/"
,
" PCM "
,
$U
);
118.
119.
120.
$parts
=
explode
(
"-"
,
$P
);
121.
if
(
strpos
(
strtolower
(
$P
),
$from
)!== false &&!in_array(
$file
,
$exclude
))
122.
{
123.
124.
(
$tep
.=
"<option value =\"$dir$file\"> $P</option>"
);
125.
}}}}}
126.
127.
128.
?>
129.
130.
131.
<td>
132.
<form method=
"post"
>
133.
<font color=
""
>Data File</font>
134.
<select name =
"from"
id=
"from"
onchange=
"submit(this.form)"
required >
135.
136.
<?php
echo
(
$tep
);?></option>
137.
</select>
138.
139.
<button type=
"submit"
>Summit</button>
140.
</body>
141.
</form>
142.
</td></tr></table>
143.
144.
<?php
145.
$datafile
=file(
$_POST
[
"from"
]);
146.
for
(
$i
=0;
$i
<26;
$i
++){ ${
'num'
.
$i
}=
array
();}
147.
148.
$i
= 0;
149.
foreach
(
$datafile
as
$line
){
150.
151.
list(
$num1
[
$i
],
$num2
[
$i
],
$num3
[
$i
],
$num4
[
$i
],
$num5
[
$i
],
$num6
[
$i
],
$num7
[
$i
],
$num8
[
$i
],
$num9
[
$i
],
$num10
[
$i
],
$num11
[
$i
],
$num12
[
$i
],
$num13
[
$i
],
$num14
[
$i
],
$num15
[
$i
],
$num16
[
$i
],
$num17
[
$i
],
$num18
[
$i
],
$num19
[
$i
],
$num20
[
$i
],
$num21
[
$i
],
$num22
[
$i
],
$num23
[
$i
],
$num24
[
$i
],
$num25
[
$i
]) =
explode
(
','
,
substr
(
$line
,0));
152.
$num1
[
$i
] =
intval
(
substr
(
$num1
[
$i
],0,-2));
153.
$num18
[
$i
] =
intval
(
$num18
[
$i
]);
154.
$num19
[
$i
] =
intval
(
$num19
[
$i
]);
155.
$num20
[
$i
] =
intval
(
$num20
[
$i
]);
156.
$num21
[
$i
] =
intval
(
$num21
[
$i
]);
157.
$num22
[
$i
] =
intval
(
$num22
[
$i
]);
158.
$target1
[
$i
] = 10;
159.
$target2
[
$i
] = 20;
160.
$target3
[
$i
] = 30;
161.
$i
++;
162.
163.
}
164.
$T
=
substr
(
$_POST
[
"from"
],13);
165.
$R
=
str_replace
(
"H0"
,
" MC#"
,
$T
);
166.
$W
=
str_replace
(
"#01"
,
"#13"
,
$R
);
167.
$P
=
str_replace
(
"E."
,
" - "
,
$W
);
168.
169.
?>
170.
172.
173.
<script>
174.
$(
function
() {
175.
$(
'#container'
).highcharts({
176.
chart: {
177.
type:
'line'
178.
},
179.
title: {
180.
text:
"<?= print "
<br>
".$P;?>"
181.
},
182.
183.
yAxis: {
184.
title: {
185.
text:
'Load cell value'
186.
},
187.
},
188.
tooltip: {
189.
enabled: false,
190.
formatter:
function
() {
191.
return
'<b>'
+ this.series.name +
'</b><br/>'
+
192.
this.x +
': '
+ this.y ;
193.
}
194.
},
195.
legend: {
196.
layout:
'vertical'
,
197.
align:
'right'
,
198.
verticalAlign:
'top'
,
199.
x: -0,
200.
y: 90,
201.
borderWidth: 0
202.
},
203.
plotOptions: {
204.
line: {
205.
dataLabels: {
206.
207.
},
208.
enableMouseTracking: false
209.
}
210.
},
211.
series: [{
212.
name:
'loadcell-1'
,
213.
color:
'#0066FF'
,
214.
data: [<?= implode(
','
,
$num19
)?>]
215.
}, {
216.
name:
'loadcell-2'
,
217.
color:
'#FF6600'
,
218.
data: [<?= implode(
','
,
$num20
)?>]
219.
}, {
220.
name:
'loadcell-3'
,
221.
color:
'#33CC00'
,
222.
data: [<?= implode(
','
,
$num21
)?>]
223.
}, {
224.
name:
'loadcell-4'
,
225.
color:
'#990033'
,
226.
data: [<?= implode(
','
,
$num22
)?>]
227.
}, {
228.
name:
'target : 10'
,
229.
color:
'#FF0033'
,
230.
dashStyle:
'ShortDash'
,
231.
data: [<?= implode(
','
,
$target1
)?>]
232.
}, {
233.
name:
'target : 20'
,
234.
color:
'#FF0033'
,
235.
dashStyle:
'ShortDash'
,
236.
data: [<?= implode(
','
,
$target2
)?>]
237.
}, {
238.
name:
'target : 30'
,
239.
color:
'#FF0033'
,
240.
dashStyle:
'ShortDash'
,
241.
data: [<?= implode(
','
,
$target3
)?>]
242.
243.
}]
244.
});
245.
})
246.
</script>
247.
248.
</head>
249.
<body>
250.
251.
<body bgcolor=
"#cccccc"
>
252.
<div id=
"container"
style=
" min-height: 96%; min-width: 1024px;width: 99%; height: auto; position: fixed;"
></div>
253.
<span>
254.
255.
256.
</body>
257.
<?php
258.
259.
260.
261.
262.
263.
264.
265.
?>
266.
267.
</html>
268.
</html>