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