if ($restore_user->changePassword($new_pass) != 1) { aExit(5, ''); } aExit(0, lng('RESTORE_COMPLETE')); break; case 'comment': $comment = Filter::input('comment'); $item_type = Filter::input('item_type', 'post', 'int'); $item_id = Filter::input('item_id', 'post', 'int'); 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);