X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=img.php;h=e619db6b3c4fe1325ba9fa416c0c5716626d6eb4;hb=84317e249885eb03a99f2946acf285ff27d506ac;hp=c962aeca321935c06f7ea5ef5c8f1fb1dc2dd6ce;hpb=1c004d0ffe3d1bfee3ea2128f6c0165eda61baf3;p=mailer.git diff --git a/img.php b/img.php index c962aeca32..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; @@ -42,29 +42,34 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "img"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +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"); }