summaryrefslogtreecommitdiffstats
path: root/templates/show_search_bar.inc
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-07-18 02:55:07 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-07-18 02:55:07 +0000
commitf999eeb21c73e3f6c653994b20fc8fec89f69644 (patch)
tree44a9377f4f9604bea64b2da5a6951f1c01973ef4 /templates/show_search_bar.inc
parent39ea881cc5ec586b70650246b7fc1471e5fcca8a (diff)
downloadampache-f999eeb21c73e3f6c653994b20fc8fec89f69644.tar.gz
ampache-f999eeb21c73e3f6c653994b20fc8fec89f69644.tar.bz2
ampache-f999eeb21c73e3f6c653994b20fc8fec89f69644.zip
new search bar
Diffstat (limited to 'templates/show_search_bar.inc')
-rw-r--r--templates/show_search_bar.inc78
1 files changed, 78 insertions, 0 deletions
diff --git a/templates/show_search_bar.inc b/templates/show_search_bar.inc
new file mode 100644
index 00000000..e574ef38
--- /dev/null
+++ b/templates/show_search_bar.inc
@@ -0,0 +1,78 @@
+<?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!
+
+ 7/16/05 Do it in smaller bar format - sigger
+
+*/
+
+?>
+<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" style="clear:both;" width="100%">
+<tr class="table-header">
+ <td colspan="4"><b><?php echo _("Search Ampache"); ?>...</b></td>
+</tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td><input type="text" name="search_string" value="<?php echo $_REQUEST['search_string']; ?>" /></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>
+ <td>
+ <input type="submit" value="<?php echo _("Search"); ; ?>" />&nbsp;&nbsp;
+ <input type="hidden" name="action" value="search" />
+ <input type="hidden" name="search_type" value="fuzzy" />
+ </td>
+</tr>
+</table>
+</form>
+