} // END - if
// Load all includes
-$INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/autopurge/", "purge-");
+$INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/autopurge/", "purge-");
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
define('ENABLE_BACKLINK', true);
// Connect to the MySQL database...
-require(PATH."inc/mysql-connect.php");
+require(constant('PATH')."inc/mysql-connect.php");
//
?>
//
// Debugging stuff...
//
- $fp = @fopen(PATH."inc/cache/mysql.log", 'a') or mxchange_die("Cannot write mysql.log!");
+ $fp = fopen(constant('PATH')."inc/cache/mysql.log", 'a') or mxchange_die("Cannot write mysql.log!");
if (!isset($OK)) {
// Write first entry
fwrite($fp, "Module=".$GLOBALS['module']."\n");
//
// Debugging
//
- //* DEBUG: */ $fp = fopen(PATH."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!");
+ //* DEBUG: */ $fp = fopen(constant('PATH')."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!");
//* DEBUG: */ fwrite($fp, $file."(".$line."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n");
//* DEBUG: */ fclose($fp);
case "0.2.4": // SQL queries for v0.2.4
$auto_type = "png"; // PNG image is the default
- if ((FILE_READABLE(PATH."theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) {
+ if ((INCLUDE_READABLE("theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) {
// Switch to JPEG format
$auto_type = "jpg";
}
$ret = $cacheArray['language'];
} elseif (!empty($lang)) {
// Check if main language file does exist
- if (FILE_READABLE(PATH."inc/language/".$lang.".php")) {
+ if (FILE_READABLE(constant('PATH')."inc/language/".$lang.".php")) {
// Okay found, so let's update cookies
SET_LANGUAGE($lang);
}
if (!defined('_MAX')) define('_MAX', 15235);
// Build server string
- $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(PATH."inc/databases.php");
+ $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(constant('PATH')."inc/databases.php");
// Build key string
$keys = SITE_KEY.":".DATE_KEY;
// When the salt is empty build a new one, else use the first x configured characters as the salt
if (empty($salt)) {
// Build server string
- $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(PATH."inc/databases.php");
+ $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(constant('PATH')."inc/databases.php");
// Build key string
$keys = constant('SITE_KEY').":".constant('DATE_KEY').":".getConfig('secret_key').":".getConfig('file_hash').":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime'))).":".getConfig('master_salt');
// Is debug mode enabled?
if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force === true)) {
// Log this message away
- $fp = fopen(PATH."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
+ $fp = fopen(constant('PATH')."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
fwrite($fp, date("d.m.Y|H:i:s", time())."|".basename($file)."|".$line."|".strip_tags($message)."\n");
fclose($fp);
} // END - if
} // END - if
// Get more daily reset scripts
- $INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/reset/", "reset_");
+ $INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/reset/", "reset_");
// Update database
if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
// Has it changed?
if (getConfig('last_week') != $currWeek) {
// Include weekly reset scripts
- $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(PATH."inc/weekly/", "weekly_"));
+ $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(constant('PATH')."inc/weekly/", "weekly_"));
// Update config
if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
// Has it changed?
if (getConfig('last_month') != $currMonth) {
// Include monthly reset scripts
- $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(PATH."inc/monthly/", "monthly_"));
+ $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(constant('PATH')."inc/monthly/", "monthly_"));
// Update config
if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
}
// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/loader/", "load_cache-");
+$INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/loader/", "load_cache-");
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
switch ($ret)
{
case "done":
- admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
+ admin_WriteData(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
if (!constant('_FATAL')) {
// Registering is done
LOAD_URL("modules.php?module=admin&action=login®ister=done");
// Admin still not registered?
if (!isBooleanConstantAndTrue('admin_registered')) {
// Write to config that registration is done
- admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
+ admin_WriteData(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
// Load URL for login
LOAD_URL("modules.php?module=admin&action=login");
if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', "OLD");
// Check for version and switch between old menu system and new "intelligent menu system"
- if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (FILE_READABLE(PATH."inc/modules/admin/lasys-inc.php"))) {
+ if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (INCLUDE_READABLE("inc/modules/admin/lasys-inc.php"))) {
// Default area is the entrance, of course
$area = "entrance";
$JOBS_DONE = true;
// Open the extension directory
- $handle = opendir(PATH."inc/extensions/") or mxchange_die("Cannot read extension directory!");
+ $handle = opendir(constant('PATH')."inc/extensions/") or mxchange_die("Cannot read extension directory!");
while ($file = readdir($handle)) {
// Is this file an extension?
if ((substr($file, 0, 4) == "ext-") && (substr($file, -4) == ".php")) {
);
// Read directory "themes"
-$handle = opendir(PATH."theme/") or mxchange_die("Cannot read themes dir!");
+$handle = opendir(constant('PATH')."theme/") or mxchange_die("Cannot read themes dir!");
while ($dir = readdir($handle)) {
// Construct absolute theme.php file name
$INC = sprintf("theme/%s/theme.php", $dir);
OUTPUT_HTML("<div style=\"padding-left: 10px; padding-right: 10px\">");
$rdf = new fase4_rdf();
$rdf->use_dynamic_display(false);
-$rdf->set_CacheDir(PATH."inc/cache/");
+$rdf->set_CacheDir(constant('PATH')."inc/cache/");
$rdf->set_salt(md5(SITE_KEY));
$rdf->set_max_item(10);
$rdf->set_Options(
);
// Read directory "themes"
-$handle = opendir(PATH."theme/") or mxchange_die("Cannot read themes dir!");
+$handle = opendir(constant('PATH')."theme/") or mxchange_die("Cannot read themes dir!");
while ($entry = readdir($handle)) {
// Construct absolute theme.php file name
$INC = sprintf("theme/%s/theme.php", $entry);
$GLOBALS['pool_cnt'] = 0;
// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/pool/", "pool-");
+$INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/pool/", "pool-");
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);