<table>
<tr>
<td><span class="button" onclick="RefreshPlaylist()"><img width="20" src="images/playlist.png"></span><td>
- <td><span class="button" onclick="return confirm('Добавить все. Вы уверены?') ? PlaylistEditCommand('addall','<?php echo escapePhpString($dir);?>') : false;" ><img width="20" src="images/addall.png"></span><td>
+ <td><span class="button" onclick="return confirm('Add all to the list, are you sure?') ? PlaylistEditCommand('addall','<?php echo escapePhpString($dir);?>') : false;" ><img width="20" src="images/addall.png"></span><td>
<td><span class="button" onclick="PlaylistEditItemsCommand('addselected','<?php echo escapePhpString($dir);?>')"><img width="20" src="images/addselected.png"></span><td>
</tr>
</table>
<div id="items">
<table>
<tr id="items_heading">
- <td></td><td>Название</td><th colspan="2">Управление</th>
+ <td></td><td>Title</td><th colspan="2">Controls</th>
</tr>
<?php
$dirs=$mpd->GetDir($dir);
<table>
<tr>
<td><span class="button" onclick="RefreshPlaylist()"><img width="20" src="images/playlist.png"></span><td>
- <td><span class="button" onclick="return confirm('Добавить все. Вы уверены?') ? PlaylistEditCommand('addall','<?php echo escapePhpString($dir);?>') : false;" ><img width="20" src="images/addall.png"></span><td>
+ <td><span class="button" onclick="return confirm('Add all to the list, are you sure?') ? PlaylistEditCommand('addall','<?php echo escapePhpString($dir);?>') : false;" ><img width="20" src="images/addall.png"></span><td>
<td><span class="button" onclick="PlaylistEditItemsCommand('addselected','<?php echo escapePhpString($dir);?>')"><img width="20" src="images/addselected.png"></span><td>
</tr>
</table>
function SavePlayList() {
-var name=window.prompt('Имя списка','');
+var name=window.prompt('List name','');
var req = new XMLHttpRequest();
var req = new XMLHttpRequest();
-//if (! window.alert("Удалить список "+item+"?")) return;
-
req.onreadystatechange = function () {
if (this.readyState != 4 || this.status != 200) return;
RefreshPageStatus();
$mpd = new mpd($mpd_host,$mpd_port,$mpd_password);
if($mpd->connected != 1){
- echo "Нет соединения с сервером!";
+ echo "Server not available!";
exit(1);
}
<div id="items">
<table>
<tr id="items_heading">
- <td></td><td>Название</td><th colspan="4">Управление</th>
+ <td></td><td>Title</td><th colspan="4">Controls</th>
</tr>
<?php
for($i=0;$i<count($playlist);$i++) {
<table>
<tr>
<td><span class="button" onclick="RefreshPlaylist()"><img width="20" src="images/playlist.png"></span><td>
- <td><span class="button" onclick="confirm('Очистить список. Вы уверены?') ? PlaylistCommandRefStatus('clear') : false;" ><img width="20" src="images/removeall.png"></span><td>
+ <td><span class="button" onclick="confirm('Clear current playlist, are you sure?') ? PlaylistCommandRefStatus('clear') : false;" ><img width="20" src="images/removeall.png"></span><td>
</tr>
</table>
</div>
<tr id="items_heading">
<td></td><td>Название</td><td>Управление</td>
</tr>
-<?
+<?php
$playlists = $mpd->playlists;
?>
<tr id="item<?php if($i%2==0) { echo "Even";}else{echo "Odd";}?>">
<td id="track_number"><a name="<?php echo $i;?>"></a></td>
- <td id="file"><span class="button" onclick="PlaylistEditCommandRefFull('load','<?php echo $playlists[$i]['name'];?>')"><? echo $playlists[$i]['name'];?></td>
- <td id="controls"><span class="button" onclick="confirm('Удалить список <?php echo $playlists[$i]['name'];?>. Вы уверены?') ? DelPlayList('<?php echo $playlists[$i]['name'];?>') : false;"><img width="20" src="images/minus.png"></span></td>
+ <td id="file"><span class="button" onclick="PlaylistEditCommandRefFull('load','<?php echo $playlists[$i]['name'];?>')"><?php echo $playlists[$i]['name'];?></td>
+ <td id="controls"><span class="button" onclick="confirm('Delete playlist <?php echo $playlists[$i]['name'];?>, are you sure?') ? DelPlayList('<?php echo $playlists[$i]['name'];?>') : false;"><img width="20" src="images/minus.png"></span></td>
</tr>
<?php
+
}
+
?>
</table>
<table>
<tr>
<td><span class="button" onclick="RefreshPlaylist()"><img width="20" src="images/playlist.png"></span><td>
- <td><span class="button" onclick="return confirm('Очистить список. Вы уверены?') ? PlaylistCommand('clear') : false;" ><img width="20" src="images/removeall.png"></span><td>
+ <td><span class="button" onclick="confirm('Clear current playlist, are you sure?') ? PlaylistCommandRefStatus('clear') : false;" ><img width="20" src="images/removeall.png"></span><td>
</tr>
</table>
</div>
} else {
echo "<div class=\"trackno\">#-/$playlist_count</div>";
- echo "<div class=\"trackname\">Трек не выбран</div>";
+ echo "<div class=\"trackname\">No track selected</div>";
}
?>
}
} else {
- echo "Трек не выбран";
+ echo "No track selected";
}
?>
$mpd_host ="localhost";
$mpd_port = "6600";
-$mpd_password = "mypassword"
+$mpd_password = "mypassword";
?>
$mpd = new mpd($mpd_host,$mpd_port,$mpd_password);
if($mpd->connected != 1){
- echo "Нет соединения с сервером!";
+ echo "Server not available!";
exit(1);
}
<td><span class="button" onclick="EditPlayList()"><img width="20" src="images/songs.png"></span><td>
<td><span class="button" onclick="LoadPlayList()"><img width="20" src="images/lists.png"></span><td>
<td><span class="button" onclick="SavePlayList()"><img width="20" src="images/save.png"></span><td>
- <td><span class="button" onclick="return confirm('Очистить список. Вы уверены?') ? PlaylistCommand('clear') : false;" ><img width="20" src="images/removeall.png"></span><td>
+ <td><span class="button" onclick="return confirm('Clear current playlist, are you sure?') ? PlaylistCommand('clear') : false;" ><img width="20" src="images/removeall.png"></span><td>
<td><span class="button" onclick="PlaylistItemsCommand('removeselected')"><img width="20" src="images/removeselected.png"></span><td>
</tr>
</table>
<div id="nowplaying_heading">
<table id="heading_tbl">
<tr>
- <td id="left">Проигрывается</td><td id="right"><span onclick="RefreshPageContent()"><img class="button" align="right" width="20" src="images/update.png"></span></td>
+ <td id="left">Now playing</td><td id="right"><span onclick="RefreshPageContent()"><img class="button" align="right" width="20" src="images/update.png"></span></td>
</tr>
</table>
</div>