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