Файл: files/screen_creators/java.php
Строк: 31
<?
$zip=zip_open(H."fd/$id_file.dat");
if($zip)
{
while($zip_icerik=zip_read($zip))
{
$zip_dosya=zip_entry_name($zip_icerik);
if(strpos($zip_dosya,'.'))
{
if($zip_dosya=='icon.png')
{
$hedef_yol=H."files/java_icons/$id_file.png";
touch($hedef_yol);
$yeni_dosya=fopen($hedef_yol,'w+');
fwrite($yeni_dosya,zip_entry_read($zip_icerik));
fclose($yeni_dosya);
$imgc=imagecreatefromstring(file_get_contents(H."files/java_icons/$id_file.png"));
$img_x=imagesx($imgc);
$img_y=imagesy($imgc);
$dstW=16; // ширина
$dstH=16; // высота
$screen=imagecreatetruecolor($dstW, $dstH);
$black = imagecolorallocate ($screen, 0, 0, 0);
//imagecolortransparent($screen,$black);
imagecopyresampled($screen, $imgc, 0, 0, 0, 0, $dstW, $dstH, $img_x, $img_y);
imagedestroy($imgc);
imagepng($screen,H."files/java_icons/$id_file.png");
chmod(H."files/java_icons/$id_file.png", 0777);
imagedestroy($screen);
}
}
}
}
?>