<?php
	
	include_once __DIR__ . '/include/general_functions.php';
	
	$sex	=	intval(@$_GET['sex']);
	
	$image	=	imagecreatefrompng(__DIR__ . sprintf(
		'/images/mnkn/%d.png',
		$sex
	));
	
		$_GET[7]=	intval(@$_GET[7]);	
	if ($_GET[7] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[7]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
		$_GET[8]=	intval(@$_GET[8]);	
	if ($_GET[8] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[8]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
		$_GET[3]=	intval(@$_GET[3]);	
	if ($_GET[3] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[3]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
		$_GET[1]=	intval(@$_GET[1]);	
	if ($_GET[1] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[1]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
		$_GET[2]=	intval(@$_GET[2]);	
	if ($_GET[2] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[2]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
		$_GET[4]=	intval(@$_GET[4]);	
	if ($_GET[4] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[4]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
		$_GET[6]=	intval(@$_GET[6]);	
	if ($_GET[6] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[6]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
		$_GET[5]=	intval(@$_GET[5]);	
	if ($_GET[5] != 0)
	{
		imagecopy(
			$image,
			imagecreatefrompng(__DIR__ . sprintf(
				'/images/mnkn/%d/%d.png',
				$sex,
				$_GET[5]
			)),
			0,
			0,
			0,
			0,
			120,
			160
		);
	}
	
	setContentType('image/jpeg');
	
	imagejpeg($image, null, 100);
	
?>