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