It looks like you're new here. If you want to get involved, click one of these buttons!
<script>
$(document).ready(function() {
$('#fileInput').fileUpload({
'uploader': 'src/uploader.swf',
'script': 'scripts/upload.php',
'folder': 'uploads',
'cancelImg': 'images/cancel.png',
'buttonImg': 'images/browse-files.png',
'width': 130,
'onComplete': function(event, queueID, fileObj, response, data) {
$('#filesUploaded').append('<a href='+fileObj.filePath+'>'+fileObj.name+'</a><br>');},
'multi': true
});
});
</script>
<?php
$masterFolder = $_SERVER['DOCUMENT_ROOT'] . $_GET['folder'] . '/';
$newDir = $masterFolder . date('m-d-Y h-i-s A') . '/';
// Uploadify v1.6.2
// Copyright (C) 2009 by Ronnie Garcia
// Co-developed by Travis Nickels
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $newDir;
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
// Uncomment the following line if you want to make the directory if it doesn't exist
mkdir(str_replace('//','/',$targetPath), 0755, true);
move_uploaded_file($tempFile,$targetFile);
}
echo \"1\";
?>
<?php
$masterFolder = $_SERVER['DOCUMENT_ROOT'] . $_GET['folder'] . '/';
$newDir = $masterFolder . date('m-d-Y h-i-s A') . '/';
// Uploadify v1.6.2
// Copyright (C) 2009 by Ronnie Garcia
// Co-developed by Travis Nickels
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $newDir;
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
// Uncomment the following line if you want to make the directory if it doesn't exist
mkdir(str_replace('//','/',$targetPath), 0755, true);
move_uploaded_file($tempFile,$targetFile);
}
$relDir = str_replace(' ', '%20', substr( $newDir, 21, -1) . '/' . $_FILES['Filedata']['name']);
echo '<div id=\"File\"><strong>'.$_FILES['Filedata']['name'] . '</strong><br />Location: <a href=\"'.$relDir.'\" target=\"_blank\">http://'.$_SERVER['SERVER_NAME'] . $relDir. '</a><br />File Type: '. $fileType . '</div>';
?>
if ($fileType == image) {
echo <img ...
} else if($fileType == pdf) {
echo '<img ..