I’ve removed the long piece of malware you posted. Please don’t do that. If this code is on your website, get a fresh cup of coffee, take a deep breath and carefully follow this guide. When you’re done, you may want to implement some (if not all) of the recommended security measures.
If you’re unable to clean your site(s) successfully, there are reputable organizations that can clean your sites for you. Sucuri and Wordfence are a couple.
Otherwise, please explain your question, if any.
Note, too, that because you posted malware here, I’ve put a temporary flag on your account to allow moderators to review your post(s) before they’re published.