Various updates and fixes for namespace change
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../Smarty
|
||||
@@ -23,11 +23,6 @@ extract($_POST, EXTR_SKIP);
|
||||
// set output to quiet for load of classes & session settings
|
||||
ob_start();
|
||||
require("config.inc");
|
||||
|
||||
// login class, DB connections & Admin class, Smarty extension
|
||||
foreach (array ('Login', 'Admin.Backend', 'Smarty.Extend') as $class) {
|
||||
_spl_autoload('Class.'.$class.'.inc');
|
||||
}
|
||||
//------------------------------ library include end
|
||||
|
||||
//------------------------------ basic variable settings start
|
||||
@@ -50,17 +45,15 @@ if (array_key_exists('action', $_POST) && $_POST['action'] != 'download_csv') {
|
||||
|
||||
//------------------------------ class init start
|
||||
// login & page access check
|
||||
$login = new login($DB_CONFIG[LOGIN_DB], $lang);
|
||||
$login = new CoreLibs\ACL\Login($DB_CONFIG[LOGIN_DB], $lang);
|
||||
// post login lang check
|
||||
if ($_SESSION['DEFAULT_LANG']) {
|
||||
$lang = $_SESSION['DEFAULT_LANG'];
|
||||
}
|
||||
// create smarty object
|
||||
$smarty = new SmartyML($lang);
|
||||
$smarty = new CoreLibs\Template\SmartyExtend($lang);
|
||||
// create new DB class
|
||||
$cms = new AdminBackend($DB_CONFIG[MAIN_DB], $lang);
|
||||
// set search path to the default DB schema
|
||||
$cms->db_exec("SET search_path TO ".DB_SCHEMA);
|
||||
$cms = new CoreLibs\Admin\Backend($DB_CONFIG[MAIN_DB], $lang);
|
||||
// the menu show flag (what menu to show)
|
||||
$cms->menu_show_flag = 'main';
|
||||
// db nfo
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../libs/
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$DEBUG_ALL_OVERRIDE = 0; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = 1;
|
||||
$PRINT_ALL = 1;
|
||||
@@ -14,18 +16,26 @@ DEFINE('SET_SESSION_NAME', EDIT_SESSION_NAME);
|
||||
|
||||
echo "DIR: ".DIR."<br>ROOT: ".ROOT."<br>BASE: ".BASE."<br>";
|
||||
|
||||
$lang = 'en_utf8';
|
||||
$lang = 'ja_utf8';
|
||||
$base = new CoreLibs\Admin\Backend($DB_CONFIG[MAIN_DB], $lang);
|
||||
ob_end_flush();
|
||||
|
||||
print "Start time: ".$base->runningTime()."<br>";
|
||||
print "ByteStringFormat: ".$base->ByteStringFormat(1234567.12)."<br>";
|
||||
print "byteStringFormat: ".$base->byteStringFormat(1234567.12)."<br>";
|
||||
print "get_page_name: ".$base->get_page_name()."<br>";
|
||||
print "getPageName: ".$base->getPageName()."<br>";
|
||||
|
||||
print "DB Info: ".$base->dbInfo(1);
|
||||
print "DB Info: ".$base->dbInfo(1)."<br>";
|
||||
|
||||
ob_end_flush();
|
||||
|
||||
print "End Time: ".$base->runningTime()."<br>";
|
||||
print "Run Time: ".$base->runningTime()."<br>";
|
||||
|
||||
print "Lang: ".$base->l->__getLang().", MO File: ".$base->l->__getMoFile()."<br>";
|
||||
print "Translate test: Year -> ".$base->l->__('Year')."<br>";
|
||||
|
||||
// end error print
|
||||
print $base->printErrorMsg();
|
||||
|
||||
# __END__
|
||||
|
||||
Reference in New Issue
Block a user