grandgefx
01-24-2012, 04:27 AM
I want to resize both width and height of the thumb pic
this is the php code
<?php
$id_member=$_SESSION['rid'];
if(!empty($foto1_name))
{
$nama_file=$foto1_name;
$anton->sekur_upload($nama_file);
if($valid)
{
$abpath = "conf/i/";
@copy($foto1, $abpath."/".$foto1_name);
$abang_dom=$abpath."/".$foto1_name;
list($width, $height) = getimagesize($abang_dom);
if($width>200)
{
make_thumb("$abpath/$foto1_name","conf/i/thumb/$foto1_name",200);
}
else
{
$tujuan="conf/i/thumb/".$foto1_name;
rename($abang_dom, $tujuan);
}
}
$foto_old_name=$foto1_name;
$foto1_name=$id_member."_".$foto1_name;
$foto1_name=strtolower($foto1_name);
$foto1_name=str_replace(' ', '', $foto1_name);
$asal1="conf/i/".$foto_old_name;
$asal2="conf/i/thumb/".$foto_old_name;
$tujuan1="conf/i/".$foto1_name;
$tujuan2="conf/i/thumb/".$foto1_name;
rename($asal1, $tujuan1);
rename($asal2, $tujuan2);
}
I want to set the size to 100 x 100, which part of the code that I need to edit?
this is the php code
<?php
$id_member=$_SESSION['rid'];
if(!empty($foto1_name))
{
$nama_file=$foto1_name;
$anton->sekur_upload($nama_file);
if($valid)
{
$abpath = "conf/i/";
@copy($foto1, $abpath."/".$foto1_name);
$abang_dom=$abpath."/".$foto1_name;
list($width, $height) = getimagesize($abang_dom);
if($width>200)
{
make_thumb("$abpath/$foto1_name","conf/i/thumb/$foto1_name",200);
}
else
{
$tujuan="conf/i/thumb/".$foto1_name;
rename($abang_dom, $tujuan);
}
}
$foto_old_name=$foto1_name;
$foto1_name=$id_member."_".$foto1_name;
$foto1_name=strtolower($foto1_name);
$foto1_name=str_replace(' ', '', $foto1_name);
$asal1="conf/i/".$foto_old_name;
$asal2="conf/i/thumb/".$foto_old_name;
$tujuan1="conf/i/".$foto1_name;
$tujuan2="conf/i/thumb/".$foto1_name;
rename($asal1, $tujuan1);
rename($asal2, $tujuan2);
}
I want to set the size to 100 x 100, which part of the code that I need to edit?