<?php
/************************************************************************
* MXChange v0.2.1 Start: 10/12/2003 *
- * =============== Last change: 10/12/2004 *
+ * =============== Last change: 10/16/2008 *
* *
* -------------------------------------------------------------------- *
* File : img.php *
$GLOBALS['module'] = "img"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
-if (defined('mxchange_installed') && (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();
-
-//
?>