names[$nrow['sys_name']] = $nrow['name'];
}
// Несовпадения по именам.
$this->names['lvl'] = $this->names['level'];
$this->printAll();
$this->printUnknown();
}
private function printer(array $data, string $title): string
{
$result = '';
foreach ($data as $k=>$v) {
if ($k === array_key_first($data)) {
$result .= "
$title: ";
}
$result .= $this->namer($k, $v);
}
return $result;
}
private function printAll(): void
{
foreach (Db::getRows('select name, info, date2, date3, id, tr from priems order by name') as $prow) {
$d2 = Conversion::dataStringToArray($prow['date2']);
$d3 = Conversion::dataStringToArray($prow['date3']);
$tr = Conversion::dataStringToArray($prow['tr']);
$d2s = $this->printer($d2, 'date2');
$d3s = $this->printer($d3, 'date3');
$trs = $this->printer($tr, 'Требуется');
$dallk = array_flip(array_keys(array_merge($d2, $d3, $tr)));
$this->parameters = array_merge($dallk, $this->parameters);
echo "