2020-08-08 19:29:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
header('Content-Type: image/png');
|
|
|
|
|
|
|
|
$docroot = realpath(__DIR__);
|
2020-08-08 19:37:29 +02:00
|
|
|
$vendor_name = preg_replace( '/([^a-z0-9\.,\-\(\)\s]+)/i', '', $_GET['name'] );
|
2020-08-08 19:29:15 +02:00
|
|
|
|
|
|
|
$vendor_img = $docroot.'/img/vendors/'.$vendor_name.'.png';
|
|
|
|
|
|
|
|
if( file_exists($vendor_img) ){
|
|
|
|
echo file_get_contents($docroot.'/img/vendors/'.$vendor_name.'.png');
|
|
|
|
} else {
|
|
|
|
echo file_get_contents($docroot.'/img/vendors/unknown.png');
|
|
|
|
}
|