*/ // error_reporting(E_ALL); // define('e107_INIT', true); $_E107['no_online'] = true; $_E107['no_forceuserupdate'] = true; $_E107['no_menus'] = true; $_E107['no_maintenance'] = true; //$_E107['no_theme'] = true; require_once("../class2.php"); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT', true); /* define('e_BASE',realpath("..".DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR); @include(e_BASE.'e107_config.php'); if(!isset($mySQLserver)) { if(defined('e_DEBUG')) { echo "FAILED TO LOAD ".e_BASE."e107_config.php in secimg.php"; } exit; }*/ // require_once(realpath(e_BASE.$HANDLERS_DIRECTORY.DIRECTORY_SEPARATOR."secure_img_handler.php")); require_once(e_HANDLER."secure_img_handler.php"); $sim = new secure_image(); if(!isset($_GET['id'])) { exit; } $code = $_GET['id']; if(!empty($_GET['clr']) && preg_match('/^[a-f0-9]{6}$/i', $_GET['clr'])) //hex color is valid { $color = $_GET['clr']; } else { $color = "cccccc"; } ob_clean(); // Precaution - clearout utf-8 BOM or any other garbage in e107_config.php $sim->render($code,$color); exit; ?>