<?php 
defined('IN_HS') or exit('Access Denied');
require HS_ROOT.'/module/'.$mod.'/include/common.inc.php';
$imgext = array('jpg','jpeg','gif','png','bmp');
if($MOD['show_mode'] != 1 || !isset($src) || !in_array(strtolower(fileext($src)), $imgext)) exit;
$file = HS_ROOT.'/'.$HS['uploaddir'].'/'.$CHA['channeldir'].'/'.$MOD['upload_dir'].'/'.$src;
if(!file_exists($file)) exit;
if(empty($PHP_REFERER) || !strpos($PHP_REFERER, $PHP_DOMAIN)) $file = HS_ROOT.'/images/error.jpg';
header("Content-type:image/pjpeg");
readfile($file);
?>