[FIX] Scripts shared library

This commit is contained in:
Sebastian Grewe 2014-02-03 08:15:51 +01:00
parent d61e6a7243
commit ea1dfa73e9

View File

@ -26,14 +26,28 @@ define("BASEPATH", "../public/");
* No need to change beyond this point *
*****************************************************/
// Our security check
define("SECURITY", 1);
define('SECURITY', '*)WT#&YHfd');
// Whether or not to check SECHASH for validity, still checks if SECURITY defined as before if disabled
define('SECHASH_CHECK', false);
// change SECHASH every second, we allow up to 3 sec back for slow servers
if (SECHASH_CHECK) {
function fip($tr=0) { return md5(SECURITY.(time()-$tr).SECURITY); }
define('SECHASH', fip());
function cfip() { return (fip()==SECHASH||fip(1)==SECHASH||fip(2)==SECHASH) ? 1 : 0; }
} else {
function cfip() { return (@defined('SECURITY')) ? 1 : 0; }
}
// Include our configuration (holding defines for the requires)
require_once(BASEPATH . 'include/config/global.inc.dist.php');
require_once(BASEPATH . 'include/config/global.inc.php');
// We include all needed files here, even though our templates could load them themself
require_once(INCLUDE_DIR . '/autoloader.inc.php');
require_once(BASEPATH . 'include/config/security.inc.dist.php');
@include_once(BASEPATH . 'include/config/security.inc.php');
require_once(BASEPATH . 'include/bootstrap.php');
require_once(BASEPATH . 'include/version.inc.php');
/**
* Not used as of yet, may be added later