BASE . LOG,
'file_id' => $LOG_FILE_ID,
// add file date
'print_file_date' => true,
// set debug and print flags
'debug_all' => $DEBUG_ALL ?? false,
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
$login = new CoreLibs\ACL\Login($db, $log, $session);
$locale = \CoreLibs\Language\GetLocale::setLocale();
$l10n = new \CoreLibs\Language\L10n(
$locale['locale'],
$locale['domain'],
$locale['path'],
);
$backend = new CoreLibs\Admin\Backend($db, $log, $session, $l10n, $locale);
$backend->db->dbInfo(true);
ob_end_flush();
print "";
print "
TEST CLASS";
print "";
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print '';
print "
";
print "L: " . CoreLibs\Debug\Support::printAr($locale) . "
";
// print all _ENV vars set
print "READ _ENV ARRAY:
";
print CoreLibs\Debug\Support::printAr(array_map('htmlentities', $_ENV));
// set + check edit access id
$edit_access_id = 3;
if (is_object($login) && isset($login->loginGetAcl()['unit'])) {
print "ACL UNIT: " . print_r(array_keys($login->loginGetAcl()['unit']), true) . "
";
print "ACCESS CHECK: " . (string)$login->loginCheckEditAccess($edit_access_id) . "
";
if ($login->loginCheckEditAccess($edit_access_id)) {
$backend->edit_access_id = $edit_access_id;
} else {
$backend->edit_access_id = $login->loginGetAcl()['unit_id'];
}
} else {
print "Something went wrong with the login
";
}
// $backend->log->debug('SESSION', \CoreLibs\Debug\Support::printAr($_SESSION));
print '';
// print the debug core vars
foreach (['on', 'off'] as $flag) {
foreach (['debug', 'echo', 'print'] as $type) {
$prefix = $flag == 'off' ? 'NOT ' : '';
print $prefix . strtoupper($type) . ' OUT: '
. \CoreLibs\Debug\Support::printAr($backend->log->getLogLevel($type, $flag)) . '
';
}
}
foreach (['debug', 'echo', 'print'] as $type) {
print strtoupper($type) . ' OUT ALL: ' . $backend->log->getLogLevelAll($type) . '
';
}
$log->debug('SOME MARK', 'Some error output');
// INTERNAL SET
print "EDIT ACCESS ID: " . $backend->edit_access_id . "
";
if (is_object($login)) {
// print "ACL:
".$backend->print_ar($login->loginGetAcl())."
";
$log->debug('ACL', "ACL: " . \CoreLibs\Debug\Support::printAr($login->loginGetAcl()));
// print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
";
// print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
";
// $result = array_flip(
// array_filter(
// array_flip($login->default_acl_list),
// function ($key) {
// if (is_numeric($key)) {
// return $key;
// }
// }
// )
// );
// print "DEFAULT ACL:
".$backend->print_ar($result)."
";
// DEPRICATED CALL
// $backend->adbSetACL($login->loginGetAcl());
}
print "THIS HOST: " . HOST_NAME . ", with PROTOCOL: " . HOST_PROTOCOL . " is running SSL: " . HOST_SSL . "
";
print "DIR: " . DIR . "
";
print "BASE: " . BASE . "
";
print "ROOT: " . ROOT . "
";
print "HOST: " . HOST_NAME . " => DB HOST: " . DB_CONFIG_NAME . " => " . print_r(DB_CONFIG, true) . "
";
print "DS is: " . DIRECTORY_SEPARATOR . "
";
print "SERVER HOST: " . $_SERVER['HTTP_HOST'] . "
";
// print error messages
// print $login->log->printErrorMsg();
print $log->printErrorMsg();
print "";
# __END__