<?php
/**
 * @package Flatnux_block_search
 * @author Alessandro Vernassa <speleoalex@gmail.com>
 * @copyright Copyright (c) 2011
 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License
 * 
 */
defined('_FNEXEC') or die('Restricted access');
global $_FN;
//-----------------------------get request vars-------------------------------->
$q = trim(ltrim(FN_GetParam("q", $_REQUEST, "html")));
$method = FN_GetParam("method", $_REQUEST, "html");
$where = FN_GetParam("where", $_REQUEST, "html");
$op = FN_GetParam("op", $_REQUEST, "html");
$maxres = 100;
$contares = 0;
//-----------------------------get request vars--------------------------------<
//----------------------------print search form-------------------------------->
echo "<div class=\"searchform\">";
echo "\n<form method=\"post\" action=\"" . FN_RewriteLink("index.php?mod=search&amp;op=$op") . "\" ><div>";
echo FN_i18n("search", false, "Aa") . ": ";
echo "<input size=\"10\" type=\"text\" name=\"q\" value = \"$q\" />";
echo "<input type=\"hidden\" name=\"where\" value = \"$where\" />";
echo "<input type=\"hidden\" name=\"op\" value = \"$op\" />";
echo "\n<select name=\"method\">";
$s = ($method == "OR") ? "selected=\"selected\"" : "";
echo "\n\t<option value=\"OR\" $s >" . FN_i18n("any word") . "</option>";
$s = ($method == "AND") ? "selected=\"selected\"" : "";
echo "\n\t<option value=\"AND\" $s >" . FN_i18n("all word") . "</option>";
$s = ($method == "") ? "selected=\"selected\"" : "";
echo "\n\t<option value=\"\" $s >" . FN_i18n("exact phrase") . "</option>";
echo "\n</select>";
echo "<br />\n\t<button type=\"submit\" >";
echo FN_i18n("search");
echo "</button>";
echo "</div></form>\n";
echo "</div>";
//----------------------------print search form--------------------------------<
?>
