]> git.mxchange.org Git - mailer.git/blobdiff - inc/databases.php
More rewrites, and output-mode fixed (we should documentate this)
[mailer.git] / inc / databases.php
index f06b34c03446c2eacceef3345c9f94b79f0e155b..15c81b861f9826e415ec50c90da91a63bc36e1a2 100644 (file)
@@ -17,7 +17,7 @@
  * Needs to be in all Files and every File needs "svn propset           *
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Needs to be in all Files and every File needs "svn propset           *
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -38,8 +38,7 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
-       require($INC);
+       die();
 } // END - if
 
 // System-wide return codes
 } // END - if
 
 // System-wide return codes
@@ -80,41 +79,43 @@ addCode('UNHANDLED_STATUS' , 0x022);
 addCode('MODULE_MEM_ONLY'  , 0x023);
 
 // Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
 addCode('MODULE_MEM_ONLY'  , 0x023);
 
 // Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
-define('SERVER_URL', 'http://www.mxchange.org');
+setConfigEntry('SERVER_URL', 'http://www.mxchange.org');
 
 // Replacement strings
 $GLOBALS['replacer'] = array(
 
 // Replacement strings
 $GLOBALS['replacer'] = array(
-       'userid'  => '%uid%',           // User-ID
+       'userid'  => '%userid%',                // User-ID
        'surname' => '%vorname%',       // Surname
        'family'  => '%nachname%',      // Family name
        'gender'  => '%anrede%',        // Gender
 );
 
 // One day
        'surname' => '%vorname%',       // Surname
        'family'  => '%nachname%',      // Family name
        'gender'  => '%anrede%',        // Gender
 );
 
 // One day
-setConfigEntry('one_day', (60*60*24));
+setConfigEntry('ONE_DAY', (60*60*24));
+
+// Current date
+setConfigEntry('CURRENT_DATE', generateDateTime(time(), 3));
 
 
-//
 // Timestamp for yesterday, today ... all at 00:00 am
 // Timestamp for yesterday, today ... all at 00:00 am
-define('START_YDAY', makeTime(0, 0, 0, time() - getConfig('one_day')));
-define('START_TDAY', makeTime(0, 0, 0, time()));
+setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getConfig('ONE_DAY')));
+setConfigEntry('START_TDAY', makeTime(0, 0, 0, time()));
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 
 // Take a prime number which is long (if you know a longer one please try it out!)
-define('_PRIME', 591623);
+setConfigEntry('_PRIME', 591623);
 
 // Calculate "entropy" with the prime number (for code generation)
 
 // Calculate "entropy" with the prime number (for code generation)
-define('_ADD', (constant('_PRIME') * constant('_PRIME') / (pi() * getConfig('code_length') + 1)));
+setConfigEntry('_ADD', (getConfig('_PRIME') * getConfig('_PRIME') / (pi() * getConfig('code_length') + 1)));
 
 
-// Random number for e.g. the "cache-buster" used in OpenX script
-define('CACHE_BUSTER', mt_rand(1000000, 9999999));
+// HTTP-EOL
+setConfigEntry('HTTP_EOL', "\r\n");
 
 // CFG: DEBUG-SQL (if enabled and DEBUG_MODE is enabled all SQL queries will be logged to debug.log)
 
 // CFG: DEBUG-SQL (if enabled and DEBUG_MODE is enabled all SQL queries will be logged to debug.log)
-define('DEBUG_SQL', false);
+setConfigEntry('DEBUG_SQL', 'N');
 
 // CFG: ENCRYPT-SEPERATOR
 
 // CFG: ENCRYPT-SEPERATOR
-define('ENCRYPT_SEPERATOR', ':');
+setConfigEntry('ENCRYPT_SEPERATOR', ':');
 
 // Extra title is empty by default
 
 // Extra title is empty by default
-$EXTRA_TITLE = '';
+setExtraTitle('');
 
 //
 ?>
 
 //
 ?>