Example #1
0
    $nDistance = isset($_REQUEST['distance']) ? $_REQUEST['distance'] + 0 : 5;
    if ($nDistance > 150) {
        $nDistance = 150;
    }
    cache_locate($nLat, $nLon, $nDistance);
} else {
    if ($sMode == 'wpsearch') {
        $sWaypoint = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : '';
        output_cachexml($sWaypoint);
    } else {
        if ($sMode == 'namesearch') {
            $sName = isset($_REQUEST['name']) ? $_REQUEST['name'] : '';
            $nLat = isset($_REQUEST['lat']) ? $_REQUEST['lat'] + 0 : 0;
            $nLon = isset($_REQUEST['lon']) ? $_REQUEST['lon'] + 0 : 0;
            $nResultId = isset($_REQUEST['resultid']) ? $_REQUEST['resultid'] + 0 : 0;
            output_namesearch($sName, $nLat, $nLon, $nResultId);
        } else {
            if ($sMode == 'searchresult') {
                $nResultId = isset($_REQUEST['resultid']) ? $_REQUEST['resultid'] + 0 : 0;
                $compact = isset($_REQUEST['compact']) && $_REQUEST['compact'];
                $nLon1 = isset($_REQUEST['lon1']) ? $_REQUEST['lon1'] + 0 : 0;
                $nLon2 = isset($_REQUEST['lon2']) ? $_REQUEST['lon2'] + 0 : 0;
                $nLat1 = isset($_REQUEST['lat1']) ? $_REQUEST['lat1'] + 0 : 0;
                $nLat2 = isset($_REQUEST['lat2']) ? $_REQUEST['lat2'] + 0 : 0;
                $cachenames = isset($_REQUEST['cachenames']) ? $_REQUEST['cachenames'] + 0 : 0;
                $smallmap = isset($_REQUEST['smallmap']) ? $_REQUEST['smallmap'] + 0 : 0;
                $showlockedcaches = isset($_REQUEST['locked']) ? $_REQUEST['locked'] != 0 : true;
                output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat2, $cachenames, $smallmap, $showlockedcaches);
            } else {
                if ($sMode == 'fullscreen' || $sMode == '' && sql_value("SELECT option_value FROM user_options\n                       WHERE option_id=6 AND user_id='&1'", true, $login->userid)) {
                    $fullscreen = true;
Example #2
0
require_once './lib2/logic/cache.class.php';
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
if ($mode == 'locate') {
    $lat = isset($_REQUEST['lat']) ? $_REQUEST['lat'] + 0 : 0;
    $lon = isset($_REQUEST['lon']) ? $_REQUEST['lon'] + 0 : 0;
    cache_locate($lat, $lon);
} else {
    if ($mode == 'wpsearch') {
        $wp = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : '';
        output_cachexml($wp);
    } else {
        if ($mode == 'namesearch') {
            $name = isset($_REQUEST['name']) ? $_REQUEST['name'] : '';
            $lat = isset($_REQUEST['lat']) ? $_REQUEST['lat'] + 0 : 0;
            $lon = isset($_REQUEST['lon']) ? $_REQUEST['lon'] + 0 : 0;
            output_namesearch($name, $lat, $lon);
        } else {
            if ($mode == 'fullscreen') {
                $tpl->popup = true;
                $tpl->popupmargin = false;
            }
        }
    }
}
$tpl->name = 'map';
$tpl->menuitem = MNU_MAP;
$tpl->nowpsearch = true;
// get the correct mapkey
$sHost = strtolower($_SERVER['HTTP_HOST']);
if (isset($opt['lib']['google']['mapkey'][$sHost])) {
    $sGMKey = $opt['lib']['google']['mapkey'][$sHost];