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 '
Class Test: DB
'; print '
Class Test: DB dbReturn
'; print '
Class Test: COLORS
'; print '
Class Test: MIME
'; print '
Class Test: JSON
'; print '
Class Test: FORM TOKEN
'; print '
Class Test: PASSWORD
'; print '
Class Test: MATH
'; print '
Class Test: HTML/ELEMENTS
'; print '
Class Test: EMAIL
'; print '
Class Test: CREATE EMAIL
'; print '
Class Test: UIDS
'; print '
Class Test: PHP VERSION
'; print '
Class Test: HASH
'; print '
Class Test: ENCODING (CHECK/CONVERT/MIME)
'; print '
Class Test: IMAGE
'; print '
Class Test: BYTE CONVERT
'; print '
Class Test: STRING CONVERT
'; print '
Class Test: DATE/TIME
'; print '
Class Test: ARRAY HANDLER
'; print '
Class Test: FILE
'; print '
Class Test: RANDOM KEY
'; print '
Class Test: SYSTEM
'; print '
Class Test: READ ENV FILE
'; print '
Class Test: RUNNING TIME
'; print '
Class Test: MEMORY USAGE
'; print '
Class Test: DEBUG
'; print '
Class Test: OUTPUT FORM
'; print '
Class Test: BACKEND ADMIN CLASS
'; print '
Class Test: LANG/L10n
'; print '
Class Test: SESSION
'; print '
Class Test: SMARTY
'; print '
Class Test: LOGIN
'; print '
Class Test: AUTOLOADER
'; print '
Class Test: CONFIG LINK
'; print '
Class Test: CONFIG DIRECT
'; print '
Class Test: CONFIG DIRECT SUB
'; 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 'Logout'; print ''; 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__