} } break; case Project::$type: $assoc = $_POST; $assoc['author_id'] = $_POST['id']; unset($assoc['id']); $project = Project::FetchFromAssoc($assoc); if ($project === NULL) { $content = AlertMessage('alert-danger', Language::Word('error during project adding')); } else { $glob_id = 0; if (isset($_POST['glob_id'])) { $glob_id = $_POST['glob_id']; } if (Project::InsertToDB($project, $_POST['language'], $glob_id)) { $content = AlertMessage('alert-success', Language::Word('project is successfully added')); } else { $content = AlertMessage('alert-danger', Language::Word('error during project inserting')); } } break; case TextPart::$type: $assoc = $_POST; $assoc['author_id'] = $_POST['id']; unset($assoc['id']); $part = TextPart::FetchFromAssoc($assoc); if ($part === NULL) { $content = AlertMessage('alert-danger', Language::Word('error during text block adding')); } else { $glob_id = 0;