Example #1
0
        $SearchString = implode(' ', $QueryParts);
        $SphQL->where_match($SearchString, $Search, false);
        $SphQLTor->where_match($SearchString, $Search, false);
        $Filtered = true;
    }
}
if (!empty($_GET['year'])) {
    $Years = explode('-', $_GET['year']);
    if (is_number($Years[0]) || empty($Years[0]) && !empty($Years[1]) && is_number($Years[1])) {
        if (count($Years) === 1) {
            $SphQL->where('year', $Years[0]);
            $SphQLTor->where('year', $Years[0]);
        } else {
            if (empty($Years[0])) {
                $SphQL->where_lt('year', $Years[1], true);
                $SphQLTor->where_lt('year', $Years[1], true);
            } elseif (empty($Years[1]) || !is_number($Years[1])) {
                $SphQL->where_gt('year', $Years[0], true);
                $SphQLTor->where_gt('year', $Years[0], true);
            } else {
                if ($Years[0] > $Years[1]) {
                    $Years = array_reverse($Years);
                }
                $SphQL->where_between('year', array($Years[0], $Years[1]));
                $SphQLTor->where_between('year', array($Years[0], $Years[1]));
            }
        }
        $Filtered = true;
    }
}
if (isset($_GET['haslog']) && $_GET['haslog'] !== '') {