Commit | Line | Data |
---|---|---|
de92e95d PM |
1 | <?PHP |
2 | include_once('header.php'); | |
3 | if (isset($_POST['petition'])){ | |
4 | $id = $_POST['petition']; | |
70e2de61 | 5 | setcookie("pID", $id); |
de92e95d PM |
6 | $q = "select * from petitions where petition_id = '$id'"; |
7 | $r = $petition->query($q); | |
8 | $d = mysqli_fetch_array($r); | |
beb29022 PM |
9 | }elseif($_COOKIE['pID'] != ''){ |
10 | $id = $_COOKIE['pID']; | |
11 | $q = "select * from petitions where petition_id = '$id'"; | |
12 | $r = $petition->query($q); | |
13 | $d = mysqli_fetch_array($r); | |
14 | }else{ | |
15 | die('Error #15'); | |
de92e95d | 16 | } |
58e477ae | 17 | setcookie("pJPG", $d['petition_jpg']); |
de92e95d | 18 | ?> |
7bfba107 | 19 | <script>document.title = "MEPS - Sign <?PHP echo $d['petition_name'];?>";</script> |
9545d56d PM |
20 | <style> |
21 | @font-face { | |
22 | font-family: "myFirstFont"; | |
32286a4c | 23 | src: url("files/Claston Script.ttf"); |
9545d56d PM |
24 | } |
25 | .sig { | |
26 | font-family: "myFirstFont"; | |
27 | } | |
28 | </style> | |
beb29022 PM |
29 | <?PHP |
30 | if (isset($_POST['signed_name_as'])){ | |
31 | ?> | |
32 | <script> | |
bff61df6 | 33 | window.scrollTo(0,document.body.scrollHeight); |
b3bdd4cc PM |
34 | $(document).ready(function(){ |
35 | window.scrollTo(0,document.body.scrollHeight); | |
36 | $('#exampleModalLower').modal('show'); | |
beb29022 | 37 | }); |
532fd909 | 38 | function addTextb() |
beb29022 | 39 | { |
532fd909 | 40 | document.getElementById('text2b').innerHTML = document.getElementById('myTextb').value; |
beb29022 PM |
41 | } |
42 | </script> | |
43 | <?PHP | |
44 | }else{ | |
45 | ?> | |
56b829ee | 46 | <script> |
3ffbb5c9 PM |
47 | $(document).ready(function(){ |
48 | $('#exampleModalCenter').modal('show'); | |
49 | }); | |
398ca4df PM |
50 | function addText() |
51 | { | |
52 | document.getElementById('text2').innerHTML = document.getElementById('myText').value; | |
53 | } | |
56b829ee | 54 | </script> |
beb29022 PM |
55 | <?PHP |
56 | } | |
57 | ?> | |
162b6ce2 | 58 | |
beb29022 | 59 | <!-- TOP Modal --> |
56b829ee | 60 | <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> |
7f3ed8d1 | 61 | <div class="modal-dialog" role="document"> |
56b829ee PM |
62 | <div class="modal-content"> |
63 | <div class="modal-header"> | |
9632553d | 64 | <h1 class="modal-title" id="exampleModalLongTitle">Type Your Signature to Sign <?PHP echo $d['petition_name'];?></h1> |
beb29022 PM |
65 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
66 | <span aria-hidden="true">×</span> | |
67 | </button> | |
68 | </div> | |
69 | <form action='petition.php' method='POST'> | |
70 | <div class="modal-body"> | |
9632553d PM |
71 | <h2><?PHP echo $d['petition_sign_text_box'];?></h2> |
72 | <input class="form-control input-lg" name="signed_name_as" type="text" id="myText" onkeyup="addText()" required> | |
c1659cb2 | 73 | <h1 id="text2" class="sig"></h1> |
beb29022 PM |
74 | </div> |
75 | <div class="modal-footer"> | |
9632553d | 76 | <button type="submit" class="btn btn-primary btn-lg btn-block">Sign and Next</button> |
beb29022 PM |
77 | </div> |
78 | </form> | |
79 | </div> | |
80 | </div> | |
81 | </div> | |
82 | ||
f56ddbd7 | 83 | <!-- Lower Modal --> |
beb29022 | 84 | <div class="modal fade" id="exampleModalLower" tabindex="-1" role="dialog" aria-labelledby="exampleModalLowerTitle" aria-hidden="true"> |
7f3ed8d1 | 85 | <div class="modal-dialog modal-dialog-centered" role="document"> |
beb29022 PM |
86 | <div class="modal-content"> |
87 | <div class="modal-header"> | |
9632553d | 88 | <h1 class="modal-title" id="exampleModalLongTitleLower">Type Your Signature to Sign as Circulator</h1> |
56b829ee PM |
89 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
90 | <span aria-hidden="true">×</span> | |
91 | </button> | |
92 | </div> | |
602c0bb1 | 93 | <form action='sign.php' method='POST'><input type='hidden' value='<?PHP echo $_POST['signed_name_as'];?>' name='signed_name_as'> |
dab6c4a9 | 94 | <div class="modal-body"> |
9632553d PM |
95 | <h2><?PHP echo $d['petition_circulator_text_box'];?></h2> |
96 | <input class="form-control input-lg" name="signed_name_as_circulator" type="text" id="myTextb" onkeyup="addTextb()" required> | |
c1659cb2 | 97 | <h1 id="text2b" class="sig"></h1> |
dab6c4a9 PM |
98 | </div> |
99 | <div class="modal-footer"> | |
9632553d | 100 | <button type="submit" class="btn btn-primary btn-lg btn-block">Sign and Submit</button> |
dab6c4a9 PM |
101 | </div> |
102 | </form> | |
56b829ee PM |
103 | </div> |
104 | </div> | |
105 | </div> | |
beb29022 | 106 | |
5f7975e1 | 107 | <div class='col-sm-12'><img class="img-responsive" src='hard_copy.php'></div> |
162b6ce2 | 108 | |
162b6ce2 | 109 | |
1fb7899f | 110 | <?PHP include_once('footer.php'); |