| 1 | <?PHP |
| 2 | include_once('/var/www/secure.php'); |
| 3 | include_once('slack.php'); |
| 4 | $petition_id = $_COOKIE['pID']; |
| 5 | $VTRID = $_COOKIE['pVTRID']; |
| 6 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { |
| 7 | $ip = $_SERVER['HTTP_CLIENT_IP']; |
| 8 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { |
| 9 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
| 10 | } else { |
| 11 | $ip = $_SERVER['REMOTE_ADDR']; |
| 12 | } |
| 13 | $signed_name_as = $petition->real_escape_string($_POST['signed_name_as']); |
| 14 | $date_of_birth = $petition->real_escape_string($_COOKIE['pDOB']); |
| 15 | $signed_name_as_circulator = $petition->real_escape_string($_POST['signed_name_as_circulator']); |
| 16 | $contact_phone = $petition->real_escape_string($_COOKIE['pPHONE']); |
| 17 | $signature_status = $petition->real_escape_string($_COOKIE['signature_status']); |
| 18 | $bot_check = $petition->real_escape_string($_SERVER['HTTP_USER_AGENT']); |
| 19 | |
| 20 | if (isset($_GET['s'])){ |
| 21 | $last = $_GET['s']; |
| 22 | }elseif($_COOKIE['last']){ |
| 23 | $last = $_COOKIE['last']; // fall back on cookie |
| 24 | }else{ |
| 25 | slack_general_admin("last petition cookie or get missing - directing to share",'md-petition-signed'); |
| 26 | header('Location: share.php'); |
| 27 | } |
| 28 | |
| 29 | include_once('header.php'); |
| 30 | $php_session_id = session_id(); |
| 31 | $petition->query("update presign set presign_status = 'SIGNED' where php_session_id = '$php_session_id' and presign_status = 'NEW' "); |
| 32 | $qX = "select * from website_text where id = '9'"; |
| 33 | $rX = $petition->query($qX); |
| 34 | $dX = mysqli_fetch_array($rX); |
| 35 | ?> |
| 36 | <script> |
| 37 | document.title = "MEPS - Petition Signed"; |
| 38 | alert("Petition Signed"); |
| 39 | </script> |
| 40 | <div class='row'> |
| 41 | <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $dX['text_title'];?></h1></div> |
| 42 | </div> |
| 43 | <div class='row'> |
| 44 | <div class='col-sm-10' style='text-align:center;'><h2><?PHP echo $dX['text_block'];?></h2></div> |
| 45 | </div> |
| 46 | <div class='row'> |
| 47 | <div class='col-sm-10' style='text-align:center;'><br><button type="button" class="btn btn-success btn-lg btn-block" onclick="window.open('printer.php?id=<?PHP echo $last;?>')">View and/or Print</button></div> |
| 48 | </div> |
| 49 | <div class='row'> |
| 50 | <div class='col-sm-10' style='text-align:center;'><br><button type="button" class="btn btn-info btn-lg btn-block" onclick="window.location.href='eligible.php'">More Petitions</button></div> |
| 51 | </div> |
| 52 | <div class='row'> |
| 53 | <div class='col-sm-10' style='text-align:center;'><br><button type="button" class="btn btn-danger btn-lg btn-block" onclick="window.location.href='reset.php'">Reset / Restart</button></div> |
| 54 | </div> |
| 55 | <?PHP |
| 56 | include_once('footer.php'); |