Размер файла: 584B
<?php
include_once('data/mysql.cfg');
$sql = mysql_query("
SELECT *
FROM user
WHERE login='SHiFT'");
$s = mysql_fetch_assoc($sql);
$mapsql = mysql_query("
SELECT *
FROM map
WHERE location='".$s['loc']."'");
$w = mysql_fetch_assoc($mapsql);
$m = explode('|', $w[$s['posy']]);
$img = $m[$s['posx']];
$dest = imagecreatefrompng('interface/graphics/map/'.$img);
$src = imagecreatefrompng('interface/graphics/'.$s['sex'].'/'.$s['avatar']);
imagecopy($dest, $src, 0, 0, 0, 0, 20, 20);
header('Content-Type: image/png');
imagepng($dest);
imagedestroy($dest);
imagedestroy($src);
?>