<?php

require_once('vvv.php');

$theme = @$_SERVER['QUERY_STRING'];



$nth = new PclZip ($theme);

$content = $nth->extract(PCLZIP_OPT_BY_NAME,'theme_descriptor.xml',PCLZIP_OPT_EXTRACT_AS_STRING);

$content = $content[0]['content'];

$teg = simplexml_load_string($content)->wallpaper['src'] or $teg = simplexml_load_string($content)->wallpaper['main_display_graphics'];

$image_resourse = $nth->extract(PCLZIP_OPT_BY_NAME,"$teg",PCLZIP_OPT_EXTRACT_AS_STRING);

$image_resourse = $nth->extract(PCLZIP_OPT_BY_NAME,"$teg",PCLZIP_OPT_EXTRACT_AS_STRING);

$image_resourse=$image_resourse[0]['content'];
//$i_pre=$image_resourse[0]['content'];
//$logo=imagecreatefrompng('../loads/logo.png');

//imagecopy($i_pre, $logo, 65, 85, 0, 0, 51, 45);


header("Content-type:image/jpeg");

print $image_resourse;

?>

