2 include_once('header.php');
3 if (isset($_POST['petition'])){
4 $id = $_POST['petition'];
6 $q = "select * from petitions where petition_id = '$id'";
7 $r = $petition->query($q);
8 $d = mysqli_fetch_array($r);
9 slack_general('OK POST: petition.php ('.$_COOKIE['invite'].')','md-petition');
10 }elseif($_COOKIE['pID'] != ''){
11 $id = $_COOKIE['pID'];
12 $q = "select * from petitions where petition_id = '$id'";
13 $r = $petition->query($q);
14 $d = mysqli_fetch_array($r);
15 slack_general('OK COOKIE: petition.php ('.$_COOKIE['invite'].')','md-petition');
17 slack_general('MAJOR ERROR: petition.php ('.$_COOKIE['invite'].')','md-petition');
18 header('Location: reset.php');
21 setcookie("pJPG", $d['petition_jpg']);
24 document
.title
= "MEPS - Sign <?PHP echo $d['petition_name'];?>";
25 $
(document
).ready(function() {
26 $
('#myText').keypress(function(event
){
27 if (event
.keyCode
== 10 || event
.keyCode
== 13)
28 event
.preventDefault();
30 $
('#myTextb').keypress(function(event
){
31 if (event
.keyCode
== 10 || event
.keyCode
== 13)
32 event
.preventDefault();
38 font
-family
: "myFirstFont";
39 src
: url("files/Claston Script.ttf");
42 font
-family
: "myFirstFont";
47 if (isset($_POST['signed_name_as'])){
50 window
.scrollTo(0,document
.body
.scrollHeight
);
51 $
(document
).ready(function(){
52 window
.scrollTo(0,document
.body
.scrollHeight
);
53 $
('#exampleModalLower').modal('show');
57 document
.getElementById('text2b').innerHTML
= document
.getElementById('myTextb').value
;
58 var string = document
.getElementById('myTextb').value
;
59 var res
= string.toUpperCase();
60 var result
= res
.match(/<?PHP
echo $_COOKIE['pNAME'];?
>/i
);
61 if (result
== "<?PHP echo $_COOKIE['pNAME'];?>"){
62 document
.getElementById("b2").style
.display
= "block";
63 document
.getElementById("b2warn").style
.display
= "none";
64 //alert("Confirmed : " + result);
66 document
.getElementById("b2").style
.display
= "none";
67 document
.getElementById("b2warn").style
.display
= "block";
75 $
(document
).ready(function(){
76 $
('#exampleModalCenter').modal('show');
80 document
.getElementById('text2').innerHTML
= document
.getElementById('myText').value
;
81 var string = document
.getElementById('myText').value
;
82 var res
= string.toUpperCase();
83 var result
= res
.match(/<?PHP
echo $_COOKIE['pNAME'];?
>/i
);
84 if (result
== "<?PHP echo $_COOKIE['pNAME'];?>"){
85 document
.getElementById("b1").style
.display
= "block";
86 document
.getElementById("b1warn").style
.display
= "none";
87 //alert("Confirmed : " + result);
89 document
.getElementById("b1").style
.display
= "none";
90 document
.getElementById("b1warn").style
.display
= "block";
99 <div
class="modal fade" id
="exampleModalCenter" tabindex
="-1" role
="dialog" aria
-labelledby
="exampleModalCenterTitle" aria
-hidden
="true">
100 <div
class="modal-dialog" role
="document">
101 <div
class="modal-content">
102 <div
class="modal-header">
103 <h1
class="modal-title" id
="exampleModalLongTitle">Type Your Signature to Sign
<?PHP
echo $d['petition_name'];?
></h1
>
104 <button type
="button" class="close" data
-dismiss
="modal" aria
-label
="Close">
105 <span aria
-hidden
="true">×
;</span
>
108 <form action
='petition.php' method
='POST'>
109 <div
class="modal-body">
110 <h2
><?PHP
echo $d['petition_sign_text_box'];?
></h2
>
111 <h3
><?PHP
echo $_COOKIE['pNAME'];?
>, Please Sign Here
</h3
>
114 <div
class="modal-footer">
115 <h1 id
="text2" class="sig"></h1
>
116 <button style
='display:none;' id
='b1' name
='b1' type
="submit" class="btn btn-primary btn-lg btn-block">Sign
and Next
</button
>
117 <button style
='display:block;' id
='b1warn' name
='b1warn' class="btn btn-warning btn-lg btn-block disabled" onclick
="alert('Please Type Your Name Exactly as Above');">Please Type Your Name Exactly
as Above
</button
>
118 <input
class="form-control input-lg" name
="signed_name_as" type
="text" id
="myText" onkeyup
="addText()" required autofocus
>
126 <div
class="modal fade" id
="exampleModalLower" tabindex
="-1" role
="dialog" aria
-labelledby
="exampleModalLowerTitle" aria
-hidden
="true">
127 <div
class="modal-dialog modal-dialog-centered" role
="document">
128 <div
class="modal-content">
129 <div
class="modal-header">
130 <h1
class="modal-title" id
="exampleModalLongTitleLower">Type Your Signature to Sign
as Circulator
</h1
>
131 <button type
="button" class="close" data
-dismiss
="modal" aria
-label
="Close">
132 <span aria
-hidden
="true">×
;</span
>
135 <form action
='sign.php' method
='POST'><input type
='hidden' value
='<?PHP echo $_POST['signed_name_as
'];?>' name
='signed_name_as'>
136 <div
class="modal-body">
137 <h2
><?PHP
echo $d['petition_circulator_text_box'];?
></h2
>
138 <h3
><?PHP
echo $_COOKIE['pNAME'];?
>, Please Sign Here
</h3
>
140 <div
class="modal-footer">
141 <h1 id
="text2b" class="sig"></h1
>
142 <button style
='display:none;' id
='b2' name
='b2' type
="submit" class="btn btn-primary btn-lg btn-block">Sign
and Submit
</button
>
143 <button style
='display:block;' id
='b2warn' name
='b1warn' class="btn btn-warning btn-lg btn-block disabled" onclick
="alert('Please Type Your Name Exactly as Above');">Please Type Your Name Exactly
as Above
</button
>
144 <input
class="form-control input-lg" name
="signed_name_as_circulator" type
="text" id
="myTextb" onkeyup
="addTextb()" required autofocus
>
151 <div
class='col-sm-12'><img
class="img-responsive" src
='hard_copy.php'></div
>
155 if(isset($_POST['signed_name_as'])){
156 slack_general('petition.php ('.$d['petition_name'].') ('.$_POST['signed_name_as'].') ('.$_COOKIE['invite'].')','md-petition');
158 slack_general('petition.php ('.$d['petition_name'].') ('.$_COOKIE['invite'].')','md-petition');
160 include_once('footer.php');