<?php

/*
** DGS Search
** $Id: query.php,v 1.1 2002/08/26 01:13:41 sella Exp $
** Copyright (c) 2000-2001 Digital Genesis Software, LLC. All Rights Reserved.
** Released under the GPL Version 2 License.
** http://www.digitalgenesis.com
*/

function query($retVal, $sq, $timer) {
	global $config, $css, $lang;

	$target = $config['target'];
	$dispR = ($sq['r'] == $config['maxResults']) ? 0 : $sq['r'];

   if (!isset($config['script'])) {
      $installBase = $config['installBase'];
      $urlBase = $config['urlBase'];
      $siteBase = $config['siteBase'];
      $searchURL = explode($siteBase, $installBase);
      $searchURL = $urlBase . str_replace('\\', '/', $searchURL[1]) . '/search.php';
   } else {
      $searchURL = $config['script'];
   }

	printf("\t<DIV CLASS=\"%s\"> <!-- Display Module: query -->\n\t\t<FORM METHOD=\"get\" ACTION=\"%s\" TARGET=\"%s\">\n\t\t\t%s&nbsp;\n\t\t\t<INPUT TYPE=\"text\" NAME=\"q\" VALUE=\"%s\" SIZE=\"30\" TABINDEX=\"1\">\n\t\t\t<INPUT TYPE=\"hidden\" NAME=\"r\" VALUE=\"%d\">\n\t\t\t<INPUT TYPE=\"submit\" VALUE=\"%s\">\n\t\t</FORM>\n\t</DIV>\n", $css['query'], $searchURL, $target, $lang['query'], $sq['cleanQ'], $dispR, $lang['submit']);

	return true;
}

/*
** Local Variables:
** c-basic-offset: 3
** tab-width: 3
** End:
** vim600: fdm=marker
** vim: noet ts=3 sw=3
*/

?>
