Going XHTML.
[squirrelmail.git] / templates / default / search.tpl
CommitLineData
146acc11 1<?php
2/**
3 * search.tpl
4 *
5 * Display the simple (single field) search fields
6 *
7 * The following variables are available in this template:
8 * $allow_advanced_search - boolean TRUE if the advacned search feature is available
9 * $adv_toggle_link - URL to toggle between basic and advanced searches.
10 * NULL if advanced search has been disabled.
11 * $adv_toggle_text - Text to toggle between basic and advanced searches.
12 * NULL if advanced search has been disabled.
13 * $mailbox_options - array containing sanitized list of mailboxes to
14 * sort. Index of each element is the value that
15 * should be assigned to the HTML input element.
16 * $unary_options - array containing sanitized list of unary options,
17 * e.g. NOT. Index of each element is the value that
18 * should be assigned to the HTML input element.
19 * $where_options - array containing sanitized list of fields availble
20 * to search on. Index of each element is the value
21 * that should be assigned to the HTML input element.
22 * $mailbox_sel - the selected mailbox for the search
23 * $unary_sel - the selected unary operator for the search
24 * $where_sel - the selected field to search in for the search
25 * $what_val - the value that is to be searched for.
26 *
27 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
28 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
29 * @version $Id$
30 * @package squirrelmail
31 * @subpackage templates
32 */
33
34/** add required includes **/
35
36/** extract template variables **/
37extract($t);
38
39/** Begin template **/
40?>
41<div class="search">
42<table cellspacing="0" class="table2">
43 <tr>
44 <td class="header1" colspan="5">
45 <?php echo _("Search"); ?>
46 <?php
47 if ($allow_advanced_search) {
48 ?>
49 - <small>[<a href="<?php echo $adv_toggle_link; ?>"><?php echo $adv_toggle_text; ?></a>]</small>
50 <?php
51 }
52 ?>
53 </td>
54 </tr>
55 <tr>
56 <td class="searchForm">
57 <?php echo _("In"); ?>
58 <select name="mailbox[0]">
59 <?php
60 foreach ($mailbox_options as $value=>$option) {
61 echo '<option value="'. $value .'"' . (strtolower($value)==$mailbox_sel ? ' selected="selected"' : '').'>' . $option .'</option>'."\n";
62 }
63 ?>
64 </select>
65 </td>
66 <td class="searchForm">
67 <select name="unop[0]">
68 <?php
69 foreach ($unary_options as $value=>$option) {
70 echo '<option value="'. $value .'"' . ($value==$unary_sel ? ' selected="selected"' : '').'>' . $option .'</option>'."\n";
71 }
72 ?>
73 </select>
74 &nbsp;
75 <select name="where[0]">
76 <?php
77 foreach ($where_options as $value=>$option) {
78 echo '<option value="'. $value .'"' . ($value==$where_sel ? ' selected="selected"' : '').'>' . $option .'</option>'."\n";
79 }
80 ?>
81 </select>
82 </td>
83 <td class="searchForm">
84 <input type="text" name="what[0]" value="<?php echo $what_val; ?>" size="35" />
85 </td>
86 <td class="searchForm">
87 <input type="submit" name="submit" value="<?php echo _("Search"); ?>" />
88 </td>
89 </tr>
90</table>
91</div>