Viewing File: /people/testlab/www/testlab.com.pl/panel/upload.php

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?
echo "<script>parent.document.getElementById('file_loader').innerHTML='<img src=img/loader.gif>';</script>";


$max_rozmiar = 900*1024;
$foto=md5(date("Ymdhis"));
 $j=date("Ymdhis");
if (is_uploaded_file($_FILES['plik']['tmp_name']))
{
  if ($_FILES['plik']['size'] > $max_rozmiar) 
  {
   die ("<script>parent.document.getElementById('fImage').reset();alert('Plik za duży!')</script>");					
  }
  else
  {
     
    move_uploaded_file($_FILES['plik']['tmp_name'],'../upload/'.$foto.'.jpg');
	$player = ""; 
	echo "<script>parent.rto[parent.document.fImage.id.value].viewDialog(\'Image\');parent.document.getElementById('fImage').reset();</script>";
    echo "<script>parent.document.getElementById('file_loader').innerHTML='';</script>";
	echo "<script>";
	$al='';
	if ($_POST['pozycja']!='') $al="align=".$_POST['pozycja']."";
	list($width, $height, $type, $attr) = getimagesize('../upload/'.$foto.'.jpg'); if ($width>500) $w='width=500'; else $w='';
	if ($_POST['wysokoscmin']!='') $w='height='.$_POST['wysokoscmin'];
	
	if ($_POST['aktywny']==on) 
	echo "
	var html='<a href=\'upload/".$foto.".jpg\' id=\"mb".$j."\" class=\"mb\" ><img src=\'upload/".$foto.".jpg\' border=0 $al $w></a>';
	";
	else
	echo "
	var html='<img src=\'upload/".$foto.".jpg\' border=0 $al $w>';
	";
	//<div class=\"multiBoxDesc mb".$j."\">$opis</div>
	echo "
	//alert(html);
    parent.editor1.doCmd('insertHTML', html);
	//
	</script>
	";

				
  }
}
else
echo "<script>parent.document.getElementById('file_loader').innerHTML='Błąd podczas przesyłania pliku!';</script>";
//echo "<script>parent.document.getElementById('okladka_error').innerHTML=\"<font color=red>Błąd podczas przesyłania pliku!</font>\";</script>";


?>
Back to Directory File Manager