refactor(shop_category): migrate admin module to Domain+DI with routing and ajax cleanup
This commit is contained in:
48
temp/update_build/tmp_0.275/libraries/grid/config.php
Normal file
48
temp/update_build/tmp_0.275/libraries/grid/config.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
|
||||
define( 'gdir', "/libraries/grid" );
|
||||
require_once dirname( __FILE__ ) . '/grid-view.php';
|
||||
require_once dirname( __FILE__ ) . '/gdb.min.php';
|
||||
require_once dirname( __FILE__ ) . '/grid.php';
|
||||
require_once dirname( __FILE__ ) . '/grid-edit.php';
|
||||
require_once dirname( __FILE__ ) . '/grid-upload.php';
|
||||
|
||||
session_start();
|
||||
|
||||
/* połączenie z bazą ustawić wg własnych preferencji */
|
||||
require_once dirname( __FILE__ ) . '/../../config.php';
|
||||
require_once dirname( __FILE__ ) . '/../../autoload/class.S.php';
|
||||
|
||||
$legacyFactoryFiles = [
|
||||
'/../../autoload/admin/factory/class.Articles.php',
|
||||
'/../../autoload/admin/factory/class.Pages.php',
|
||||
'/../../autoload/admin/factory/class.ShopProduct.php',
|
||||
];
|
||||
|
||||
foreach ( $legacyFactoryFiles as $legacyFactoryFile )
|
||||
{
|
||||
$legacyFactoryPath = dirname( __FILE__ ) . $legacyFactoryFile;
|
||||
if ( file_exists( $legacyFactoryPath ) )
|
||||
require_once $legacyFactoryPath;
|
||||
}
|
||||
|
||||
require_once dirname( __FILE__ ) . '/../../autoload/shop/class.Product.php';
|
||||
require_once dirname( __FILE__ ) . '/../../libraries/medoo/medoo.php';
|
||||
|
||||
$gdb = array(
|
||||
'database_type' => 'mysql',
|
||||
'database_name' => $database['name'],
|
||||
'server' => $database['host'],
|
||||
'username' => $database['user'],
|
||||
'password' => $database['password'],
|
||||
'charset' => 'utf8'
|
||||
);
|
||||
|
||||
$mdb = new medoo( [
|
||||
'database_type' => 'mysql',
|
||||
'database_name' => $database['name'],
|
||||
'server' => $database['host'],
|
||||
'username' => $database['user'],
|
||||
'password' => $database['password'],
|
||||
'charset' => 'utf8'
|
||||
] );
|
||||
Reference in New Issue
Block a user