wifi-probe-aggregator/gui/vendor.php

14 lines
396 B
PHP
Raw Normal View History

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');
}