public function Delete($params)
 {
     Article::Delete($this->conn, $params['id']);
 }
Example #2
0
            $article->SetUser($arti_user_id);
            $article->SetSubject($arti_subj_id);
            if ($article->Update()) {
                $message_position = 5;
                $message = $screen_module_name . " alterado com sucesso.";
            } else {
                $message_position = 5;
                $message = "Problemas na operação.";
            }
        }
    }
    if ($action == 4) {
        $article = new Article();
        $article->SetDatabase($database);
        $article->SetId($arti_id);
        if ($article->Delete()) {
            $message_position = 5;
            $message = $screen_module_name . " excluído com sucesso.";
            $arti_id = "";
            $arti_title = "";
            $arti_date = "";
            $arti_user_id = "";
            $arti_subj_id = "";
        } else {
            $message_position = 5;
            $message = "Problemas na operação.";
        }
    }
}
?>
Example #3
0
 case RequestOnRegister::$type:
     if (!RequestOnRegister::Delete($_POST['id'])) {
         $content = AlertMessage('alert-danger', Language::Word('error while request rejecting'));
     } else {
         $content = AlertMessage('alert-success', Language::Word('request is rejected'));
     }
     break;
 case User::$type:
     if (!User::Delete($_POST['id'])) {
         $content = AlertMessage('alert-danger', Language::Word('error while user deleting'));
     } else {
         $content = AlertMessage('alert-success', Language::Word('user is deleted'));
     }
     break;
 case Article::$type:
     if (!Article::Delete($_POST['id'])) {
         $content = AlertMessage('alert-danger', Language::Word('error while article deleting'));
     } else {
         $content = AlertMessage('alert-success', Language::Word('article is deleted'));
     }
     break;
 case Report::$type:
     $tmp = Report::Delete($_POST['id']);
     if (Error::IsError($tmp)) {
         $content = AlertMessage('alert-danger', Language::Word('error while report deleting') . ': ' . Error::ToString($tmp));
     } else {
         $content = AlertMessage('alert-success', Language::Word('report is deleted'));
     }
     break;
 case Direction::$type:
     if (!Direction::Delete($_POST['id'])) {