made a copy
[atutor.git] / include / html / dropdowns / search.inc.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
6 /* Adaptive Technology Resource Centre / University of Toronto                  */
7 /* http://atutor.ca                                                                                                             */
8 /*                                                                                                                                              */
9 /* This program is free software. You can redistribute it and/or                */
10 /* modify it under the terms of the GNU General Public License                  */
11 /* as published by the Free Software Foundation.                                                */
12 /************************************************************************/
13 // $Id$
14
15 if (!defined('AT_INCLUDE_PATH')) { exit; }
16 global $_base_path, $include_all, $include_one, $stripslashes;
17 global $savant;
18
19 ob_start(); 
20
21 if (!isset($include_all, $include_one)) {
22         $include_one = ' checked="checked"';
23 }
24 if (!isset($_GET['words'])) {
25         $_GET['words'] = '';
26 } else {
27         $_GET['words'] = stripslashes(htmlspecialchars($_GET['words']));
28 }
29 ?>
30
31 <form action="<?php echo $_base_path; ?>search.php#search_results" method="get" name="searchform">
32 <input type="hidden" name="search" value="1" />
33 <input type="hidden" name="find_in" value="this" />
34 <input type="hidden" name="display_as" value="pages" />
35 <input type="hidden" name="search_within[]" value="content" />
36 <input type="hidden" name="search_within[]" value="forums" />
37 <label for="words" style="display:none;"><?php echo _AT('search'); ?></label>
38 <input type="text" name="words" class="formfield" size="20" id="words" value="<?php echo $_GET['words']; ?>" /><br />
39 <fieldset>
40 <legend style="display:none;"><?php echo _AT('search'); ?></legend>
41 <small>
42         <?php echo _AT('search_match'); ?>:<br />
43         <input type="radio" name="include" value="all" id="all2"<?php echo $include_all; ?> /><label for="all2"><?php echo _AT('search_all_words'); ?></label><br />
44
45         <input type="radio" name="include" value="one" id="one2"<?php echo $include_one; ?> /><label for="one2"><?php echo _AT('search_any_word'); ?></label><br />
46 </small>
47 </fieldset>
48 <input type="submit" name="submit" value="<?php echo _AT('search'); ?>" class="button" />
49 </form>
50
51 <?php
52 $savant->assign('dropdown_contents', ob_get_contents());
53 ob_end_clean();
54
55 $savant->assign('title', _AT('search'));
56
57 $savant->display('include/box.tmpl.php');
58 ?>