All, except security block, include()/require() rewritten to own LOAD_INC()/LOAD_INC_...
[mailer.git] / img.php
diff --git a/img.php b/img.php
index 15fb090ac9e17093263964bd3753af22ed47e5ee..b6e1636eeece57e07885b755f4b1c50f28cb727c 100644 (file)
--- a/img.php
+++ b/img.php
@@ -42,33 +42,32 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "img"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Load header
-       require_once(PATH."inc/header.php");
+       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
-       require_once(PATH."inc/footer.php");
+       LOAD_INC_ONCE("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");