Exemplo n.º 1
0
         $waypoints_visible = 1;
     }
 }
 if ($waypoints_visible != 0) {
     $waypoints = '<table id="gradient" cellpadding="5" width="97%" border="1" style="border-collapse: collapse; font-size: 12px; line-height: 1.6em">';
     $waypoints .= '<tr>';
     if ($cache_type == 1 || $cache_type == 3 || $cache_type == 7) {
         $waypoints .= '<th align="center" valign="middle" width="30"><b>' . tr('stage_wp') . '</b></th>';
     }
     $waypoints .= '<th align="center" valign="middle" width="40">&nbsp;<b>' . tr('symbol_wp') . '</b>&nbsp;</th>
             <th align="center" valign="middle" width="40">&nbsp;<b>' . tr('type_wp') . '</b>&nbsp;</th>
             <th width="90" align="center" valign="middle">&nbsp;<b>' . tr('coordinates_wp') . '</b>&nbsp;</th>
             <th align="center" valign="middle"><b>' . tr('describe_wp') . '</b></th></tr>';
 }
 /*@var $waypoint lib\Objects\GeoCache\Waypoint */
 foreach ($geocache->getWaypoints() as $waypoint) {
     if ($waypoint->getStatus() != Waypoint::STATUS_HIDDEN) {
         $wpTypeTranslation = tr('wayPointType' . $waypoint->getType());
         $tmpline1 = $wpline;
         // string in viewcache.inc.php
         if ($waypoint->getStatus() == Waypoint::STATUS_VISIBLE) {
             $coords_lat_lon = "<a class=\"links4\" href=\"#\" onclick=\"javascript:window.open('http://www.opencaching.pl/coordinates.php?lat=" . $waypoint->getCoordinates()->getLatitude() . "&amp;lon=" . $waypoint->getCoordinates()->getLongitude() . "&amp;popup=y&amp;wp=" . htmlspecialchars($geocache->getWaypointId(), ENT_COMPAT, 'UTF-8') . "','Koordinatenumrechnung','width=240,height=334,resizable=yes,scrollbars=1'); return event.returnValue=false\">" . mb_ereg_replace(" ", "&nbsp;", htmlspecialchars(help_latToDegreeStr($waypoint->getCoordinates()->getLatitude()), ENT_COMPAT, 'UTF-8') . "<br/>" . htmlspecialchars(help_lonToDegreeStr($waypoint->getCoordinates()->getLongitude()), ENT_COMPAT, 'UTF-8')) . "</a>";
         }
         if ($waypoint->getStatus() == Waypoint::STATUS_VISIBLE_HIDDEN_COORDS) {
             $coords_lat_lon = "N ?? ??????<br />E ?? ??????";
         }
         $tmpline1 = mb_ereg_replace('{wp_icon}', htmlspecialchars($waypoint->getIconName(), ENT_COMPAT, 'UTF-8'), $tmpline1);
         $tmpline1 = mb_ereg_replace('{type}', htmlspecialchars($wpTypeTranslation, ENT_COMPAT, 'UTF-8'), $tmpline1);
         $tmpline1 = mb_ereg_replace('{lat_lon}', $coords_lat_lon, $tmpline1);
         $tmpline1 = mb_ereg_replace('{desc}', "&nbsp;" . nl2br($waypoint->getDescription()) . "&nbsp;", $tmpline1);
         $tmpline1 = mb_ereg_replace('{wpid}', $waypoint->getId(), $tmpline1);