Просмотр файла upload/files.php

Размер файла: 1.37Kb
<?php
//-------------------------------------//
//------Mod by Shur1k------//
//--http://wap.rovno.ua--//
//-------------------------------------//
////////////////////////////////////////////////////////

include("./config.php");
if(isset($_GET['act'])){$act = $_GET['act'];}else{$act = "null";}
session_start();
include("./header.php");

if($enable_filelist==false){
echo "This page is disabled.";
include("./footer.php");
die();
}
?>
<h1>Загруженные файлы</h1>
<p><table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td width="50%"><b>Имя файла</b></td><td><b>Размер</b></td><td><b>Последнее скачивание</b></td><td><b>Кол-во скачиваний</b></td></tr>
<?php

$checkfiles=file("./files.txt");
foreach($checkfiles as $line)
{
  $thisline = explode('|', $line);
  
  echo "<tr><td><a href=\"download.php?file=".$thisline[0]."\">".$thisline[1]."</td>";

  $filesize = filesize("./storage/".$thisline[0]);
  $filesize = ($filesize / 1048576);

  if ($filesize < 1)
  {
     $filesize = round($filesize*1024,0);
     echo "<td>".$filesize." KB</td>";

  }
  else
    {
     $filesize = round($filesize,2);
     echo "<td>".$filesize." MB</td>";
     
  }
echo "<td>".date('Y-m-d G:i', $thisline[4])."</td><td>".$thisline[5]."</tr>";
}
echo "</table></p>";
include("./footer.php");
?>