Code: Selecteer alles
<?php
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
@include($phpbb_root_path . 'common.'.$phpEx);
$user->session_begin();
list($width, $height, $type) = @getimagesize($user->data['user_avatar']);
switch ( $type )
{
case 1:
$avatar = imagecreatefromgif($user->data['user_avatar']);
break;
case 2:
$avatar = imagecreatefromjpeg($user->data['user_avatar']);
break;
case 3:
$avatar = imagecreatefrompng($user->data['user_avatar']);
break;
}
if ( isset($_GET['bg']) )
{
list($bg_width, $bg_height, $bg_type) = @getimagesize($_GET['bg']);
switch ( $bg_type )
{
case 1:
$bg_img = imagecreatefromgif($_GET['bg']);
break;
case 2:
$bg_img = imagecreatefromjpeg($_GET['bg']);
break;
case 3:
$bg_img = imagecreatefrompng($_GET['bg']);
break;
}
}
$this_img = imagecreatetruecolor(468, 60);
if ( isset($bg_width) && isset($bg_height) && isset($bg_img) )
imagecopymerge($this_img, $bg_img, 0, 0, 0, 0, $bg_width, $bg_height, 100);
imagealphablending($this_img, TRUE);
$color = imagecolorallocate($this_img, 0, 0, 0);
$bg = imagecolorallocatealpha($this_img, rand(200, 250), rand(200, 250), rand(200, 250), 50);
imagefill($this_img, 0, 0, $bg);
if ( isset($width) && isset($height) )
imagecopymerge($this_img, $avatar, 468 - $width, 0, 0, 0, $width, $height, 100);
imagefilledrectangle($this_img, 0, 0, 467, 59, $bg);
imagestring($this_img, 2, 4, 1, $config['sitename'] . ' (hey ' . $user->data['username'] . '!)', $color);
imagestring($this_img, 3, 4, 15, 'phpBB Olympus', $color);
imagestring($this_img, 2, 95, 15, ' @ ' . $config['cookie_domain'], $color);
imagestring($this_img, 2, 4, 29, 'Berichten: ' . $config['num_posts'] . ' | Onderwerpen: ' . $config['num_topics'] . ' | Leden: ' . $config['num_users'] . ' | Nieuwste lid: ' . $config['newest_username'], $color);
imagestring($this_img, 1, 4, 49, $config['site_desc'], $color);
imagerectangle($this_img, 0, 0, 467, 59, $color);
header('Content-Type: image/gif');
imagegif($this_img);
?>