<?php

// creating the function that is called from the index-test.php
function listing_dir()
{
if ( $search_dir == "")

{
	$search_dir = ".";
}

$mydirectory = opendir($search_dir);

// get each entry in the directory

while ($entryname = readdir($mydirectory))
{
	if (is_dir($entryname))
	{
	    // Returns nothing if it is a directory
	    echo "";
	} else {
	    echo "<li><a href='$search_dir/$entryname'>$entryname</a>\n";
	}
}
}
?>
