CoreLibs composer v8.0.5 update test

This commit is contained in:
Clemens Schwaighofer
2023-03-10 15:29:15 +09:00
parent 1cbe4e5c06
commit 2aab94a842
142 changed files with 2979 additions and 1170 deletions

View File

@@ -74,20 +74,35 @@ if (
// db config with logger
$db = new \CoreLibs\DB\IO(DB_CONFIG, $log);
// login & page access check
$login = new \CoreLibs\ACL\Login($db, $log, $session);
$login = new \CoreLibs\ACL\Login(
$db,
$log,
$session,
[
'auto_login' => true,
'default_acl_level' => DEFAULT_ACL_LEVEL,
'logout_target' => '',
'site_locale' => SITE_LOCALE,
'site_domain' => SITE_DOMAIN,
'site_encoding' => SITE_ENCODING,
'locale_path' => BASE . INCLUDES . LOCALE,
]
);
// lang, path, domain
// pre auto detect language after login
$locale = \CoreLibs\Language\GetLocale::setLocale();
$locale = $login->loginGetLocale();
// set lang and pass to smarty/backend
$l10n = new \CoreLibs\Language\L10n(
$locale['locale'],
$locale['domain'],
$locale['path'],
$locale['encoding']
);
// create smarty object
$smarty = new \CoreLibs\Template\SmartyExtend($l10n, $locale);
$smarty = new \CoreLibs\Template\SmartyExtend($l10n, CACHE_ID, COMPILE_ID);
// create new Backend class with db and loger attached
$cms = new \CoreLibs\Admin\Backend($db, $log, $session, $l10n, $locale);
$cms = new \CoreLibs\Admin\Backend($db, $log, $session, $l10n, DEFAULT_ACL_LEVEL);
// the menu show flag (what menu to show)
$cms->menu_show_flag = 'main';
// db info

View File

@@ -43,24 +43,57 @@ $log = new CoreLibs\Debug\Logging([
// db connection
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
// login page
$login = new CoreLibs\ACL\Login($db, $log, $session);
$login = new CoreLibs\ACL\Login(
$db,
$log,
$session,
[
'auto_login' => true,
'default_acl_level' => DEFAULT_ACL_LEVEL,
'logout_target' => '',
'site_locale' => SITE_LOCALE,
'site_domain' => SITE_DOMAIN,
'site_encoding' => SITE_ENCODING,
'locale_path' => BASE . INCLUDES . LOCALE,
]
);
// space for setting special debug flags
// $login->log->setLogLevelAll('debug', true);
// lang, path, domain
// pre auto detect language after login
$locale = \CoreLibs\Language\GetLocale::setLocale();
$locale = $login->loginGetLocale();
// set lang and pass to smarty/backend
$l10n = new \CoreLibs\Language\L10n(
$locale['locale'],
$locale['domain'],
$locale['path'],
$locale['encoding']
);
// flush and start
ob_end_flush();
// init smarty and form class
$edit_base = new CoreLibs\Admin\EditBase(DB_CONFIG, $log, $l10n, $locale);
$edit_base = new CoreLibs\Admin\EditBase(
DB_CONFIG,
$log,
$l10n,
$login,
[
'cache_id' => CACHE_ID,
'compile_id' => COMPILE_ID
]
);
// creates edit pages and runs actions
$edit_base->editBaseRun();
$edit_base->editBaseRun(
BASE . INCLUDES . TEMPLATES . CONTENT_PATH,
BASE . TEMPLATES_C,
BASE . CACHE,
ADMIN_STYLESHEET,
DEFAULT_ENCODING,
LAYOUT . CSS,
LAYOUT . JS,
ROOT,
CONTENT_PATH
);
// __END__

View File

@@ -39,7 +39,7 @@ function pop(theURL, winName, features) {
<form method="post">
<tr>
<td bgcolor="{$HEADER_COLOR}" class="normal">
Hello <b>{$USER_NAME|upper}</b> [{$EUID}] from the group <b>{$GROUP_NAME}</b> with Access Level <b>{$GROUP_LEVEL}</b>
Hello <b>{$USER_NAME|upper}</b> [{$EUID}] from the group <b>{$GROUP_NAME}</b> with Access Level <b>{$ACCESS_LEVEL}</b>
</td>
<td bgcolor="{$HEADER_COLOR}" class="normal" align="right">
<input type="submit" name="login_logout" value="Logout">