<?php
// ------------------------------------------------------------------------- //
//                XOOPS - PHP Content Management System                      //
//                       <http://www.xoops.org/>                             //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
// get textsanitizer class global object
$myts =& MyTextSanitizer::getInstance();

// initialize form vars
$query = $myts->makeTboxData4PreviewInForm($query);

// create form elements
$query_text = new XoopsFormText(_SR_KEYWORDS, "query", 30, 255, $query);
$type_select = new XoopsFormSelect(_SR_TYPE, "andor", $andor);
$type_select->addOptionArray(array("AND"=>_SR_ALL, "OR"=>_SR_ANY, "exact"=>_SR_EXACT));
$mods_checkbox = new XoopsFormCheckBox(_SR_SEARCHIN, "mids[]", $mids);
$mods_checkbox->addOptionArray(XoopsModule::getHasSearchModulesList());
$action_hidden = new XoopsFormHidden("action", "results");
$submit_button = new XoopsFormButton("", "submit", _SR_SEARCH, "submit");

// create form
$search_form = new XoopsThemeForm(_SR_SEARCH, "search", "search.php");
$search_form->addElement($query_text);
$search_form->addElement($type_select);
$search_form->addElement($mods_checkbox);
$search_form->addElement($action_hidden);
$search_form->addElement($submit_button);
?>