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