Forum Moderators: coopster
<?
if (is_dir($_SETTINGS['DIR'])) {
$dir = opendir("{$_SETTINGS['DIR']}");
echo "<table width=\"100%\" valign=\"top\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td valign=\"top\">File list of {$_SETTINGS['DIR']}/";
echo "<select name=\"edit_file_name\">
<option value=\"$file\">$file</option>
<option value=\"\"></option>";
while ($file = readdir ($dir)) {
if($_SETTINGS['FILE_LIST']){
$file2 = array_pop(explode(".",$file));
if(!in_array($file2,$_SETTINGS['FILE_LIST']))
continue;
}
if ($file != "." && $file != ".." && !is_dir($file) && !eregi("\.bac", $file)){
print '<option value="'.$file.'">'.$file. '</option>';
}
// echo " <a href=\"$_SERVER[PHP_SELF]?edit_file_name=$file\">$file</a></td> \n";
}
echo '</select> ';
closedir($dir);
} else echo "{$_SETTINGS['DIR']} not found";
?>
<?
if (is_dir($_SETTINGS['DIR'])) {
$dir = opendir("{$_SETTINGS['DIR']}");
echo "<table width=\"100%\" valign=\"top\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td valign=\"top\"><b>File List Of</b> {$_SETTINGS['DIR']}/";
echo "<select name=\"edit_file_name\">
<option value=\"$file\">$file</option>
<option value=\"\"></option>";
while ($file = readdir ($dir)) {
if($_SETTINGS['FILE_LIST']){
$file2 = array_pop(explode(".",$file));
if(!in_array($file2,$_SETTINGS['FILE_LIST']))
continue;
}
if ($file != "." && $file != ".." && !is_dir($file) && !eregi("\.bac", $file)){
print '<option value="'.$file.'">'.$file. '</option>';
}
// echo " <a href=\"$_SERVER[PHP_SELF]?edit_file_name=$file\">$file</a></td> \n";
}
echo '</select> ';
closedir($dir);
} else echo "{$_SETTINGS['DIR']} not found";
?>