<?
if (is_file(H."files/user_files/screens_litle/$file_id[id].png"))
{
echo "<img src='/files/user_files/screens_litle/$file_id[id].png' alt='scr...' />\n";
}
elseif (class_exists('ffmpeg_movie')){
$media = new ffmpeg_movie($file);
$k_frame=intval($media->getFrameCount());

$w = $media->GetFrameWidth();
$h = $media->GetFrameHeight();
$ff_frame = $media->getFrame(intval($k_frame/2));
if ($ff_frame) {
$gd_image = $ff_frame->toGDImage();
if ($gd_image) {
$des_img = imagecreatetruecolor(80, 80);
$s_img = $gd_image;
imagecopyresampled($des_img, $s_img, 0, 0, 0, 0, 80, 80, $w, $h);
imagegif($des_img,H."files/user_files/screens_litle/$file_id[id].png");
chmod(H."files/user_files/screens_litle/$file_id[id].png", 0777);
imagedestroy($des_img);
imagedestroy($s_img);
if (function_exists('iconv'))
echo "<img src='".iconv('windows-1251', 'utf-8',"/files/user_files/screens_litle/$file_id[id].png")."' alt='scr...' />\n";
else
echo "<img src='/files/user_files/screens_litle/$file_id[id].png' alt='scr...' />\n";

}
}
}

?>