From 803716beb793822942c448722808e6bf073c7666 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Fri, 19 Feb 2010 15:31:42 +0100 Subject: Indentation --- includes/inc_media.php | 61 ++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/includes/inc_media.php b/includes/inc_media.php index d6b6e59..7c5f133 100755 --- a/includes/inc_media.php +++ b/includes/inc_media.php @@ -25,8 +25,8 @@ else print "Back\r\n"; if ($dir != $mediapath) { -print "
\r\n"; -print "\"home\"
\r\n"; + print "
\r\n"; + print "\"home\"
\r\n"; } print "
iStreamdev
\r\n"; print "\r\n"; @@ -54,42 +54,45 @@ else while ($medianame = readdir($dir_handle)) // if ($medianame_array[0] == NULL) { -//do nothing + //do nothing } else { -sort($medianame_array); -foreach($medianame_array as $value) - { - $medianame2=addslashes($value); - // Directories - if (is_dir($dir ."/" .$value)) - { - print "
  • $value
  • \r\n"; - print "
    "; - print " "; - print " "; - print "
    \r\n"; - } - else - { - // Get file extension - $fileext = end(explode(".", $value)); + // Alphabetical sorting + sort($medianame_array); + + foreach($medianame_array as $value) + { + $medianame2=addslashes($value); - // Check if it is supported - if ( preg_match("'" .$fileext ." '", $videotypes) - || preg_match("'" .$fileext ." $'", $videotypes) - ) + // Directories + if (is_dir($dir ."/" .$value)) { - print "
  • $value
  • \r\n"; + print "
  • $value
  • \r\n"; print "
    "; - print " "; - print " "; - print " "; + print " "; + print " "; print "
    \r\n"; } + else + { + // Get file extension + $fileext = end(explode(".", $value)); + + // Check if it is supported + if ( preg_match("'" .$fileext ." '", $videotypes) + || preg_match("'" .$fileext ." $'", $videotypes) + ) + { + print "
  • $value
  • \r\n"; + print "
    "; + print " "; + print " "; + print " "; + print "
    \r\n"; + } + } } - } } $updir = dirname($dir); -- cgit v1.2.3