. www.evoluted.net Layout: Manny . www.tenka.co.uk REQUIREMENTS ============ This script requires PHP and GD2 if you wish to use the thumbnail functionality. INSTRUCTIONS ============ 1) Unzip all files 2) Edit this file, making sure everything is setup as required. 3) Upload to server 4) ?????? 5) Profit! CONFIGURATION ============= Edit the variables in this section to make the script work as you require. Start Directory - To list the files contained within the current directory enter '.', otherwise enter the path to the directory you wish to list. The path must be relative to the current directory. */ $startdir = 'upload/'; /* Show Thumbnails? - Set to true if you wish to use the scripts auto-thumbnail generation capabilities. This requires that GD2 is installed. */ $showthumbnails = true; /* Show Directories - Do you want to make subdirectories available? If not set this to false */ $showdirs = true; /* Force downloads - Do you want to force people to download the files rather than viewing them in their browser? */ $forcedownloads = false; /* Hide Files - If you wish to hide certain files or directories then enter their details here. The values entered are matched against the file/directory names. If any part of the name matches what is entered below then it is now shown. */ $hide = array( 'dlf', 'index.php', 'Thumbs', '.htaccess', '.htpasswd', '.php', '.htm', '.html' ); /* Show index files - if an index file is found in a directory to you want to display that rather than the listing output from this script? */ $displayindex = false; /* Allow uploads? - If enabled users will be able to upload files to any viewable directory. You should really only enable this if the area this script is in is already password protected. */ $allowuploads = true; /* Overwrite files - If a user uploads a file with the same name as an existing file do you want the existing file to be overwritten? */ $overwrite = true; /* Index files - The follow array contains all the index files that will be used if $displayindex (above) is set to true. Feel free to add, delete or alter these */ $indexfiles = array ( 'index.html', 'index.htm', 'default.htm', 'default.html' ); /* File Icons - If you want to add your own special file icons use this section below. Each entry relates to the extension of the given file, in the form => . These files must be located within the dlf directory. */ $filetypes = array ( 'png' => 'jpg.gif', 'jpeg' => 'jpg.gif', 'bmp' => 'jpg.gif', 'jpg' => 'jpg.gif', 'gif' => 'gif.gif', 'zip' => 'archive.png', 'exe' => 'exe.gif', 'setup' => 'setup.gif', 'txt' => 'text.png', 'htm' => 'html.gif', 'html' => 'html.gif', 'fla' => 'fla.gif', 'swf' => 'swf.gif', 'xls' => 'xls.gif', 'doc' => 'doc.gif', 'sig' => 'sig.gif', 'fh10' => 'fh10.gif', 'pdf' => 'pdf.gif', 'apk' => 'android.gif', 'psd' => 'psd.gif', 'rm' => 'real.gif', 'mpg' => 'video.gif', 'mpeg' => 'video.gif', 'mov' => 'video2.gif', 'wma' => 'sound.gif', 'wmv' => 'wmv.gif', 'wav' => 'sound.gif', 'mp3' => 'sound.gif', 'avi' => 'video.gif', 'eps' => 'eps.gif', 'gz' => 'archive.png', 'asc' => 'sig.gif', 'rar' => 'rar.gif', 'ppt' => 'ppt.gif', ); /* That's it! You are now ready to upload this script to the server. Only edit what is below this line if you are sure that you know what you are doing! */ if ($_GET['sort']=="") { $_GET['sort']="date"; $_GET['order']="desc"; } error_reporting(0); if(!function_exists('imagecreate')) $showthumbnails = false; $leadon = $startdir; if($leadon=='.') $leadon = ''; if($_GET['dir']==".") $_GET['dir'] = 'upload/' ; if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/'; $startdir = $leadon; if($_GET['dir']) { //check this is okay. if(substr($_GET['dir'], -1, 1)!='/') { $_GET['dir'] = $_GET['dir'] . '/'; } $dirok = true; $dirnames = split('/', $_GET['dir']); for($di=0; $di"; echo "






