Exemplo n.º 1
0
                 $cache_bylist = implode(",", $_SESSION['print_list']);
             }
         }
     }
     $sql_select[] = '`caches`.`cache_id` `cache_id`';
     $sql_from[] = '`caches`';
     $sql_where[] = '`caches`.`cache_id` IN (' . $cache_bylist . ')';
 } elseif ($options['searchtype'] == 'bypt') {
     //print '<pre>';
     //print_r($_SESSION['geoPathCacheList']);
     if (isset($_SESSION['geoPathCacheList']) && count($_SESSION['geoPathCacheList']) > 0) {
         $cache_bylist = implode(",", $_SESSION['geoPathCacheList']);
         $options['gpxPtFileName'] = $_SESSION['ptName'];
     } else {
         $options['ptId'] = (int) $_REQUEST['ptId'];
         $cache_bylist = implode(",", powerTrailBase::getPtCachesIds($options['ptId']));
         $ptDetails = powerTrailBase::getPtDbRow($options['ptId']);
         $options['gpxPtFileName'] = powerTrailBase::clearPtNames($ptDetails['name']);
     }
     $sql_select[] = '`caches`.`cache_id` `cache_id`';
     $sql_from[] = '`caches`';
     $sql_where[] = '`caches`.`cache_id` IN (' . $cache_bylist . ')';
     // unset ($_SESSION['geoPathCacheList']);
 } elseif ($options['searchtype'] == 'bywaypoint' && $options['waypoint'] != '') {
     $sql_select[] = '`caches`.`cache_id` `cache_id`';
     $sql_from[] = '`caches`';
     $sql_where[] = '`caches`.`wp_' . sql_escape($options['waypointtype']) . '`=\'' . sql_escape($options['waypoint']) . '\'';
 } elseif ($options['searchtype'] == 'byfulltext') {
     require_once $rootpath . 'lib/ftsearch.inc.php';
     $fulltext = $options['fulltext'];
     $hashes = ftsearch_hash($fulltext);