MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/b2680/oyeliascom.ipage.com/php/
File Upload :
Current < : /hermes/sb_web/b2680/oyeliascom.ipage.com/php/logvisit.php

<?php

require_once("subs.inc.php");

$timeint = time();
$timestr = (string)$timeint;

if ($_POST["name"] == "Jordonbep") {
	die();
}
if ($_POST["name"] == "KiethPob") {
	die();
}
if (substr($_POST["phone"], 0, 1) == "8") {
	die();
}
if (strlen($_SERVER['HTTP_USER_AGENT'])<16) {
	die();
}


if ((strlen($_POST["name"]) + strlen($_POST["phone"]) + strlen($_POST["email"]))>5) {
	$text = "Name: " . $_POST["name"] . PHP_EOL . "Phone: " . $_POST["phone"] . PHP_EOL . "Email: " . $_POST["email"] . PHP_EOL . "Message: " . $_POST["message"] . PHP_EOL . "Accept Marketing: " . $_POST["approve"] . PHP_EOL;

	if (strpos($text, '<') !== false) {
		die();
	}
	if (strpos($text, '?') !== false) {
		die();
	}
	if (substr( $_POST["phone"], 0, 1 ) === "1") {
	    die();
	}
	if (strlen($_POST["message"]) < 14) {
	    die();
	}
	$myfile = fopen("../visits/" . $timestr, "w");
	fwrite($myfile, $text);
	fclose($myfile);
	
	mail('keggyberko@gmail.com', 'New message in website', $text, 'From: Einat Website <info@einatbesser.com>' . "\r\n");
	
	$subs = new SUBS;
	$subs->insert_visit($_POST['email'],$_POST['name'],$_POST['phone'],$_SERVER['HTTP_USER_AGENT']);
}

header("Location: https://einatbesser.com");
die();

?>