6 '4' => 'Training Warm Up (deprecated)',
7 '5' => 'Training Session (deprecated)',
8 '6' => 'Training Cool Down (deprecated)',
9 '7' => 'Training Rehab (deprecated)',
12 // This is the number of leading entries in $arr_activity that are for
13 // injuries due to contact with a player or object.
14 $arr_activity_contact_count = 12;
16 $arr_activity = array(
17 'blocked' => 'Blocked', // new
18 'hitbyball' => 'Hit by Ball', // new
19 'goalpost' => 'Collision with Goal Post', // new
20 'ground' => 'Collision with Ground', // new
21 'kicked' => 'Collision with Other Player',
22 'collother' => 'Collision with Other Object', // new
23 'collision' => 'Collision Non Specified',
24 'tackled' => 'Tackled from Front',
25 'tackside' => 'Tackled from Side', // new
26 'tackback' => 'Tackled from Back', // new
27 'tackling' => 'Tackling Other Player',
28 'elbow' => 'Use of Arm/Elbow',
29 // 12 Contact entries, see $arr_activity_contact_count.
30 'running' => 'Running/Sprinting',
31 'turning' => 'Twisting/Turning',
32 'shooting' => 'Shooting',
33 'passing' => 'Passing/Crossing',
34 'dribbling' => 'Dribbling',
35 'jumping' => 'Jumping/Landing',
36 'fall' => 'Falling/Diving',
37 'stretching' => 'Stretching',
38 'sliding' => 'Sliding', // new
39 'throwing' => 'Throwing',
40 'heading' => 'Heading',
41 'landing' => 'Landing (deprecated)', // change to jumping
42 'diving' => 'Diving (deprecated)', // change to fall
43 'overuse' => 'Overuse (deprecated)', // s/b recorded in Classification
46 $arr_sanction = array(
47 'nofoul' => 'No Foul',
48 'oppfoul' => 'Opponent Foul',
49 'ownfoul' => 'Own Foul',
50 'yellow' => 'Yellow Card',
56 '3' => 'Outdoor Artificial' ,
57 '4' => 'Indoor Artificial' ,
62 '1' => 'Pitch (deprecated)' ,
63 '2' => 'Training (deprecated)',
64 '5' => 'Gym (deprecated)' ,
67 $arr_condition = array(
71 '4' => 'Slippery/Wet',
82 'sleet' => 'Sleet/Snow',
83 'overcast' => 'Overcast' ,
86 $arr_position = array(
87 '5' => 'Goal Keeper' ,
91 '2' => 'Midfield Offensive (deprecated)',
92 '3' => 'Midfield Defensive (deprecated)',
93 '6' => 'Substitute (deprecated)' ,
96 $arr_footwear = array(
98 '1' => 'Molded Studs' ,
99 '2' => 'Detachable Studs',
100 '3' => 'Indoor Shoes' ,
104 /*********************************************************************
109 '4' => 'Not Applicable',
111 *********************************************************************/
113 $arr_removed = array(
114 '1' => 'Immediately',
116 '3' => 'Not at All' ,
119 $arr_match_type = array(
120 '1' => 'Premiership (deprecated)',
121 '2' => 'FA Cup (deprecated)',
122 '3' => 'League Cup (deprecated)',
123 '4' => 'Champions League Cup (deprecated)',
124 '5' => 'Championship Match (deprecated)',
125 '6' => 'League One Match (deprecated)',
126 '7' => 'League Two Match (deprecated)',
127 '8' => 'International Match (deprecated)',
129 '10' => 'League Match',
130 '11' => 'UEFA Champtions League Match',
131 '12' => 'UEFA Europa League Match',
132 '13' => 'Carling Cup Match',
133 '14' => 'Other Cup Match',
134 '15' => 'National Match',
135 '16' => 'Reserve Match',
136 '17' => 'Youth Team Match',
139 $arr_training_type = array(
142 '53' => 'Mixed i.e. Football + Other',
144 '55' => 'Speed Agility Quickness',
146 '57' => 'Injury Prevention F-mark 11',
147 '58' => 'Injury Prevention Squad Own',
153 function rbfiinput($name, $value, $desc, $colname) {
155 $ret = "<input type='radio' name='$name' value='$value'";
156 if ($firow[$colname] == $value) $ret .= " checked";
161 function rbficell($name, $value, $desc, $colname) {
162 return "<td width='25%' nowrap>" . rbfiinput($name, $value, $desc, $colname) . "</td>\n";
165 function cbfiinput($name, $colname) {
167 $ret = "<input type='checkbox' name='$name' value='1'";
168 if ($firow[$colname]) $ret .= " checked";
173 function cbficell($name, $desc, $colname) {
174 return "<td width='25%' nowrap>" . cbfiinput($name, $colname) . "$desc</td>\n";
177 function issue_football_injury_newtype() {
178 echo " var fiadisp = (aitypes[index] == 2) ? '' : 'none';\n";
179 echo " document.getElementById('football_injury').style.display = fiadisp;\n";
182 function issue_football_injury_save($issue) {
183 global $arr_activity, $arr_sanction, $arr_weather;
184 $query = "REPLACE INTO lists_football_injury ( " .
185 "id, fiinjmin, fiinjtime, fimatchtype, ";
186 foreach ($arr_activity as $key => $value)
187 $query .= "fimech_$key, ";
188 foreach ($arr_sanction as $key => $value)
189 $query .= "fimech_$key, ";
190 foreach ($arr_weather as $key => $value)
191 $query .= "fiweather_$key, ";
192 $query .= "fimech_othercon, fimech_othernon, fiweather_temperature, " .
193 "fisurface, fiposition, fifootwear, firemoved, ficondition " .
196 invalue('form_injmin') . ", " .
197 rbvalue('form_injtime') . ", " .
198 rbvalue('form_matchtype') . ", ";
199 foreach ($arr_activity as $key => $value)
200 $query .= cbvalue("form_mech_$key") . ", ";
201 foreach ($arr_sanction as $key => $value)
202 $query .= cbvalue("form_mech_$key") . ", ";
203 foreach ($arr_weather as $key => $value)
204 $query .= cbvalue("form_weather_$key") . ", ";
206 txvalue('form_mech_othercon') . ", " .
207 txvalue('form_mech_othernon') . ", " .
208 txvalue('form_weather_temperature') . ", " .
209 rbvalue('form_surface') . ", " .
210 rbvalue('form_position') . ", " .
211 rbvalue('form_footwear') . ", " .
212 // rbvalue('form_side') . ", " .
213 rbvalue('form_removed') . ", " .
214 rbvalue('form_condition') . " " .
216 sqlStatement($query);
219 function issue_football_injury_form($issue) {
220 global $firow, $arr_match_type, $arr_injtime, $arr_training_type;
221 global $arr_activity, $arr_activity_contact_count, $arr_position;
222 global $arr_surface, $arr_condition, $arr_weather, $arr_footwear;
225 $firow = sqlQuery ("SELECT * FROM lists_football_injury WHERE id = '$issue'");
231 <table border
='1' width
='98%' id
='football_injury' style
='display:none;margin-top:6pt;'>
233 <tr bgcolor
='#dddddd'>
234 <td colspan
='2' align
='center'><b
>Timing of Injury
</b
></td
>
238 <td nowrap
>Match Play
</td
>
244 <input type
='text' name
='form_injmin' size
='4'
245 value
='<?php echo addslashes($firow['fiinjmin
']) ?>' />
249 foreach ($arr_injtime as $key => $value) {
250 // Skip deprecated values except if currently selected.
251 if (stristr($value, 'deprecated') && $firow['fiinjtime'] != $key) continue;
253 if ($i %
4 == 0) echo " <tr>\n";
254 echo " " . rbficell('form_injtime', $key, $value, 'fiinjtime');
256 if ($i %
4 == 0) echo " </tr>\n";
259 echo " <td width='25%'> </td>\n";
261 if ($i %
4 == 0) echo " </tr>\n";
269 <!-- Training Type
and Match Type are all a single set of radio buttons
. -->
272 <td nowrap
>Training Type
</td
>
277 foreach ($arr_training_type as $key => $value) {
278 if ($i %
4 == 0) echo " <tr>\n";
279 echo " " . rbficell('form_matchtype', $key, $value, 'fimatchtype');
281 if ($i %
4 == 0) echo " </tr>\n";
284 echo " <td width='25%'> </td>\n";
286 if ($i %
4 == 0) echo " </tr>\n";
294 <td nowrap
>Match Type
</td
>
299 foreach ($arr_match_type as $key => $value) {
300 // Skip deprecated values except if currently selected.
301 if (stristr($value, 'deprecated') && $firow['fimatchtype'] != $key) continue;
303 if ($i %
4 == 0) echo " <tr>\n";
304 echo " " . rbficell('form_matchtype', $key, $value, 'fimatchtype');
306 if ($i %
4 == 0) echo " </tr>\n";
309 echo " <td width='25%'> </td>\n";
311 if ($i %
4 == 0) echo " </tr>\n";
318 <tr bgcolor
='#dddddd'>
319 <td colspan
='2' align
='center'><b
>Injury Mechanism
</b
></td
>
323 <td nowrap
>Contact
</td
>
329 foreach ($arr_activity as $key => $value) {
330 if (++
$index > $arr_activity_contact_count) break;
331 // Skip deprecated values except if currently selected.
332 if (stristr($value, 'deprecated') && empty($firow["fimech_$key"])) continue;
334 if ($i %
4 == 0) echo " <tr>\n";
335 echo " " . cbficell("form_mech_$key", $value, "fimech_$key");
337 if ($i %
4 == 0) echo " </tr>\n";
342 <input type
='text' name
='form_mech_othercon' size
='8'
343 title
='Describe other'
344 value
='<?php echo addslashes($firow['fimech_othercon
']) ?>' />
348 if ($i %
4 == 0) echo " </tr>\n";
350 echo " <td width='25%'> </td>\n";
352 if ($i %
4 == 0) echo " </tr>\n";
360 <td nowrap
>Non Contact
</td
>
366 foreach ($arr_activity as $key => $value) {
367 if (++
$index <= $arr_activity_contact_count) continue;
368 // Skip deprecated values except if currently selected.
369 if (stristr($value, 'deprecated') && empty($firow["fimech_$key"])) continue;
371 if ($i %
4 == 0) echo " <tr>\n";
372 echo " " . cbficell("form_mech_$key", $value, "fimech_$key");
374 if ($i %
4 == 0) echo " </tr>\n";
379 <input type
='text' name
='form_mech_othernon' size
='8'
380 title
='Describe other'
381 value
='<?php echo addslashes($firow['fimech_othernon
']) ?>' />
385 if ($i %
4 == 0) echo " </tr>\n";
387 echo " <td width='25%'> </td>\n";
389 if ($i %
4 == 0) echo " </tr>\n";
396 <tr bgcolor
='#dddddd'>
397 <td colspan
='2' align
='center'><b
>Additional Factors
</b
></td
>
401 <td nowrap
>Playing Position
</td
>
406 foreach ($arr_position as $key => $value) {
407 // Skip deprecated values except if currently selected.
408 if (stristr($value, 'deprecated') && $firow['fiposition'] != $key) continue;
410 if ($i %
4 == 0) echo " <tr>\n";
411 echo " " . rbficell('form_position', $key, $value, 'fiposition');
413 if ($i %
4 == 0) echo " </tr>\n";
416 echo " <td width='25%'> </td>\n";
418 if ($i %
4 == 0) echo " </tr>\n";
426 <td nowrap
>Surface
</td
>
431 foreach ($arr_surface as $key => $value) {
432 // Skip deprecated values except if currently selected.
433 if (stristr($value, 'deprecated') && $firow['fisurface'] != $key) continue;
435 if ($i %
4 == 0) echo " <tr>\n";
436 echo " " . rbficell('form_surface', $key, $value, 'fisurface');
438 if ($i %
4 == 0) echo " </tr>\n";
441 echo " <td width='25%'> </td>\n";
443 if ($i %
4 == 0) echo " </tr>\n";
451 <td nowrap
>Condition of Grass
/Pitch
</td
>
456 foreach ($arr_condition as $key => $value) {
457 // Skip deprecated values except if currently selected.
458 if (stristr($value, 'deprecated') && $firow['ficondition'] != $key) continue;
460 if ($i %
4 == 0) echo " <tr>\n";
461 echo " " . rbficell('form_condition', $key, $value, 'ficondition');
463 if ($i %
4 == 0) echo " </tr>\n";
466 echo " <td width='25%'> </td>\n";
468 if ($i %
4 == 0) echo " </tr>\n";
476 <td nowrap
>Weather Conditions
</td
>
481 foreach ($arr_weather as $key => $value) {
482 if ($i %
4 == 0) echo " <tr>\n";
483 echo " " . cbficell("form_weather_$key", $value, "fiweather_$key");
485 if ($i %
4 == 0) echo " </tr>\n";
490 <input type
='text' name
='form_weather_temperature' size
='3'
491 title
='Ambient temperature in degrees Celsius'
492 value
='<?php echo addslashes($firow['fiweather_temperature
']) ?>' />
496 if ($i %
4 == 0) echo " </tr>\n";
498 echo " <td width='25%'> </td>\n";
500 if ($i %
4 == 0) echo " </tr>\n";
508 <td nowrap
>Footwear
</td
>
513 foreach ($arr_footwear as $key => $value) {
514 // Skip deprecated values except if currently selected.
515 if (stristr($value, 'deprecated') && $firow['fifootwear'] != $key) continue;
517 if ($i %
4 == 0) echo " <tr>\n";
518 echo " " . rbficell('form_footwear', $key, $value, 'fifootwear');
520 if ($i %
4 == 0) echo " </tr>\n";
523 echo " <td width='25%'> </td>\n";
525 if ($i %
4 == 0) echo " </tr>\n";
532 <tr bgcolor
='#dddddd'>
533 <td colspan
='2' align
='center'><b
>Referee
's Sanction</b></td>
537 <td nowrap>Referee's Sanction
</td
>
541 <?php
echo cbficell('form_mech_nofoul' , 'No Foul' , 'fimech_nofoul' ) ?
>
542 <?php
echo cbficell('form_mech_oppfoul', 'Opponent Foul', 'fimech_oppfoul') ?
>
543 <?php
echo cbficell('form_mech_ownfoul', 'Own Foul' , 'fimech_ownfoul') ?
>
544 <td width
='25%'> 
;</td
>
547 <?php
echo cbficell('form_mech_yellow' , 'Yellow Card' , 'fimech_yellow' ) ?
>
548 <?php
echo cbficell('form_mech_red' , 'Red Card' , 'fimech_red' ) ?
>
549 <td width
='25%'> 
;</td
>
550 <td width
='25%'> 
;</td
>
556 <tr bgcolor
='#dddddd'>
557 <td colspan
='2' align
='center'><b
>Post Injury Sequelae
</b
></td
>
561 <td nowrap
>Removed from
<br
>Play
/Training
<br
>after Injury
</td
>
565 <?php
echo rbficell('form_removed', '1', 'Immediately', 'firemoved') ?
>
566 <?php
echo rbficell('form_removed', '2', 'Later' , 'firemoved') ?
>
567 <?php
echo rbficell('form_removed', '3', 'Not at All' , 'firemoved') ?
>
568 <td width
='25%'> 
;</td
>