<?php
global $gdb;

$grid = new \grid( 'globelus_settings' );
$grid -> gdb_opt      = $gdb;
$grid -> order        = [ 'column' => 'param', 'type' => 'ASC' ];
$grid -> search       = [
                            [ 'name' => 'param', 'db' => 'text', 'type' => 'text' ]
                        ];
$grid -> columns_view = [
                          [ 
                            'name' => 'Lp.',
                            'th' => [ 'class' => 'g-lp' ],
                            'td' => [ 'class' => 'g-center' ],
                            'autoincrement' => true 
                          ],
                          [
                            'name'  => 'Parametr',
                            'db'    => 'param',
                            'sort'  => true
                          ],
                          [
                            'name'  => 'Wartośc',
                            'db'    => 'value'
                          ]
                        ];
$grid -> columns_edit = [
                          [ 
                            'name'          => 'Parametr',
                            'db'            => 'param',
                            'type'          => 'text',
                            'readonly-edit' => true
                          ],
                          [ 
                            'name'      => 'Wartość',
                            'db'        => 'value',
                            'type'      => 'text',
                            'readonly'  => true
                          ]
                        ];
$grid -> actions = [ 'edit' => true ];
echo $grid -> draw();