diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-19 15:45:12 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-19 15:45:12 +0100 |
commit | c96ba3be049fadb71c9cbfaa53f21607c60d66a5 (patch) | |
tree | 59c51c676ea8fb136eedede8e8ab60cdfd7939c7 | |
parent | 97119d9248475946e69ed8485fdd4723c5f54fbe (diff) | |
download | istreamdev-c96ba3be049fadb71c9cbfaa53f21607c60d66a5.tar.gz istreamdev-c96ba3be049fadb71c9cbfaa53f21607c60d66a5.tar.bz2 |
Nicer recordings dir name
-rwxr-xr-x | includes/inc_rec.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/includes/inc_rec.php b/includes/inc_rec.php index a950d14..2ff9c38 100755 --- a/includes/inc_rec.php +++ b/includes/inc_rec.php @@ -47,6 +47,11 @@ else while ($recname = readdir($dir_handle)) if (strstr($recname, ".rec") == ".rec") { + + $date = preg_replace('/-/', '/', substr($recname, 0, 10)); + $time = preg_replace('/\./', 'h', substr($recname, 11, 5)); + $recnice = $date .' at ' .$time; + print "<li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('$recname2');\"><span class=\"name\">$recnice</span><span class=\"arrow\"></span></a></li>\r\n"; print "<form name=\"$recname\" id=\"$recname\" method=\"post\" action=\"index.php\">"; print " <input name=\"action\" type=\"hidden\" id=\"action\" value=\"stream\"/>"; @@ -56,7 +61,12 @@ else while ($recname = readdir($dir_handle)) } else { - print "<li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('$recname2');\"><span class=\"name\">$recname</span><span class=\"arrow\"></span></a></li>\r\n"; + $recnice = $recname; + if ($recnice[0] == '@') + $recnice = substr($recnice, 1); + $recnice = preg_replace('/\_/', ' ', $recnice); + + print "<li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('$recname2');\"><span class=\"name\">$recnice</span><span class=\"arrow\"></span></a></li>\r\n"; print "<form name=\"$recname\" id=\"$recname\" method=\"post\" action=\"index.php\">"; print " <input name=\"action\" type=\"hidden\" id=\"action\" value=\"recordings\"/>"; print " <input name=\"dir\" type=\"hidden\" id=\"dir\" value=\"{$dir}/{$recname}\" />"; |