function ReceiveSettings($formname = '') { $this->dataset = manage_receive_dataset_from_selector($formname); if ($this->dataset == null) { return false; } if ($this->dataset->GetID() < 0) { add_info('Не указан набор данных'); return false; } $this->dataset->Ref(); $fields = array('uid' => 'INT', 'order' => 'INT'); $arr = $this->dataset->GenCreateFields(); foreach ($arr as $k => $v) { $fields[$k] = $v; } $this->settings['dataset'] = array('id' => $this->dataset->GetID(), 'settings' => $this->dataset->GetSettings()); $this->settings['content'] = content_create_support_table($this->content_id, $this->dataset->GetID(), $fields); $this->settings['script'] = -1; $this->settings['itemScript'] = -1; $this->settings['fullScript'] = -1; $this->settings['detailed'] = $_POST[$formname . '_detailed'] ? 1 : 0; $this->UpdateScripts(); $s = 'content_' . $this->content_id . '_count'; manage_settings_create('Количество элементов на странице для раздела ' . '«' . htmlspecialchars($this->GetName()) . '»', 'Разделы', $s, 'CSCSignedNumber'); opt_set($s, '10'); return true; }
function ReceiveSettings() { $this->dataset = manage_receive_dataset_from_selector($this->GetClassName()); if ($this->dataset == null) { return false; } if ($this->dataset->GetID() < 0) { add_info('Не указан набор данных'); return false; } $this->dataset->Ref(); $this->settings['dataset'] = array('id' => $this->dataset->GetID(), 'settings' => $this->dataset->GetSettings()); $this->settings['content'] = content_create_support_table($this->content_id, $this->dataset->GetID(), $this->dataset->GenCreateFields()); $this->settings['script'] = -1; return true; }
function AppendReceivedCat() { $dataset = manage_receive_dataset_from_selector(); if ($dataset == nil) { return false; } $name = stripslashes($_POST['name']); if ($this->AppendCatFromDataset($name, $dataset)) { $_POST = array(); return true; } return false; }