0) { ?>
Linux Tools Videos
\n";
echo "Linux Tools Videos |
";
sort($files);
foreach ($files as $file) {
$cnt++;
if ($file != ".htaccess" && false===strpos($file,"index.") && $file != "CVS")
{
echo ' '.$file.' |
';
}
}
echo "\n";
} else {
echo "No files found!";
}
function loadDirSimple($dir,$ext,$type) { // 1D array
$stuff = array();
if (is_dir($dir) && is_readable($dir)) {
$handle=opendir($dir);
while (($file = readdir($handle))!==false) {
if ( ($ext=="" || preg_match("/".$ext."$/",$file)) && $file!=".." && $file!=".") {
if (($type=="f" && is_file($file)) || ($type=="d" && is_dir($file))) {
$stuff[] = "$file";
}
}
}
closedir($handle);
}
return $stuff;
}
?>