Exemple #1
0
         tpl_set_var('search_time', $time_hours . ':' . $time_min . ' h');
     }
     if ($geocache->getWayLenght() == null || $geocache->getWayLenght() == 0) {
         tpl_set_var('way_length', tr('not_available'));
     } else {
         tpl_set_var('way_length', sprintf('%01.2f km', $geocache->getWayLenght()));
     }
 }
 tpl_set_var('country', htmlspecialchars($geocacheLocation['adm1']), ENT_COMPAT, 'UTF-8');
 //        tpl_set_var('cache_log_pw', (($cache_record['logpw'] == NULL) || ($cache_record['logpw'] == '')) ? '' : $cache_log_pw);
 tpl_set_var('nocrypt', $no_crypt);
 $hidden_date = $geocache->getDatePlaced()->format($applicationContainer->getOcConfig()->getDateFormat());
 tpl_set_var('hidden_date', $hidden_date);
 $listed_on = array();
 if ($usr !== false && $usr['userFounds'] >= $config['otherSites_minfinds']) {
     $geocacheOtherWaypoints = $geocache->getOtherWaypointIds();
     if ($geocacheOtherWaypoints['ge'] != '' && $config['otherSites_gpsgames_org'] == 1) {
         $listed_on[] = '<a href="http://geocaching.gpsgames.org/cgi-bin/ge.pl?wp=' . $geocacheOtherWaypoints['ge'] . '" target="_blank">GPSgames.org (' . $geocacheOtherWaypoints['ge'] . ')</a>';
     }
     if ($geocacheOtherWaypoints['tc'] != '' && $config['otherSites_terracaching_com'] == 1) {
         $listed_on[] = '<a href="http://play.terracaching.com/Cache/' . $geocacheOtherWaypoints['tc'] . '" target="_blank">Terracaching.com (' . $geocacheOtherWaypoints['tc'] . ')</a>';
     }
     if ($geocacheOtherWaypoints['nc'] != '' && $config['otherSites_navicache_com'] == 1) {
         $wpnc = hexdec(mb_substr($geocacheOtherWaypoints['nc'], 1));
         $listed_on[] = '<a href="http://www.navicache.com/cgi-bin/db/displaycache2.pl?CacheID=' . $wpnc . '" target="_blank">Navicache.com (' . $wpnc . ')</a>';
     }
     if ($geocacheOtherWaypoints['gc'] != '' && $config['otherSites_geocaching_com'] == 1) {
         $listed_on[] = '<a href="http://coord.info/' . $geocacheOtherWaypoints['gc'] . '" target="_blank">Geocaching.com (' . $geocacheOtherWaypoints['gc'] . ')</a> ';
     }
 }
 tpl_set_var('listed_on', sizeof($listed_on) == 0 ? $listed_only_oc : implode(", ", $listed_on));