CaptchaCheck(3); if (empty($user) or !$comment or !$item_type or !$item_id) { aExit(1, lng('MESS_FAIL')); } loadTool('comment.class.php'); $comments_item = new Comments_Item(false, 'news/comments/'); $comments_item->aCreate($comment, $user, $item_id, $item_type); break; case 'del_com': $id = Filter::input('item_id', 'post', 'int'); if (empty($user) or !$id) { aExit(1); } loadTool('comment.class.php'); $comments_item = new Comments_Item($id); if (!$user->getPermission('adm_comm') and $comments_item->GetAuthorID() != $user->id()) { aExit(1); } if ($comments_item->Delete()) { aExit(0); } else { aExit(1); } break; case 'load_info': $id = Filter::input('id', 'post', 'int'); if (!$id) { aExit(1, 'Empty POST param ID'); } loadTool('profile.class.php'); $user_profile = new Profile($id, 'other/');