

Pedro Paulo hasn't added any friends yet.
19/02/2005, 00:29
18/11/2004, 04:11
<?
import_request_variables(P,"p_");
function new_img($imagem_original='',$largura='',$nome=''){
$im = imagecreatefromjpeg($imagem_original);
$w = imagesx($im);
$h = imagesy($im);
if ($w > $h)
{
$nw = $largura;
$nh = ($h * $largura)/$w;
}else{
$nh = $largura;
$nw = ($w * $largura)/$h;
}
if(function_exists('imagecopyresampled'))
{
if(function_exists('imageCreateTrueColor'))
{
$ni = imageCreateTrueColor($nw,$nh);
}else{
$ni = imagecreate($nw,$nh);
}
if(!@imagecopyresampled($ni,$im,0,0,0,0,$nw,$nh,$w,$h))
{
imagecopyresized($ni,$im,0,0,0,0,$nw,$nh,$w,$h);
}
}else{
$ni = imagecreate($nw,$nh);
imagecopyresized($ni,$im,0,0,0,0,$nw,$nh,$w,$h);
}
imagejpeg($ni,"./".$nome.".jpg",80);
}
if($p_fotos[0])
{
$foto = $p_fotos[0];
new_img($foto,"120","miniatura");
}
?>
<FORM ACTION='?' METHOD='POST' NAME='formulario'>
<INPUT NAME='fotos[]' TYPE='FILE' SIZE='60'><BR>
<INPUT TYPE='submit' VALUE='Inserir'>
</FORM>
17/10/2004, 13:14
function BlaBla($bla=''){
// Abre Conexão!
// Consulta!
// Fecha conexão!
}
16/10/2004, 20:30
foreach($_POST as $c1 => $c2){ $$c1 = $c2; }
18/09/2004, 23:30
Community Forum Software by IP.Board
Licensed to: Webmasters Online