Looks like you are making a request for square $bucket_display
Please enter your name and email address below.
require_once($_SERVER['DOCUMENT_ROOT'] . "/objects/common.php");
$bucket = strip_tags($_REQUEST['bucket']);
$gid = strip_tags($_REQUEST['gid']);
$bucket_display = substr($bucket, 0, 1) . "/" . substr($bucket, 1, 1);
$bucket_display = $bucket;
// Add to request file
if ($_REQUEST['submit_picks']){
// Add to _requests.txt
/*
$file = $_SERVER['DOCUMENT_ROOT'] . "/_requests.txt";
$person = $bucket . "," . strip_tags($_REQUEST['name']) . "," . strip_tags($_REQUEST['email']) . "\n";
// print "file: $file
";
// print "person: $person
";
file_put_contents($file, $person, FILE_APPEND | LOCK_EX);
*/
// Update Database
$dataset = array(
strip_tags($_REQUEST['name']),
strtolower(strip_tags($_REQUEST['email'])),
$bucket,
$gid,
);
$yquery = "UPDATE grid SET name = ?, email = ? WHERE spot = ? AND gid = ? LIMIT 1";
$yresult = db::Q()->prepare($yquery);
$yresult->execute($dataset);
// Send Notifcation
$message = strip_tags($_REQUEST['name']) . " has requested the square number $bucket. You need to flip them over in the grid file.";
// Send me a text message to look this over.
$key = "abee9c06c4b0d53be2bc48ee189912c52d1257721TpvWELQ5oSKeiUZ9mlIq7HCd";
$ch = curl_init('https://textbelt.com/text');
$data = array(
'phone' => 5712058785,
'message' => $message,
'key' => $key,
);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
header("Location: /$gid");
}
print <<< CONTENT
Looks like you are making a request for square $bucket_display
Please enter your name and email address below.