Averr...
files.php
Código PHP:
Ver original<?php
// ___ ____ _ ______ _ _ _ _ _
// | \/ (_) (_) | ___(_) | | | | | | |
// | . . |_ _ __ _ | |_ _| | ___ | |_| | ___ ___| |_
// | |\/| | | '_ \| | | _| | | |/ _ \ | _ |/ _ \/ __| __|
// | | | | | | | | | | | | | | __/ | | | | (_) \__ \ |_
// \_| |_/_|_| |_|_| \_| |_|_|\___| \_| |_/\___/|___/\__|
//
// by MiniFileHost.co.nr version 1.1
////////////////////////////////////////////////////////
include("./config.php");
if(isset($_GET['act'])){$act = $_GET['act'];}else{$act = "null";} include("./header.php");
if($enable_filelist==false){
echo "This page is disabled.";
include("./footer.php");
}
?>
<center><table style='margin-top:20px;width:790px;height:400px;'><tr><td style='border:1px #AAAAAA solid;height:100%;background-color:#FFFFFF;padding:20px;text-align:left;' valign=top>
<h1><center>File List</h1>
<p><table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td>#</td><td width="50%"><a href=files.php?sortby=filename style=color:black><b>Filename</b></a></td><td><a href=files.php style=color:black><b>Downloads</b></a></td><td><b>Size</b></td><td><b>Last Download</b></td></tr>
<tr><td colspan=5 height=10></td></tr>
<?php
if(isset($_GET['act'])){$act = $_GET['act'];}else{$act = "null";}
// Rename PATHTO with the mapname where you keep the config.php
include("./config.php");
if($enable_filelist == false){
echo "File List Is Disabled.";
}
$dirname = "/files/$rand2";
$dh = opendir( $dirname ) or
die("couldn't open directory"); if ($file != '.' && $file != '..' && $file != '.htaccess') {
$fh = fopen ("./files/".$file, r
); if (isset($_GET['sortby'])) { $order[] = $list[1].','.$filecrc.','.$list[5].",".$list[4];
} else {
$order[] = $list[5].','.$filecrc.','.$list[1].",".$list[4];
}
}
}
if (isset($_GET['sortby'])) { sort($order, SORT_STRING
); } else {
sort($order, SORT_NUMERIC
); }
$i = 1;
foreach($order as $line)
{
$shourturl==$me;
if ($me=="true")
$short= "";
else
$short= "download.php?file=";
if (isset($_GET['sortby'])) { echo "<tr><td>".$i."</td><td><a href=\"" . $scripturl . "$me" . $line[1] . "\">".$line[0]."</a></td><td>".$line[2]."</td>";
} else {
echo "<tr><td>".$i."</td><td><a href=\"" . $scripturl . "$me" . $line[1] . "\">".$line[2]."</a></td><td>".$line[0]."</td>";
}
// Rename PATHTO with the mapname where you keep the "storage" map
$filesize = filesize("./storage/".$line[1]); $filesize = ($filesize / 1048576);
if ($filesize < 1)
{
$filesize = round($filesize*1024,0); echo "<td>" . $filesize . " KB</td>";
}
else
{
$filesize = round($filesize,0); echo "<td>" . $filesize . " MB</td>";
}
echo "<td>".date('Y-m-d G:i', $line[3])."</td></tr>"; $i++;
}
?>
</table></p></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
?>
Index.php
Código PHP:
Ver original<?php
include("./config.php");
include("./header.php");
$sizehosted = 0; //get the storage size hosted
$sizehosted = $sizehosted + filesize ("./files/".$file); if((is_dir("./files/".$file.'/')) && ($file != '..')&&($file != '.')) {
$sizehosted = $sizehosted + total_size("./files/".$file.'/');
}
}
$sizehosted = round($sizehosted/1024/1024,2);
if(isset($allowedtypes)){ //get allowed filetypes. $types = implode(", ", $allowedtypes); $filetypes = "<b>allowed file types:</b> ".$types."<br /><br />";
} else { $filetypes = ""; }
if(isset($categories)){ //get categories $categorylist = "Category: <select name=\"category\">";
foreach($categories as $category){
$categorylist .= "<option value=\"".$category."\">".$category."</option>";
}
$categorylist .= "</select><br />";
} else { $filetypes = ""; }
$p = $_GET['page'];
else
$p = "0";
include 'total.php';
switch($p) {
default: include("./pages/upload.php"); break;
}
include("./footer.php");
?>
Lo sigo en otro coment