require("inc/config.php");
// Is the script installed?
-if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')))
-{
+if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) {
// Base URL for redirection
$URL = URL."/modules.php?module=index&what=confirm&hash=";
- if (empty($_GET['hash']))
- {
+ if (empty($_GET['hash'])) {
// No refid and we add our refid (don't forget to set $def_refid!)
$URL = URL."/modules.php?module=index";
- }
- else
- {
+ } else {
// We have an refid here. So we simply add it
$URL .= $_GET['hash'];
}
+
// Load the URL
LOAD_URL($URL);
+
// Redirection should be done here
-}
- else
-{
+} else {
// You have to configure first!
LOAD_URL("install.php");
}
+
// Really all done here... ;-)
?>
define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "624");
+define('CURR_SVN_REVISION', "625");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
global $EXT_LOADED, $_CONFIG, $CSS, $cacheMode;
// Is the extension already loaded?
+ //* DEBUG: */ echo "Loading extension {$ext_name}.<br />\n";
if (isset($EXT_LOADED[$ext_name])) {
// Debug message
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s already loaded.", $ext_name));
// Is this include there?
if (FILE_READABLE($langInclude)) {
// Then load it
+ //* DEBUG: */ echo "--- Language loaded.<br />\n";
require($langInclude);
} // END - if
// Is this include there?
if (FILE_READABLE($funcsInclude)) {
// Then load it
+ //* DEBUG: */ echo "--- Functions loaded.<br />\n";
require($funcsInclude);
} // END - if
$EXT_LOAD_MODE = "";
// Include the extension file
+ //* DEBUG: */ echo "Extension loaded.<br />\n";
require($extInclude);
// Mark it as loaded
// Version history array (add more with , "0.1" and so on)
$EXT_VER_HISTORY = array("0.0");
+/*
print "<pre>";
debug_print_backtrace();
print "<pre>";
+*/
switch ($EXT_LOAD_MODE)
{
// By default no cache is set
$cacheMode = "no";
+// Load sql_patchrs extension alone
+LOAD_EXTENSION("sql_patches");
+
//
// Load extensions
//
if ($EXT_DUMMY['ext_css'][$k] == "Y") $EXT_CSS_FILES[] = "".$name.".css";
// Load extension file itself
- if (($EXT_DUMMY['ext_active'][$k] == "Y") || ($EXT_DUMMY['ext_keep'][$k] == "Y") || (IS_ADMIN())) {
+ if ((($EXT_DUMMY['ext_active'][$k] == "Y") || ($EXT_DUMMY['ext_keep'][$k] == "Y") || (IS_ADMIN())) && (!in_array($name, array("sql_patches", "cache")))) {
$EXT_POOL[] = $name;
} // END - if
$EXT_ALWAYS_ACTIVE = "N";
// Load extension
- if (($content['ext_name'] != "sql_patches") && (($content['ext_name'] == "cache") || (!EXT_IS_ACTIVE("cache")))) {
+ if (($content['ext_name'] != "sql_patches") && (($content['ext_name'] != "cache") || (!EXT_IS_ACTIVE("cache")))) {
// Load extension
LOAD_EXTENSION($content['ext_name']);
} else {
admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
// Load URL for login
- $URL = URL."/modules.php?module=admin&action=login";
- LOAD_URL($URL);
+ LOAD_URL(URL."/modules.php?module=admin&action=login");
} // END - if
break;
}
// At leat one administrator account was created
if ((isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5')) && (isSessionVariableSet('admin_last')) && (isSessionVariableSet('admin_to'))) {
// Timeout for last login, we have to logout first!
- $URL = URL."/modules.php?module=admin&action=login&logout=1";
- LOAD_URL($URL);
- }
+ LOAD_URL(URL."/modules.php?module=admin&action=login&logout=1");
+ } // END - if
+
if (!empty($_GET['register'])) {
// Registration of first admin is done
if ($_GET['register'] == "done") OUTPUT_HTML("<STRONG class=\"admin\">".ADMIN_REGISTER_DONE."</STRONG>");
return $ret;
}
// Only be executed on login procedure!
-function CHECK_ADMIN_LOGIN ($admin_login, $password)
-{
+function CHECK_ADMIN_LOGIN ($admin_login, $password) {
global $cacheArray, $_CONFIG, $cacheInstance;
// Init variables
$ERROR = CODE_UNKNOWN_STATUS;
break;
}
- $URL = URL."/modules.php?module=index&login=".$ERROR;
- LOAD_URL($URL);
+
+ // Load URL
+ LOAD_URL(URL."/modules.php?module=index&login=".$ERROR);
} // END - if
// Load adverstising template
LOAD_TEMPLATE("member_order-back", false);
} else {
// Matching line not found or already "placed" in send queue
- $URL = URL."/modules.php?module=login";
- LOAD_URL($URL);
+ LOAD_URL(URL."/modules.php?module=login");
}
} else {
// Redirect...
// Load the URL
LOAD_URL($URL);
- // Redirection should be done here
+ // Redirection should be done here
} else {
// You have to configure first!
LOAD_URL(URL."/install.php");