Favor seleccione archivo e ingrese descripción, NO se sube el archivo

Volver
"; die(); } if($upload && $_REQUEST['clave'] <> 'lu7aa1') { set_time_limit(0); $filename = $_FILES['file']['tmp_name']; // Get new sizes list($width, $height) = getimagesize($filename); if ($width>800){$percent=800/$width*2;} else {$percent=2;} $percent=1; $newwidth = $width * $percent; $newheight = $height * $percent; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($_FILES['file']['tmp_name']); // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output $nosubir = ""; $nombre = explode(".", $_FILES['file']['name']); $currentExtension1 = "xxx"; $currentExtension = $nombre[count($nombre)-1]; $currentExtension1 = $nombre[count($nombre)-2]; $nuevonombre = $_REQUEST['nuevonombre'] ; $nombrenuevo = explode(".", $nuevonombre); $newExtension = "aaa"; $newExtension1 = "bbb"; $newExtension = $nombrenuevo[count($nombrenuevo)-1]; $newExtension1 = $nombrenuevo[count($nombrenuevo)-2]; //if ($currentExtension == "JPG" || $currentExtension == "jpg" ) if ($currentExtension == "wvc" || $currentExtension == "php" || $currentExtension == "PHP" || $currentExtension == "Php" || $currentExtension == "pHp" || $currentExtension == "pHP" || $currentExtension == "PhP" || $currentExtension == "PHp" || $currentExtension == "htm" || $currentExtension == "html" || $currentExtension == "HTM" || $currentExtension == "HTML" || $currentExtension == ".js"|| $currentExtension == "js" || $currentExtension == "asp" || $currentExtension == "ASP" || $currentExtension == "EXE" || $currentExtension == "exe" || $currentExtension == "fla" || $currentExtension == "FLA" || $currentExtension == "com" || $currentExtension == "php5" || $currentExtension == "pht" || $currentExtension == "phtml" || $currentExtension == "shtml" || $currentExtension == "swf" || $currentExtension == "asa" || $currentExtension == "asax" || $currentExtension == "xap" || $currentExtension1 == "php" || $newExtension == "wvc" || $newExtension == "php" || $newExtension == "PHP" || $newExtension == "Php" || $newExtension == "pHp" || $newExtension == "pHP" || $newExtension == "PhP" || $newExtension == "PHp" || $newExtension == "htm" || $newExtension == "html" || $newExtension == "HTM" || $newExtension == "HTML" || $newExtension == ".js"|| $newExtension == "js" || $newExtension == "asp" || $newExtension == "ASP" || $newExtension == "EXE" || $newExtension == "exe" || $newExtension == "fla" || $newExtension == "FLA" || $newExtension == "com" || $newExtension == "php5" || $newExtension == "pht" || $newExtension == "phtml" || $newExtension == "shtml" || $newExtension == "swf" || $newExtension == "asa" || $newExtension == "asax" || $newExtension == "xap" || $newExtension1 == "php" ) { $nosubir = "NO "; if ($nosubir == "") { imagejpeg($thumb, $leadon . $_REQUEST['nuevonombre'], 85); $descFile = './dlf/' . $_REQUEST['nuevonombre'] . '.txt'; $fdesc = fopen($descFile, 'w') or die("No puedo grabar descripcion"); fwrite($fdesc, $_REQUEST['descripcion']); fclose($fdesc); } } else { if ($nosubir == "") { move_uploaded_file($_FILES['file']['tmp_name'], $leadon . $_REQUEST['nuevonombre']); $descFile = './dlf/' . $_REQUEST['nuevonombre'] . '.txt'; $fdesc = fopen($descFile, 'w') or die("No puedo grabar descripcion"); fwrite($fdesc, $_REQUEST['descripcion']); fclose($fdesc); } } // Prepare & write logfile if ($nosubir == "") { $logentry = date("Y-m-d H:i:s", time()) . "//" . $_SERVER['REMOTE_ADDR']. "//" . $_REQUEST['nuevonombre'] . "//" . $_REQUEST['descripcion'] . "//" . $_FILES['file']['size']. "//" . "\r\n" ; $logFile = './dlf/' . 'upload.log'; $flogFile = fopen($logFile, 'a') or die("No puedo grabar logfile"); fwrite($flogFile, $logentry) ; fclose($flogFile); } // // Send Mail to upload@amsat.org.ar require_once "Mail.php"; $from = "Upload Amsat "; $to = "upload@amsat.org.ar"; $subject = $_REQUEST['nuevonombre'] . " Subido al Upload"; $body = "Desde IP: " . "https://ipinfo.io/" . $_SERVER['REMOTE_ADDR']. " a http://amsat.org.ar/?f=w" . "\n\n" . $nosubir . "Se subio archivo " . $_REQUEST['nuevonombre'] . " de " . $_FILES['file']['size'] . " Bytes.\n\n" . "Descripcion: " . $_REQUEST['descripcion'] . ".\n\nVer en: http://lu7aa.org/" . $leadon . rawurlencode($_REQUEST['nuevonombre']) . " \n\n73s, Dorita, CyberSecre de Amsat. Chuik..."; $host = "mail.amsat.org.ar"; $port = "25"; $username = "pconver@amsat.org.ar"; $password = "lu7a"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("

