'tables', 'multiSelect' => true, 'idField'=>'tabId', ); $table_fields = array( 'tabId' => array( 'type' => 'id', 'default_list' => true, ), 'tabName' => array( 'type' => 'text', 'size' => '150', 'length' => '30', 'default_list' => true, ), 'tabTitle' => array( 'type' => 'text', 'size' => '300', 'length' => '200', 'default_list' => true, 'language' => true, ), 'tabPrefix' => array( 'type' => 'text', 'size' => '80', 'length' => '5', 'default_list' => true, ), ); */ $table=mysqli_fetch_assoc(mysqli_query($db, "SELECT * FROM tables WHERE tabId='".$_GET['tid']."'")); $_table = $table['tabName']; $table_config = array( 'table' => $table['tabName'], 'idField' => table2prefix($table['tabName']).'Id', 'linkEdit' => '&tid='.$table['tabId'], ); if($table['tabLanguages']) $table_config['languages']=true; if($table['tabStatuses']) $table_config['status']=true; if($table['tabCategories']) $table_config['categories']=true; $table_fields = array( table2prefix($table['tabName']).'Id' => array( 'type' => 'id', 'default_list' => true, ), ); //print_r($_SESSION); $_t['moduleName']=$table['tabTitle@'.$cfg['admin']['language']]; $_t[table2prefix($table['tabName']).'Id']='ID'; //print_r($table_config); //exit; require_once('_backend/grid.php'); function print_header() { global $_url, $cfg, $table, $table_config; $_header=array('language'=>true, 'search'=>true, 'filters'=>true, 'sorting'=>true); require_once('_backend/templates/grid_header.php'); } function action_index() { global $table_config; grid_view($table_config['table']); } function action_view() { global $table_config; grid_view($table_config['table']); } function action_structure() { global $table_config; grid_structure($table_config['table']); } function action_edit() { global $table_config; grid_record($table_config['table'], true); } function action_add() { global $table_config; grid_record($table_config['table'], false); } function action_settings() { global $table_config, $table_fields; grid_settings($table_config['table']); } function action_adjust() { global $table_config, $table_fields; grid_adjust($table_config['table']); } ?>