Просмотр файла index.php

Размер файла: 1.49Kb
<html><head><title>Mass url upload by www.hotfiles.in</title></head><body>



<?
include "config.php";
$upload=$_REQUEST[upload];

if($upload) {
$file=$_REQUEST[file];
if($file) {
$total=count($file)+1;
$mehraj=1;
foreach($file as $var){
if ($mehraj>0 && $mehraj<$total )
{
if ($file[$mehraj]=="")
{$error="empty";}
else {
$ext[$mehraj] = strtolower(substr($file[$mehraj],strrpos($file[$mehraj],".")));

$start[$mehraj]=strrpos($file[$mehraj],"/");
$start[$mehraj]=$start[$mehraj]+1;
$end[$mehraj]=-strlen($ext[$mehraj]);


$newf[$mehraj]=substr($file[$mehraj],$start[$mehraj],$end[$mehraj]);
$newf[$mehraj]=$newf[$mehraj].'('.$site.')';
$ds[$mehraj]= array($folder,$newf[$mehraj],$ext[$mehraj]); 


  $ds[$mehraj] = implode("", $ds[$mehraj]); 
  
  
  if (file_exists($ds[$mehraj])) {

 echo "<br/>File ".$newf[$mehraj]." already exists! <br>\n Adding random digits to beginning of filename.\n";

 $ds[$mehraj] = array($folder, rand(0,9999), $newf[$mehraj],$ext[$mehraj]);

 $ds[$mehraj] = implode("", $ds[$mehraj]);

}
  
  
  
  if (!copy($file[$mehraj], $ds[$mehraj]))
  {  echo "Was unable to copy file no. ".$file[$mehraj]."<br />"; }
  else 
				{
			//	$p[$mehraj]= filesize($ds[$mehraj])/1024;
              //  $d[$mehraj]=round($p[$mehraj],2);
                echo $file[$mehraj]." Copied to ".$ds[$mehraj];
				echo "<br />";
				}}
				
				}
 $mehraj++; 
}



print "<a href=index.php>Upload More</a>";}
}
else include 'upload.php';
?>
</body></html>