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']);
23 <script
>document
.title
= "MEPS - Sign <?PHP echo $d['petition_name'];?>";</script
>
26 font
-family
: "myFirstFont";
27 src
: url("files/Claston Script.ttf");
30 font
-family
: "myFirstFont";
35 if (isset($_POST['signed_name_as'])){
38 window
.scrollTo(0,document
.body
.scrollHeight
);
39 $
(document
).ready(function(){
40 window
.scrollTo(0,document
.body
.scrollHeight
);
41 $
('#exampleModalLower').modal('show');
45 document
.getElementById('text2b').innerHTML
= document
.getElementById('myTextb').value
;
46 var string = document
.getElementById('myTextb').value
;
47 var res
= string.toUpperCase();
48 var result
= res
.match(/<?PHP
echo $_COOKIE['pNAME'];?
>/i
);
49 if (result
== "<?PHP echo $_COOKIE['pNAME'];?>"){
50 document
.getElementById("b2").style
.display
= "block";
51 //alert("Confirmed : " + result);
53 document
.getElementById("b2").style
.display
= "none";
61 $
(document
).ready(function(){
62 $
('#exampleModalCenter').modal('show');
66 document
.getElementById('text2').innerHTML
= document
.getElementById('myText').value
;
67 var string = document
.getElementById('myText').value
;
68 var res
= string.toUpperCase();
69 var result
= res
.match(/<?PHP
echo $_COOKIE['pNAME'];?
>/i
);
70 if (result
== "<?PHP echo $_COOKIE['pNAME'];?>"){
71 document
.getElementById("b1").style
.display
= "block";
72 //alert("Confirmed : " + result);
74 document
.getElementById("b1").style
.display
= "none";
83 <div
class="modal fade" id
="exampleModalCenter" tabindex
="-1" role
="dialog" aria
-labelledby
="exampleModalCenterTitle" aria
-hidden
="true">
84 <div
class="modal-dialog" role
="document">
85 <div
class="modal-content">
86 <div
class="modal-header">
87 <h1
class="modal-title" id
="exampleModalLongTitle">Type Your Signature to Sign
<?PHP
echo $d['petition_name'];?
></h1
>
88 <button type
="button" class="close" data
-dismiss
="modal" aria
-label
="Close">
89 <span aria
-hidden
="true">×
;</span
>
92 <form action
='petition.php' method
='POST'>
93 <div
class="modal-body">
94 <h2
><?PHP
echo $d['petition_sign_text_box'];?
></h2
>
95 <h3
><?PHP
echo $_COOKIE['pNAME'];?
>, Please Sign Here
</h3
>
98 <div
class="modal-footer">
99 <button
<?PHP
if ($d['eligibleVoterSigMatch'] == 'YES' ){ echo "style='display:none;'"; } ?
> id
='b1' name
='b1' type
="submit" class="btn btn-primary btn-lg btn-block">Sign
and Next
</button
>
100 <input
class="form-control input-lg" name
="signed_name_as" type
="text" id
="myText" onkeyup
="addText()" required
>
101 <h1 id
="text2" class="sig"></h1
>
109 <div
class="modal fade" id
="exampleModalLower" tabindex
="-1" role
="dialog" aria
-labelledby
="exampleModalLowerTitle" aria
-hidden
="true">
110 <div
class="modal-dialog modal-dialog-centered" role
="document">
111 <div
class="modal-content">
112 <div
class="modal-header">
113 <h1
class="modal-title" id
="exampleModalLongTitleLower">Type Your Signature to Sign
as Circulator
</h1
>
114 <button type
="button" class="close" data
-dismiss
="modal" aria
-label
="Close">
115 <span aria
-hidden
="true">×
;</span
>
118 <form action
='sign.php' method
='POST'><input type
='hidden' value
='<?PHP echo $_POST['signed_name_as
'];?>' name
='signed_name_as'>
119 <div
class="modal-body">
120 <h2
><?PHP
echo $d['petition_circulator_text_box'];?
></h2
>
121 <h3
><?PHP
echo $_COOKIE['pNAME'];?
>, Please Sign Here
</h3
>
123 <div
class="modal-footer">
124 <h1 id
="text2b" class="sig"></h1
>
125 <button
<?PHP
if ($d['eligibleVoterSigMatch'] == 'YES' ){ echo "style='display:none;'"; } ?
> id
='b2' name
='b2' type
="submit" class="btn btn-primary btn-lg btn-block">Sign
and Submit
</button
>
126 <input
class="form-control input-lg" name
="signed_name_as_circulator" type
="text" id
="myTextb" onkeyup
="addTextb()" required
>
133 <div
class='col-sm-12'><img
class="img-responsive" src
='hard_copy.php'></div
>
137 if(isset($_POST['signed_name_as'])){
138 slack_general('petition.php ('.$d['petition_name'].') ('.$_POST['signed_name_as'].') ('.$_COOKIE['invite'].')','md-petition');
140 slack_general('petition.php ('.$d['petition_name'].') ('.$_COOKIE['invite'].')','md-petition');
142 include_once('footer.php');