19if(!defined(
"SEC_FILE")){define(
"SEC_FILE",
'/framework/secure.php' );}
20if (defined(
'LEPTON_PATH')) {
21 include LEPTON_PATH.SEC_FILE;
26 while ((
$level < 10) && (!file_exists(
$root.SEC_FILE))) {
30 if (file_exists(
$root.SEC_FILE)) {
31 include
$root.SEC_FILE;
33 trigger_error(sprintf(
"[ <b>%s</b> ] Can't include secure.php!", $_SERVER[
'SCRIPT_NAME']), E_USER_ERROR);
57 "SELECT name, value FROM ". TABLE_PREFIX.
"settings ORDER BY name ",
64 if ( preg_match(
'/^0[0-7]{1,3}$/', $row[
'value' ] ) === 1 )
66 $value = $row[
'value' ];
68 elseif ( preg_match(
'/^[0-9]+$/S', $row[
'value' ] ) === 1 )
70 $value = intval( $row[
'value' ] );
72 elseif ( $row[
'value' ] ==
'false' )
76 elseif ( $row[
'value' ] ==
'true' )
82 $value = $row[
'value' ];
86 if( ($row[
'name'] ==
"website_header") || ($row[
'name'] ==
"website_footer") )
92 $temp_name = strtoupper( $row[
'name' ] );
93 if ( !defined( $temp_name ) )
95 define( $temp_name, $value );
101if ( !defined(
'LEPTON_INSTALL_PROCESS' ) )
106 "SELECT * FROM ".TABLE_PREFIX.
"mod_captcha_control ",
112 if ( empty($setting))
114 die(
"CAPTCHA-Settings not found" );
117 define(
'ENABLED_CAPTCHA', $setting[
'enabled_captcha' ]);
118 define(
'ENABLED_ASP', $setting[
'enabled_asp' ]);
119 define(
'CAPTCHA_TYPE', $setting[
'captcha_type' ] );
123 define(
'ASP_SESSION_MIN_AGE', (
int) $setting[
'asp_session_min_age' ] );
124 define(
'ASP_VIEW_MIN_AGE', (
int) $setting[
'asp_view_min_age' ] );
125 define(
'ASP_INPUT_MIN_AGE', (
int) $setting[
'asp_input_min_age' ] );
131 $timezone_string = ($_SESSION[
'TIMEZONE_STRING'] ?? DEFAULT_TIMEZONE_STRING);
132 date_default_timezone_set($timezone_string);
135 define(
'DATE_FORMAT', ($_SESSION[
'DATE_FORMAT'] ?? DEFAULT_DATE_FORMAT));
138 define(
'TIME_FORMAT', ($_SESSION[
'TIME_FORMAT'] ?? DEFAULT_TIME_FORMAT));
141 define(
'THEME_URL', LEPTON_URL .
'/templates/' . DEFAULT_THEME);
142 define(
'THEME_PATH', LEPTON_PATH .
'/templates/' . DEFAULT_THEME);
145 define(
'MODULE_URL', LEPTON_URL .
'/modules');
146 define(
'MODULE_PATH', LEPTON_PATH .
'/modules');
149 define(
'SECURE_URL', LEPTON_URL .
'/temp/secure');
150 define(
'SECURE_PATH', LEPTON_PATH .
'/temp/secure');
156 define(
'THEME_URL', LEPTON_URL .
'/templates/lepsem');
157 define(
'THEME_PATH', LEPTON_PATH .
'/templates/lepsem');
static getInstance(array &$settings=[])
static restoreSpecialChars(string &$sAnyString, array $aAnyAssocArray=self::SPECIAL_CHARS_RESTORE)
const USERS_CAN_SELF_DELETE
const USERS_DEFAULT_SETTINGS
const USERS_PROFILE_AVAIL
const USERS_PROFILE_ALLOWED