Archivo" . $_REQUEST['nuevonombre'] . " NO Recibido

"); } else { echo("

Archivo " . $_REQUEST['nuevonombre'] . " recibido OK !!    Ver y Link en:
http://lu7aa.org/" . $leadon . rawurlencode($_REQUEST['nuevonombre']) . "

"); } } } $opendir = $leadon; if(!$leadon) $opendir = '.'; if(!file_exists($opendir)) { $opendir = '.'; $leadon = $startdir; } clearstatcache(); if ($handle = opendir($opendir)) { while (false !== ($file = readdir($handle))) { //first see if this file is required in the listing if ($file == "." || $file == "..") continue; $discard = false; for($hi=0;$hi Files in //

Files in / Click para ver ultimos archivos subidos Para subir archivos
Seleccione Directorio
 y Click en Browse
 O en Choose File  !  Call W

 File  Click sobre File, Size o Last Modified para cambiar el orden
  Folder ▼ Seleccione el Directorio para Upload o Download
                Size
150){$arsize=150;} // se limita arsize a 300 for($i=0;$i<$arsize;$i++) { $icon = 'unknown.png'; $ext = strtolower(substr($files[$i], strrpos($files[$i], '.')+1)); $supportedimages = array('gif', 'png', 'jpeg', 'jpg'); $thumb = ''; if($showthumbnails && in_array($ext, $supportedimages)) { $thumb = ''.$files[$i].''; $thumb2 = ' onmouseover="o('.$i.', \''.urlencode($leadon . $files[$i]).'\');" onmouseout="f('.$i.');"'; } if($filetypes[$ext]) { $icon = $filetypes[$ext]; } $filename = $files[$i]; if(strlen($filename)>62) { $filename = substr($files[$i], 0, 62) . '...'; } $fileurl = $leadon . $files[$i]; if($forcedownloads) { $fileurl = $_SESSION['PHP_SELF'] . '?dir=' . urlencode($leadon) . '&download=' . urlencode($files[$i]); } $altex=file_get_contents('./dlf/'.$files[$i].'.txt'); $tamanio = filesize($leadon.$files[$i]); if ($tamanio > 1024) { $resu=round($tamanio/1024) . ' KB'; } else { $resu=$tamanio . ' B  '; } ?>
 +Clave Para regrabar o Upload
File Upload  Subir como:  ingrese/cambie nombre (Max Size: MB)
Subido por y Descripción:  * Description Required File uploads are disabled in your php.ini file. Please enable them. NO se sube el archivo"; } ?>
UPLOAD
Facilidad para compartir fotos, videos, audios, presentaciones, pdfs, programas y archivos de Amsat-LU