_data; } $this->delete(); if (is_array($data['top']) && !empty($data['top'])) { foreach ($data['top'] as $index => $v) { $row = array( 'idSlide' => $this->_idSlide, 'type' => $data['type'][$index], 'top' => (int) $data['top'][$index], 'left' => (int) $data['left'][$index], 'width' => (int) $data['width'][$index], 'height' => (int) $data['height'][$index], 'urlType' => $data['urlType'][$index], 'idPage' => $data['idPage'][$index], 'url' => $data['url'][$index], ); $this->table->insert($row); } } return true; } public function delete() { return $this->table->delete("idBanner = " . (int)$this->_idSlide); } }