Example #1
0
 public function deleteArticleAction()
 {
     header('Content-type: text/plain; charset=utf-8');
     header('Cache-Control: no-store, no-cache');
     header('Expires: ' . date('r'));
     if (filter_has_var(INPUT_POST, 'id')) {
         $id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
     }
     $model = new ArticleTableModel();
     $model->setId($id);
     $model->setTable('article');
     echo $model->deleteRecord();
 }