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 // ok to check for records
12 header('Location: warning_incomplete.php');
14 $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'";
15 $r = $petition->query($q);
16 $d = mysqli_fetch_array($r);
17 if ($d['VTRID'] != ''){
19 $FIRSTNAME = $d['FIRSTNAME'];
20 $MIDDLENAME = $d['MIDDLENAME'];
21 $LASTNAME = $d['LASTNAME'];
22 $ADDRESS = $d['ADDRESS'];
23 $RESIDENTIALCITY = $d['RESIDENTIALCITY'];
24 $COUNTY = $d['COUNTY'];
25 $RESIDENTIALZIP5 = $d['RESIDENTIALZIP5'];
27 header('Location: warning_not_found.php');
30 if (isset($_GET['remove'])){
31 $id = $_GET['remove'];
32 $q = "update signatures set signature_status = 'removed' where id = '$id'";
34 header('Location: eligible.php');
43 $q2 = "SELECT * FROM petitions";
44 $r2 = $petition->query($q2);
45 while($d2 = mysqli_fetch_array($r2)){
46 $field = $d2['eligibleVoterListField'];
47 $pass = $d2['eligibleVoterListEquals'];
48 $q4 = "select * from signatures where VTRID = '$VTRID' and petition_id = '$d2[petition_id]' and signature_status <> 'removed' )";
49 $r4 = $petition->query($q4);
50 $d4 = mysqli_fetch_array($r4);
52 $available .= "<div class='row'>
53 <div class='col-sm-2'><a target='_Blank' href='soft_copy.php?id=$d4[id]'>Already Signed - View</a> or <a target='_Blank' href='?remove=$d4[id]'>Remove</a></div>
54 <div class='col-sm-6'><del>$d2[petition_name]</del></div>
55 <div class='col-sm-4'>$field == $pass</div>
57 }elseif($d[$field] == $pass){
58 if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
63 $available .= "<div class='row'>
64 <div class='col-sm-2'><input type='radio' id='petition' name='petition' value='$d2[petition_id]' $checked> </div>
65 <div class='col-sm-6'>$d2[petition_name]</div>
66 <div class='col-sm-4'>$field == $pass</div>
68 if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
69 $available .= '<script>document.getElementById("form").submit();</script>';
72 if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
77 $available .= "<div class='row'>
78 <div class='col-sm-2'><input type='radio' id='petition' name='petition' value='$d2[petition_id]' checked > </div>
79 <div class='col-sm-6'><del>$d2[petition_name]</del></div>
80 <div class='col-sm-4'>$field != $pass</div>
82 if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
83 $available .= '<script>document.getElementById("form").submit();</script>';
88 <form method
='POST' action
='petition.php' id
='form'>
91 <div
class='col-sm-12' style
='height:100px; text-align:center;'><h2
>Active Petitions
and Eligiblity Requirements to Sign
.</h2
></div
>
95 <div
class='col-sm-2'><h3
>Pick One
</h3
></div
>
96 <div
class='col-sm-6'><h3
>Petition Name
</h3
></div
>
97 <div
class='col-sm-4'><h3
>Requirements
</h3
></div
>
100 <?PHP
echo $available;?
>
103 <div
class='col-sm-12' style
='height:100px; text-align:center;'><button type
="submit" class="btn btn-success">Next
</button
><div
>
108 <?PHP
include_once('footer.php');