File size: 7.33Kb
<?php
$webdir = 'http://all-cs.pusku.com/file_hosting/';
$uploaddir = 'files/';
$password = 'hsfUD7jdy76E%4NDNhdys%jc&^mcncg36cnxvx^^#%q90qejz<cnzx7w373rfsdhcjxce78w';
if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['pass'] != $password)
die('<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <center>Предупреждение!<br>Не правильный пароль.
<br><br>
<div style="text-align: center;"><a style="color:red"
href="/file_hosting/admin.php">Повторить</a><span
style="color: rgb(255, 102, 102);"> </span><br>
</div>
</center>');
$filepath = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $filepath))
$link = "<a href=\"$webdir$filepath\">$webdir$filepath</a>";
header('Content-Type: text/html; charset=UTF-8');
echo '<?xml version="1.0" encoding="utf-8"?>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Панель управления файлового хостига</title>
<style type="text/css">
body {
font-family: tahoma, verdana, arial, sans-serif;
color:#343434;
}
</style>
<style type="text/css">
.search {
width: 300px; /* Ширина в пикселах */
}
</style>
</head>
<body>
<div style="text-align: center;"><img style="width: 640px; height: 50px;" alt="" src="http://all-cs.pusku.com/file_hosting/logo11.png"></div>
<center>
<table style="text-align: left; width: 642px; height: 32px;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
</tr>
</tbody>
</table>
<center>
<center>
<table style="text-align: left; width: 620px; " border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr align="left">
<td style="vertical-align: top; width: 620px;">
<center>
<table style="text-align: left; width: 620px; "
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: top;">
<form enctype="multipart/form-data" method="post">
<center><table style="text-align: left; width: 100px;" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: middle;"><img style="width: 26px;"
alt=""
src="http://file.cs-kukmor.org/file_hosting/files/1313309512e4ccac82b0.png"></td>
<td style="vertical-align: middle;"><input name="pass" size="10"
class="search" value="<?php echo $_POST['pass'] ?>"></td>
<td style="vertical-align: middle;"><input value="Войти"
type="submit"> </td>
</tr>
</tbody>
</table></center>
<?php if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['pass'] == $password): ?>
<?php
echo $link;
if(!empty($_POST['to_delete'])) {
foreach($_POST['to_delete'] as $file)
@unlink($file);
}
$files = glob( $uploaddir . '*', GLOB_MARK );
if(!empty($files)):
?>
<br/>
<br/>
<hr/>
<?php
function getFilesSize($path){
$fileSize = 0;
$dir = scandir($path);
foreach($dir as $file){
if (($file!='.') && ($file!='..'))
if(is_dir($path . '/' . $file))
$fileSize += getFilesSize($path.'/'.$file);
else
$fileSize += filesize($path . '/' . $file);
}
return number_format($fileSize/1024/1024 ,2);
}
$myPath = $_SERVER['DOCUMENT_ROOT'].'/file_hosting/files/';
getFilesSize($myPath);
?><center>
На диске занято: <?php echo getFilesSize($myPath).' ';
?></span></center>
<hr/>
<table cellpadding="5" style="font-size: 0.8em;">
<tr>
<th>Удалить</th>
<th>Название файла</th>
<th>Размер</th>
<th>Дата</th>
</tr>
<?php
foreach($files as $filepath):
?>
<tr>
<td align="center"><input type="checkbox" name="to_delete[]" value="<?php echo $filepath?>" /></td>
<td align="left"><?php echo "<a href=\"$webdir$filepath\">$webdir$filepath</a>"?></td>
<td align="right"><?php echo filesize($filepath)?></td>
<td align="right"><?php echo date('Y-m-d H:i:s', filemtime( $filepath ) )?></td>
</tr>
<?php endForeach ?>
</table><center>
<input type="submit" value="Удалить выбранные"></center>
<?php endIf ?>
<?php endIf ?>
</form>
</div>
</td>
</tr>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
</tbody>
</table>
</center>
</form>
</td>
</tr>
</tbody>
</table><br>
</center>
<?php
$stat=<<<EOD
<!-- Rating@Mail.ru counter -->
<script type="text/javascript">//<![CDATA[
(function(w,n,d,r,s){d.write('<p><a href="http://top.mail.ru/jump?from=2312723">'+
'<img src="http://da.c4.b3.a2.top.mail.ru/counter?id=2312723;t=171;js=13'+
((r=d.referrer)?';r='+escape(r):'')+((s=w.screen)?';s='+s.width+'*'+s.height:'')+';_='+Math.random()+
'" style="border:0;" height="15" width="88" alt="Рейтинг@Mail.ru" /><\/a><\/p>');})(window,navigator,document);//]]>
</script><noscript><p><a href="http://top.mail.ru/jump?from=2312723">
<img src="http://da.c4.b3.a2.top.mail.ru/counter?id=2312723;t=171;js=na"
style="border:0;" height="15" width="88" alt="Рейтинг@Mail.ru" /></a></p></noscript>
<!-- //Rating@Mail.ru counter -->
EOD;
$statik= <<<EOD
<!-- Yandex.Metrika informer -->
<a href="http://metrika.yandex.ru/stat/?id=20225281&from=informer"
target="_blank" rel="nofollow"><img src="//bs.yandex.ru/informer/20225281/1_0_6590C2FF_4570A2FF_1_pageviews"
style="width:80px; height:15px; border:0;" alt="Яндекс.Метрика" title="Яндекс.Метрика: данные за сегодня (просмотры)" onclick="try{Ya.Metrika.informer({i:this,id:20225281,lang:'ru'});return false}catch(e){}"/></a>
<!-- /Yandex.Metrika informer -->
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter20225281 = new Ya.Metrika({id:20225281,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="//mc.yandex.ru/watch/20225281" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
EOD;
?>
<div style="text-align: center;"><img style="width: 640px; height: 20px;" alt="" src="http://all-cs.pusku.com/file_hosting/logo2.png"><br>
</div>
<div style="font-size: 10pt; text-align: center;">Файловый хостинг
проекта
© <a href="http://cs-kukmor.org">cs-kukmor.org</a><br>
2011-2013<br><center><table style="text-align: left; width: 180px; height: 15px;" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: middle; text-align: center; height: 12px;"><?php echo $stat ?>
</td>
<td style="vertical-align: middle; text-align: center; height: 12px;"><?php echo $statik ?>
</td>
</tr>
</tbody>
</table></center></div>
<br>
<br>
</center></center></center>
</body></html>