Skyscraper now in member menu supported (you need to update/patch member_header.tpl...
[mailer.git] / img.php
diff --git a/img.php b/img.php
index df3c72506b67ed34b7494a3a4f5beea5ac3e1bc2..c962aeca321935c06f7ea5ef5c8f1fb1dc2dd6ce 100644 (file)
--- a/img.php
+++ b/img.php
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
  * MXChange v0.2.1                                    Start: 10/12/2003 *
- * ===============                              Last change: 10/12/2004 *
+ * ===============                              Last change: 10/16/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : img.php                                          *
@@ -44,22 +44,29 @@ $GLOBALS['module'] = "img"; $CSS = -1;
 // Load the required file(s)
 require ("inc/config.php");
 
-if (isBooleanConstantAndTrue('mxchange_installed'))
-{
-       if (!empty($_GET['code']))
-       {
+// Script installed?
+if (isBooleanConstantAndTrue('mxchange_installed')) {
+       // 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,
+                       SQL_ESCAPE($_GET['tag'])
+               );
+
+               // Include is readable?
+               if (FILE_READABLE($fqfn)) {
+                       // Include it
+                       require($fqfn);
+               } // END - if
        }
-}
- else
-{
+} else {
        // You have to configure first!
        LOAD_URL("install.php");
 }
 
 // Really all done here... ;-)
-die();
-
-//
 ?>