diff options
Diffstat (limited to 'templates/show_search.inc')
-rw-r--r-- | templates/show_search.inc | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/templates/show_search.inc b/templates/show_search.inc new file mode 100644 index 00000000..78433854 --- /dev/null +++ b/templates/show_search.inc @@ -0,0 +1,89 @@ +<?php +/* + + Copyright (c) 2001 - 2005 Ampache.org + All rights reserved. + + 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. + +*/ + + +/*! + @header search template + @discussion This is the template for the searches... amazing! + +*/ + +?> +<form name="search" method="post" action="<?php echo conf('web_path'); ?>/search.php" enctype="multipart/form-data" style="Display:inline"> +<table class="tabledata" cellspacing="0" cellpadding="3" border="0" width="450px" style="clear:both;"> +<tr class="table-header"> + <td colspan="2"><b><?php echo _("Search Ampache"); ?>...</b></td> +</tr> +<tr class="<?php echo flip_class(); ?>"> + <td><?php echo _("Search"); ?>:</td> + <td><input type="text" name="search_string" value="<?php echo $_REQUEST['search_string']; ?>" /></td> +</tr> +<tr class="<?php echo flip_class(); ?>"> + <td><?php echo _("Object Type"); ?>:</td> + <td> + <?php + $search_type = $_REQUEST['search_field']; + if (isset($_REQUEST['search_field'])) { + $search_field = $_REQUEST['search_field']; + ${$search_field} = 1; + } else { + $search_field = conf('search_field'); + ${$search_field} = 1; + } + + if (isset($_REQUEST['search_type'])) { + $search_type = $_REQUEST['search_type']; + ${$search_type} = 1; + } else { + $search_type = conf('search_type'); + ${$search_type} = 1; + } + ?> + <select name="search_field"> + <option value="artist" <?php if ($artist) { echo "SELECTED"; } ?>>Artist</option> + <option value="album" <?php if ($album) { echo "SELECTED"; } ?>>Album</option> + <option value="song_title" <?php if ($song_title) { echo "SELECTED"; } ?>>Song Title</option> + <option value="song_genre" <?php if ($song_genre) { echo "SELECTED"; } ?>>Song Genre</option> + <option value="song_year" <?php if ($song_year) { echo "SELECTED"; } ?>>Song Year</option> + <option value="song_bitrate" <?php if ($song_bitrate) { echo "SELECTED"; } ?>>Song Bitrate</option> + <option value="song_min_bitrate" <?php if ($song_min_bitrate) { echo "SELECTED"; } ?>>Minimum Bitrate</option> + <option value="song_filename" <?php if ($song_filename) { echo "SELECTED"; } ?>>Song Filename</option> + </select> + </td> +</tr> +<tr class="<?php echo flip_class(); ?>"> + <td><?php echo _("Search Type"); ?>:</td> + <td> + <input type="radio" name="search_type" value="exact" <?php if ($_REQUEST['search_type'] === 'exact') { echo "CHECKED"; } ?>>Exact<br /> + <input type="radio" name="search_type" value="fuzzy" <?php if ($_REQUEST['search_type'] !== 'exact') { echo "CHECKED"; } ?>>Fuzzy<br /> + </td> +</tr> +<tr class="<?php echo flip_class(); ?>"> + <td> </td> + <td> + <input type="submit" value="<?php echo _("Search"); ; ?>" /> + <input type="reset" value="Reset Form" /> + <input type="hidden" name="action" value="search" /> + </td> +</tr> +</table> +</form> |