Вход Регистрация
Файл: users/diary/inc/create_image.php
Строк: 102
<?
require_once ("../../core/cuctema/core.php");
require_once (
"../../core/cuctema/zip.php");
$movie=@new ffmpeg_movie(H."users/diary/files/".intval($_GET['file']).".dat");
$name=$_GET['name'];
$fid=intval($_GET['file']);
$imname="image.f".$fid.".80.80.png";
$icname="icon.f".$fid.".16.16.png";
if(
$imgc=imagecreatefromstring(file_get_contents(H."users/diary/files/".intval($_GET['file']).".dat")) && $name==$imname)
{
header("Content-type: image/png");
$imgc=imagecreatefromstring(file_get_contents(H."users/diary/files/".intval($_GET['file']).".dat"));
$img_x=imagesx($imgc);
$img_y=imagesy($imgc);
if (
$img_x==$img_y)
{
$dstW=80// ширина
$dstH=80// высота 
}
elseif (
$img_x>$img_y)
{
$prop=$img_x/$img_y;
$dstW=80;
$dstH=ceil($dstW/$prop);
}
else
{
$prop=$img_y/$img_x;
$dstH=80;
$dstW=ceil($dstH/$prop);
}
$screen=imagecreatetruecolor($dstW$dstH);
$black imagecolorallocate ($screen000);
//imagecolortransparent($screen,$black);
imagecopyresampled($screen$imgc0000$dstW$dstH$img_x$img_y);
imagedestroy($imgc);
imagepng($screen);
imagedestroy($screen);
}
elseif(
$movie && $name==$imname)
{
$k_frames=$movie->getFrameCount(); //к-тво кадров
for($kp=1;$kp<=60;$kp++) //выбираем случайный кадр
{
$image=$movie->getFrame($kp);
if(
$image)$show_img=$image->toGDImage(); //если кадр в нормальном состоянии, то выбираем его для дальнейшей работы
}
if(
$show_img)
{
$imgc=$show_img;
$img_x=imagesx($imgc);
$img_y=imagesy($imgc);
if (
$img_x==$img_y)
{
$dstW=80// ширина
$dstH=80// высота 
}
elseif (
$img_x>$img_y)
{
$prop=$img_x/$img_y;
$dstW=80;
$dstH=ceil($dstW/$prop);
}
else
{
$prop=$img_y/$img_x;
$dstH=80;
$dstW=ceil($dstH/$prop);
}
$screen=imagecreatetruecolor($dstW$dstH); // создаем изображение
$black imagecolorallocate ($screen000); // и предаем ему черного фона
//imagecolortransparent($screen,$black);
imagecopyresampled($screen$imgc0000$dstW$dstH$img_x$img_y); // налаживаем на него кадр
imagedestroy($imgc);
// и выводим его в браузер
header("Content-type: image/png");
imagepng($screen);
imagedestroy($screen);

// Систему переделал Killer (Special For New DiaryMod)
/*
###Контакты###
Ася 75319624
Кошелек R408800828608

(с) Killer
Все права защищены.Мод нельзя продавать/отдавать и т.п. третим лицам(хоть даже ето лицо ваш друг, брат или сват...)

БАРЫГ УБЬЮ!!!

Давай детка оп оп
*/
}
}
elseif(
$zip=new PclZip(H."users/diary/files/".intval($_GET['file']).".dat"))
{
if(
$name==$icname)
{
$content $zip->extract(PCLZIP_OPT_BY_NAME"META-INF/MANIFEST.MF" ,PCLZIP_OPT_EXTRACT_AS_STRING);
if(
$content[0]['content']==NULL)$content $zip->extract(PCLZIP_OPT_BY_NAME"META-INF/manifest.mf" ,PCLZIP_OPT_EXTRACT_AS_STRING);
$icon=false;
if(@
eregi("MIDlet-Icon:[^(n|r)]*(n|r)"$content[0]['content'], $jad))
$icon=eregi_replace("(MIDlet-Icon:( )*)|(n|r)"NULL$jad[0]);
elseif (@
eregi("MIDlet-1:[^(n|r)]*(n|r)"$content[0]['content'], $jad))
{
$icon=eregi_replace("(MIDlet-1:( )*)|(n|r)"NULL$jad[0]);
$icon=eregi_replace("(^[^,]*,)|(,[^,]*$)"NULL$icon);
}
$icon=eregi_replace('^ *| *$'NULL$icon);
$icon=ereg_replace("(^(/){1,})|((/){1,}$)","",$icon);
//echo $icon;
if ($icon==NULL)$icon=false;
if (
$icon)
{
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon,PCLZIP_OPT_EXTRACT_AS_STRING);
header("Content-type: image/png");
echo 
$content[0]['content'];
}
}
else echo 
"Хакир?!";
}
else echo 
"Хакир?!";
?>
Онлайн: 1
Реклама