Exemplo n.º 1
0
     $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'])) {
         $content = AlertMessage('alert-danger', Language::Word('error while direction deleting'));
     } else {
         $content = AlertMessage('alert-success', Language::Word('direction is deleted'));
     }
     break;
 case UserBlock::$type:
     if (!UserBlock::Delete($_POST['id'])) {
         $content = AlertMessage('alert-danger', Language::Word('error while user block deleting'));
     } else {
         $content = AlertMessage('alert-success', Language::Word('user block is deleted'));
     }
     break;
 case Project::$type:
     if (!Project::Delete($_POST['id'])) {
         $content = AlertMessage('alert-danger', Language::Word('error while project deleting'));
     } else {
         $content = AlertMessage('alert-success', Language::Word('project is deleted'));
     }
     break;
 case TextPart::$type:
     if (!TextPart::Delete($_POST['id'])) {
         $content = AlertMessage('alert-danger', Language::Word('error while text block deleting'));