Browse Source

add method filters

main
ghost 2 years ago
parent
commit
acafdfcf3a
  1. 4
      public/search.php

4
public/search.php

@ -34,7 +34,7 @@ if (!empty($q)) {
} }
// Mime list // Mime list
$hostPagesMime = $sphinx->searchHostPagesMime($q); $hostPagesMime = $sphinx->searchHostPagesMime(Filter::searchQuery($q, $m));
// Define page basics // Define page basics
$totalPages = $sphinx->getHostPagesTotal(); $totalPages = $sphinx->getHostPagesTotal();
@ -310,7 +310,7 @@ if (filter_var($q, FILTER_VALIDATE_URL) && preg_match(CRAWL_URL_REGEXP, $q)) {
<h1><a href="<?php echo WEBSITE_DOMAIN; ?>"><?php echo _('YGGo!') ?></a></h1> <h1><a href="<?php echo WEBSITE_DOMAIN; ?>"><?php echo _('YGGo!') ?></a></h1>
<input type="text" name="q" placeholder="<?php echo $placeholder ?>" value="<?php echo htmlentities($q) ?>" /> <input type="text" name="q" placeholder="<?php echo $placeholder ?>" value="<?php echo htmlentities($q) ?>" />
<?php foreach ($hostPagesMime as $hostPageMime) { ?> <?php foreach ($hostPagesMime as $hostPageMime) { ?>
<label><input type="radio" name="t" value="<?php echo $hostPageMime->mime ?>" <?php echo ($t == $hostPageMime->mime ? 'checked="checked"' : false) ?>/> <?php echo $hostPageMime->mime ?> <!--(<?php // echo $sphinx->searchHostPagesTotalByMime($q, $hostPageMime->mime) ?>)--></label> <label><input type="radio" name="t" value="<?php echo $hostPageMime->mime ?>" <?php echo ($t == $hostPageMime->mime ? 'checked="checked"' : false) ?>/> <?php echo $hostPageMime->mime ?> <!--(<?php // echo $sphinx->searchHostPagesTotalByMime(Filter::searchQuery($q, $m), $hostPageMime->mime) ?>)--></label>
<?php } ?> <?php } ?>
<button type="submit"><?php echo _('Search'); ?></button> <button type="submit"><?php echo _('Search'); ?></button>
</form> </form>

Loading…
Cancel
Save