added search icon and fixed issue with border-radius of html and body
[mirrors/JukeBox.git] / index.php
index 233513ed74bc2c985a623d6e96fdd596e85dae1a..d345f39d958bee3607b806e2a584d1745f548e23 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -205,8 +205,8 @@ function render_file_line($dir, $item, $dir_url, $index, $filesize, $parent = fa
        echo('&nbsp;</td><td><a href="'.$temp.'">'.unxss(str_replace('_', ' ', $item)).'</a></td><td>'.$filesize."&nbsp;MiB&nbsp;</td></tr>\n");                        
 }
 
-function render_dir_line($item, $i) {
-       $parclass=($i%2?'even':'odd'); $parcolor=($index%2?'lightblue':'white');
+function render_dir_line($current_dir, $item, $i) {
+       $parclass=($i%2?'even':'odd'); $parcolor=($i%2?'lightblue':'white');
        $temp=str_replace('%2F', '/', rawurlencode($current_dir)).rawurlencode($item);
        echo("<tr class=\"$parclass directory\" bgcolor=\"$parcolor\">".
        '<td><a href="#up">'.$i.'</a></td><td class="btntd"><a href="?download&playlist&dir='.$temp.'" class="icon iplay">P</a>/'.
@@ -375,11 +375,13 @@ if(!isset($_GET['search'])) {
 <span style="float: right;">
        <form action="?" method="GET" align="right" style="display: inline;">
                <input type="hidden" name="download" value="" />
-               <input type="number" name="random" value="<?=$default_random_count?>" />
+               <input type="number" min="1" name="random" value="<?=$default_random_count?>" style="width:4em;" title="how many randomly selected tracks should be in 
+playlist?" 
+/>
                <input type="submit" value="random" title="Generate random music playlist..." />
        </form>
        <form action="?" method="GET" align="right" style="display: inline;">
-               <input type="search" name="search" autofocus placeholder="search regexp..."
+               <span class="icon isearch"></span><input type="search" name="search" autofocus placeholder="search regexp..."
                        title="Search in music/google/lyrics/mp3/youtube; Hint: You can use regular expressions in search query..."
                        value="<?=unxss($_GET['search'])?>"
                />
@@ -394,7 +396,7 @@ if(!isset($_GET['search'])) {
 ?>
 <span style="float: right;">
        <form action="?" method="POST" align="right">
-               <input type="password" name="cache-refresh" value="" title="Password for refreshing - good for avoiding DoS Attacks!!!" />
+               <input type="password" name="cache-refresh" value="" style="width:5em;" title="Password for refreshing - good for avoiding DoS Attacks!!!" />
                <input type="submit" value="refresh cache" title="You should refresh cache each time when you add new music or upgrade to newer version of JuKe!Box !!!" />
        &nbsp;
        </form>
@@ -477,7 +479,7 @@ for($s=2;$s;$s--) { while(($item = readdir($dd)) != false) {
                        render_file_line($dir, $item, $music_dir_url, $i, filesize($dir.$item));
                }
                if(is_dir($dir.$item)) {
-                       render_dir_line($item, $i);
+                       render_dir_line($current_dir, $item, $i);
                }
        }
 } rewinddir($dd); }
@@ -487,7 +489,7 @@ if($sort > 1) {
        @sort($itemsd);
        foreach($itemsd as $item) {
                $i++;
-               render_dir_line($item, $i);
+               render_dir_line($current_dir, $item, $i);
        }
        foreach($itemsf as $item) {
                $i++;
This page took 0.151711 seconds and 4 git commands to generate.