X-Git-Url: http://git.hcoop.net/clinton/MarylandElectronicPetitionSignature.git/blobdiff_plain/de92e95d60b96edce70f5a22a1000d406d588b9e..4108c6129a33144d77835efc3c258787dde0a1a7:/petition.php diff --git a/petition.php b/petition.php index 16039de..657e97f 100644 --- a/petition.php +++ b/petition.php @@ -2,10 +2,170 @@ include_once('header.php'); if (isset($_POST['petition'])){ $id = $_POST['petition']; + setcookie("pID", $id); $q = "select * from petitions where petition_id = '$id'"; $r = $petition->query($q); $d = mysqli_fetch_array($r); + //slack_general('OK POST (invite:'.$_COOKIE['invite'].')','md-petition'); +}elseif($_COOKIE['pID'] != ''){ + $id = $_COOKIE['pID']; + $q = "select * from petitions where petition_id = '$id'"; + $r = $petition->query($q); + $d = mysqli_fetch_array($r); + //slack_general('OK COOKIE (invite:'.$_COOKIE['invite'].')','md-petition'); +}else{ + slack_general('MAJOR ERROR (invite:'.$_COOKIE['invite'].')','md-petition'); + header('Location: reset.php'); + die('Error #15'); } +setcookie("pJPG", $d['petition_jpg']); +?> + + + -
'>
- + window.scrollTo(0,document.body.scrollHeight); + $(document).ready(function(){ + window.scrollTo(0,document.body.scrollHeight); + $('#exampleModalLower').modal('show'); + }); + function addTextb() + { + document.getElementById('text2b').innerHTML = document.getElementById('myTextb').value; + var string = document.getElementById('myTextb').value; + var string = string.replace(/ +(?= )/g,''); + var res = string.toUpperCase(); + var res = res.replace(/ +(?= )/g,''); + var result = res.match(//i); + if (result == ""){ + document.getElementById("b2").style.display = "block"; + document.getElementById("b2warn").style.display = "none"; + document.getElementById("click_me2").style.display = "none"; + document.getElementById("form2").submit(); + //alert("Confirmed : " + result); + }else{ + document.getElementById("b2").style.display = "none"; + document.getElementById("b2warn").style.display = "block"; + document.getElementById("click_me2").style.display = "block"; + } + } + + + + + + + + + + + +
+ +
'>
+ +