diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-17 16:32:04 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-17 16:32:04 +0000 |
commit | e3734f063ed58356f9653a81f6dea86aa55931f4 (patch) | |
tree | 3aace945cfd5d8e988395170ff92ab75c0419819 /templates | |
parent | c6c2320170b488f64f1c67de23a35f4ca4de59de (diff) | |
download | ampache-e3734f063ed58356f9653a81f6dea86aa55931f4.tar.gz ampache-e3734f063ed58356f9653a81f6dea86aa55931f4.tar.bz2 ampache-e3734f063ed58356f9653a81f6dea86aa55931f4.zip |
moved init.php improved vainfo a bit, removed checkboxes from search page
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_search.inc | 121 |
1 files changed, 47 insertions, 74 deletions
diff --git a/templates/show_search.inc b/templates/show_search.inc index 3a182e14..7bbc5f39 100644 --- a/templates/show_search.inc +++ b/templates/show_search.inc @@ -19,134 +19,108 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Setup the needed variables that check the correct boxes */ -$final_javascript = "<script type=\"text/javascript\" language=\"javascript\">\n<!-- Begin \n"; - -$i = 0; -foreach ($_REQUEST['search_object'] as $key) { - $name = "check_" . $key; - $field_name = $key . "_string"; - ${$name} = "checked=\"checked\""; - $final_javascript .= "flipField('$field_name'); \n"; - if ($i++ == 0) { /* Focus the first checked field */ - $final_javascript .= "selectField('$field_name'); \n"; - } -} /* end foreach ($_REQUEST['search_object'] as $key) */ -if ($i == 0) { /* Select the artist/title/album one by default */ - $final_javascript .= "flipField('all_string'); \n"; - $final_javascript .= "selectField('all_string'); \n"; - $check_all = "checked=\"checked\""; -} - -$final_javascript .= " // END-->\n </script>"; - /** * search template * This is the template for the searches... amazing! - * @package Search - * @catagory Display */ ?> <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"> <tr class="table-header"> - <th colspan="4"><?php echo _("Search Ampache"); ?>...</th> + <th colspan="4"><?php echo _('Search Ampache'); ?>...</th> </tr> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo _("Keywords") ?></td> + <td><?php echo _('Keywords') ?></td> <td> - <input type="checkbox" name="search_object[]" value="all" onclick="flipField('all_string');" <?php echo $check_all; ?> /> - <input type="text" id="all_string" name="all_string" value="<?php echo scrub_out($_REQUEST['all_string']); ?>" disabled="disabled" /> - <?php $GLOBALS['error']->print_error('keyword'); ?> + <input type="text" id="s_keywords" name="s_keywords" value="<?php echo scrub_out($_REQUEST['s_keywords']); ?>"/> </td> - <td colspan="2"> </td> + <td><?php echo _('Comment'); ?></td> + <td> + <input type="text" id="s_comment" name="s_comment" value="<?php echo scrub_out($_REQUEST['s_comment']); ?>" /> + </td> </tr> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo _("Title"); ?></td> + <td><?php echo _('Title'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="title" onclick="flipField('title_string');" <?php echo $check_title; ?> /> - <input type="text" id="title_string" name="title_string" value="<?php echo scrub_out($_REQUEST['title_string']); ?>" disabled="disabled" /> + <input type="text" id="s_title" name="s_title" value="<?php echo scrub_out($_REQUEST['s_title']); ?>" /> </td> - <td><?php echo _("Artist"); ?></td> + <td><?php echo _('Artist'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="artist" onclick="flipField('artist_string');" <?php echo $check_artist; ?> /> - <input type="text" id="artist_string" name="artist_string" value="<?Php echo scrub_out($_REQUEST['artist_string']); ?>" disabled="disabled" /> + <input type="text" id="s_artist" name="s_artist" value="<?php echo scrub_out($_REQUEST['s_artist']); ?>" /> </td> </tr> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo _("Album"); ?></td> + <td><?php echo _('Album'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="album" onclick="flipField('album_string');" <?php echo $check_album; ?> /> - <input type="text" id="album_string" name="album_string" value="<?php echo scrub_out($_REQUEST['album_string']); ?>" disabled="disabled" /> + <input type="text" id="s_album" name="s_album" value="<?php echo scrub_out($_REQUEST['s_album']); ?>" /> </td> - <td><?php echo _("Genre"); ?></td> + <td><?php echo _('Genre'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="genre" onclick="flipField('genre_string');" <?php echo $check_genre; ?> /> - <input type="text" id="genre_string" name="genre_string" value="<?php echo scrub_out($_REQUEST['genre_string']); ?>" disabled="disabled" /> + <input type="text" id="s_genre" name="s_genre" value="<?php echo scrub_out($_REQUEST['s_genre']); ?>" /> </td> </tr> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo _("Year"); ?></td> + <td><?php echo _('Year'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="year" onclick="flipField('year_string');" <?php echo $check_year; ?> /> - <input type="text" id="year_string" name="year_string" value="<?php echo scrub_out($_REQUEST['year_string']); ?>" disabled="disabled" /> + <input type="text" id="s_year" name="s_year" value="<?php echo scrub_out($_REQUEST['s_year']); ?>" /> </td> - <td><?php echo _("Filename"); ?></td> + <td><?php echo _('Filename'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="filename" onclick="flipField('filename_string');" <?php echo $check_filename; ?> /> - <input type="text" id="filename_string" name="filename_string" value="<?php echo scrub_out($_REQUEST['filename_string']); ?>" disabled="disabled" /> + <input type="text" id="s_filename" name="s_filename" value="<?php echo scrub_out($_REQUEST['s_filename']); ?>" /> </td> </tr> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo _("Played"); ?></td> + <td><?php echo _('Played'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="played" onclick="flipField('played_string');" <?php echo $check_played; ?> /> - <select id="played_string" name="played_string" disabled="disabled"> - <option value="1" <?php if($_REQUEST['played_string']=="1") echo "selected=\"selected\""?>><?php echo _("Yes"); ?></option> - <option value="0" <?php if($_REQUEST['played_string']=="0") echo "selected=\"selected\""?>><?php echo _("No"); ?></option> + <select id="s_played" name="s_played" > + <option value=""> </option> + <option value="1" <?php if($_REQUEST['s_played']=="1") echo "selected=\"selected\""?>><?php echo _('Yes'); ?></option> + <option value="0" <?php if($_REQUEST['s_played']=="0") echo "selected=\"selected\""?>><?php echo _('No'); ?></option> </select> </td> - <td><?php echo _("Min Bitrate"); ?></td> + <td><?php echo _('Min Bitrate'); ?></td> <td> - <input type="checkbox" name="search_object[]" value="minbitrate" onclick="flipField('minbitrate_string');" <?php echo $check_minbitrate; ?> /> - <select id="minbitrate_string" name="minbitrate_string" disabled="disabled"> + <select id="s_minbitrate" name="s_minbitrate" > + <option vlaue=""> </option> <?php foreach(array(32,40,48,56,64,80,96,112,128,160,192,224,256,320) as $val) { ?> - <option value="<?php echo $val?>" <?php if($_REQUEST['minbitrate_string']==$val) echo "selected=\"selected\""?>><?php echo $val?></option> + <option value="<?php echo $val?>" <?php if($_REQUEST['s_minbitrate']==$val) echo "selected=\"selected\""?>><?php echo $val?></option> <?php } ?> </select> </td> </tr> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo _("Object Type"); ?>:</td> + <td><?php echo _('Rating'); ?>:</td> <td> - <select name="object_type"> - <option value="song" <?php if($_REQUEST['object_type']=="song") echo "selected=\"selected\""?>><?php echo _("Songs"); ?></option> - <option value="album" <?php if($_REQUEST['object_type']=="album") echo "selected=\"selected\""?>><?php echo _("Albums"); ?></option> - <option value="artist" <?php if($_REQUEST['object_type']=="artist") echo "selected=\"selected\""?>><?php echo _("Artists"); ?></option> - <option value="genre" <?php if($_REQUEST['object_type']=="genre") echo "selected=\"selected\""?>><?php echo _("Genres"); ?></option> + <select id="s_rating" name="s_rating"> + <option value=""> </option> + <option value="1"><?php echo _('One Star'); ?></option> + <option value="2"><?php echo _('Two Stars'); ?></option> + <option value="3"><?php echo _('Three Stars'); ?></option> + <option value="4"><?php echo _('Four Stars'); ?></option> + <option value="5"><?php echo _('Five Stars'); ?></option> </select> </td> - <td><?php echo _("Operator"); ?>:</td> + <td><?php echo _('Operator'); ?>:</td> <td> <select name="operator"> - <option value="and" <?php if($_REQUEST['operator']=="and") echo "selected=\"selected\""?>><?php echo _("AND"); ?></option> - <option value="or" <?php if($_REQUEST['operator']=="or") echo "selected=\"selected\""?>><?php echo _("OR"); ?></option> + <option value="and" <?php if($_REQUEST['operator']=="and") echo "selected=\"selected\""?>><?php echo _('AND'); ?></option> + <option value="or" <?php if($_REQUEST['operator']=="or") echo "selected=\"selected\""?>><?php echo _('OR'); ?></option> </select> </td> </tr> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo _("Method"); ?>:</td> + <td><?php echo _('Method'); ?>:</td> <td> <select name="method"> - <option value="fuzzy" <?php if($_REQUEST['method']=="fuzzy") echo "selected=\"selected\""?>><?php echo _("Fuzzy"); ?></option> - <option value="exact" <?php if($_REQUEST['method']=="exact") echo "selected=\"selected\""?>><?php echo _("Exact"); ?></option> + <option value="fuzzy" <?php if($_REQUEST['method']=="fuzzy") echo "selected=\"selected\""?>><?php echo _('Fuzzy'); ?></option> + <option value="exact" <?php if($_REQUEST['method']=="exact") echo "selected=\"selected\""?>><?php echo _('Exact'); ?></option> </select> </td> - <td><?php echo _("Maxium Results"); ?>:</td> + <td><?php echo _('Maxium Results'); ?>:</td> <td> <select name="limit"> - <option value="0"><?php echo _("Unlimited"); ?></option> + <option value="0"><?php echo _('Unlimited'); ?></option> <option value="25" <?php if($_REQUEST['limit']=="25") echo "selected=\"selected\""?>>25</option> <option value="50" <?php if($_REQUEST['limit']=="50") echo "selected=\"selected\""?>>50</option> <option value="100" <?php if($_REQUEST['limit']=="100") echo "selected=\"selected\""?>>100</option> @@ -157,22 +131,21 @@ $final_javascript .= " // END-->\n </script>"; <tr class="<?php echo flip_class(); ?>"> <td> </td> <td> - <input type="submit" value="<?php echo _("Search");?>" /> - <input type="reset" value="<?php echo _("Reset Form");?>" /> + <input class="button" type="submit" value="<?php echo _('Search'); ?>" /> + <input class="button" type="reset" value="<?php echo _('Reset Form');?>" /> <input type="hidden" name="action" value="search" /> </td> <td colspan="2"> </td> </tr> </table> </form> -<?php echo $final_javascript; ?> <?php if (isset($_REQUEST['search_object'])) { ?> <br /> <form method="post" action="<?php echo conf('web_path'); ?>/playlist.php?action=add_dyn_song"> <?php echo _('Save Search As Track on'); ?>: <?php show_playlist_dropdown('', true); ?> -<input type="submit" value="<?php echo _('Save'); ?>" /></form> +<input class="button" type="submit" value="<?php echo _('Save'); ?>" /></form> <?php } ?> <br /> |