<
html>
<head>
<title>LittleWebFTP</title>
<link rel="stylesheet" type="text/css" href="css/webftp.css">
</head>
<body>
<h1>LittleWebFTP</h1>
<?php
$path = getcwd().'/'.$path;
echo '[b]Contents of[/b] '.$path;
?>
</p>
[img]images/line.png[/img]
<table class="dir">
<colgroup>
<col width="150" align="left">
<col width="75" align="right">
<col width="675" align="left">
</colgroup>
<?php
include 'php/webftp.php';
echo '<tr>';
echo '<th class="dir">[
url="index.php?SortOrder=time"]Last modified[/
url]</th>
<th class="dir"><a class="parent" href="index.php?SortOrder=size">Size</th>
<th class="dir">[
url="index.php?SortOrder=name"]Name[/
url]</th>';
echo '</tr>';
echo $path;
$dirs = ListDirs($path);
foreach($dirs as $dir)
{
echo '<tr>';
echo '<td class="dir">'.date("Y-m-d H:i", filemtime($dir)).'</td>
<td class="dir"><DIR></td>
<td class="dir">[
url="index.php?path='.$dir.'"]['.$dir.'][/
url]</td>';
echo '</tr>';
}
?>
</table>
<table class="files">
<colgroup>
<col width="150" align="left">
<col width="75" align="right">
<col width="675" align="left">
</colgroup>
<?php
if ($SortOrder == '')
{
$SortOrder = 'name';
}
echo $path;
$files = ListFiles($path, $SortOrder);
foreach($files as $file)
{
echo '<tr>';
echo '<td class="files">'.date("Y-m-d H:i", filemtime($file)).'</td>
<td class="files">'.format_filesize(filesize($file)).'</td>
<td class="files">[
url="'.$file.'"]'.$file.'[/
url]</td>';
echo '</tr>';
}
?>
</table>
[img]images/line.png[/img]
<table class="tblfooter">
<tr>
<?php
echo '<td class="total">'.'Total: '.count($files).' file(s) - '.count($dirs).' directory(s) ~'.format_filesize(directory_size($path)).'</td>'.
'<td></td>';
?>
</tr>
</table>
</p>
</body>
</
html>