public function edit() { $this->show->propertyID = $this->post['PropertyID']; $oProperty = new Catalog_Property(); if (!empty($this->post['Save'])) { if ($this->show->itemID) { $oProperty->update($this->post, $this->show->itemID); } else { $oProperty->insert($this->post, $_COOKIE["categoryID"]); } redirect(BASE_PATH . 'admin/catalog/property'); } $this->show->item = $oProperty->getById($this->show->itemID); if ($this->show->itemID) { $this->show->breadcrumbs[] = array('url' => BASE_PATH . 'admin/catalog/property/' . $this->show->itemID . '/edit', 'title' => $this->show->item['Title']); } else { $this->show->breadcrumbs[] = array('url' => BASE_PATH . 'admin/catalog/property/0/edit', 'title' => 'Создание'); } }