-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwpfitlogoptions.php
More file actions
executable file
·230 lines (223 loc) · 7.6 KB
/
wpfitlogoptions.php
File metadata and controls
executable file
·230 lines (223 loc) · 7.6 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
<script src="script.js" type="text/javascript"></script>
<script type="text/javascript">
function calc_swimpace()
{
swimtotal = document.getElementById ('swimtotal').value;
swimdist = document.getElementById ('swimdist').value;
var element = document.getElementById('swimpace');
xmlhttp.open("GET", 'http://www.vanhlebarsoftware.com/sandbox/fitlogpace.php?time=' + swimtotal + '&distance=' + swimdist + '&activity=' + 'swim');
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
element.value = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
function calc_bikepace()
{
biketotal = document.getElementById ('biketotal').value;
bikedist = document.getElementById ('bikedist').value;
var element = document.getElementById('bikepace');
xmlhttp.open("GET", 'http://www.vanhlebarsoftware.com/sandbox/fitlogpace.php?time=' + biketotal + '&distance=' + bikedist + '&activity=' + 'bike');
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
element.value = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
function calc_runpace()
{
runtotal = document.getElementById ('runtotal').value;
rundist = document.getElementById ('rundist').value;
var element = document.getElementById('runpace');
xmlhttp.open("GET", 'http://www.vanhlebarsoftware.com/sandbox/fitlogpace.php?time=' + runtotal + '&distance=' + rundist + '&activity=' + 'run');
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
element.value = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
</script>
<div id="wrap">
<h2>Fitness Training Log</h2>
<!-- BEGIN MESSAGEAREA -->
<p>{MESSAGE}</p>
<!-- END MESSAGEAREA -->
<!-- BEGIN FORM -->
<form action="{ACTION}" method="post" class="swimbikerun">
<!-- END FORM -->
<!-- BEGIN WORKOUT -->
<div>
<label for="date">Date: <span class="small">(YYYY-MM-DD)</span>:</label>
<input type="text" name="date" id="date" value="{WORKOUTDATE}"/>
</div>
<!-- END WORKOUT -->
<div id="sbr">
<!-- BEGIN SWIMAREA -->
<div id="swim">
<div id="heading">
<h4>Swimming</h4>
</div>
<div>
<label for="swimtime">Workout time <span class="small">(hh:mm:ss)</span>:</label>
<input type="text" name="swimtime" id="swimtime" value="{TIMEOFDAY}"/>
</div>
<div>
<label for="swimtotal">Total Time <span class="small">(hh:mm:ss)</span>:</label>
<input type="text" name="swimtotal" id="swimtotal" value="{DURATION}"/>
</div>
<div>
<label for="swimdist">Distance:</label>
<input type="text" name="swimdist" id="swimdist" value="{DISTANCE}"/>
</div>
<div>
<label for="swimpace">Pace:</label>
<input type="text" name="swimpace" id="swimpace" value="{PACE}"/>
<label for="swimtype"> </label>
<select name="swimtype" id="swimtype" value="{TYPE}">
<option>Min/100yds</option>
<option>Min/100m</option>
</select>
<input type="button" value="Calc" OnClick="calc_swimpace();" />
</div>
<div>
<label for="swimnotes">Notes:</label>
<textarea id="swimnotes" name="swimnotes" value="{NOTES}" cols="26" rows="10"></textarea>
</div>
<div>
<label for="swimhrmin">Min Hr:</label>
<input type="text" name="swimhrmin" id="swimhrmin" value="{MINHR}"/>
</div>
<div>
<label for="swimhravg">Avg Hr:</label>
<input type="text" name="swimhravg" id="swimhravg" value="{AVGHR}"/>
</div>
<div>
<label for="swimhrmax">Max Hr:</label>
<input type="text" name="swimhrmax" id="swimhrmax" value="{MAXHR}"/>
</div>
<div>
<label for="swimcalsburned">Calories Burned:</label>
<input type="text" name="swimcalsburned" id="swimcalsburned" value="{CALORIES}"/>
</div>
</div>
<!-- END SWIMAREA -->
<!-- BEGIN BIKEAREA -->
<div id="bike">
<div id="heading">
<h4>Biking</h4>
</div>
<div>
<label for="biketime">Workout time <span class="small">(hh:mm:ss)</span>:</label>
<input type="text" name="biketime" id="biketime" value="{TIMEOFDAY}"/>
</div>
<div>
<label for="biketotal">Total Time <span class="small">(hh:mm:ss)</span>:</label>
<input type="text" name="biketotal" id="biketotal" value="{DURATION}"/>
</div>
<div>
<label for="bikedist">Distance:</label>
<input type="text" name="bikedist" id="bikedist" value="{DISTANCE}"/>
</div>
<div>
<label for="bikepace">Pace:</label>
<input type="text" name="bikepace" id="bikepace" value="{PACE}"/>
<label for="biketype"> </label>
<select name="biketype" id="biketype" value="{TYPE}">
<option>Miles/Hr</option>
<option>KMs/Hr</option>
</select>
<input type="button" value="Calc" OnClick="calc_bikepace();" />
</div>
<div>
<label for="bikenotes">Notes:</label>
<textarea id="bikenotes" name="bikenotes" cols="26" rows="10" value="{NOTES}"></textarea>
</div>
<div>
<label for="bikehrmin">Min Hr:</label>
<input type="text" name="bikehrmin" id="bikehrmin" value="{MINHR}"/>
</div>
<div>
<label for="bikehravg">Avg Hr:</label>
<input type="text" name="bikehravg" id="bikehravg" value="{AVGHR}"/>
</div>
<div>
<label for="bikehrmax">Max Hr:</label>
<input type="text" name="bikehrmax" id="bikehrmax" value="{MAXHR}"/>
</div>
<div>
<label for="bikerpms">Avg Rpms:</label>
<input type="text" name="bikerpms" id="bikerpms" value="{RPMS}"/>
</div>
<div>
<label for="bikecalsburned">Calories Burned:</label>
<input type="text" name="bikecalsburned" id="bikecalsburned" value="{CALORIES}"/>
</div>
</div>
<!-- END BIKEAREA -->
<!-- BEGIN RUNAREA -->
<div id="run">
<div id="heading">
<h4>Running</h4>
</div>
<div>
<label for="runtime">Workout time <span class="small">(hh:mm:ss)</span>:</label>
<input type="text" name="runtime" id="runtime" value="{TIMEOFDAY}"/>
</div>
<div>
<label for="runtotal">Total Time <span class="small">(hh:mm:ss)</span>:</label>
<input type="text" name="runtotal" id="runtotal" value="{DURATION}"/>
</div>
<div>
<label for="rundist">Distance:</label>
<input type="text" name="rundist" id="rundist" value="{DISTANCE}"/>
</div>
<div>
<label for="runpace">Pace:</label>
<input type="text" name="runpace" id="runpace" value="{PACE}"/>
<label for="runtype"> </label>
<select name="runtype" id="runtype" value="{TYPE}">
<option>Min/Mile</option>
<option>Min/KMs</option>
</select>
<input type="button" value="Calc" OnClick="calc_runpace();"/>
</div>
<div>
<label for="runnotes">Notes:</label>
<textarea id="runnotes" name="runnotes" cols="26" rows="10" value="{NOTES}"></textarea>
</div>
<div>
<label for="runhrmin">Min Hr:</label>
<input type="text" name="runhrmin" id="runhrmin" value="{MINHR}"/>
</div>
<div>
<label for="runhravg">Avg Hr:</label>
<input type="text" name="runhravg" id="runhravg" value="{AVGHR}"/>
</div>
<div>
<label for="runhrmax">Max Hr:</label>
<input type="text" name="runhrmax" id="runhrmax" value="{MAXHR}"/>
</div>
<div>
<label for="runcalsburned">Calories Burned:</label>
<input type="text" name="runcalsburned" id="runcalsburned" value="{CALORIES}"/>
</div>
</div>
<!-- END RUNAREA -->
</div> <!-- END OF "sbr" div -->
<!-- BEGIN BUTTONAREA -->
<div id="submit_bottom">
<input type="submit" value="{SUBMITVALUE}">
<input type="reset" value="Reset" />
</div>
<!-- END BUTTONAREA -->
</form>
</div> <!-- End of bodycontent div -->