3 include_once('header.php');
4 $head = ob_get_clean();
5 $web_first_name = $_COOKIE['web_first_name'];
6 $web_last_name = $_COOKIE['web_last_name'];
7 $web_house_number = $_COOKIE['web_house_number'];
8 $web_zip_code = $_COOKIE['web_zip_code'];
9 if ($web_first_name != '' && $web_last_name != '' && $web_house_number != '' && $web_zip_code != ''){
10 include_once('header.php');
11 $web_first_name = $petition->real_escape_string($web_first_name);
12 $web_last_name = $petition->real_escape_string($web_last_name);
13 $web_house_number = $petition->real_escape_string($web_house_number);
14 $web_zip_code = $petition->real_escape_string($web_zip_code);
15 $DOB = $petition->real_escape_string($DOB);
16 $PHONE = $petition->real_escape_string($PHONE);
18 // we should NEVER hit this page anymore
19 header('Location: warning_incomplete.php');
21 $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'";
22 $r = $petition->query($q);
23 $d = mysqli_fetch_array($r);
24 if ($d['VTRID'] != ''){
26 $FIRSTNAME = $d['FIRSTNAME'];
27 $MIDDLENAME = $d['MIDDLENAME'];
28 $LASTNAME = $d['LASTNAME'];
29 $ADDRESS = $d['ADDRESS'];
30 $RESIDENTIALCITY = $d['RESIDENTIALCITY'];
31 $COUNTY = $d['COUNTY'];
32 $RESIDENTIALZIP5 = $d['RESIDENTIALZIP5'];
33 slack_general('MATCH: eligible ('.$FIRSTNAME.' '.$LASTNAME.' '.$RESIDENTIALCITY.') ('.$_COOKIE['invite'].')','md-petition');
35 slack_general('MISS: eligible ('.$web_first_name.' '.$web_last_name.' '.$PHONE.') ('.$_COOKIE['invite'].')','md-petition');
36 header('Location: warning_not_found.php');
39 if (isset($_GET['remove'])){
40 $id = $_GET['remove'];
41 $q = "update signatures set signature_status = 'removed' where id = '$id'";
43 slack_general('SQL: eligible ('.$q.') ('.$_COOKIE['invite'].')','md-petition');
44 header('Location: eligible.php');
51 $q2 = "SELECT * FROM petitions where admin_status = 'approved'";
52 $r2 = $petition->query($q2);
53 while($d2 = mysqli_fetch_array($r2)){
55 $field = $d2['eligibleVoterListField'];
56 $pass = $d2['eligibleVoterListEquals'];
58 $my_test = $d[$field];
60 if($my_test == $pass){
63 if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
68 $available .= "<div class='row'>
69 <div class='col-sm-3' style='background-color:$d2[web_color];'>→<input onclick='document.getElementById(\"form\").submit();' type='radio' id='petition' name='petition' value='$d2[petition_id]' $checked >←</div>
70 <div class='col-sm-6' style='background-color:$d2[web_color];'><h2>$d2[petition_name] <br> $field == $pass</h2></div>
71 <div class='col-sm-1' style='background-color:$d2[web_color];'><h2>$d2[eligibleVoterListEnforce]</h2></div>
74 if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
75 $available .= '<script>document.getElementById("form").submit();</script>';
78 // not a eligable voter
80 if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
85 $available .= "<div class='row'>
86 <div class='col-sm-3' style='background-color:$d2[web_color];'>"; if ($d2['eligibleVoterListEnforce'] == 'NO'){ $available .="→<input onclick='document.getElementById(\"form\").submit();' type='radio' id='petition' name='petition' value='$d2[petition_id]' $checked >←"; }else{ $available .= "<h2>Constituents Only</h2>"; } $available .= "</div>
87 <div class='col-sm-6' style='background-color:$d2[web_color];'><h2>$d2[petition_name] <br> $field != $pass ($my_test)</h2></div>
88 <div class='col-sm-1' style='background-color:$d2[web_color];'><h2>$d2[eligibleVoterListEnforce]</h2></div>
90 if($d2['eligibleVoterListEnforce'] == 'NO' && $_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name']) ){
91 $available .= '<script>document.getElementById("form").submit();</script>';
92 }elseif($d2['eligibleVoterListEnforce'] == 'YES' && $_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name']) ){
93 setcookie("invite", ""); // clear invite
94 $available .= '<script>alert("'.$d2[eligibleVoterListWarning
].'");</script>';
99 <script
>document
.title
= "MEPS - Select Petition";</script
>
100 <form method
='POST' action
='petition.php' id
='form'>
102 $q = "select * from website_text where id = '7'";
103 $r = $petition->query($q);
104 $d = mysqli_fetch_array($r);
113 <div
class='col-sm-10' style
='height:100px; text-align:center;'><h1
><?PHP
echo $d['text_title'];?
></h1
><h2
><?PHP
echo $d['text_block'];?
></h2
></div
>
117 <div
class='col-sm-3'><h3
>Pick One
</h3
></div
>
118 <div
class='col-sm-6'><h3
>Petition Name
<br
> Eligible
</h3
></div
>
119 <div
class='col-sm-1'><h3
>Locked
</h3
></div
>
122 <?PHP
echo $available;?
>
125 <div
class='col-sm-10'><button type
="submit" class="btn btn-success btn-lg btn-block"><img
class='click_me' src
="files/click_here.gif">Next
</button
></div
>
128 <div
class='col-sm-10'><button type
="button" class="btn btn-danger btn-lg btn-block" onclick
="window.location.href='reset.php'">Reset
/ Restart
</button
></div
>
133 <?PHP
include_once('footer.php');