X-Git-Url: http://git.hcoop.net/clinton/MarylandElectronicPetitionSignature.git/blobdiff_plain/990091571a192810245d072ffbb0f711efb5608d..d46a6dd3be64893e950dc5486a5d7525904bb2af:/eligible.php diff --git a/eligible.php b/eligible.php index dcee458..70dd7c2 100644 --- a/eligible.php +++ b/eligible.php @@ -2,6 +2,7 @@ ob_start(); include_once('header.php'); $head = ob_get_clean(); +$VoterList_table = $_COOKIE['VoterList_table']; $web_first_name = $_COOKIE['web_first_name']; $web_last_name = $_COOKIE['web_last_name']; $web_house_number = $_COOKIE['web_house_number']; @@ -18,7 +19,7 @@ if ($web_first_name != '' && $web_last_name != '' && $web_house_number != '' && // we should NEVER hit this page anymore header('Location: warning_incomplete.php'); } -$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'"; +$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'"; $r = $petition->query($q); $d = mysqli_fetch_array($r); if ($d['VTRID'] != ''){ @@ -48,23 +49,17 @@ echo $head; $available=''; -$q2 = "SELECT * FROM petitions"; +$q2 = "SELECT * FROM petitions where admin_status = 'approved'"; $r2 = $petition->query($q2); while($d2 = mysqli_fetch_array($r2)){ $checked = ''; $field = $d2['eligibleVoterListField']; $pass = $d2['eligibleVoterListEquals']; - /* -if ($d4['id'] > 0){ - $available .= "
"; - }else */ +$my_test = $d[$field]; - if($d[$field] == $pass){ + if($my_test == $pass){ + // good to go $checked = ''; if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){ $checked = 'checked'; @@ -72,15 +67,16 @@ if ($d4['id'] > 0){ $checked = ''; } $available .= "