X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=img.php;h=e619db6b3c4fe1325ba9fa416c0c5716626d6eb4;hp=2e7d46fb9d1f1ca0e75859e5f315b5659db0c14e;hb=8f60465485bd5e9ab2c0ddfa1f054458cf510042;hpb=d798a412acb8c1263933bd7f7a0fd9aa251495a7 diff --git a/img.php b/img.php index 2e7d46fb9d..e619db6b3c 100644 --- a/img.php +++ b/img.php @@ -32,7 +32,7 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require_once("inc/libs/security_functions.php"); +require("inc/libs/security_functions.php"); // Init "action" and "what" global $what, $action; @@ -46,25 +46,30 @@ require("inc/config.php"); // Script installed? if (isBooleanConstantAndTrue('mxchange_installed')) { + // Load header + LOAD_INC_ONCE("inc/header.php"); + // Code set? if (!empty($_GET['code'])) { // Generate image GENERATE_IMAGE(bigintval($_GET['code'])); } elseif (!empty($_GET['tag'])) { - // Tag set so create FQFN - $fqfn = sprintf("%sinc/img/tag-%s.php", - PATH, + // Tag set so create the IFN (Include-FileName) + $INC = sprintf("inc/img/tag-%s.php", SQL_ESCAPE($_GET['tag']) ); // Include is readable? - if (FILE_READABLE($fqfn)) { + if (FILE_READABLE($INC)) { // Include it - require($fqfn); + LOAD_INC($INC); } // END - if } + + // Finish generation here + LOAD_INC_ONCE("inc/footer.php"); } else { - // You have to configure first! + // You have to install first! LOAD_URL("install.php"); }