From 763d9eb71fc0b4efb93c93e6f16762d5adac1e46 Mon Sep 17 00:00:00 2001 From: following Date: Wed, 25 Jul 2012 01:43:56 +0200 Subject: [PATCH] =?UTF-8?q?'#4511:=20Karte:=20PopUp-Tafel=20bei=20Events?= =?UTF-8?q?=20l=C3=BCckenhaft'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/map2.php | 7 +++++-- htdocs/templates2/ocstyle/map2.tpl | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/map2.php b/htdocs/map2.php index 947445d0..f5b907be 100644 --- a/htdocs/map2.php +++ b/htdocs/map2.php @@ -188,7 +188,7 @@ function output_cachexml($sWaypoint) { global $opt, $login; - $rsCache = sql_slave("SELECT `caches`.`name`, `caches`.`wp_oc`, `caches`.`cache_id`, + $rsCache = sql_slave("SELECT `caches`.`name`, `caches`.`wp_oc`, `caches`.`cache_id`, `caches`.`type`, `caches`.`longitude`, `caches`.`latitude`, IF(`caches`.`status`=2, 1, 0) AS `tna`, IFNULL(`trans_status_text`.`text`, `cache_status`.`name`) AS `statustext`, @@ -224,10 +224,12 @@ function output_cachexml($sWaypoint) } $nGeokretyCount = sql_value_slave("SELECT COUNT(*) FROM `gk_item_waypoint` WHERE `wp`='&1'", 0, $sWaypoint); - $nNotFoundCount = 0; + $nNotFoundCount = $nAttendedCount = 0; $nFoundCount = sql_value_slave("SELECT COUNT(*) FROM `cache_logs` WHERE `user_id`='&1' AND `cache_id`='&2' AND `type`=1", 0, $login->userid, $rCache['cache_id']); if ($nFoundCount == 0) $nNotFoundCount = sql_value_slave("SELECT COUNT(*) FROM `cache_logs` WHERE `user_id`='&1' AND `cache_id`='&2' AND `type`=2", 0, $login->userid, $rCache['cache_id']); + if ($rCache['type'] == 6) + $nAttendedCount = sql_value_slave("SELECT COUNT(*) FROM `cache_logs` WHERE `user_id`='&1' AND `cache_id`='&2' AND `type`=7", 0, $login->userid, $rCache['cache_id']); echo '' . "\n"; echo ' ' . "\n"; diff --git a/htdocs/templates2/ocstyle/map2.tpl b/htdocs/templates2/ocstyle/map2.tpl index e8f0899a..d15a78c7 100644 --- a/htdocs/templates2/ocstyle/map2.tpl +++ b/htdocs/templates2/ocstyle/map2.tpl @@ -774,6 +774,7 @@ var nGeoKreties = aCaches[0].getAttribute("geokreties"); var bFound = aCaches[0].getAttribute("found"); var bNotFound = aCaches[0].getAttribute("notfound"); + var bAttended = aCaches[0].getAttribute("attended"); var bOwner = aCaches[0].getAttribute("owner"); var sUsername = aCaches[0].getAttribute("username"); var nUserId = aCaches[0].getAttribute("userid"); @@ -799,6 +800,9 @@ if (bNotFound==1) sHtml += " {/literal}{t escape=js}You havn't found this cache, yet{/t}{literal}"; + if (bAttended==1) + sHtml += " {/literal}{t escape=js}You have attended this event!{/t}{literal}"; + if (nGeoKreties>0) sHtml += " {/literal}{t escape=js}This cache stores a GeoKrety{/t}{literal}";