<?php
// ___ ____ _ ______ _ _ _ _ _
// | \/ (_) (_) | ___(_) | | | | | | |
// | . . |_ _ __ _ | |_ _| | ___ | |_| | ___ ___| |_
// | |\/| | | '_ \| | | _| | | |/ _ \ | _ |/ _ \/ __| __|
// | | | | | | | | | | | | | | __/ | | | | (_) \__ \ |_
// \_| |_/_|_| |_|_| \_| |_|_|\___| \_| |_/\___/|___/\__|
//
// by MiniFileHost.co.nr version 1.1
////////////////////////////////////////////////////////
include("./config.php");
include("./header.php");
$filename = $_FILES['upfile']['name'];
$filesize = $_FILES['upfile']['size'];
$rand2=rand('1','999999');
$m=$shourturl;
if ($m=="true")
$short= "";
else
$short= "download.php?file=";
$bans=file("./bans.txt"); foreach($bans as $line)
{
if ($line==$rand2."\n"){
?> <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>
<?
echo "That file is not allowed to be uploaded.";
?></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
}
if ($line==$_SERVER['REMOTE_ADDR']."\n"){
?><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>
<? echo "You are not allowed to upload files.";
?></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
}
}
$checkfiles=file("./files.txt"); foreach($checkfiles as $line)
{
if ($thisline[0]==$filecrc){
$filecrc=rand('10000','1000000000'); }
}
if(isset($allowedtypes)){ $allowed = 0;
foreach($allowedtypes as $ext) {
$allowed = 1;
}
if($allowed==0) {
?><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><?
echo "That file type is not allowed to be uploaded.";
?></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
}
}
if(isset($categorylist)){ $validcat = 0;
foreach($categories as $cat) {
if($_POST['category']==$cat || $_POST['category'] = ""){ $validcat = 1; }
}
if($validcat==0) {
?><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><?
echo "Invalid category was chosen..";
?></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
}
$cat = $_POST['category'];
} else { $cat = ""; }
if($filesize==0) {
?><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><?
echo "You didn't pick a file to upload.";
?></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
}
$filesize = $filesize / 1048576;
if($filesize > $maxfilesize) {
?><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><?
echo "The file you uploaded is too large.";
?></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
}
$userip = $_SERVER['REMOTE_ADDR'];
if($filesize > $nolimitsize) {
$uploaders = fopen("./uploaders.txt","r+"); while (!feof($uploaders)) { }
fseek($uploaders,0,SEEK_SET
); foreach ($user as $line) {
if ($savedip == $userip) {
if ($time < $savedtime + ($uploadtimelimit*60)) {
?><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><?
echo "You're trying to upload again too soon!";
?></center></td></tr></table><p style="margin:3px;text-align:center"><?
include("./footer.php");
}
}
if ($time < $savedtime + ($uploadtimelimit*60)) {
fputs($uploaders,"$savedip|$savedtime\n"); }
}
fputs($uploaders,"$userip|$time\n");
}
$passkey = rand(100000, 999999);
if($emailoption && isset($_POST['myemail']) && $_POST['myemail']!="") { $uploadmsg = "Your file (".$filename.") was uploaded.\n Your download link is: ". $scripturl . "$short" . $rand2 . "\n Your delete link is: ". $scripturl . "$short" . $rand2 . "&del=" . $passkey . "\n Thank you for using our service!";
}
if($passwordoption && isset($_POST['pprotect'])) { $passwerd = md5($_POST['pprotect']); } else { $passwerd = md5(""); }
if($descriptionoption && isset($_POST['descr'])) { } else { $description = ""; }
$filelist = fopen("./files/".$rand2.".txt","w"); fwrite($filelist, $rand2 ."|". basename($_FILES['upfile']['name']) ."|". $passkey ."|". $userip ."|". $time."|0|".$description."|".$passwerd."|".$cat."|\n");
$movefile = "files/$rand2/$filename";
?>
<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>
<?
include("./ads.php");
echo "<center><b>Tu archivo fue subido!</b></center><br/>";
echo "<center>Link de descarga:</center><p><center><a href=$scripturl/files/$rand2/$filename>$scripturl/files/$rand2/$filename</a><br/>";
echo "<p><center>Link de eliminación:</center><p><center><a href=$scripturl/files/$rand2/&del=$filename>$scripturl/files/$rand2/&del=$filename</a><br />";
echo "<p><center>Please remember the above links."; ?><p><?
include("./bottomads.php");
?>
</td></tr></table></center>
<hr>
<p align="center">If you want, we will send an e-mail to up to three persons, who will be informed about your upload. This e-mail will only contain your download links. The delete links will not be mentioned. For privacy reasons, the e-mail addresses will not be saved.
<form action="http://rs365.rapidshare.com/cgi-bin/sendmail.cgi" method="post" target="_blank">
<div align="center">
<table>
<tr><td><div align="center"><b>Your name (as signer):</b></div></td><td> <input type="text" name="name" size="32">
</td></tr>
<tr><td><b>E-Mail #1:</b></td><td><input type="text" name="email1" size="32"></td></tr>
<tr><td><b>E-Mail #2:</b></td><td><input type="text" name="email2" size="32"></td></tr>
<tr><td><b>E-Mail #3:</b></td><td><input type="text" name="email3" size="32"></td></tr>
</table>
<input type="submit" value="Send download links to the e-mail addresses above">
</div>
</form></p>
<hr>
<p align="center">Last but not least you can create a free collector´s account now. Your advantages:
<table><tr><td><div align="center">
<ul>
<li>Collect premium-points for downloads of your files and then convert them to a <b>FREE PREMIUM-ACCOUNT!</b></li>
<li>Use remote HTTP/FTP-Uploads to do server-to-server transfers.</li>
<li>Manage your files easily and add files to your collection at anytime.</li>
<li>Especially for photos, thumbnails are generated for an easy overview of your photos.</li>
<li>No more need to write down links or waiting until uploads are completed. Your uploads will automatically be added to your collection.</li>
</ul>
</div></td></tr></table>
</p>
<p align="center">Create your free account now. Its easy! Just enter the details below.<br>Your uploaded file will automatically be added to your new collection.</p>
<p align="center"><b>IMPORTANTE:</b> This is NO premium-account, but a collector´s account.<br>
This means that you will not have any premium-download privileges.</p>
<p><form action="https://ssl.rapidshare.com/cgi-bin/freeaccount.cgi" method="post" target="_blank">
<div align="center">
<table>
<tr>
<td><b>Usuario:</b></td>
<td><input type="text" name="username" size="32"></td></tr>
<tr><td><b>E-Mail:</b></td><td><input type="text" name="email" size="32"></td></tr>
<tr><td><b>Password:</b></td><td><input type="password" name="password1" size="16"></td></tr>
<tr>
<td><b>Repetir:</b></td>
<td><input type="password" name="password2" size="16"></td></tr>
</table>
<input type="submit" value="Crear cuenta!">
</div>
</form></p></div></div></div>
</div>
<p>
<!-- wrapper -->
</p>
</body></html>