mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2025-07-30 12:50:17 +00:00
Added the files of the project to the repo
This commit is contained in:
49
upload.php
Executable file
49
upload.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<html>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-24492597-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
<body bgcolor="black" text="white">
|
||||
<?php
|
||||
if (($_FILES["file"]["size"] < 2000000000000000000000000000000000000000000))
|
||||
{
|
||||
if ($_FILES["file"]["error"] > 0)
|
||||
{
|
||||
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
|
||||
echo "Type: " . $_FILES["file"]["type"] . "<br />";
|
||||
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
|
||||
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
|
||||
|
||||
if (file_exists("upload/" . $_FILES["file"]["name"]))
|
||||
{
|
||||
echo $_FILES["file"]["name"] . " already exists. ";
|
||||
}
|
||||
else
|
||||
{
|
||||
move_uploaded_file($_FILES["file"]["tmp_name"],
|
||||
"upload/" . $_FILES["file"]["name"]);
|
||||
echo "Stored in: " . "unps-gama.tk/upload/" . $_FILES["file"]["name"];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Invalid file";
|
||||
}
|
||||
?>
|
||||
<div align="center"><a href="http://unps-gama.tk/index.php">Go Home</a>
|
||||
</div>
|
||||
</body></html>
|
Reference in New Issue
Block a user