public function edit() { $this->show->brandID = $this->post['BrandID']; setcookie("brandID", $this->show->brandID, null, '/'); $oCategory = new Catalog_Category(); if ($this->post['action'] == 'delimage') { $IDs = $this->post['id']; $oCategory->deleteFile($IDs); echo $IDs; exit; } if (!empty($this->post['Save'])) { if ($this->show->itemID) { $oCategory->update($this->post, $this->show->itemID); } else { $oCategory->insert($this->post); } redirect(BASE_PATH . 'admin/catalog/category'); } $this->show->item = $oCategory->getById($this->show->itemID); if ($this->show->itemID) { $this->show->breadcrumbs[] = array('url' => BASE_PATH . 'admin/catalog/category/' . $this->show->itemID . '/edit', 'title' => $this->show->item['Title']); } else { $this->show->breadcrumbs[] = array('url' => BASE_PATH . 'admin/catalog/category/0/edit', 'title' => 'Создание'); } }