-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewdata.php
110 lines (101 loc) · 4.53 KB
/
viewdata.php
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
<?php include_once('./header.php'); ?>
<?php include_once('./subnav.php'); ?>
<div id="basic" class="content">
<h1>View Data</h1>
<p>Search and filer historical weather data.</p>
<form action="filterData.php" method="post">
<label><input type="checkbox" id="aliasCheckid" name="aliasCheck">alias</input></label>
<label><input type="checkbox" id="locCheckid" name="locCheck">location</input></label>
<label><input type="checkbox" id="tempCheckid" name="tempCheck">temperature</input></label>
<label><input type="checkbox" id="humidCheckid" name="humidCheck">humidity</input></label>
<label><input type="checkbox" id="pressCheckid" name="pressCheck">pressure</input></label>
<label><input type="checkbox" id="lightCheckid" name="lightCheck">light</input></label>
<label><input type="checkbox" id="windCheckid" name="windCheck">wind</input></label>
<label><input type="checkbox" id="dateCheckid" name="dateCheck">date</input></label>
<fieldset id="alias" style="display:none">
<legend>Weather Station Alias</legend>
Enter a weather station alias:<br>
alias: <input type="text" name="alias" value="none">
<br>
</fieldset>
<fieldset id="loc" style="display:none">
<legend>Location:</legend>
Enter a location:<br>
city: <input type="text" name="city" value="none">
state: <input type="text" name="state" value="none">
<br>
</fieldset>
<fieldset id="temp" style="display:none">
<legend>Temperature</legend>
Enter a temperature range:<br>
low: <input type="number" name="lowTemp" size="7" min="-40" max="120" value="30">
high: <input type="number" name="highTemp" size="7" min="-40" max="120" value="80">
<br>
</fieldset>
<fieldset id="humid" style="display:none">
<legend>Humidity</legend>
Enter a humidity range:<br>
low: <input type="number" name="lowHumid" size="7" min="0" max="100" value="20">
high: <input type="number" name="highHumid" size="7" min="0" max="100" value="80">
<br>
</fieldset>
<fieldset id="press" style="display:none">
<legend>Pressure</legend>
Enter a pressure range:<br>
low: <input type="number" name="lowPress" size="7" min="800" max="1200" value="900">
high: <input type="number" name="highPress" size="7" min="800" max="1200" value="1100">
<br>
</fieldset>
<fieldset id="light" style="display:none">
<legend>Light</legend>
Enter a light range:<br>
low: <input type="number" name="lowLight" size="7" min="0" max="100" value="0">
high: <input type="number" name="highLight" size="7" min="0" max="100" value="100">
<br>
</fieldset>
<fieldset id="wind" style="display:none">
<legend>Wind</legend>
Enter a wind speed range:<br>
low: <input type="number" name="lowSpeed" size="7" min="0" max="60" value="0">
high: <input type="number" name="highSpeed" size="7" min="0" max="60" value="60">
<br>
</fieldset>
<fieldset id="date" style="display:none">
<legend>Date</legend>
Enter a date range:<br>
low: <input type="date" name="lowDate" size="10" min="2015-01-01" max="<?php echo date("Y-m-d");?>" value="2015-01-01">
high: <input type="date" name="highDate" size="10" min="2015-01-01" max="<?php echo date("Y-m-d");?>" value="<?php echo date("Y-m-d");?>">
<br>
</fieldset>
<br>
<input type="submit" value="submit">
</form>
<br><br>
</div>
<script>
document.getElementById('aliasCheckid').onchange = function() {
document.getElementById('alias').style.display = this.checked ? 'block' : 'none';
};
document.getElementById('locCheckid').onchange = function() {
document.getElementById('loc').style.display = this.checked ? 'block' : 'none';
};
document.getElementById('tempCheckid').onchange = function() {
document.getElementById('temp').style.display = this.checked ? 'block' : 'none';
};
document.getElementById('humidCheckid').onchange = function() {
document.getElementById('humid').style.display = this.checked ? 'block' : 'none';
};
document.getElementById('pressCheckid').onchange = function() {
document.getElementById('press').style.display = this.checked ? 'block' : 'none';
};
document.getElementById('lightCheckid').onchange = function() {
document.getElementById('light').style.display = this.checked ? 'block' : 'none';
};
document.getElementById('windCheckid').onchange = function() {
document.getElementById('wind').style.display = this.checked ? 'block' : 'none';
};
document.getElementById('dateCheckid').onchange = function() {
document.getElementById('date').style.display = this.checked ? 'block' : 'none';
};
</script>
<?php include_once('./footer.php'); ?>