public function delete() { $id = isset($_GET['id']) ? intval($_GET['id']) : 0; $this->_deleteImage($id); $data = $this->Video_model->delete($id); $url = base_url() . 'admin_video/index'; set_flash_message($this->lang->line('admin.video.deleted')); redirect($url); }
public function delete() { $id = isset($_GET['id']) ? intval($_GET['id']) : 0; $this->_deleteImage($id); $data = $this->Series_model->delete($id); $this->Series_Genre_model->deleteBySeriesId($id); $url = base_url() . 'admin_series/index'; set_flash_message($this->lang->line('admin.content.deleted')); redirect($url); }
public function save() { $data = $_POST; $importType = $this->_config['import_type']; unset($importType[IMPORT_TYPE_COUNTRY]); $importTypeSelectbox = selectBox($importType, array('Name' => 'import_type_id', 'Selected' => $data['import_type_id'])); $data['importTypeSelectbox'] = $importTypeSelectbox; $typeSelectbox = selectBox($this->_config['video_type'], array('Name' => 'type', 'Selected' => $data['type'])); $data['typeSelectbox'] = $typeSelectbox; $message = $this->validate($data); if (!empty($message)) { set_flash_error($message); } if (!has_error()) { $siteUrl = strtolower($data['site_url']); $id = 0; $importTypeId = $data['import_type_id']; if (strpos($siteUrl, "dramacool.com/")) { if ($importTypeId == IMPORT_TYPE_VIDEO) { $ret = $this->dramaCool->importFromVideoUrl($siteUrl); } elseif ($importTypeId == IMPORT_TYPE_SERIES) { $ret = $this->dramaCool->importFromSeriesUrl($siteUrl); } elseif ($importTypeId == IMPORT_TYPE_COUNTRY) { die; //$ret = $this->dramaCool->importFromCountryUrl($siteUrl); } $id = $ret['id']; } if ($id) { $url = base_url() . 'admin_video/show?id=' . $id; set_flash_message($this->lang->line('admin.import.success')); redirect($url); } else { set_flash_error($ret['msg']); $this->layout->title('Import Data'); $this->layout->view('import_data/import', $data); } } else { $this->layout->title('Import Data'); $this->layout->view('import_data/import', $data); } }
public function delete() { $id = isset($_GET['id']) ? intval($_GET['id']) : 0; $data = $this->Config_model->delete($id); $url = base_url() . 'config/index'; set_flash_message($this->lang->line('admin.config.deleted')); redirect($url); }
public function delete_box_item() { $id = isset($_GET['id']) ? intval($_GET['id']) : 0; $data = $this->Editor_Box_Item_model->getById($id); if ($data) { $originalThumb = $data['item_thumbnail']; if (file_exists(EDITOR_IMAGE_THUMBNAIL_PATH . $originalThumb)) { unlink(EDITOR_IMAGE_THUMBNAIL_PATH . $originalThumb); } } $data = $this->Editor_Box_Item_model->delete($id); $url = base_url() . 'admin_editor/list_box_item'; set_flash_message($this->lang->line('admin.content.deleted')); redirect($url); }