Commit | Line | Data |
---|---|---|
d484e8ee PM |
1 | <?PHP |
2 | ob_start(); | |
3 | include_once('header.php'); | |
4 | $head = ob_get_clean(); | |
d484e8ee PM |
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 | |
11 | }else{ | |
12 | header('Location: warning_incomplete.php'); | |
13 | } | |
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'] != ''){ | |
18 | $VTRID = $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']; | |
26 | }else{ | |
27 | header('Location: warning_not_found.php'); | |
28 | } | |
9855180c PM |
29 | echo $head; |
30 | ||
a71cf996 | 31 | |
c47974a8 | 32 | |
a71cf996 | 33 | |
32cc64e6 | 34 | $available=''; |
35eb0502 | 35 | $q2 = "SELECT * FROM petitions"; |
d484e8ee PM |
36 | $r2 = $petition->query($q2); |
37 | while($d2 = mysqli_fetch_array($r2)){ | |
38 | $field = $d2['eligibleVoterListField']; | |
39 | $pass = $d2['eligibleVoterListEquals']; | |
a71cf996 PM |
40 | $q4 = "select * from signatures where VTRID = '$VTRID' and petition_id = '$d2[petition_id]' "; |
41 | $r4 = $petition->query($q4); | |
b49f7f1b | 42 | $d4 = mysqli_fetch_array($r4); |
a71cf996 PM |
43 | if ($d4['id'] > 0){ |
44 | $available .= "<div class='row'> | |
6bd81fdd | 45 | <div class='col-sm-2'><a target='_Blank' href='soft_copy.php?id=$d4[id]'>Already Signed - View</a></div> |
a71cf996 | 46 | <div class='col-sm-6'><del>$d2[petition_name]</del></div> |
852ab3b3 | 47 | <div class='col-sm-4'>$field == $pass</div> |
a71cf996 PM |
48 | </div>"; |
49 | }elseif($d[$field] == $pass){ | |
833c8121 PM |
50 | $available .= "<div class='row'> |
51 | <div class='col-sm-2'><input type='radio' id='petition' name='petition' value='$d2[petition_id]'> </div> | |
cbe0a2ba PM |
52 | <div class='col-sm-6'>$d2[petition_name]</div> |
53 | <div class='col-sm-4'>$field == $pass</div> | |
32cc64e6 | 54 | </div>"; |
cc2fc9be PM |
55 | }else{ |
56 | $available .= "<div class='row'> | |
57 | <div class='col-sm-2'> </div> | |
656ecac3 | 58 | <div class='col-sm-6'><del>$d2[petition_name]</del></div> |
cc2fc9be | 59 | <div class='col-sm-4'>$field != $pass</div> |
e2c1b70c | 60 | </div>"; |
d484e8ee | 61 | } |
d484e8ee | 62 | } |
e2bffda9 | 63 | ?> |
2b1ae240 PM |
64 | <form method='POST' action='petition.php'> |
65 | ||
e2c1b70c | 66 | <div class='row'> |
ca14c503 | 67 | <div class='col-sm-12' style='height:100px; text-align:center;'><h2>Active Petitions and Eligiblity Requirements to Sign.</h2></div> |
e2c1b70c | 68 | </div> |
32cc64e6 | 69 | |
aacea61e PM |
70 | <div class='row'> |
71 | <div class='col-sm-2'><h3>Pick One</h3></div> | |
72 | <div class='col-sm-6'><h3>Petition Name</h3></div> | |
73 | <div class='col-sm-4'><h3>Requirements</h3></div> | |
74 | </div> | |
75 | ||
e2c1b70c | 76 | <?PHP echo $available;?> |
32cc64e6 | 77 | |
4b7a5d37 | 78 | <div class='row'> |
2b1ae240 | 79 | <div class='col-sm-12' style='height:100px; text-align:center;'><button type="submit" class="btn btn-success">Next</button><div> |
e2c1b70c | 80 | </div> |
2b1ae240 PM |
81 | |
82 | </form> | |
91d0a62a PM |
83 | |
84 | <?PHP include_once('footer.php'); |