protected function GetFields(&$other_fields_array, &$checkboxes_array) { if (!$other_fields_array || !$checkboxes_array) { throw new ExceptionAllError("не найдены данные о дополнительных полях"); } foreach ($other_fields_array as $id => $field) { if (file_exists(ENGINE_DIR . '/car-market/array/' . $field['file'] . '.php')) { include_once ENGINE_DIR . '/car-market/array/' . $field['file'] . '.php'; $name = str_replace("_array", "", $field['file']); $this->sel_fields[$name]['name'] = $field['name']; $this->sel_fields[$name]['id'] = $id; $this->sel_fields[$name]['values'] = ${$field}['file']; $this->search_array[$name] = 0; } else { trigger_error("Не найден файл дополнительного поля " . $field['file'], E_WARNING); } } Licencing::check(); $this->checkbox_fields = $checkboxes_array; foreach ($this->checkbox_fields as $name => $value) { $this->search_array[$name] = 0; } for ($i = (int) date("Y", $this->base->timer->cur_time); $i >= 1900; $i--) { $this->year_array[$i] = $i; } }
protected final function GetColumn(array $columns) { if ($columns[0] == '*') { return '*'; } else { $columns = array_flip($columns); $this->ArrayIntersectKey($columns); if ($columns) { $column_str = ''; foreach ($columns as $column => $as) { if ($column_str) { $column_str .= ", "; } if (!is_numeric($as)) { $column_str .= $column . " as " . preg_replace('#[^a-z]#i', "_", $as); } else { $column_str .= $column; Licencing::check(); } } return $column_str; } return '*'; } }