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