Вычищение старых конструкций PHP + многочисленная доводка по мелочи. master
authorRoman Bazalevsky <rvb@rvb.name>
Thu, 29 Sep 2016 15:33:48 +0000 (18:33 +0300)
committerRoman Bazalevsky <rvb@rvb.name>
Thu, 29 Sep 2016 15:33:48 +0000 (18:33 +0300)
ajax/editplaylist.php
ajax/mpd.js
ajax/mpd.php
ajax/playlist.php
ajax/playlists.php
ajax/trackinfo.php
ajax/trackname.php
config/config.php
index.php
view/default/tmpl/playlistmenu.php
view/player/tmpl/default.php

index a4764c9be23b4cb60e7e0d9d13ef4ea7cc8a4ec3..31c66974acbab5a946f6374615028ba648fb46e2 100644 (file)
@@ -18,7 +18,7 @@ $dir = $_REQUEST['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>
@@ -26,7 +26,7 @@ $dir = $_REQUEST['dir'];
   <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);
@@ -65,7 +65,7 @@ $dir = $_REQUEST['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>
index 37176039def197a4fce50871e54939d3b518628a..1be85a64af41c57b16f48fca915edb6ba6174e51 100644 (file)
@@ -132,7 +132,7 @@ req.send();
 
 function SavePlayList() {
 
-var name=window.prompt('Имя списка','');
+var name=window.prompt('List name','');
 
 var req = new XMLHttpRequest();
 
@@ -152,8 +152,6 @@ function DelPlayList(item) {
 
 var req = new XMLHttpRequest();
 
-//if (! window.alert("Удалить список "+item+"?")) return;
-
 req.onreadystatechange = function () {
   if (this.readyState != 4 || this.status != 200) return;
   RefreshPageStatus();
index 86ea78ed09410a12eed4b6d1d231b9ea7b019b53..dd4df8ef492895d9511c7cc7c6ce4025efd4f538 100644 (file)
@@ -7,7 +7,7 @@ include('../system/helper.php');
 $mpd = new mpd($mpd_host,$mpd_port,$mpd_password);
 
 if($mpd->connected != 1){
-        echo "Нет соединения с сервером!";
+        echo "Server not available!";
         exit(1);
 }
 
index 8050bbaa7c31b316762d8a35f8c4b37a7c9af2d0..09d06e1dc6547753b513465c386a3037d85c1933 100644 (file)
@@ -9,7 +9,7 @@ $playlist= $mpd->playlist;
 <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++) {
index 23066cf1ebfaeb8f9159d2b855a8c90d1c8893af..91e386e653d9ce09d3ee0245f8216a04eb95a1e8 100644 (file)
@@ -7,7 +7,7 @@ include('mpd.php');
   <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>
@@ -17,7 +17,7 @@ include('mpd.php');
     <tr id="items_heading">
       <td></td><td>Название</td><td>Управление</td>
     </tr>
-<?
+<?php
 
 $playlists = $mpd->playlists;
 
@@ -26,11 +26,13 @@ for($i=0;$i<count($playlists);$i++) {
 ?>
     <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>
@@ -40,7 +42,7 @@ for($i=0;$i<count($playlists);$i++) {
   <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>
index f1c4b362b8fbc2ed04d86a617d56a0b6ace778fd..ef868939918787854558ac6be81313665b7a22e3 100644 (file)
@@ -20,7 +20,7 @@ if($cur_track !=-1) {
     
 } else {
     echo "<div class=\"trackno\">#-/$playlist_count</div>";
-    echo "<div class=\"trackname\">Трек не выбран</div>";
+    echo "<div class=\"trackname\">No track selected</div>";
 }
 
 ?>
index 49cc01d8c1d854c681bad0bbf0cb8399f92c94d1..d12955b28126f5b20c198a390e7b6dc53b4045ac 100644 (file)
@@ -18,7 +18,7 @@ if($cur_track !=-1) {
     }
     
 } else {
-    echo "Трек не выбран";
+    echo "No track selected";
 }
 
 ?>
index fecc1f60356a1aa7ef8d40b110c064fb08e7a886..25f4c38299845d862194d6a411a7fcf269501e2b 100644 (file)
@@ -2,6 +2,6 @@
 
 $mpd_host ="localhost";
 $mpd_port = "6600";
-$mpd_password = "mypassword"
+$mpd_password = "mypassword";
 
 ?>
index 7ed34f33557a1215f8f0332b1c9583a5d47e45cf..ddf52bf681d64265493d652754bd7a0135c3d901 100644 (file)
--- a/index.php
+++ b/index.php
@@ -6,7 +6,7 @@ include('system/helper.php');
 $mpd = new mpd($mpd_host,$mpd_port,$mpd_password);
 
 if($mpd->connected != 1){
-       echo "Нет соединения с сервером!";
+       echo "Server not available!";
        exit(1);
 }
 
index 45c88572e0afe70f5da011be6e88b0ce958b7039..fdf21572ff73fa0e91115906b8688666036a78ef 100644 (file)
@@ -4,7 +4,7 @@
                        <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>
index 2f0126b32b651027042d8afe3b38b723b8acabc3..6287a0ab6e89c16dcaa12528766577bd13354f6c 100644 (file)
@@ -2,7 +2,7 @@
   <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>