<key>normal</key> <styleUrl>#marker_cat_' . $tmpcat . '_n</styleUrl> </Pair> <Pair> <key>highlight</key> <styleUrl>#marker_cat_' . $tmpcat . '_h</styleUrl> </Pair> </StyleMap> '; } // add filter clauses $fltr = $_GET['fltr']; $filter_clause = ''; if ($fltr) { require_once dirname(__FILE__) . '/CL_filter.php'; $filter = new LeonardoFilter(); $filter->parseFilterString($fltr); // echo "<PRE>"; print_r($filter->filterArray); echo "</PRE>"; $filter_clause = $filter->makeClause(); if (!strpos($filter_clause, $waypointsTable) === false) { $extra_tbl = " LEFT JOIN {$waypointsTable} ON {$flightsTable}.takeoffID={$waypointsTable}.ID "; } if (!strpos($filter_clause, $pilotsTable) === false) { $extra_tbl .= " LEFT JOIN {$pilotsTable} ON \n\t\t\t\t\t\t({$flightsTable}.userID={$pilotsTable}.pilotID AND \n\t\t\t\t\t\t{$flightsTable}.userServerID={$pilotsTable}.serverID) "; } } $query = "SELECT * FROM {$flightsTable} {$extra_tbl} WHERE \n\t\t\t\t firstLat>={$south} && firstLat<={$north} && \n\t\t\t\t firstLon>={$west} && firstLon<={$east} {$filter_clause}\n\t\t\t\t ORDER BY FLIGHT_POINTS DESC LIMIT 100 "; //echo $query; $res = $db->sql_query($query); if ($res <= 0) { echo "<H3> Error in query! {$query} </H3>\n";
&FILTER_duration_op=%3E%3D &FILTER_duration_hours_select=23 &FILTER_duration_minutes_select=12 add also - Extend Filter with checkbox categories for Paraglider LTF Class (LTF 1, 1-2, 2, 2-3, A, B, C, D, E, Open) - Extend Filter with checkbox category for Hanggliders with Kingposts. - Extend Filter page with Pilot Birthdate. - Extend Filter page for Start type: foot, winch, microlight tow or e-motor (is to be included on GUI_flight_submit.php) Integrate RSS Feed in Filterpage, to generate Feeds according to filter settings. Ensure Filter bookmarks function correctly (check seasons mod). Ensure Filter settings function correctly on all scoring lists. */ $filterOps = array(0x20 => array("FILTER_DATE"), 0x22 => array("FILTER_PilotBirthdate"), 0x40 => array("FILTER_pilots_incl", 'pilot', 'userID'), 0x41 => array("FILTER_countries_incl", 'country', $waypointsTable . '.countryCode'), 0x42 => array("FILTER_takeoffs_incl", 'takeoff', 'takeoffID'), 0x43 => array("FILTER_nationality_incl", 'nationality', $pilotsTable . '.countryCode'), 0x44 => array("FILTER_server_incl", 'server', $flightsTable . '.serverID'), 0x45 => array("FILTER_nacclubs_incl", 'nacclub', $flightsTable . '.NACclubID'), 0x60 => array("FILTER_sex"), 0x61 => array("FILTER_cat"), 0x62 => array("FILTER_class"), 0x63 => array("FILTER_olc_type"), 0x64 => array("FILTER_glider_cert"), 0x65 => array("FILTER_start_type"), 0x66 => array("FILTER_WEEKEND"), 0x80 => array("FILTER_linear_distance"), 0x81 => array("FILTER_olc_distance"), 0x82 => array("FILTER_olc_score"), 0x83 => array("FILTER_duration")); if (0) { //echo leonardoFilter::getShort("10004",0); $filter = new LeonardoFilter(); $filterString = $_GET['f']; if (!$filterString) { $filterString = "80000260000820C100A64100A741gr_de_us_fr.402466_4672_17282_13461." . "45101_234_235_271."; } $filter->parseFilterString($filterString); echo "<PRE>"; print_r($filter->filterArray); echo "</PRE>"; echo $filter->makeClause(); echo "<HR>" . $filterString . "<HR>" . $filter->makeFilterString(); } class leonardoFilter { var $filterArray = array(); var $filterTextual = "";
// DEBUG setVarFromRequest("DBGcat",""); setVarFromRequest("DBGlvl",0,1); // new filter code setVarFromRequest("fltr",0); if ($fltr) { $filter=new LeonardoFilter(); $filter->parseFilterString($fltr); // echo "<PRE>"; print_r($filter->filterArray); echo "</PRE>"; $_SESSION['filter_clause']=$filter->makeClause(); } if ($_REQUEST['setFilter']==1) { // form submitted if (!$filter) $filter=new LeonardoFilter(); //echo "<pre>"; print_r($_REQUEST); echo "</pre>"; $filter->filterImport('_REQUEST'); //echo "<PRE>"; print_r($filter->filterArray); echo "</PRE>"; if ($_REQUEST['clearFilter']==1) { $_SESSION["filter_clause"]=''; $_SESSION["fltr"]=''; } else { $_SESSION["filter_clause"]=$filter->makeClause(); $_SESSION["fltr"]=$filter->makeFilterString(); } } // echo "<PRE>"; print_r($_SESSION['filter_clause']); echo "</PRE>";
if (!empty($nacdata['use_clubs'])) { $key = 'nacclubs' . $nacid . '_incl'; $dlgfilters[$key] = new dialogfilter('nacclub', 'FILTER_' . $key, $nacid); } } } } $dlgfilters['countries_incl'] = new dialogfilter('country', 'FILTER_countries_incl'); $dlgfilters['takeoffs_incl'] = new dialogfilter('takeoff', 'FILTER_takeoffs_incl'); $dlgfilters['nationality_incl'] = new dialogfilter('nationality', 'FILTER_nationality_incl'); if (count($CONF['servers']['list'])) { $dlgfilters['servers_incl'] = new dialogfilter('server', 'FILTER_server_incl'); } $filterkeys = array_keys($dlgfilters); setVarFromRequest("fltr", 0); $filter = new LeonardoFilter(); $filter->parseFilterString($fltr); // echo "<PRE>"; print_r($filter->filterArray); echo "</PRE>"; $_SESSION['filter_clause'] = $filter->makeClause(); // echo "<pre>".print_r($filter->filterArray)."</pre>"; global $filterVariables; $filter->filterExport('filterVariables'); // print_r($filterVariables); if (is_array($filterVariables)) { foreach ($filterVariables as $key => $value) { if (is_array($value)) { continue; } if (substr($key, 0, 7) == "FILTER_") { ${$key} = $value; }
if (!empty($nacdata['use_clubs'])) { $key = 'nacclubs' . $nacid . '_incl'; $dlgfilters[$key] = new dialogfilter('nacclub', 'FILTER_' . $key, $nacid); } } } } $dlgfilters['countries_incl'] = new dialogfilter('country', 'FILTER_countries_incl'); $dlgfilters['takeoffs_incl'] = new dialogfilter('takeoff', 'FILTER_takeoffs_incl'); $dlgfilters['nationality_incl'] = new dialogfilter('nationality', 'FILTER_nationality_incl'); if (count($CONF['servers']['list'])) { $dlgfilters['servers_incl'] = new dialogfilter('server', 'FILTER_server_incl'); } $filterkeys = array_keys($dlgfilters); if (!$filter) { $filter = new LeonardoFilter(); } // echo "<pre>".print_r($filter->filterArray)."</pre>"; if (($_REQUEST['setFilter'] == 1 || $_GET['fl_url'] == 1) && 0) { // form submitted // we have taken care of this at index.php } else { // form not submitted global $filterVariables; $filter->filterExport('filterVariables'); print_r($filterVariables); if (is_array($filterVariables)) { foreach ($filterVariables as $key => $value) { if (is_array($value)) { continue; }