Просмотр файла men/men/index.php

Размер файла: 1.75Kb
<?PHP
//get vars from do_upload.php
$called = 1;
include 'do_upload.php';
?>
<HTML>
<HEAD>
<TITLE> <?PHP print "$ntitle"; ?> </TITLE>
</HEAD>

<BODY>
<div align="center">
Current Hosted Files:

<p>
<?PHP

//give option to upload a file
print "<table border=\"0\">";
print "<tr><td bgcolor=\"#B4B4B4\" width=\"180\" height=\"30\">";
print "<div align=\"center\"><a href=\"$url/show_upload.php\"><b><font face=\"Arial\" size=\"2\" color=\"#000000\">Click Here to upload a file.</font></b></a></div>";
print "</td></tr>";
print "</table><p>";

?>

<TABLE border="0">
<?PHP

//set counter to 0
$tfiles = 0;

//open directory for reading files
$dh = opendir( $ufolder ) or die("Could not open directory");

//read files
while ( ! ( ( $file = readdir( $dh ) ) === false ) ) {
	//make sure file isn't in the don't read list
	if ( is_file( "$ufolder/$file" ) and (!in_array($file,$not_include)) )
	{
		//add 1 to counter
		$tfiles++;
		//print through all files add each to the table
		print " ";
		print "<TR>";
		print "<TD align=\"right\" bgcolor=\"#B4B4B4\">($tfiles)</TD>";
		print "<TD bgcolor=\"#B4B4B4\">";
		print "&nbsp;<a href=\"$url$file\" target=\"_blank\"><font face=\"arial\" color=\"#000000\" size=\"2\">$file</font></A>&nbsp;<BR>\n";
		print "</TD>";
		print "<TD bgcolor=\"#B4B4B4\">";
		$size = "".filesize ("$ufolder$file")."";
		$size = "".round(($size/1024), 2)."";
		print "<font face=\"arial\" color=\"#000000\" size=\"2\">&nbsp;$size KB&nbsp;</font>";
		print "</TD>";
		print "</TR>";
	}
}
print "</table>";
print "<P>";
print "<table border=\"0\">";
print "<tr><td>";
print "Total files: $tfiles";
print "</td></tr>";
print "</table>";
//close directory
closedir( $dh );

print "</div>";
?>
</BODY>
</HTML>