Skip to content
Permalink
Browse files

show own unpublished caches on map

  • Loading branch information...
following5 committed Jul 23, 2013
1 parent 988dad2 commit f5dd9fc91ccd8e7377d4ff384fc7c8c6cd248fad
Showing with 5 additions and 5 deletions.
  1. +3 −3 htdocs/map2.php
  2. +2 −2 htdocs/templates2/ocstyle/map2.tpl
@@ -276,7 +276,7 @@ function output_cachexml($sWaypoint)
$rsCache = sql_slave("SELECT `caches`.`cache_id`, `caches`.`name`, `caches`.`wp_oc`, `caches`.`cache_id`, `caches`.`type`,
`caches`.`longitude`, `caches`.`latitude`,
IF(`caches`.`status` IN (2,3,6), 1, 0) AS `tna`,
`caches`.`status`>1 AS `inactive`,
IFNULL(`trans_status_text`.`text`, `cache_status`.`name`) AS `statustext`,
IFNULL(`trans_type_text`.`text`, `cache_type`.`name`) AS `type_text`, `cache_type`.`id` AS `type_id`,
IFNULL(`trans_size_text`.`text`, `cache_size`.`name`) AS `size`,
@@ -332,7 +332,7 @@ function output_cachexml($sWaypoint)
echo 'name="' . xmlentities($rCache['name']) . '" ';
echo 'wpoc="' . xmlentities($rCache['wp_oc']) . '" ';
echo 'coords="' . $rCache['longitude'] . ',' . $rCache['latitude'] . '" ';
echo 'status_tna="' . xmlentities($rCache['tna']) . '" ';
echo 'inactive="' . xmlentities($rCache['inactive']) . '" ';
echo 'status_text="' . xmlentities($rCache['statustext']) . '" ';
echo 'type_id="' . xmlentities($rCache['type_id']) . '" ';
echo 'type_text="' . xmlentities($rCache['type_text']) . '" ';
@@ -466,7 +466,7 @@ function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat
LEFT JOIN `cache_logs` `notfound_logs` ON `notfound_logs`.`cache_id`=`caches`.`cache_id` AND `notfound_logs`.`user_id`='&6' AND `notfound_logs`.`type`=2
LEFT JOIN `caches_attributes` ON `caches_attributes`.`cache_id`=`caches`.`cache_id` AND `caches_attributes`.`attrib_id`=6
WHERE `map2_data`.`result_id`='&1' AND `caches`.`longitude`>'&2' AND `caches`.`longitude`<'&3' AND `caches`.`latitude`>'&4' AND `caches`.`latitude`<'&5'
AND `caches`.`status`<>5 /* hide unpublished caches */
AND (`caches`.`status`<>5 OR `caches`.`user_id`='&6') /* hide unpublished caches */
AND `caches`.`status`<>'&7' /* ... and vandalized listings, locked duplicates etc. */
AND `caches`.`status`<>7 /* ... and locked/invisible caches */
ORDER BY `caches`.`status` DESC, `oconly` AND NOT (`found` OR `notfound`), NOT (`found` OR `notfound`), `caches`.`type`<>4, MD5(`caches`.`name`)
@@ -1131,7 +1131,7 @@ function parseXML_GetHTML(xmlobject)
var sName = aCaches[0].getAttribute("name");
var sWPOC = aCaches[0].getAttribute("wpoc");
var sCoords = aCaches[0].getAttribute("coords");
var bStatusTNA = aCaches[0].getAttribute("status_tna");
var bInactive = aCaches[0].getAttribute("inactive");
var sStatusText = aCaches[0].getAttribute("status_text");
var nTypeId = aCaches[0].getAttribute("type_id");
var sTypeText = aCaches[0].getAttribute("type_text");
@@ -1159,7 +1159,7 @@ function parseXML_GetHTML(xmlobject)
*}
var sHtml = "<div id='mapinfowindow' class='mappopup' style='z-index:800'><table class='mappopup'>";
if (bStatusTNA == 1)
if (bInactive == 1)
sHtml += "<tr><td colspan='2'><font size='2' color='red'><b>" + xmlentities(sStatusText) + "</b></font></td></tr>";
// InfoWindows have a min width; set min width for content to avoid large right borders:

0 comments on commit f5dd9fc

Please sign in to comment.
You can’t perform that action at this time.