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"; | |
8e6694a5 | 27 | font-size: 40px; |
9545d56d PM |
28 | } |
29 | </style> | |
beb29022 PM |
30 | <?PHP |
31 | if (isset($_POST['signed_name_as'])){ | |
32 | ?> | |
33 | <script> | |
bff61df6 | 34 | window.scrollTo(0,document.body.scrollHeight); |
b3bdd4cc PM |
35 | $(document).ready(function(){ |
36 | window.scrollTo(0,document.body.scrollHeight); | |
37 | $('#exampleModalLower').modal('show'); | |
beb29022 | 38 | }); |
532fd909 | 39 | function addTextb() |
beb29022 | 40 | { |
532fd909 | 41 | document.getElementById('text2b').innerHTML = document.getElementById('myTextb').value; |
beb29022 PM |
42 | } |
43 | </script> | |
44 | <?PHP | |
45 | }else{ | |
46 | ?> | |
56b829ee | 47 | <script> |
3ffbb5c9 PM |
48 | $(document).ready(function(){ |
49 | $('#exampleModalCenter').modal('show'); | |
50 | }); | |
398ca4df PM |
51 | function addText() |
52 | { | |
53 | document.getElementById('text2').innerHTML = document.getElementById('myText').value; | |
54 | } | |
56b829ee | 55 | </script> |
beb29022 PM |
56 | <?PHP |
57 | } | |
58 | ?> | |
162b6ce2 | 59 | |
beb29022 | 60 | <!-- TOP Modal --> |
56b829ee | 61 | <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> |
7f3ed8d1 | 62 | <div class="modal-dialog" role="document"> |
56b829ee PM |
63 | <div class="modal-content"> |
64 | <div class="modal-header"> | |
beb29022 PM |
65 | <h5 class="modal-title" id="exampleModalLongTitle">Type Your Signature to Sign Petition</h5> |
66 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
67 | <span aria-hidden="true">×</span> | |
68 | </button> | |
69 | </div> | |
70 | <form action='petition.php' method='POST'> | |
71 | <div class="modal-body"> | |
cc3c5196 | 72 | <div><?PHP echo $d['petition_sign_text_box'];?></div> |
beb29022 PM |
73 | <input name="signed_name_as" type="text" id="myText" onkeyup="addText()"> |
74 | <div id="text2" class="sig"></div> | |
75 | </div> | |
76 | <div class="modal-footer"> | |
77 | <button type="submit" class="btn btn-primary">Sign and Next</button> | |
78 | </div> | |
79 | </form> | |
80 | </div> | |
81 | </div> | |
82 | </div> | |
83 | ||
f56ddbd7 | 84 | <!-- Lower Modal --> |
beb29022 | 85 | <div class="modal fade" id="exampleModalLower" tabindex="-1" role="dialog" aria-labelledby="exampleModalLowerTitle" aria-hidden="true"> |
7f3ed8d1 | 86 | <div class="modal-dialog modal-dialog-centered" role="document"> |
beb29022 PM |
87 | <div class="modal-content"> |
88 | <div class="modal-header"> | |
4fe6e24f | 89 | <h5 class="modal-title" id="exampleModalLongTitleLower">Type Your Signature to Sign as Circulator</h5> |
56b829ee PM |
90 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
91 | <span aria-hidden="true">×</span> | |
92 | </button> | |
93 | </div> | |
602c0bb1 | 94 | <form action='sign.php' method='POST'><input type='hidden' value='<?PHP echo $_POST['signed_name_as'];?>' name='signed_name_as'> |
dab6c4a9 | 95 | <div class="modal-body"> |
cc3c5196 | 96 | <div><?PHP echo $d['petition_circulator_text_box'];?></div> |
8a393bc1 | 97 | <input name="signed_name_as_circulator" type="text" id="myTextb" onkeyup="addTextb()"> |
532fd909 | 98 | <div id="text2b" class="sig"></div> |
dab6c4a9 PM |
99 | </div> |
100 | <div class="modal-footer"> | |
101 | <button type="submit" class="btn btn-primary">Sign and Submit</button> | |
102 | </div> | |
103 | </form> | |
56b829ee PM |
104 | </div> |
105 | </div> | |
106 | </div> | |
beb29022 | 107 | |
5f7975e1 | 108 | <div class='col-sm-12'><img class="img-responsive" src='hard_copy.php'></div> |
162b6ce2 | 109 | |
162b6ce2 | 110 | |
1fb7899f | 111 | <?PHP include_once('footer.php'); |