case 'showSerie': $powerTrail = new lib\Objects\PowerTrail\PowerTrail(array('id' => (int) $_GET['ptrail'])); $ptOwners = $pt->getPtOwners(); $_SESSION['ptName'] = powerTrailBase::clearPtNames($powerTrail->getName()); tpl_set_var('powerTrailId', $powerTrail->getId()); if (!$usr && $hide_coords) { tpl_set_var('mapOuterdiv', 'none'); } else { tpl_set_var('mapOuterdiv', 'block'); } $userIsOwner = $powerTrail->isUserOwner($usr['userid']); if ($powerTrail->getStatus() == 1 || $userIsOwner || $appContainer->getLoggedUser() !== false && $appContainer->getLoggedUser()->getIsAdmin()) { $ptTypesArr = powerTrailBase::getPowerTrailTypes(); $ptStatusArr = \lib\Controllers\PowerTrailController::getPowerTrailStatus(); $foundCachsByUser = $powerTrail->getFoundCachsByUser($usr['userid']); $leadingUser = powerTrailBase::getLeadingUser($powerTrail->getId()); if ($powerTrail->getConquestedCount() > 0) { $removeCacheButtonDisplay = 'none'; } else { $removeCacheButtonDisplay = 'inline'; } tpl_set_var('ptStatusSelector', generateStatusSelector($powerTrail->getStatus())); tpl_set_var('removeCacheButtonDisplay', $removeCacheButtonDisplay); tpl_set_var('leadingUserId', $leadingUser['user_id']); tpl_set_var('leadingUserName', $leadingUser['username']); tpl_set_var('fullCountryMap', '0'); tpl_set_var('ptTypeName', tr($ptTypesArr[$powerTrail->getType()]['translate'])); tpl_set_var('displaySelectedPowerTrail', 'block'); tpl_set_var('powerTrailName', $powerTrail->getName()); tpl_set_var('powerTrailDescription', stripslashes(htmlspecialchars_decode($powerTrail->getDescription()))); tpl_set_var('displayPtDescriptionUserAction', displayPtDescriptionUserAction($powerTrail));