<?



if ($sys['uid']) {
	$shareInfo = $share->getInfo($sys['uid']."::".gluePath($sys['path'], $sys['filename']));
	$sys['fullPath'] = $shareInfo['path'];
	//debug($shareInfo);
} else {

$tmp['path'] = gluePath($permissions['path'], $sys['path']);


if (is_dir($tmp['path'])) {
	if (is_readable($tmp['path'])) {
	} else {
		$sys['path'] = "";
	}
} else {
	$sys['path'] = "";
}
$sys['fullPath'] = gluePath($permissions['path'], $sys['path']);

}



$src = gluePath($sys['fullPath'], $str->fromHTML($_GET['filename']));



if (!isCleanFilename($str->fromHTML($_GET['filename']))){
die(base64_encode("dirty path ".$str->fromHTML($_GET['filename'])));
}


//var_dump(headers_list());
	$maxHeight = "66";
	$maxWidth = "90";
	if ($_GET['clearCache']) {
		$thumb->clearCache($src);
	}
	$img->thumb($src,$maxWidth,$maxHeight, true);
	
?>