Просмотр поста #528707: У Вас есть один вопрос? - Тогда задайте его тут! new!

.
-sanek-

kandyor,

require('../incfiles/lib/class.upload.php');

$handle = new upload($_FILES['imagefile']);
if ($handle->uploaded) {
$handle->file_new_name_body = $user_id._.time();
$handle->allowed = array('image/jpeg', 'image/gif', 'image/png');
$handle->file_max_size = 1024 * $set['flsz'];
$handle->file_new_name_body   = $nid;
$handle->image_resize         = false;
$handle->image_x              = 240;
$handle->image_ratio_y        = false;
$handle->image_convert = 'jpg';
$handle->process('../files/foto/');
if (!$handle->processed) {
echo functions::display_error($handle->error);
}
$handle->clean();
$image = substr($_FILES['imagefile']['name'],0,-4);
}