示例#1
0
         $npa_content .= $npa_item . '<br />';
     }
     $npa_content .= "</td><td align=\"center\" valign=\"middle\"><img src=\"tpl/stdstyle/images/misc/natura2000.png\"></td>\n                </tr></table>";
 }
 if ($npac == "0") {
     tpl_set_var('hidenpa_start', '<!--');
     tpl_set_var('hidenpa_end', '-->');
     tpl_set_var('npa_content', '');
 } else {
     tpl_set_var('hidenpa_start', '');
     tpl_set_var('hidenpa_end', '');
     tpl_set_var('npa_content', $npa_content);
 }
 //cache data
 list($iconname) = getCacheIcon($usr['userid'], $cache_record['cache_id'], $cache_record['status'], $cache_record['user_id'], $cache_record['icon_large']);
 list($lat_dir, $lat_h, $lat_min) = help_latToArray($cache_record['latitude']);
 list($lon_dir, $lon_h, $lon_min) = help_lonToArray($cache_record['longitude']);
 $tpl_subtitle = htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8') . ' - ';
 $map_msg = mb_ereg_replace("{target}", urlencode("viewcache.php?cacheid=" . $cache_id), tr('map_msg'));
 tpl_set_var('googlemap_key', $googlemap_key);
 tpl_set_var('map_msg', $map_msg);
 tpl_set_var('typeLetter', typeToLetter($cache_record['type']));
 tpl_set_var('cacheid_urlencode', htmlspecialchars(urlencode($cache_id), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('cachename', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8'));
 if ($cache_record['date_alg'] == '') {
     tpl_set_var('icon_titled', '');
 } else {
     $ntitled_cache = $titled_cache_period_prefix . '_titled_cache';
     tpl_set_var('icon_titled', '<img src="tpl/stdstyle/images/free_icons/award_star_gold_1.png" class="icon16" alt="' . tr($ntitled_cache) . '" title="' . tr($ntitled_cache) . '"/>');
 }
 // cache type Mobile add calculate distance
示例#2
0
function help_latToArray2($lat)
{
    list($dir, $lat_h_int, $lat_min_float) = help_latToArray($lat);
    $lat_min_int = sprintf("%02d", floor($lat_min_float));
    $lat_min_frac = $lat_min_float - $lat_min_int;
    $lat_sec_int = sprintf("%02d", round($lat_min_frac * 60));
    return array($dir, $lat_h_int, $lat_min_int, $lat_sec_int, $lat_min_float);
}
示例#3
0
     }
     $npa_content .= "</td><td align=\"center\" valign=\"middle\"><img src=\"tpl/stdstyle/images/misc/natura2000.png\"></td>\n                </tr></table>";
 }
 if ($npac == "0") {
     tpl_set_var('hidenpa_start', '<!--');
     tpl_set_var('hidenpa_end', '-->');
     tpl_set_var('npa_content', '');
 } else {
     tpl_set_var('hidenpa_start', '');
     tpl_set_var('hidenpa_end', '');
     tpl_set_var('npa_content', $npa_content);
 }
 $icons = $geocache->dictionary->getCacheTypeIcons();
 //cache data
 list($iconname) = getCacheIcon($usr['userid'], $geocache->getCacheId(), $geocache->getStatus(), $geocache->getOwner()->getUserId(), $icons[$geocache->getCacheType()]['icon']);
 list($lat_dir, $lat_h, $lat_min) = help_latToArray($geocache->getCoordinates()->getLatitude());
 list($lon_dir, $lon_h, $lon_min) = help_lonToArray($geocache->getCoordinates()->getLongitude());
 $tpl_subtitle = htmlspecialchars($geocache->getCacheName(), ENT_COMPAT, 'UTF-8') . ' - ';
 $map_msg = mb_ereg_replace("{target}", urlencode("viewcache.php?cacheid=" . $cache_id), tr('map_msg'));
 tpl_set_var('googlemap_key', $googlemap_key);
 tpl_set_var('map_msg', $map_msg);
 tpl_set_var('typeLetter', typeToLetter($geocache->getCacheType()));
 tpl_set_var('cacheid_urlencode', htmlspecialchars(urlencode($cache_id), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('cachename', htmlspecialchars($geocache->getCacheName(), ENT_COMPAT, 'UTF-8'));
 if ($geocache->isTitled()) {
     $ntitled_cache = $titled_cache_period_prefix . '_titled_cache';
     tpl_set_var('icon_titled', '<img src="tpl/stdstyle/images/free_icons/award_star_gold_1.png" class="icon16" alt="' . tr($ntitled_cache) . '" title="' . tr($ntitled_cache) . '"/>');
 } else {
     tpl_set_var('icon_titled', '');
 }
 // cache type Mobile add calculate distance