Просмотр файла games/thm.php

Размер файла: 572B
<?
include('modul/config.php');  include('modul/tar.php');
$id=intval($_GET['id']);
$d=mysql_fetch_array(mysql_query("SELECT * FROM `files` WHERE `id`=$id"));
$tar=new Archive_Tar(''.$d['infolder'].'/'.$d['name'].'');
$content=$tar->extractInString('Theme.xml');
$teg=simplexml_load_string($content)->Standby_image['Source'] or simplexml_load_string($content)->Desktop_image['Source'];
$string=$tar->extractInString(trim($teg));
$image=imagecreatefromstring($string);
$width=imagesx($image); $height=imagesy($image);
header("Content-type: image/png");
imagepng($image);
?>