4
Copyright (c) 2001 - 2007 Ampache.org
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License v2
9
as published by the Free Software Foundation.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
$ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
23
$allowed_filters = Browse::get_allowed_filters();
25
<ul class="sb2" id="sb_browse">
26
<li><h4><?php echo _('Browse By'); ?></h4>
28
// Build the selected dealie
29
$text = scrub_in($_REQUEST['action']) . '_ac';
30
${$text} = ' selected="selected"';
32
<ul class="sb3" id="sb_browse_bb">
33
<li id="sb_browse_bb_SongTitle"><a href="<?php echo $web_path; ?>/browse.php?action=song"><?php echo _('Song Title'); ?></a></li>
34
<li id="sb_browse_bb_Album"><a href="<?php echo $web_path; ?>/browse.php?action=album"><?php echo _('Albums'); ?></a></li>
35
<li id="sb_browse_bb_Artist"><a href="<?php echo $web_path; ?>/browse.php?action=artist"><?php echo _('Artist'); ?></a></li>
36
<li id="sb_browse_bb_Genre"><a href="<?php echo $web_path; ?>/browse.php?action=genre"><?php echo _('Genre'); ?></a></li>
37
<li id="sb_browse_bb_Playlist"><a href="<?php echo $web_path; ?>/browse.php?action=playlist"><?php echo _('Playlist'); ?></a></li>
38
<li id="sb_browse_bb_RadioStation"><a href="<?php echo $web_path; ?>/browse.php?action=live_stream"><?php echo _('Radio Stations'); ?></a></li>
41
<?php if (count($allowed_filters)) { ?>
42
<li><h4><?php echo _('Filters'); ?></h4>
44
<?php if (in_array('starts_with',$allowed_filters)) { ?>
45
<form id="multi_alpha_filter_form" method="post" action="javascript:void(0);">
46
<label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo _('Starts With'); ?></label>
47
<input type="textbox" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php echo scrub_out(Browse::get_filter('starts_with')); ?>" onKeyUp="DelayRun(this,'400','ajaxState','<?php echo Config::get('ajax_url'); ?>?page=browse&action=browse&key=starts_with','multi_alpha_filter');">
49
<?php } // end if starts_with ?>
50
<?php if (in_array('minimum_count',$allowed_filters)) { ?>
51
<input id="mincountCB" type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=min_count&value=1');return true;" value="1" />
52
<label id="mincountLabel" for="mincountCB"><?php echo _('Minimum Count'); ?></label><br />
54
<?php if (in_array('rated',$allowed_filters)) { ?>
55
<input id="ratedCB" type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=rated&value=1');return true;" value="1" />
56
<label id="ratedLabel" for="ratedCB"><?php echo _('Rated'); ?></label><br />
58
<?php if (in_array('unplayed',$allowed_filters)) { ?>
59
<input id="unplayedCB" type="checkbox" <?php echo $string = Browse::get_filter('unplayed') ? 'checked="checked"' : ''; ?>/>
60
<label id="unplayedLabel" for="unplayedCB"><?php echo _('Unplayed'); ?></label><br />
62
<?php if (in_array('show_art',$allowed_filters)) { ?>
63
<input id="show_artCB" type="checkbox" <?php echo $string = Browse::get_filter('show_art') ? 'checked="checked"' : ''; ?>/>
64
<label id="show_artLabel" for="show_artCB"><?php echo _('Show Art'); ?></label><br />
65
<?php echo Ajax::observe('show_artCB','click',Ajax::action('?page=browse&action=browse&key=show_art&value=1','')); ?>
66
<?php } // if show_art ?>
67
<?php if (in_array('playlist_type',$allowed_filters)) { ?>
68
<input id="show_allplCB" type="checkbox" <?php echo $string = Browse::get_filter('playlist_type') ? 'checked="checked"' : ''; ?>/>
69
<label id="show_allplLabel" for="showallplCB"><?php echo _('All Playlists'); ?></label><br />
70
<?php echo Ajax::observe('show_allplCB','click',Ajax::action('?page=browse&action=browse&key=playlist_type&value=1','')); ?>
71
<?php } // if playlist_type ?>