0) $_GET['image'] = substr($_GET['image'], 0, strpos($_GET['image'], "\\")); $file = sprintf("%s%s%s_usage_%s.png", PATH, $usage, SQL_ESCAPE($_GET['type']), SQL_ESCAPE($_GET['image'])); } if (FILE_READABLE($file)) { $image = imagecreatefrompng($file); header("Content-type: image/png"); imagepng($image); imagedestroy($image); } exit(); } elseif (empty($_GET['usage'])) { $file = sprintf("%s%sindex.html", PATH, $usage); } else { $file = sprintf("%s%susage_%s.html", PATH, $usage, SQL_ESCAPE($_GET['usage']) ); } if (!empty($file)) { if (FILE_READABLE($file)) { $tmpl_file = implode("", file($file)); $tmpl_file = addslashes($tmpl_file); $tmpl_file = "\$content=\"".$tmpl_file."\";"; eval($tmpl_file); $content = str_replace("usage.png", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=usage&image=usage", $content); $content = str_replace("daily_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=daily&image=", $content); $content = str_replace("hourly_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=hourly&image=", $content); $content = str_replace("ctry_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=ctry&image=", $content); $content = str_replace("usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", "", $content)); // Disabled due to too much trouble //$content = str_replace("HREF=\"http://", "href=\"".URL."/modules.php?module=loader&url=http://", $content); $test = strtolower($content); $body_start = strpos($test, ""); if (($body_start > 0) && ($body_end > 0)) { $content = substr(substr($content, 0, $body_end), $body_start); $content = substr($content, strpos($content, ">") + 1); OUTPUT_HTML("
".$content."
"); } } } // ?>