| 1 | <?PHP |
| 2 | include_once('/var/www/secure.php'); |
| 3 | $petition_id = $_COOKIE['pID']; |
| 4 | $VTRID = $_COOKIE['pVTRID']; |
| 5 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { |
| 6 | $ip = $_SERVER['HTTP_CLIENT_IP']; |
| 7 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { |
| 8 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
| 9 | } else { |
| 10 | $ip = $_SERVER['REMOTE_ADDR']; |
| 11 | } |
| 12 | $signed_name_as = $petition->real_escape_string($_POST['signed_name_as']); |
| 13 | $date_of_birth = $petition->real_escape_string($_COOKIE['pDOB']); |
| 14 | $signed_name_as_circulator = $petition->real_escape_string($_POST['signed_name_as_circulator']); |
| 15 | $contact_phone = $petition->real_escape_string($_COOKIE['pPHONE']); |
| 16 | $signature_status = $petition->real_escape_string($_COOKIE['signature_status']); |
| 17 | |
| 18 | $petition->query("insert into signatures (VTRID,ip_address,date_of_birth,date_time_signed,petition_id,signed_name_as,signed_name_as_circulator,contact_phone,signature_status) values ('$VTRID','$ip','$date_of_birth',NOW(),'$petition_id','$signed_name_as','$signed_name_as_circulator','$contact_phone','$signature_status')") or die(mysqli_error($petition)); |
| 19 | $last = $petition->insert_id; |
| 20 | setcookie("invite_used", $_COOKIE['invite']); |
| 21 | setcookie("invite", ""); // clear invite |
| 22 | //header('Location: eligible.php'); |
| 23 | include_once('header.php'); |
| 24 | slack_general('Warning Not Found ('.$_COOKIE['invite'].')','md-petition'); |
| 25 | $qX = "select * from website_text where id = '5'"; |
| 26 | $rX = $petition->query($qX); |
| 27 | $dX = mysqli_fetch_array($rX); |
| 28 | ?> |
| 29 | <script>document.title = "MEPS - Petition Signed";</script> |
| 30 | <div class='row'> |
| 31 | <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $dX['text_title'];?></h1></div> |
| 32 | </div> |
| 33 | <div class='row'> |
| 34 | <div class='col-sm-10' style='text-align:center;'><h2><?PHP echo $dX['text_block'];?></h2></div> |
| 35 | </div> |
| 36 | <div class='row'> |
| 37 | <div class='col-sm-10' style='text-align:center;'><button type="button" class="btn btn-success btn-lg btn-block" onclick="window.open('soft_copy.php?id=<?PHP echo $last;?>')">View and/or Print</button></div> |
| 38 | </div> |
| 39 | <div class='row'> |
| 40 | <div class='col-sm-10' style='text-align:center;'><button type="button" class="btn btn-info btn-lg btn-block" onclick="window.location.href='elegible.php'">More Petitions</button></div> |
| 41 | </div> |
| 42 | <div class='row'> |
| 43 | <div class='col-sm-10' style='text-align:center;'><button type="button" class="btn btn-danger btn-lg btn-block" onclick="window.location.href='reset.php'">Reset / Restart</button></div> |
| 44 | </div> |
| 45 | <?PHP |
| 46 | include_once('footer.php'); |