GA4
[clinton/MarylandElectronicPetitionSignature.git] / warning_not_found.php
1 <?PHP
2 $save_invite = $_COOKIE['invite'];
3 include_once('email.php');
4
5
6 ob_start();
7 echo "<pre>";
8 print_r($_COOKIE);
9 print_r($_SESSION);
10 print_r($_GET);
11 print_r($_POST);
12 print_r($_SERVER);
13 echo "</pre>";
14 $msg = ob_get_clean();
15 //meps_mail('mdpetition@gmail.com',$msg,'Voter v1 Found Details');
16
17 // hopefully no conflicts with the new api
18 include_once('api/maryland_voter.php');
19 $web_first_name = $_COOKIE['web_first_name'];
20 $web_last_name = $_COOKIE['web_last_name'];
21 $web_house_number = $_COOKIE['web_house_number'];
22 $web_zip_code = $_COOKIE['web_zip_code'];
23 $DOB = $_COOKIE['pDOB'];
24 $month = date('m',strtotime($DOB));
25 $day = date('d',strtotime($DOB));
26 $year = date('Y',strtotime($DOB));
27 $error = 'Based on what you entered, we were unable to find any information.';
28 $sbe_response = md_voter_lookup($web_first_name,$web_last_name,$month,$day,$year,$web_zip_code,'','');
29 $pos = strpos($sbe_response, $error);
30 if ($pos !== false) {
31 meps_mail('mdpetition@gmail.com',$sbe_response,'Voter API v2 Fail: '.$error);
32 }
33 $error2 = 'MISSING NAME';
34 $pos = strpos($sbe_response, $error2);
35 if ($pos !== false) {
36 meps_mail('mdpetition@gmail.com',$sbe_response,'Voter API v2 Fail: '.$error2);
37 }
38 $error3 = 'My Voter Registration Record';
39 $pos = strpos($sbe_response, $error3);
40 if ($pos !== false) {
41 meps_mail('mdpetition@gmail.com',$sbe_response,'Voter API v2 Success: '.$error3);
42 }
43
44 /* delete ALL cookies */
45 foreach ( $_COOKIE as $key => $value ){
46 unset($_COOKIE[$key]);
47 setcookie($key, '', time() - 3600, '/');
48 }
49 // unset cookies
50 if (isset($_SERVER['HTTP_COOKIE'])) {
51 $cookies = explode(';', $_SERVER['HTTP_COOKIE']);
52 foreach($cookies as $cookie) {
53 $parts = explode('=', $cookie);
54 $name = trim($parts[0]);
55 setcookie($name, '', time()-1000);
56 setcookie($name, '', time()-1000, '/');
57 }
58 }
59 setcookie("invite", $save_invite);
60 include_once('header.php');
61 slack_general('Warning Not Found ('.$_COOKIE['invite'].')','md-petition');
62 $qX = "select * from website_text where id = '5'";
63 $rX = $petition->query($qX);
64 $dX = mysqli_fetch_array($rX);
65 ?>
66 <script>document.title = "MEPS - Warning Not Found";</script>
67 <div class='row'>
68 <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $dX['text_title'];?></h1></div>
69 </div>
70 <div class='row'>
71 <div class='col-sm-10' style='text-align:center;'><h2><?PHP echo $dX['text_block'];?></h2></div>
72 </div>
73 <?PHP include_once('footer.php');