Probably a local firewall preventing the referral checking. You can update the IF statement and remove the referral checking portion...
in other words update:
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
and make it:
if ($_SERVER["REQUEST_METHOD"] == "POST") {