3 function escapePhpString($target) {
10 return strtr($target, $replacements);
14 $dir = $_REQUEST['dir'];
17 <div id="playlist_menu">
20 <td><span class="button" onclick="RefreshPlaylist()"><img width="20" src="images/playlist.png"></span><td>
21 <td><span class="button" onclick="return confirm('Добавить все. Вы уверены?') ? PlaylistEditCommand('addall','<?php echo escapePhpString($dir);?>') : false;" ><img width="20" src="images/addall.png"></span><td>
22 <td><span class="button" onclick="PlaylistEditItemsCommand('addselected','<?php echo escapePhpString($dir);?>')"><img width="20" src="images/addselected.png"></span><td>
28 <tr id="items_heading">
29 <td></td><td>Title</td><th colspan="2">Control</th>
32 $dirs=$mpd->GetDir($dir);
34 <tr id="home"><td></td><td><span class="button" onclick="EditPlayList('<?php echo escapePhpString(cut_upperDir($dir));?>')"><img width="20" src="images/left.png"></span></td><td></td><td></td>
36 <?php for($i=0;$i<count($dirs);$i++) {?>
37 <tr id="item<?php if($i%2==0) { echo "Even";}else{echo "Odd";}?>">
38 <td id="track_number"> <a name="<?php echo $i;?>"></a></td>
39 <?php if($dirs[$i]['type']=="directory") {?>
40 <td id="file"><span class="button" onclick="EditPlayList('<?php echo escapePhpString($dirs[$i]['name']);?>')"><?php
41 if ($dirs[$i]['name']==$dirs[$i]['title']) {
42 echo htmlentities(cut_lastDir($dirs[$i]['name']));
44 echo htmlentities($dirs[$i]['title']);
46 ?></span></td><td><span class="button" onclick="PlaylistEditCommand('adddir','<?php echo escapePhpString($dirs[$i]['name']);?>')"><img width="15" src="images/plus.png"></span></td>
49 if ($dirs[$i]['name']==$dirs[$i]['title']) {
50 echo htmlentities(cut_file($dirs[$i]['name']));
52 echo htmlentities($dirs[$i]['title']);
54 ?></td><td><span class="button" onclick="PlaylistEditCommand('addfile','<?php echo escapePhpString($dirs[$i]['name']);?>')"><img width="15" src="images/plus.png"></span></td>
56 <td id="checkbox"><input type="checkbox" name="itemlist[]" value="<?php echo $i;?>"></td>
64 <div id="playlist_menu">
67 <td><span class="button" onclick="RefreshPlaylist()"><img width="20" src="images/playlist.png"></span><td>
68 <td><span class="button" onclick="return confirm('Добавить все. Вы уверены?') ? PlaylistEditCommand('addall','<?php echo escapePhpString($dir);?>') : false;" ><img width="20" src="images/addall.png"></span><td>
69 <td><span class="button" onclick="PlaylistEditItemsCommand('addselected','<?php echo escapePhpString($dir);?>')"><img width="20" src="images/addselected.png"></span><td>