1 |
joko |
1.1 |
{* |
2 |
|
|
|
3 |
|
|
This template is used by the following pages: |
4 |
|
|
|
5 |
|
|
playlists.php sets variable $isplaylist to TRUE |
6 |
|
|
browse.php sets variable $isbrowse to TRUE |
7 |
|
|
search.php is the default (nothing to be set) |
8 |
|
|
|
9 |
|
|
additional variables: |
10 |
|
|
|
11 |
|
|
name values default |
12 |
|
|
------------------------------------------------------------------------------ |
13 |
|
|
$isplaylist TRUE / FALSE FALSE |
14 |
|
|
(shows/hides "move up/down") |
15 |
|
|
|
16 |
|
|
$isbrowse TRUE / FALSE FALSE |
17 |
|
|
("jump-to"-links, if true) |
18 |
|
|
|
19 |
|
|
$showtracknumber TRUE / FALSE FALSE |
20 |
|
|
(tracknumber-field, if true) |
21 |
|
|
|
22 |
|
|
$hidealbum TRUE / FALSE FALSE |
23 |
|
|
(shows/hides album-colum) |
24 |
|
|
|
25 |
|
|
*} |
26 |
|
|
|
27 |
|
|
{* set some variables *} |
28 |
|
|
{if $issearch}{assign var="link" value="search.php?artist=`$artist`&title=`$title`&genre=`$genre`&type=`$type`&lang=`$lang`&source=`$source`&rating=`$rating`&orderby=%s&direction=`$negative_direction`&page=%s&sid=`$sid`"} |
29 |
|
|
{elseif $isbrowse}{assign var="link" value="browse.php?mode=tracks&page=`$page`&orderby=%s&direction=%s&sid=`$sid`"}{/if} |
30 |
|
|
|
31 |
|
|
<form action="" method="get" id="tracks" target=""> |
32 |
|
|
<input type="hidden" name="mode" value="" id="mode"> |
33 |
|
|
{if $isplaylist}<input type="hidden" name="pid" value="{$playlist.id}">{/if} |
34 |
|
|
<table border="0" cellspacing="1" width="100%"> |
35 |
|
|
<tr> |
36 |
|
|
<td></td> |
37 |
|
|
{if $isplaylist || $showtracknumber}<td><!-- Tracknumber --></td>{/if} |
38 |
|
|
{if $cfg.tracklist_showartist} |
39 |
|
|
<td class="tracklist"> |
40 |
|
|
{if $issearch} |
41 |
|
|
{strip} |
42 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=artist&direction={if $orderby == "artist" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Artist</a> |
43 |
|
|
{if $orderby == "artist" || empty($orderby)}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
44 |
|
|
{/strip} |
45 |
|
|
{elseif $isbrowse} |
46 |
|
|
{strip} |
47 |
|
|
{if $orderby == "artist" && $direction == "asc"}{assign var="adir" value="desc"}{else}{assign var="adir" value="asc"}{/if} |
48 |
|
|
<a href="{$link|sprintf:"artist":$adir:$page}">Artist</a> |
49 |
|
|
{if $orderby == "artist" || empty($orderby)}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
50 |
|
|
{/strip} |
51 |
|
|
{else} |
52 |
|
|
Artist |
53 |
|
|
{/if} |
54 |
|
|
</td> |
55 |
|
|
{/if} |
56 |
|
|
{if $cfg.tracklist_showtitle} |
57 |
|
|
<td class="tracklist"> |
58 |
|
|
{if $issearch} |
59 |
|
|
{strip} |
60 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=title&direction={if $orderby == "title" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Title</a> |
61 |
|
|
{if $orderby == "title"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
62 |
|
|
{/strip} |
63 |
|
|
{elseif $isbrowse} |
64 |
|
|
{strip} |
65 |
|
|
{if $orderby == "title" && $direction == "asc"}{assign var="adir" value="desc"}{else}{assign var="adir" value="asc"}{/if} |
66 |
|
|
<a href="{$link|sprintf:"title":$adir:$page}">Title</a> |
67 |
|
|
{if $orderby == "title"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
68 |
|
|
{/strip} |
69 |
|
|
{else} |
70 |
|
|
Title |
71 |
|
|
{/if} |
72 |
|
|
</td> |
73 |
|
|
{/if} |
74 |
|
|
{if $cfg.tracklist_showgenre} |
75 |
|
|
<td class="tracklist"> |
76 |
|
|
{if $issearch} |
77 |
|
|
{strip} |
78 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=genre&direction={if $orderby == "genre" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Genre</a> |
79 |
|
|
{if $orderby == "genre"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
80 |
|
|
{/strip} |
81 |
|
|
{else} |
82 |
|
|
Genre |
83 |
|
|
{/if} |
84 |
|
|
</td> |
85 |
|
|
{/if} |
86 |
|
|
{if $cfg.tracklist_showalbum && !$hidealbum} |
87 |
|
|
<td class="tracklist"> |
88 |
|
|
{if $issearch} |
89 |
|
|
{strip} |
90 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=album&direction={if $orderby == "album" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Album</a> |
91 |
|
|
{if $orderby == "album"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
92 |
|
|
{/strip} |
93 |
|
|
{else} |
94 |
|
|
Album |
95 |
|
|
{/if} |
96 |
|
|
</td> |
97 |
|
|
{/if} |
98 |
|
|
{if $cfg.tracklist_showyear} |
99 |
|
|
<td class="tracklist"> |
100 |
|
|
{if $issearch} |
101 |
|
|
{strip} |
102 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=year&direction={if $orderby == "year" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Year</a> |
103 |
|
|
{if $orderby == "year"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
104 |
|
|
{/strip} |
105 |
|
|
{else} |
106 |
|
|
Year |
107 |
|
|
{/if} |
108 |
|
|
</td> |
109 |
|
|
{/if} |
110 |
|
|
{if $cfg.tracklist_showlength} |
111 |
|
|
<td class="tracklist"> |
112 |
|
|
{if $issearch} |
113 |
|
|
{strip} |
114 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=length&direction={if $orderby == "length" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Len.</a> |
115 |
|
|
{if $orderby == "length"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
116 |
|
|
{/strip} |
117 |
|
|
{else} |
118 |
|
|
Len. |
119 |
|
|
{/if} |
120 |
|
|
</td> |
121 |
|
|
{/if} |
122 |
|
|
{if $cfg.tracklist_showlang} |
123 |
|
|
<td class="tracklist"> |
124 |
|
|
{if $issearch} |
125 |
|
|
{strip} |
126 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=lang&direction={if $orderby == "lang" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Lang.</a> |
127 |
|
|
{if $orderby == "lang"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
128 |
|
|
{/strip} |
129 |
|
|
{else} |
130 |
|
|
Lang. |
131 |
|
|
{/if} |
132 |
|
|
</td> |
133 |
|
|
{/if} |
134 |
|
|
{if $cfg.tracklist_showrating} |
135 |
|
|
<td class="tracklist"> |
136 |
|
|
{if $issearch} |
137 |
|
|
{strip} |
138 |
|
|
<a href="search.php?artist={$artist}&title={$title}&genre={$genre}&type={$type}&lang={$lang}&source={$source}&rating={$rating}&orderby=rating&direction={if $orderby == "rating" && $direction == "asc"}desc{else}asc{/if}&page={$page}&sid={$sid}">Rat.</a> |
139 |
|
|
{if $orderby == "rating"}{if $direction == "desc"}<img src="gfx/main.order.desc.gif" alt="" class="menu-img">{else}<img src="gfx/main.order.asc.gif" alt="" class="menu-img">{/if}{/if} |
140 |
|
|
{/strip} |
141 |
|
|
{else} |
142 |
|
|
Rat. |
143 |
|
|
{/if} |
144 |
|
|
</td> |
145 |
|
|
{/if} |
146 |
|
|
{if $isplaylist}<td><!-- Delete from Playlist --></td>{/if} |
147 |
|
|
<td><!-- Delete File --></td> |
148 |
|
|
<td><!-- Edit Entry --></td> |
149 |
|
|
{if !$isplaylist}<td><!-- Add to Playlist --></td>{/if} |
150 |
|
|
<td><!-- Play --></td> |
151 |
|
|
</tr> |
152 |
|
|
|
153 |
|
|
{section name=i loop=$tracks} |
154 |
|
|
{if $isplaylist}{assign var="number" value=$tracks[i].tracknumber} |
155 |
|
|
{else}{assign var="number" value=$tracks[i].id}{/if} |
156 |
|
|
|
157 |
|
|
{if $smarty.section.i.iteration % 2 == 1} |
158 |
|
|
{assign var="color" value="#F4F4F4"} |
159 |
|
|
{assign var="cycle" value="true"} |
160 |
|
|
|
161 |
|
|
{else} |
162 |
|
|
{assign var="color" value="transparent"} |
163 |
|
|
{assign var="cycle" value="false"} |
164 |
|
|
{/if} |
165 |
|
|
|
166 |
|
|
<tr id="row{$number}" class="trackbg" style="background-color: {$color}" onmouseover="hoverRow({$number},'over',false,{$cycle})" onmouseout="hoverRow({$number},'out',false,{$cycle})" onclick="clickRow({$number},false,{$cycle})"> |
167 |
|
|
<td width="1%" class="tracklist"> |
168 |
|
|
{if $isplaylist} |
169 |
|
|
<input class="checkbox" type="checkbox" name="track[]" value="{$tracks[i].tracknumber}" id="checkbox{$tracks[i].tracknumber}"> |
170 |
|
|
{else} |
171 |
|
|
{if $isbrowse && isset($tracks[i].first) && !empty($tracks[i].first)}<a name="{$tracks[i].first}"></a>{/if} |
172 |
|
|
<input class="checkbox" type="checkbox" name="id[]" value="{$tracks[i].id}" id="checkbox{$tracks[i].id}"> |
173 |
|
|
{/if} |
174 |
|
|
</td> |
175 |
|
|
{if $isplaylist || $showtracknumber}<td class="tracklist" style="text-align: right"><b>{if $isplaylist && $playlist.id == 0}{$tracks[i].tracknumber+1}{else}{$tracks[i].tracknumber}{/if}</b></td>{/if} |
176 |
|
|
{if $cfg.tracklist_showartist}<td class="tracklist">{$tracks[i].artist}</td>{/if} |
177 |
|
|
{if $cfg.tracklist_showtitle}<td class="tracklist">{$tracks[i].title}</td>{/if} |
178 |
|
|
{if $cfg.tracklist_showgenre}<td class="tracklist">{$tracks[i].genre1txt}{if !empty($tracks[i].genre2)}, {$tracks[i].genre2txt}{/if}</td>{/if} |
179 |
|
|
{if $cfg.tracklist_showalbum && !$hidealbum}<td class="tracklist">{if $tracks[i].albumartist == '' && $tracks[i].albumtitle == ''}-{else}{$tracks[i].albumtitle}<a href="browse.php?mode=albums&id={$tracks[i].albumid}&sid={$sid}"><img src="gfx/icon.info.gif" alt="" class="menu-img" onmouseover="showTip(this,event,'<b>Show Album</b><br>Artist: {$tracks[i].albumartist|addslashes}<br>Title: {$tracks[i].albumtitle|addslashes}')" onmouseout="hideTip()"></a>{/if}</td>{/if} |
180 |
|
|
{if $cfg.tracklist_showyear}<td class="tracklist">{if !$tracks[i].year}-{else}{$tracks[i].year}{/if}</td>{/if} |
181 |
|
|
{if $cfg.tracklist_showlength}<td class="tracklist">{length seconds=$tracks[i].length}</td>{/if} |
182 |
|
|
{if $cfg.tracklist_showlang}<td class="tracklist" style="text-align: center">{flag lang=$tracks[i].lang}</td>{/if} |
183 |
|
|
{if $cfg.tracklist_showrating}<td class="tracklist" style="text-align: center">{strip} |
184 |
|
|
{if $tracks[i].rating == 0}<img src="gfx/main.rating.minus.gif" alt=""> |
185 |
|
|
{elseif $tracks[i].rating == 1}<img src="gfx/main.rating.null.gif" alt=""> |
186 |
|
|
{elseif $tracks[i].rating == 2}<img src="gfx/main.rating.plus.gif" alt=""> |
187 |
|
|
{elseif $tracks[i].rating == 3}<img src="gfx/main.rating.plusplus.gif" alt="">{/if} |
188 |
|
|
{/strip}</td>{/if} |
189 |
|
|
{if $isplaylist}<td width="1%"><a href="#" onclick="{if $cfg.common_isdemo}demoInfo(){else}goPlaylistSingleEntryMoveUp('{$playlist.id}','{$tracks[i].tracknumber}','{$sid}'){/if}" onmouseover="showTip(this,event,'Move up')" onmouseout="hideTip()"><img src="gfx/icon.arrow.up.gif" alt=""></a></td>{/if} |
190 |
|
|
{if $isplaylist}<td width="1%"><a href="#" onclick="{if $cfg.common_isdemo}demoInfo(){else}goPlaylistSingleEntryMoveDown('{$playlist.id}','{$tracks[i].tracknumber}','{$sid}','{$playlist.files}'){/if}" onmouseover="showTip(this,event,'Move down')" onmouseout="hideTip()"><img src="gfx/icon.arrow.down.gif" alt=""></a></td>{/if} |
191 |
joko |
1.2 |
{if not $cfg.disable_delete_playlist_entry} |
192 |
joko |
1.1 |
{if $isplaylist}<td width="1%"><a href="#" onclick="{if $cfg.common_isdemo}demoInfo(){else}goPlaylistSingleEntryDelete('{$playlist.id}','{$tracks[i].tracknumber}','{$sid}'){/if}" onmouseover="showTip(this,event,'Delete Playlist-Entry')" onmouseout="hideTip()"><img src="gfx/icon.delete.entry.gif" alt=""></a></td>{/if} |
193 |
joko |
1.2 |
{/if} |
194 |
|
|
{if not $cfg.disable_delete_files} |
195 |
joko |
1.1 |
<td width="1%"><a href="#" onclick="{if $cfg.common_isdemo}demoInfo(){else}goTrackSingleDelete('{$tracks[i].id}','{$sid}'); return false;{/if}" onmouseover="showTip(this,event,'Delete file!')" onmouseout="hideTip()"><img src="gfx/icon.delete.file.gif" alt=""></a></td> |
196 |
joko |
1.2 |
{/if} |
197 |
joko |
1.1 |
<td width="1%"><a href="#" onclick="goTrackSingleEdit('{$tracks[i].id}','{$sid}'); return false;" onmouseover="showTip(this,event,'Edit')" onmouseout="hideTip()"><img border="0" src="gfx/icon.edit.gif" alt=""></a></td> |
198 |
|
|
{if !$isplaylist}<td width="1%"><a href="#" onclick="{if $cfg.common_isdemo}demoInfo(){else}goTrackSingleAdd('{$tracks[i].id}','{$sid}'); return false;{/if}" onmouseover="showTip(this,event,'Add')" onmouseout="hideTip()"><img border="0" src="gfx/icon.add.gif" alt=""></a></td>{/if} |
199 |
|
|
<td width="1%"><a href="#" onclick="{if $cfg.common_isdemo}demoInfo(){else}goTrackdownload_singledownload('{$tracks[i].id}','{$sid}'); return false;{/if}" onmouseover="showTip(this,event,'Play')" onmouseout="hideTip()"><img border="0" src="gfx/icon.play.gif" alt=""></a></td> |
200 |
|
|
</tr> |
201 |
|
|
{/section} |
202 |
|
|
</table> |
203 |
|
|
<input type="hidden" name="sid" value="{$sid}"> |
204 |
|
|
</form> |