Ver Mensaje Individual
  #8 (permalink)  
Antiguo 23/08/2002, 15:46
zeus_bsas
 
Fecha de Ingreso: junio-2002
Ubicación: Buenos Aires, Argentina
Mensajes: 876
Antigüedad: 21 años, 10 meses
Puntos: 0
Re: soy nuevito: AYUDA con manejo de fotos

<html><head><title>TITULO DE PAGINA</title></head>
<body bgcolor="#FFFFFF">
<?
$picdir = "pics";
$height = "100";
$newwidth = "100";

$array = explode (".",$file_name);
$filename = $array[0];
$extension = strtolower($array[1]);

if($file_name == "")
{
echo " Bitte eine Datei auswählen:";
}
else
{
if(!(($extension == jpe) or ($extension == jpg) or ($extension == jpeg)))
{
echo "Sólo se permiten fotos del tipo JPG";
}
else
{
$smallimage = "fotoschicas"."/"."foto"."."."jpg&qu ot;;

@copy($file, "fotosgrandes"."/"."foto"."."."jpg&qu ot;);
echo " Die Datei wurde auf den Server übertragen !";
if(@copy($file,"fotoschicas"."/"."foto"."."."jpg&qu ot;));

if(file_exists($smallimage))
{
$image = imagecreatefromjpeg("$smallimage");
$ywert=imagesy($image);
$xwert=imagesx($image);

$newheight = $height;
$newwidth = $width;

$destimage = imagecreate($newwidth,$newheight);
imagecopyresized($destimage, $image, 0, 0, 0, 0, $newwidth, $newheight,$xwert,$ywert);
imagejpeg($destimage,$smallimage);
}
}
}
?>
<form method="POST" action="<?php echo $PHP_SELF ?>" enctype="multipart/form-data">
<input type=file name=file size=25><br>
<button name="upload" type="submit">Upload</button>
</form>
<?
if(isset($original))
{
echo "Vorschau<br><br>Thumbnail » <i>".$smallimage."</i><br><img src=".$smallimage."><br><br& gt;Original » <i>".$original."</i><br><img src=".$original.">";
}
?>
</body></html>