Changeset 1788
- Timestamp:
- 09/06/10 14:27:57 (17 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
lib/phpcommon/functions.php (modified) (1 diff)
-
lib/phpcommon/races.class.php (modified) (2 diffs)
-
site/ics.php (modified) (1 diff)
-
site/myboat.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/phpcommon/functions.php
r1774 r1788 1662 1662 } 1663 1663 1664 function getWaypointHTMLSymbols($wpformat) { 1665 $wpsymbols = ""; 1666 switch ($wpformat & (WP_CROSS_CLOCKWISE|WP_CROSS_ANTI_CLOCKWISE)) { 1667 case WP_CROSS_ANTI_CLOCKWISE: 1668 $wpsymbols .= "↺ "; 1669 break; 1670 case WP_CROSS_CLOCKWISE: 1671 $wpsymbols .= "↻ "; 1672 break; 1673 default: 1674 } 1675 if (($wpformat & WP_CROSS_ONCE) == WP_CROSS_ONCE) { 1676 $wpsymbols .= "⊅ "; 1677 } 1678 1679 switch ($wpformat & (WP_ICE_GATE_N|WP_ICE_GATE_S)) { 1680 case WP_ICE_GATE_S: 1681 $wpsymbols .= "⥴"; 1682 break; 1683 case WP_ICE_GATE_N: 1684 $wpsymbols .= "⥲"; 1685 default: 1686 } 1687 return trim($wpsymbols); 1688 } 1689 1664 1690 // For a finished race, to give the Palmares 1665 1691 function getRaceRanking($idusers, $idraces) { -
trunk/lib/phpcommon/races.class.php
r1767 r1788 312 312 function htmlWayPoints($startstring) { 313 313 $ret = "<table class=\"waypoints\">\n"; 314 $ret .= "<tr><th>#</th><th>Lat1</th><th>Lon1</th><th>Lat2</th><th>Lon2</th><th>@</th><th> Type</th><th>Name</th></tr>";314 $ret .= "<tr><th>#</th><th>Lat1</th><th>Lon1</th><th>Lat2</th><th>Lon2</th><th>@</th><th>Spec</th><th>Type</th><th>Name</th></tr>"; 315 315 $ret .= "<tr>\n"; 316 316 $ret .= "<td>WP0</td>"; 317 $ret .= sprintf("<td>%.3f</td><td>%.3f</td><td colspan=\"2\"> </td><td> </td><td> %s</td><td> </td>", $this->startlat/1000., $this->startlong/1000., $startstring);317 $ret .= sprintf("<td>%.3f</td><td>%.3f</td><td colspan=\"2\"> </td><td> </td><td> </td><td>%s</td><td> </td>", $this->startlat/1000., $this->startlong/1000., $startstring); 318 318 $ret .= "</tr>\n"; 319 319 … … 321 321 $ret .= "<tr>\n"; 322 322 $ret .= "<td>WP".$num."</td>"; 323 $wpsymbols = getWaypointHTMLSymbols($wp['wpformat']); 323 324 switch($wp['wpformat'] & 0xF) { 324 325 case WP_ONE_BUOY: 325 $ret .= sprintf("<td>%.3f</td><td>%.3f</td><td colspan=\"2\"> </td><td>%.0f°</td><td>%s</td><td>%s</td> ",326 $ret .= sprintf("<td>%.3f</td><td>%.3f</td><td colspan=\"2\"> </td><td>%.0f°</td><td>%s</td><td>%s</td><td>%s</td>", 326 327 $wp['latitude1']/1000., $wp['longitude1']/1000., 327 $wp['laisser_au'], $wp['wptypelabel'], htmlentities($wp['libelle']));328 $wp['laisser_au'], $wpsymbols, $wp['wptypelabel'], htmlentities($wp['libelle'])); 328 329 break; 329 330 case WP_TWO_BUOYS: 330 331 default: 331 $ret .= sprintf("<td>%.3f</td><td>%.3f</td><td>%.3f</td><td>%.3f</td><td> </td><td>%s</td><td>%s</td> ",332 $ret .= sprintf("<td>%.3f</td><td>%.3f</td><td>%.3f</td><td>%.3f</td><td> </td><td>%s</td><td>%s</td><td>%s</td>", 332 333 $wp['latitude1']/1000., $wp['longitude1']/1000., 333 $wp['latitude2']/1000., $wp['longitude2']/1000., $wp['wptypelabel'], htmlentities($wp['libelle']));334 $wp['latitude2']/1000., $wp['longitude2']/1000., $wpsymbols, $wp['wptypelabel'], htmlentities($wp['libelle'])); 334 335 } 335 336 $ret .= "</tr>\n"; -
trunk/site/ics.php
r1612 r1788 4 4 5 5 if ($idraces != 0) { 6 $ro = new Races($idraces);6 $ro = new races($idraces); 7 7 echo $ro->htmlRaceDescription(); 8 8 } -
trunk/site/myboat.php
r1787 r1788 167 167 $wp_maparea=$wp['maparea']; 168 168 169 $wpsymbols = ""; 170 switch ($wp['wpformat'] & (WP_CROSS_CLOCKWISE|WP_CROSS_ANTI_CLOCKWISE)) { 171 case WP_CROSS_ANTI_CLOCKWISE: 172 $wpsymbols .= "↺ "; 173 break; 174 case WP_CROSS_CLOCKWISE: 175 $wpsymbols .= "↻ "; 176 break; 177 default: 178 } 179 if (($wp['wpformat'] & WP_CROSS_ONCE) == WP_CROSS_ONCE) { 180 $wpsymbols .= "⊅"; 181 } 182 183 switch ($wp['wpformat'] & (WP_ICE_GATE_N|WP_ICE_GATE_S)) { 184 case WP_ICE_GATE_S: 185 $wpsymbols .= "⥴"; 186 break; 187 case WP_ICE_GATE_N: 188 $wpsymbols .= "⥲"; 189 default: 190 } 169 $wpsymbols = getWaypointHTMLSymbols($wp['wpformat']); 191 170 192 171 $status_content="<div class="infobulle"><b>WP" . $wp_num . " ".$wpsymbols."</b><br />";
