Commit | Line | Data |
---|---|---|
ffde8170 | 1 | <?PHP |
064f3eee | 2 | $save_invite = $_COOKIE['invite']; |
35aa6c1e PM |
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(); | |
b74aaa29 | 15 | //meps_mail('mdpetition@gmail.com',$msg,'Voter v1 Found Details'); |
35aa6c1e | 16 | |
2b8425bc PM |
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)); | |
b74aaa29 PM |
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 v2 ** Data Found! **'); | |
32 | } else { | |
33 | meps_mail('mdpetition@gmail.com',$sbe_response,'Voter v2 Still Missing'); | |
34 | } | |
35 | ||
35aa6c1e | 36 | |
f612f880 PM |
37 | /* delete ALL cookies */ |
38 | foreach ( $_COOKIE as $key => $value ){ | |
39 | unset($_COOKIE[$key]); | |
40 | setcookie($key, '', time() - 3600, '/'); | |
41 | } | |
42 | // unset cookies | |
43 | if (isset($_SERVER['HTTP_COOKIE'])) { | |
44 | $cookies = explode(';', $_SERVER['HTTP_COOKIE']); | |
45 | foreach($cookies as $cookie) { | |
46 | $parts = explode('=', $cookie); | |
47 | $name = trim($parts[0]); | |
48 | setcookie($name, '', time()-1000); | |
49 | setcookie($name, '', time()-1000, '/'); | |
50 | } | |
51 | } | |
064f3eee | 52 | setcookie("invite", $save_invite); |
ffde8170 | 53 | include_once('header.php'); |
f612f880 | 54 | slack_general('Warning Not Found ('.$_COOKIE['invite'].')','md-petition'); |
ce49cf79 | 55 | $qX = "select * from website_text where id = '5'"; |
ffde8170 PM |
56 | $rX = $petition->query($qX); |
57 | $dX = mysqli_fetch_array($rX); | |
ce49cf79 | 58 | ?> |
5625b4c2 | 59 | <script>document.title = "MEPS - Warning Not Found";</script> |
1a946745 | 60 | <div class='row'> |
833a22d3 | 61 | <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $dX['text_title'];?></h1></div> |
1a946745 PM |
62 | </div> |
63 | <div class='row'> | |
833a22d3 | 64 | <div class='col-sm-10' style='text-align:center;'><h2><?PHP echo $dX['text_block'];?></h2></div> |
1a946745 | 65 | </div> |
9cf4b960 | 66 | <?PHP include_once('footer.php'); |