function buildForm() { $this->buildFormCommonItems(); $this->addElement('header', 'header', 'Рентгенологические исследования'); $vDB = GetDB(); $vContainer =& $this->controller->container(); $vDefaults =& $vContainer['defaults']; $vCaseID = @$vDefaults['BaseInfo']['id']; $vTab = new TTable('emst_rg', 'id, date, area, done, description', $vDB->CondEqual('case_id', $vCaseID), 'date, area, done, id', 'id'); $vTab->AddDateColumn('date', 'Дата'); $vTab->AddColumn('area', 'Область исследования'); $vTab->AddBoolColumn('done', 'Выполнено'); $vTab->AddTextColumn('description', 'Описание'); $vTab->AddRowAction('изменить', 'rg_dir_edit.html?id='); $vTab->AddTableAction('Новое направление на RG', 'rg_dir_edit.html?caseid=' . $vCaseID); $vHTML = $vTab->ProduceHTML($vDB, @$_GET['PageIdx'] + 0, 20); $this->addElement('static', 'table', 'table', $vHTML); $this->addElement('submit', 'submit', 'OK', array('class' => 'bigred')); $this->setDefaultAction('submit'); if ($this->controller->isValid()) { ActionProcess::save($this->controller); } }