// Base directory (should be moved to database)
$usage = "usage/";
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
-
if (!empty($_GET['image'])) {
if ($_GET['type'] == "usage") {
$file = sprintf("%s%susage.png", PATH, $usage);
$file = sprintf("%s%s%s_usage_%s.png", PATH, $usage, SQL_ESCAPE($_GET['type']), SQL_ESCAPE($_GET['image']));
}
- if ((file_exists($file)) && (is_readable($file))) {
+ if (FILE_READABLE($file)) {
$image = imagecreatefrompng($file);
header("Content-type: image/png");
imagepng($image);
}
exit();
} elseif (empty($_GET['usage'])) {
- $file = PATH.$usage."index.html";
+ $file = sprintf("%s%sindex.html", PATH, $usage);
} else {
$file = sprintf("%s%susage_%s.html",
PATH,
}
if (!empty($file)) {
- if (file_exists($file) && is_readable($file)) {
+ if (FILE_READABLE($file)) {
$tmpl_file = implode("", file($file));
$tmpl_file = addslashes($tmpl_file);
$tmpl_file = "\$content=\"".$tmpl_file."\";";
}
}
-CLOSE_TABLE();
//
?>