<?php
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';

$gdb = array(
          'database_type' => 'mysql',
          'database_name' => $config['db']['name'],
          'server'        => $config['db']['host'],
          'username'      => $config['db']['user'],
          'password'      => $config['db']['password'],
          'charset'       => 'utf8'
        );

$mdb = new gdb( [
  'database_type' => 'mysql',
  'database_name' => $config['db']['name'],
  'server'        => $config['db']['host'],
  'username'      => $config['db']['user'],
  'password'      => $config['db']['password'],
  'charset'       => 'utf8'
] );