<?php
$uid=$_GET['uid']?$_GET['uid']:$_G['uid'];
$size=$_GET['size']?$_GET['size']:'middle';
/*
$data=is_file(QOL_ROOT."/data/avatar/{$uid}_{$size}.jpg")?("/data/avatar/{$uid}_{$size}.jpg"):("/source/static/images/noavatar.gif");
header( "Location:../$data");
exit;
 */

$data=is_file(QOL_ROOT."/data/avatar/{$uid}_{$size}.jpg")?file_get_contents(QOL_ROOT."/data/avatar/{$uid}_{$size}.jpg"):file_get_contents(QOL_ROOT."/source/static/images/noavatar.gif");
header( "Content-type: image/png");
exit($data);

