Kamissar, rasm qayda turganini so`ramadim. Men shuni kodlari qayda yozilganini so`radim/incfiles/classes/functions.php da
.gif)
$handle = new upload($_FILES['imagefile']);
if ($handle->uploaded) {
// Обрабатываем фото
$handle->image_watermark = '../images/watermark.png';
$handle->image_watermark_position = 'BR';
$handle->file_new_name_body = 'img_' . time();
$handle->allowed = array(
'image/jpeg',
'image/gif',
'image/png'
);
$handle->file_max_size = 1024 * $set['flsz'];
$handle->image_resize = true;
$handle->image_x = 1920;
$handle->image_y = 1024;
$handle->image_ratio_no_zoom_in = true;
$handle->image_convert = 'jpg';
$handle->process('../files/album/');
$img_name = $handle->file_dst_name;
if ($handle->processed) {
// Обрабатываем превьюшку
$handle->file_new_name_body = 'tmb_' . time();
$handle->image_resize = true;
$handle->image_x = 100;
$handle->image_y = 100;
$handle->image_ratio_no_zoom_in = true;
$handle->image_convert = 'jpg';
$handle->process('../files/album/');
$tmb_name = $handle->file_dst_name;
$cat_id = abs(intval($_POST['cat']));
if ($handle->processed) {
if ($rights == 9){
mysql_query("INSERT INTO `album_files` SET
`album_id` = '$cat_id',
`img_name` = '" . mysql_real_escape_string($img_name) . "',
`tmb_name` = '" . mysql_real_escape_string($tmb_name) . "',
`time` = '" . time() . "'
");
}
}