RS
apenas error acho que no setActiveRecord, em outro servidor.
bom dia, fiz um aplicação e tudo roda perfeitamente, ai publiquei em outro servidor e agora da erro ao tentar acessar as classes, será que preciso fazer alguma atualização ou configuração no servidor?
- <?php
- /**
- * CredorList Listing
- * @author <your name here>
- */
- class CredorList extends TStandardList
- {
- /*
- protected $form; // registration form
- protected $datagrid; // listing
- protected $pageNavigation;
- protected $formgrid;
- protected $deleteButton;
- protected $transformCallback;
- */
- /**
- * Page constructor
- */
- public function __construct()
- {
- parent::__construct();
- parent::setDatabase('conpusis'); // defines the database
- parent::setActiveRecord('Credor'); // defines the active record
- parent::setDefaultOrder('id', 'asc'); // defines the default order
- parent::addFilterField('nome', 'like', 'nome'); // filterField, operator, formField
- // creates the form
- $this->form = new TQuickForm('form_search_Credor');
- $this->form->class = 'tform'; // change CSS class
- $this->form->style = 'display: table;width:100%'; // change style
- $this->form->setFormTitle('Credores');
- // create the form fields
- $nome = new TEntry('nome');
- // add the fields
- $row = $this->form->addQuickField('Nome', $nome, 600 );
- $row->get(0)->width = '10%';
- // keep the form filled during navigation with session data
- $this->form->setData( TSession::getValue('Credor_filter_data') );
- // add the search form actions
- $this->form->addQuickAction(_t('Find'), new TAction(array($this, 'onSearch')), 'fa:search');
- $this->form->addQuickAction(_t('New'), new TAction(array('CredorForm', 'onEdit')), 'bs:plus-sign green');
- // creates a DataGrid
- $this->datagrid = new TDataGrid;
- $this->datagrid->style = 'width: 100%';
- $this->datagrid->datatable = 'true';
- // $this->datagrid->enablePopover('Popover', 'Hi <b> {name} </b>');
- // creates the datagrid columns
- // $column_id = new TDataGridColumn('id', 'Id', 'right');
- $column_nome = new TDataGridColumn('nome', 'Nome', 'left');
- $column_cpf_cnpj = new TDataGridColumn('cpf_cnpj', 'CNPJ/CPF', 'left');
- $column_cidade = new TDataGridColumn('{cidades->nome} ({estados->uf})', 'Cidade', 'left');
- $column_fone1 = new TDataGridColumn('fone1', 'Telefone 1', 'left');
- $column_fone2 = new TDataGridColumn('fone2', 'Telefone 2', 'left');
- // add the columns to the DataGrid
- // $this->datagrid->addColumn($column_id);
- $this->datagrid->addColumn($column_nome);
- $this->datagrid->addColumn($column_cpf_cnpj);
- $this->datagrid->addColumn($column_cidade);
- $this->datagrid->addColumn($column_fone1);
- $this->datagrid->addColumn($column_fone2);
- // creates the datagrid column actions
- $order_nome = new TAction(array($this, 'onReload'));
- $order_nome->setParameter('order', 'nome');
- $column_nome->setAction($order_nome);
- // create EDIT action
- $action_edit = new TDataGridAction(array('CredorForm', 'onEdit'));
- $action_edit->setUseButton(TRUE);
- $action_edit->setButtonClass('btn btn-default');
- // $action_edit->setLabel(_t('Edit'));
- $action_edit->setImage('fa:pencil-square-o blue fa-lg');
- $action_edit->setField('id');
- $this->datagrid->addAction($action_edit);
- // create DELETE action
- $action_del = new TDataGridAction(array($this, 'onDelete'));
- $action_del->setUseButton(TRUE);
- $action_del->setButtonClass('btn btn-default');
- //$action_del->setLabel(_t('Delete'));
- $action_del->setImage('fa:trash-o red fa-lg');
- $action_del->setField('id');
- $this->datagrid->addAction($action_del);
- // create the datagrid model
- $this->datagrid->createModel();
- // create the page navigation
- $this->pageNavigation = new TPageNavigation;
- $this->pageNavigation->setAction(new TAction(array($this, 'onReload')));
- $this->pageNavigation->setWidth($this->datagrid->getWidth());
- // vertical box container
- $container = new TVBox;
- $container->style = 'width: 100%';
- //$container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
- $container->add($this->form);
- $container->add($this->datagrid);
- $container->add($this->pageNavigation);
- parent::add($container);
- }
- }
- ?>
Verifique os logs do apache
Bom dia Nataniel eu peguei o error.log
[error] [client 186.233.212.10] PHP Fatal error: Can't use function return value in write context in /var/www/conpusis/lib/adianti/w idget/datagrid/TDataGrid.php on line 555, referer: conpusis.dourados.ms.gov.br/index.php?class=CommonPage
PHP Version 5.4.45-4+deprecated+dontuse+deb.sury.org~precise+1
Atualize a versão do PHP para no mínimo a 5.5