More fixes, missing js.php added
[mailer.git] / img.php
diff --git a/img.php b/img.php
index df3c725..64919e4 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 *
+ * MXChange v0.2.1                                    Start: 10/16/2008 *
+ * ===============                              Last change: 10/16/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : img.php                                          *
@@ -44,16 +44,26 @@ $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");
 }