1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
<?php
/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */
/**
* Show Search
*
* PHP version 5
*
* LICENSE: GNU General Public License, version 2 (GPLv2)
* Copyright (c) 2001 - 2011 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 v2
* as published by the Free Software Foundation.
*
* 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.
*
* @category Template
* @package Template
* @author Karl Vollmer <vollmer@ampache.org>
* @copyright 2001 - 2011 Ampache.org
* @license http://opensource.org/licenses/gpl-2.0 GPLv2
* @version PHP 5.2
* @link http://www.ampache.org/
* @since File available since Release 1.0
*/
/**
* search template
* This is the template for the searches... amazing!
*/
?>
<?php show_box_top(_('Search Ampache') . "..."); ?>
<form name="search" method="post" action="<?php echo Config::get('web_path'); ?>/search.php" enctype="multipart/form-data" style="Display:inline">
<table class="tabledata" cellpadding="3" cellspacing="0">
<tr class="<?php echo flip_class(); ?>">
<td><?php echo _('Keywords') ?></td>
<td>
<input type="text" id="s_all" name="s_all" value="<?php echo scrub_out($_REQUEST['s_all']); ?>"/>
</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>
<input type="text" id="s_title" name="s_title" value="<?php echo scrub_out($_REQUEST['s_title']); ?>" />
</td>
<td><?php echo _('Artist'); ?></td>
<td>
<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>
<input type="text" id="s_album" name="s_album" value="<?php echo scrub_out($_REQUEST['s_album']); ?>" />
</td>
<td><?php echo _('Tag'); ?></td>
<td>
<input type="text" id="s_tag" name="s_tag" value="<?php echo scrub_out($_REQUEST['s_tag']); ?>" />
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td><?php echo _('Year'); ?></td>
<td>
<input type="text" id="s_year" name="s_year" size="5" value="<?php echo scrub_out($_REQUEST['s_year']); ?>" />
-
<input type="text" id="s_year2" name="s_year2" size="5" value="<?php echo scrub_out($_REQUEST['s_year2']); ?>" />
</td>
<td><?php echo _('Filename'); ?></td>
<td>
<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 _('Time'); ?></td>
<td>
<input type="text" id="s_time" name="s_time" size="3" value="<?php echo scrub_out($_REQUEST['s_time']); ?>" />
-
<input type="text" id="s_time2" name="s_time2" size="3" value="<?php echo scrub_out($_REQUEST['s_time2']); ?>" />
<?php echo _('minutes'); ?>
</td>
<td><?php echo _('Codec'); ?></td>
<td>
<input type="text" id="s_codec" name="s_codec" size="5" value="<?php echo scrub_out($_REQUEST['s_codec']); ?>" />
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td><?php echo _('Played'); ?></td>
<td>
<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>
<select id="s_minbitrate" name="s_minbitrate" >
<option value=""> </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['s_minbitrate']==$val) echo "selected=\"selected\""?>><?php echo $val?></option>
<?php } ?>
</select>
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td><?php echo _('Rating'); ?></td>
<td>
<select id="s_rating_operator" name="s_rating_operator">
<option value="0" <?php if($_REQUEST['s_rating_operator']=="0") echo "selected=\"selected\""?>><?php echo _('>='); ?></option>
<option value="1" <?php if($_REQUEST['s_rating_operator']=="1") echo "selected=\"selected\""?>><?php echo _('<='); ?></option>
<option value="2" <?php if($_REQUEST['s_rating_operator']=="2") echo "selected=\"selected\""?>><?php echo _('='); ?></option>
</select>
<select id="s_rating" name="s_rating">
<option value=""> </option>
<option value="1" <?php if($_REQUEST['s_rating']=="1") echo "selected=\"selected\""?>><?php echo _('One Star'); ?></option>
<option value="2" <?php if($_REQUEST['s_rating']=="2") echo "selected=\"selected\""?>><?php echo _('Two Stars'); ?></option>
<option value="3" <?php if($_REQUEST['s_rating']=="3") echo "selected=\"selected\""?>><?php echo _('Three Stars'); ?></option>
<option value="4" <?php if($_REQUEST['s_rating']=="4") echo "selected=\"selected\""?>><?php echo _('Four Stars'); ?></option>
<option value="5" <?php if($_REQUEST['s_rating']=="5") echo "selected=\"selected\""?>><?php echo _('Five Stars'); ?></option>
</select>
</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>
</select>
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<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>
</select>
</td>
<td><?php echo _('Maximum Results'); ?></td>
<td>
<select name="limit">
<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>
<option value="500" <?php if($_REQUEST['limit']=="500") echo "selected=\"selected\""?>>500</option>
</select>
</td>
</tr>
</table>
<div class="formValidation">
<input class="button" type="submit" value="<?php echo _('Search'); ?>" />
<input type="hidden" name="action" value="search" />
</div>
</form>
<?php show_box_bottom(); ?>
|