Trevor Slocum
f25ce734d9
This code is provided for archival purposes only. New features will not be added.
45 lines
992 B
PHP
45 lines
992 B
PHP
<?php
|
|
require 'db.php';
|
|
require 'functions.php';
|
|
require 'functions_gd.php';
|
|
|
|
if ($_GET['id'] > 0) {
|
|
$user = userInfo($_GET['id']);
|
|
|
|
if ($user) {
|
|
$im = imagecreatefrompng('img/zoop_' . $user['zoop_color'] . '.png');
|
|
imageAlphaBlending($im, true);
|
|
imageSaveAlpha($im, true);
|
|
|
|
$items = getUserItems($user, true);
|
|
if (count($items) > 0) {
|
|
foreach ($items as $item_info) {
|
|
$item = getItem($item_info['itemid']);
|
|
|
|
if ($item['type'] == 'appearance') {
|
|
if ($item['renderimage'] != '') {
|
|
$im_item = imagecreatefrompng('img/items/' . $item['renderimage'] . '.png');
|
|
imageAlphaBlending($im_item, true);
|
|
imageSaveAlpha($im_item, true);
|
|
|
|
imagecopy($im, $im_item, 0, 0, 0, 0, 150, 150);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (isset($_GET['flip'])) {
|
|
$im = flipImage($im, false, true);
|
|
}
|
|
|
|
header('Content-Type: image/png');
|
|
imagepng($im);
|
|
}
|
|
}
|
|
|
|
// Render areas
|
|
// 0 - Misc
|
|
// 1 - Face
|
|
// 2 - Head
|
|
// 3 - Left of zoop
|
|
// 4 - Right of zoop
|