$glob_id = 0; if (isset($_POST['glob_id'])) { $glob_id = $_POST['glob_id']; } if (UserBlock::InsertToDB($usr_block, $_POST['language'], $glob_id)) { $content = AlertMessage('alert-success', Language::Word('user block is successfully added')); } else { $content = AlertMessage('alert-danger', Language::Word('error during user block inserting')); } } break; case Article::$type: $assoc = $_POST; $assoc['author_id'] = $_POST['id']; unset($assoc['id']); $article = Article::FetchFromAssoc($assoc); if ($article === NULL) { $content = AlertMessage('alert-danger', Language::Word('error while article adding')); } else { $glob_id = 0; if (isset($_POST['glob_id'])) { $glob_id = $_POST['glob_id']; } if (Article::InsertToDB($article, $_POST['language'], $glob_id)) { $content = AlertMessage('alert-success', Language::Word('article is successfully added')); } else { $content = AlertMessage('alert-danger', Language::Word('error during article inserting')); } } break; case Report::$type: