<?php $file=TGET('file'); if ($file[0]=='/') $file=substr($file,1); if (!strpbrk($file,'/\\')) { if (substr($file,-4,4)==".gif") $typeheader='Content-Type: image/gif'; else if (substr($file,-4,4)==".jpg") $typeheader='Content-Type: image/jpeg'; else if (substr($file,-4,4)==".png") $typeheader='Content-Type: image/png'; else $typeheader='application/octet-stream'; $themedfile=deduce_theme_path('images/'.$file); if (is_readable($themedfile)) { header("Expires: ".gmdate("D, d M Y H:i:s",time()+$Config->ExpireSeconds)." GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s",filemtime($fullpath)) . " GMT"); header($typeheader); readfile($themedfile); } else header('HTTP/1.1 404 Not Found'); $CMD_TMPL_NAME=false; $CMD_TMPL_SUFFIX=false; } ?>