public function deleteAction() { $id = $this->_request->getParam('id'); if ($id) { //**todo check to make sure user is in org**/ if (FM_Components_Banner::deleteBanner(array('id' => $id))) { if (array_key_exists('HTTP_REFERER', $_SERVER) && stristr($_SERVER['HTTP_REFERER'], 'admin/banner')) { $this->_redirect($_SERVER['HTTP_REFERER']); } else { $this->_redirect('/admin/banner'); } } else { exit; } } exit; }
public function ajaxdeletebannerAction() { if ($_POST && array_key_exists('id', $_POST) && $_POST['id'] != '') { if (FM_Components_Banner::deleteBanner(array('id' => $_POST['id']))) { print $_POST['id']; } else { print '0'; } } else { print '0'; } exit; }