Удаление списков.
[mpd-web.git] / ajax / playlist.php
1 <?php
2
3 include('mpd.php');
4
5 $cur_track= $mpd->current_track_id;
6 $playlist= $mpd->playlist;
7 ?>
8 <?php include("../view/default/tmpl/playlistmenu.php"); ?>
9 <div id="items">
10     <table>
11     <tr id="items_heading">
12         <td></td><td>Название</td><th colspan="4">Управление</th>
13     </tr>
14     <?php
15       for($i=0;$i<count($playlist);$i++) {
16     ?>
17       <tr id="item<?php if($cur_track == $i){echo "Active";} elseif($i%2==0) { echo "Even";}else{echo "Odd";}?>">
18           <td id="track_number">
19                 <a name="<?php echo $i;?>"></a></td>
20           </td>
21           <td id="file">
22                   <span class="button" onclick="PlaylistCommand('playitem',<?php echo $i;?>)"><?php
23                         if ($playlist[$i]['name']==$playlist[$i]['title']) { 
24                                 echo htmlentities(cut_file($playlist[$i]['name']));
25                         } else {
26                                 echo htmlentities($playlist[$i]['title']);
27                         }
28                 ?></span>
29           </td>
30           <td id="move">
31                  <span class="button" onclick="PlaylistCommand('moveup',<?php echo $i;?>)"><img width="15" src="images/up.png"></span>
32           </td>
33           <td id="move">
34                  <span class="button" onclick="PlaylistCommand('movedown',<?php echo $i;?>)"><img width="15" src="images/down.png"></span>
35           </td>
36           <td id="remove">
37                  <span class="button" onclick="PlaylistCommand('remove',<?php echo $i;?>)"><img width="15" src="images/remove.png"></span>
38           </td>
39           <td id="check">
40                   <input type="checkbox" name="itemlist[]" value="<?php echo $i;?>">
41           </td>
42       </tr>
43     <?php
44       }
45     ?>
46     </table>
47 </div>
48 <?php include("../view/default/tmpl/playlistmenu.php"); ?>