$longNC = $cache_record['longitude'] * -1; tpl_set_var('longitudeNC', $longNC); } else { tpl_set_var('longitudeNC', $cache_record['longitude']); } tpl_set_var('longitude', $cache_record['longitude']); tpl_set_var('latitude', $cache_record['latitude']); tpl_set_var('lon_h', $lon_h); tpl_set_var('lon_min', $lon_min); tpl_set_var('lonEW', $lon_dir); tpl_set_var('lat_h', $lat_h); tpl_set_var('lat_min', $lat_min); tpl_set_var('latNS', $lat_dir); } tpl_set_var('cacheid', $cache_id); tpl_set_var('cachetype', htmlspecialchars(cache_type_from_id($cache_record['type'], $lang), ENT_COMPAT, 'UTF-8')); $iconname = str_replace("mystery", "quiz", $iconname); tpl_set_var('icon_cache', htmlspecialchars("{$stylepath}/images/{$iconname}", ENT_COMPAT, 'UTF-8')); tpl_set_var('cachesize', htmlspecialchars(cache_size_from_id($cache_record['size'], $lang), ENT_COMPAT, 'UTF-8')); tpl_set_var('oc_waypoint', htmlspecialchars($cache_record['wp_oc'], ENT_COMPAT, 'UTF-8')); if ($cache_record['topratings'] == 1) { tpl_set_var('rating_stat', mb_ereg_replace('{ratings}', $cache_record['topratings'], $rating_stat_show_singular)); } else { if ($cache_record['topratings'] > 1) { tpl_set_var('rating_stat', mb_ereg_replace('{ratings}', $cache_record['topratings'], $rating_stat_show_plural)); } else { tpl_set_var('rating_stat', ''); } } // cache_rating list of users // no geokrets in this cache
} if ($r_log['geokret_in'] != 0) { $thisline = mb_ereg_replace('{gkimage}', ' <img src="images/gk.png" border="0" alt="" title="GeoKret" />', $thisline); } else { $thisline = mb_ereg_replace('{gkimage}', ' ', $thisline); } $thisline = mb_ereg_replace('{cacheid}', $r['cacheid'], $thisline); $thisline = mb_ereg_replace('{userid}', $r['userid'], $thisline); // PowerTrail vel GeoPath icon if (isset($r['PT_ID'])) { $PT_icon = icon_geopath_small($r['PT_ID'], $r['PT_image'], $r['PT_name'], $r['PT_type'], $pt_cache_intro_tr, $pt_icon_title_tr); $thisline = mb_ereg_replace('{GPicon}', $PT_icon, $thisline); } else { $thisline = mb_ereg_replace('{GPicon}', '<img src="images/rating-star-empty.png" class="icon16" alt="" title="" />', $thisline); } $thisline = mb_ereg_replace('{cachetype}', htmlspecialchars(cache_type_from_id($r['type'], $lang), ENT_COMPAT, 'UTF-8'), $thisline); $thisline = mb_ereg_replace('{cachename}', htmlspecialchars($r['cachename'], ENT_COMPAT, 'UTF-8'), $thisline); $thisline = mb_ereg_replace('{username}', htmlspecialchars($r['username'], ENT_COMPAT, 'UTF-8'), $thisline); // if ($r['country']=='PL') { $thisline = mb_ereg_replace('{region}', htmlspecialchars($r['region'], ENT_COMPAT, 'UTF-8'), $thisline); // else { $thisline = mb_ereg_replace('{region}', '', $thisline);} $thisline = mb_ereg_replace('{date}', date($dateFormat, strtotime($r['date'])), $thisline); $thisline = mb_ereg_replace('{country}', htmlspecialchars(strtolower($r['country']), ENT_COMPAT, 'UTF-8'), $thisline); $cacheicon = myninc::checkCacheStatusByUser($r, $usr['userid']); $thisline = mb_ereg_replace('{imglink}', $cacheicon, $thisline); $thisline = mb_ereg_replace('{country_name}', htmlspecialchars($rr['country_name'], ENT_COMPAT, 'UTF-8'), $thisline); $content .= $thisline . "\n"; mysql_free_result($rs_log); } mysql_free_result($rs); tpl_set_var('newcaches', $content);
$tmpline = str_replace('{long}', tr('please_login'), $tmpline); $tmpline = str_replace('{lat}', tr('to_see_coords'), $tmpline); } else { if ($CalcCoordinates) { $tmpline = str_replace('{long}', htmlspecialchars(help_lonToDegreeStr($caches_record['longitude'])), $tmpline); if ($caches_record['coord_modified'] == true) { $tmpline = str_replace('{mod_cord_style}', 'style="color:orange;" alt ="' . $tr_Coord_have_been_modified . '" title="' . $tr_Coord_have_been_modified . '"', $tmpline); $tmpline = str_replace('{mod_suffix}', '[F]', $tmpline); } else { $tmpline = str_replace('{mod_cord_style}', '', $tmpline); $tmpline = str_replace('{mod_suffix}', '', $tmpline); } $tmpline = str_replace('{lat}', htmlspecialchars(help_latToDegreeStr($caches_record['latitude'])), $tmpline); } } $tmpline = str_replace('{cachetype}', htmlspecialchars(cache_type_from_id($caches_record['cache_type'], $lang), ENT_COMPAT, 'UTF-8'), $tmpline); // sp2ong short_desc ermitteln TODO: nicht die erste sondern die richtige wählen $tmpline = str_replace('{wp_oc}', htmlspecialchars($caches_record['wp_oc'], ENT_COMPAT, 'UTF-8'), $tmpline); if ($CalcCoordinates) { $tmpline = str_replace('{latitude}', htmlspecialchars($caches_record['latitude'], ENT_COMPAT, 'UTF-8'), $tmpline); $tmpline = str_replace('{longitude}', htmlspecialchars($caches_record['longitude'], ENT_COMPAT, 'UTF-8'), $tmpline); } $tmpline = str_replace('{short_desc}', htmlspecialchars(PrepareText($caches_record['short_desc']), ENT_COMPAT, 'UTF-8'), $tmpline); $dDiff = abs(dateDiff('d', $caches_record['date_created'], date('Y-m-d'))); if ($dDiff < $caches_olddays) { $tmpline = str_replace('{new}', $caches_newstring, $tmpline); } else { $tmpline = str_replace('{new}', '', $tmpline); } $tmpline = str_replace('{diffpic}', icon_difficulty("diff", $caches_record['difficulty']), $tmpline); $tmpline = str_replace('{terrpic}', icon_difficulty("terr", $caches_record['terrain']), $tmpline);