HybridUpload - File Cloud

Status
Not open for further replies.

Satan

Professional Pornstar
Aug 27, 2011
266
106
HybridUpload - Formerly CloudSatan.
HybridUpload is a small file sharing site owned and operated by Joshua Personti.
This is my second active project so development may be a little slow.​
HybridUpload will be guaranteed, one of the most simple file sharing site there is.​
We have a great deal! there's no restriction to what you can upload! any file, any size!​
Overall Project Completion - 45%
User System - 30%
File Uploading - 100%
Downloading - 100%
Main Index - 70%
Screenshots (so far).
Index​
PjJut.png
Root Folder​
NFqeT.png
Upload​
RnFZF.png
Upload Success​
YDDUy.png
Viewing uploaded file​
oydoZ.png
Snippets
Index.HTML - 50%​
HTML:
<html>
<title>HybridUpload</title>
<head>
<div id="note">
    HybridUpload is in BETA.
</div>
<body background="/images/wallpaper.jpg">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body><p>
<br>
<center><img src="images/logo.png" /><p>
</br>
<small><font color="white">HybridUpload is a small file sharing website, Owned & Operated by Joshua Personti.</small></center></font>

Upload.HTML - 100%​
Code:
<html>
<head>
<title>Upload - Hybrid</title>
<body background="/images/wallpaper.jpg">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<center>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<p>
<input type="submit" name="submit" value="Submit" />
</p>
</form>
</center>
</body>
</html>

Style.css​
Code:
body {
font-family: Segoe UI
}
 
#note {
    position: absolute;
    z-index: 101;
    top: 0;
    left: 0;
    right: 0;
    background: #000000;
    text-align: center;
    line-height: 1.5;
    overflow: hidden;
    -webkit-box-shadow: 0 0 5px black;
    -moz-box-shadow:    0 0 5px black;
    box-shadow:        0 0 5px black;
    font-family: Segoe UI
}
 
@-webkit-keyframes slideDown {
    0%, 100% { -webkit-transform: translateY(-50px); }
    10%, 90% { -webkit-transform: translateY(0px); }
}
@-moz-keyframes slideDown {
    0%, 100% { -moz-transform: translateY(-50px); }
    10%, 90% { -moz-transform: translateY(0px); }
}
 
* { margin: 0; padding: 0; }
body { font: 14px Georgia, serif; }
 
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
 
#page-wrap { width: 490px; margin: 80px auto; }
 
body { background: fff; text-align: center; color: #eee; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; }
h1 { font-size: 42px; font-weight: 600; margin: 0 0 30px 0; }
 
pre {
    background: fffff;
    text-align: left;
    padding: 20px;
    margin: 0 auto 30px auto;
}

Upload.php​
PHP:
<?php
  // Configuration - Your Options
      $allowed_filetypes = array('.jpg','.gif','.bmp','.png'); // These will be the types of file that will pass the validation.
      $max_filesize = 524288; // Maximum filesize in BYTES (currently 0.5MB).
      $upload_path = './downloads/'; // The place the files will be uploaded to (currently a 'files' directory).
 
  $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension).
  $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from the filename.
 
  // Check if the filetype is allowed, if not DIE and inform the user.
  if(!in_array($ext,$allowed_filetypes))
      die('The file you attempted to upload is not allowed.');
 
  // Now check the filesize, if it is too large then DIE and inform the user.
  if(filesize($_FILES['userfile']['tmp_name']) > $max_filesize)
      die('The file you attempted to upload is too large.');
 
  // Check if we can upload to the specified path, if not DIE and inform the user.
  if(!is_writable($upload_path))
      die('You cannot upload to the specified directory, please CHMOD it to 777.');
 
  // Upload the file to your specified path.
  if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $filename))
        echo 'Your file upload was successful, view the file <a href="' . $upload_path . $filename . '" title="Your File">here</a>'; // It worked.
      else
        echo 'There was an error during the file upload.  Please try again.'; // It failed :(.

That's It! FOR NOW.
PS: This time this is all mine, didn't use anything else like SatanCMS.​
 
Status
Not open for further replies.

Users who are viewing this thread

Top