<%@Language=JavaScript%> Welcome to Innercorp USA
 
New Innercorp Clients Register Here
home home   search search   sitemap links   help help
 | LoginÏ
 
 
   
 
\n"; function get_extension($name) { $array = explode(".", $name); $retval = strtolower(array_pop($array)); return $retval; } // Recursion! And away we go... // Set some globals and clean up a bit... // What a pig... function list_dir($chdir) { global $root, $prefix, $showsize, $display, $excludedir, $excludefile; unset($sdirs); unset($sfiles); chdir($chdir); $self = basename($_SERVER['PHP_SELF']); // Open the current directory $handle = opendir('.'); // Read directory. If the item is a directory, place it in $sdirs. // If it's a filetype we want, put it in $sfiles */ while ($file = readdir($handle)) { if(is_dir($file) && $file != "." && $file != ".." && !in_array($file, $excludedir)) { $sdirs[] = $file; } elseif(is_file($file) && $file != "$self" && array_key_exists(get_extension($file), $display) && !in_array($file, $excludefile)) { $sfiles[] = $file; } } // Count the slashes to determine how deep we're in the directory. // Add lines to make it pretty. $dir = getcwd(); $dir1 = str_replace($root, "", $dir."/"); $count = substr_count($dir1, "/") + substr_count($dir1, "\\"); // Display directory names and recursively list them. if(is_array($sdirs)) { sort($sdirs); reset($sdirs); for($y=0; $y"; } echo "\n"; } } list_dir($root); echo "
\n"; echo "
http://".$_SERVER['SERVER_NAME']; echo "$prefix/"; echo "
"; for($z=1; $z<=$count; $z++) { echo "   "; } if(is_array($sfiles)) { echo ""; } else { echo ""; } echo " $sdirs[$y]"; list_dir($dir."/".$sdirs[$y]); } } chdir($chdir); // Run through the array of files and show them. if(is_array($sfiles)) { sort($sfiles); reset($sfiles); $sizeof = sizeof($sfiles); // What file types shall we display? for($y=0; $y<$sizeof; $y++) { echo "
"; for($z=1; $z<=$count; $z++) { echo "   "; } if($y == ($sizeof -1)) { echo ""; } else { echo ""; } echo " "; echo "$sfiles[$y]"; if($showsize) { $fsize = @filesize($sfiles[$y])/1024; printf(" (%.2f kB)", $fsize); } echo "
"; for($z=1; $z<=$count; $z++) { echo "   "; } echo "

\n"; // How long did that take? $ftime = gettimeofday(); $time = round(($ftime[sec] + $ftime[usec] / 1000000) - ($stime[sec] + $stime[usec] / 1000000), 5); echo "
This page was generated in $time seconds.
\n"; ?>
printer friendly version of this page!
read more
Innercorp USA  ©2006 All Rights Reserved
Home | About us | Solution | Services | Partners | Contact