<?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';
require_once dirname( __FILE__ ) . '/../../autoload/admin/factory/class.Articles.php';
require_once dirname( __FILE__ ) . '/../../autoload/admin/factory/class.Pages.php';
require_once dirname( __FILE__ ) . '/../../autoload/admin/factory/class.ShopCategory.php';
require_once dirname( __FILE__ ) . '/../../autoload/admin/factory/class.ShopProduct.php';
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'
                ] );