2 $web_first_name = $_COOKIE['web_first_name'];
3 $web_last_name = $_COOKIE['web_last_name'];
4 $web_house_number = $_COOKIE['web_house_number'];
5 $web_zip_code = $_COOKIE['web_zip_code'];
6 $DOB = $_COOKIE['pDOB'];
7 $PHONE = $_COOKIE['pPHONE'];
8 if ($web_first_name != '' && $web_last_name != '' && $web_house_number != '' && $web_zip_code != ''){
9 include_once('header.php');
10 $web_first_name = $petition->real_escape_string($web_first_name);
11 $web_last_name = $petition->real_escape_string($web_last_name);
12 $web_house_number = $petition->real_escape_string($web_house_number);
13 $web_zip_code = $petition->real_escape_string($web_zip_code);
14 $DOB = $petition->real_escape_string($DOB);
15 $PHONE = $petition->real_escape_string($PHONE);
17 header('Location: warning_incomplete.php');
21 include_once('api/maryland_voter.php');
22 $month = date('m',strtotime($DOB));
23 $day = date('d',strtotime($DOB));
24 $year = date('Y',strtotime($DOB));
25 $error = 'Based on what you entered, we were unable to find any information.';
26 $error2 = 'MISSING NAME';
27 $error3 = 'My Voter Registration Record';
28 $error4 = 'Your search cannot be processed at this time';
29 $sbe_response = md_voter_lookup($web_first_name,$web_last_name,$month,$day,$year,$web_zip_code,'','');
30 $pos = strpos($sbe_response, $error4);
32 slack_general_admin("Voter API v2 Block: $web_first_name,$web_last_name,$month,$day,$year,$web_zip_code $error4",'md-petition-api');
34 $pos = strpos($sbe_response, $error);
36 slack_general_admin("Voter API v2 Fail: $web_first_name,$web_last_name,$month,$day,$year,$web_zip_code $error",'md-petition-api');
38 $pos = strpos($sbe_response, $error2);
40 slack_general_admin("Voter API v2 Fail: $web_first_name,$web_last_name,$month,$day,$year,$web_zip_code $error2",'md-petition-api');
42 $pos = strpos($sbe_response, $error3);
44 slack_general_admin("Voter API v2 Success: $web_first_name,$web_last_name,$month,$day,$year,$web_zip_code $error3",'md-petition-api');
48 // v3 update to VoterList
49 $q = "select * from VoterList2 where LASTNAME = '$web_last_name' and FIRSTNAME = '$web_first_name' and HOUSE_NUMBER = '$web_house_number' and RESIDENTIALZIP5 = '$web_zip_code'";
50 $r = $petition->query($q);
51 $d = mysqli_fetch_array($r);
52 if ($d['VTRID'] != ''){
53 slack_general_admin("VoterList2 Search Found",'md-petition-api');
54 $VoterList_table = 'VoterList2';
56 $q = "select * from VoterList where LASTNAME = '$web_last_name' and FIRSTNAME = '$web_first_name' and HOUSE_NUMBER = '$web_house_number' and RESIDENTIALZIP5 = '$web_zip_code'";
57 $r = $petition->query($q);
58 $d = mysqli_fetch_array($r);
59 if ($d['VTRID'] != ''){
60 slack_general_admin("VoterList Search Found",'md-petition-api');
61 $VoterList_table = 'VoterList';
63 slack_general_admin("VoterList and VoterList2 Search Not Found",'md-petition-api');
64 //slack_general('MISS: Is the information correct ('.$web_first_name.' '.$web_last_name.' '.$PHONE.') ('.$_COOKIE['invite'].')','md-petition');
65 setcookie("signature_status", 'notfound');
66 header('Location: warning_not_found.php');
70 setcookie("VoterList_table", $VoterList_table);
71 $q = "select * from $VoterList_table where LASTNAME = '$web_last_name' and FIRSTNAME = '$web_first_name' and HOUSE_NUMBER = '$web_house_number' and RESIDENTIALZIP5 = '$web_zip_code'";
72 $r = $petition->query($q);
73 $d = mysqli_fetch_array($r);
75 $FIRSTNAME = $d['FIRSTNAME'];
76 $MIDDLENAME = $d['MIDDLENAME'];
77 if ($MIDDLENAME == ''){
78 slack_general_admin("WARN: Blank Middle Name Detected",'md-petition-signed');
80 $LASTNAME = $d['LASTNAME'];
81 $pos = strpos($LASTNAME, '-');
83 slack_general_admin("WARN: Hyphen in Last Name Detected",'md-petition-signed');
85 $ADDRESS = $d['ADDRESS'];
86 $RESIDENTIALCITY = $d['RESIDENTIALCITY'];
87 $COUNTY = $d['COUNTY'];
88 $RESIDENTIALZIP5 = $d['RESIDENTIALZIP5'];
89 // set cookies for hard_copy.php
90 setcookie("pCOUNTY", $COUNTY);
91 if ($MIDDLENAME == ''){
92 setcookie("pNAME", "$FIRSTNAME $LASTNAME");
94 setcookie("pNAME", "$FIRSTNAME $MIDDLENAME $LASTNAME");
96 setcookie("pADDRESS", "$ADDRESS $RESIDENTIALCITY $RESIDENTIALZIP5");
97 setcookie("pADDRESS1", "$ADDRESS");
98 setcookie("pADDRESS2", "$RESIDENTIALCITY MD $RESIDENTIALZIP5");
99 setcookie("pVTRID", $VTRID);
100 setcookie("signature_status", 'verified');
101 slack_general('MATCH: Is the information correct ('.$FIRSTNAME.' '.$LASTNAME.' '.$RESIDENTIALCITY.') ('.$_COOKIE['invite'].')','md-petition');
102 $qX = "select * from website_text where id = '6'";
103 $rX = $petition->query($qX);
104 $dX = mysqli_fetch_array($rX);
106 <script
>document
.title
= "MEPS - Confirm information";</script
>
108 <div
class='col-sm-10' style
='text-align:center;'><h1
><?PHP
echo $dX['text_title'];?
></h1
><h2
><?PHP
echo $dX['text_block'];?
></h2
></div
>
111 <div
class='col-sm-10'><button type
="button" class="btn btn-success btn-lg btn-block" onclick
="window.location.href='eligible.php'"><img alt
='Click Here to Continue' class='click_me' src
="files/click_here.gif">YES
</button
></div
>
114 <div
class='col-sm-5' style
='text-align:right;'><h2
>First Name
</h2
></div
>
115 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $FIRSTNAME;?
></h2
></div
>
118 <div
class='col-sm-5' style
='text-align:right;'><h2
>Middle Name
</h2
></div
>
119 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $MIDDLENAME;?
><h2
></div
>
122 <div
class='col-sm-5' style
='text-align:right;'><h2
>Last Name
</h2
></div
>
123 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $LASTNAME;?
></h2
></div
>
126 <div
class='col-sm-5' style
='text-align:right;'><h2
>Date of Birth
</h2
></div
>
127 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $DOB;?
></h2
></div
>
130 <div
class='col-sm-5' style
='text-align:right;'><h2
>Full Addresss
</h2
></div
>
131 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $ADDRESS;?
></h2
></div
>
134 <div
class='col-sm-5' style
='text-align:right;'><h2
>Phone
</h2
></div
>
135 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $PHONE;?
></h2
></div
>
138 <div
class='col-sm-5' style
='text-align:right;'><h2
>City
</h2
></div
>
139 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $RESIDENTIALCITY;?
></h2
></div
>
142 <div
class='col-sm-5' style
='text-align:right;'><h2
>County
</h2
></div
>
143 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $COUNTY;?
></h2
></div
>
146 <div
class='col-sm-5' style
='text-align:right;'><h2
>Zip
</h2
></div
>
147 <div
class='col-sm-5' style
='text-align:left;'><h2
><?PHP
echo $RESIDENTIALZIP5;?
></h2
></div
>
150 <div
class='col-sm-10'><button type
="button" class="btn btn-success btn-lg btn-block" onclick
="window.location.href='eligible.php'"><img alt
='Click Here to Continue' class='click_me' src
="files/click_here.gif">YES
</button
></div
>
153 <div
class='col-sm-10'><button type
="button" class="btn btn-danger btn-lg btn-block not_me" onclick
="window.location.href='reset.php'">NO
</button
></div
>
156 <?PHP
include_once('footer.php');