/** * if coordinates were changed, update altitude * @param array $oldCacheRecord * @param integer $cacheId * @param integer $altitude */ function updateAltitudeIfNeeded($oldCacheRecord, $cacheId, $altitude = NULL) { /* add cache altitude altitude */ $geoCache = new GeoCache(array('cacheId' => $cacheId)); if ($geoCache->getCoordinates()->getLatitude() != $oldCacheRecord['latitude'] || $geoCache->getCoordinates()->getLongitude() != $oldCacheRecord['longitude']) { $geoCache->getAltitude()->pickAndStoreAltitude($altitude); } }
$email_content = mb_ereg_replace('{rrActivateCache_06}', tr('rrActivateCache_06'), $email_content); $email_content = mb_ereg_replace('{username}', $usr['username'], $email_content); $email_content = mb_ereg_replace('{cachename}', $name, $email_content); $email_content = mb_ereg_replace('{cacheid}', $cache_id, $email_content); $email_content = mb_ereg_replace('{octeamEmailsSignature}', $octeamEmailsSignature, $email_content); $email_headers = "Content-Type: text/plain; charset=utf-8\r\n"; $email_headers .= "From: {$site_name} <{$octeam_email}>\r\n"; $email_headers .= "Reply-To: {$octeam_email}\r\n"; $octeam_email = $octeam_email; //send email to octeam mb_send_mail($octeam_email, tr('rrActivateCache_07') . ": " . $name, $email_content, $email_headers); XDb::xSql("UPDATE sysconfig SET value = value + 1\n WHERE name = 'hidden_for_approval'"); } /* add cache altitude altitude */ $geoCache = new \lib\Objects\GeoCache\GeoCache(array('cacheId' => $cache_id)); $geoCache->getAltitude()->pickAndStoreAltitude($altitude); // redirection tpl_redirect('mycaches.php?status=' . urlencode($sel_status)); } else { tpl_set_var('general_message', $error_general); } } } } tpl_set_var('is_disabled_size', ''); tpl_set_var('language4js', $lang); if ($no_tpl_build == false) { //make the template and send it out tpl_BuildTemplate(); } function getDefaultCountry($usr, $lang)
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 tpl_set_var('list_of_rating_begin', ''); tpl_set_var('list_of_rating_end', ''); tpl_set_var('body_scripts', ''); tpl_set_var('altitude', $geocache->getAltitude()->getAltitude()); $rscr = sql("SELECT user.username username FROM `cache_rating` INNER JOIN user ON (cache_rating.user_id = user.user_id) WHERE cache_id=&1 ORDER BY username", $cache_id); if ($rscr == false) { tpl_set_var('list_of_rating_begin', ''); tpl_set_var('list_of_rating_end', ''); } else { // ToolTips Ballon tpl_set_var('body_scripts', '<script type="text/javascript" src="lib/js/wz_tooltip.js"></script><script type="text/javascript" src="lib/js/tip_balloon.js"></script><script type="text/javascript" src="lib/js/tip_centerwindow.js"></script>'); $lists = ''; $numr = mysql_num_rows($rscr) - 1; for ($i = 0; $i < mysql_num_rows($rscr); $i++) { $record = sql_fetch_array($rscr); $lists .= $record['username']; if (mysql_num_rows($rscr) == 1) { $lists .= ' '; } else {