2 include_once('session.php');
3 if (isset($_GET['debug'])){
4 if ($_GET['debug'] == 'on'){
5 setcookie("debug", 'on');
6 header('Location: index.php');
8 if ($_GET['debug'] == 'off'){
9 setcookie("debug", 'off');
10 header('Location: index.php');
13 if (isset($_GET['form_version'])){
14 if ($_GET['form_version'] == '2'){
15 setcookie("form_version", '2');
17 if ($_GET['form_version'] == '3'){
18 setcookie("form_version", '3');
22 if (empty($_COOKIE['start_time'])){
23 setcookie("start_time", time());
27 $time_on_site = $now - $_COOKIE['start_time'];
33 <meta property
="og:url" content
="https://www.md-petition.com/index.php" />
34 <meta property
="og:type" content
="website" />
35 <meta property
="og:title" content
="Maryland Electronic Petition Software" />
36 <meta property
="og:description" content
="Socially Distant Petitions" />
37 <meta property
="fb:app_id" content
="3170466243046869" />
38 <meta property
="og:image" content
="http://www.md-petition.com/files/maryland-flag-graphic.png" />
39 <link rel
="apple-touch-icon" sizes
="180x180" href
="/apple-touch-icon.png">
40 <link rel
="icon" type
="image/png" sizes
="32x32" href
="/favicon-32x32.png">
41 <link rel
="icon" type
="image/png" sizes
="16x16" href
="/favicon-16x16.png">
42 <link rel
="manifest" href
="/site.webmanifest">
45 window
.fbAsyncInit
= function() {
47 appId
: '3170466243046869',
53 FB
.AppEvents
.logPageView();
58 var js
, fjs
= d
.getElementsByTagName(s
)[0];
59 if (d
.getElementById(id
)) {return;}
60 js
= d
.createElement(s
); js
.id
= id
;
61 js
.src
= "https://connect.facebook.net/en_US/sdk.js";
62 fjs
.parentNode
.insertBefore(js
, fjs
);
63 }(document
, 'script', 'facebook-jssdk'));
66 <!-- Global site
tag (gtag
.js
) - Google Analytics
-->
67 <script async src
="https://www.googletagmanager.com/gtag/js?id=UA-165887820-1"></script
>
69 window
.dataLayer
= window
.dataLayer ||
[];
70 function gtag(){dataLayer
.push(arguments
);}
71 gtag('js', new Date());
73 gtag('config', 'UA-165887820-1');
76 include_once('/var/www/secure.php'); //outside webserver
77 presign(); // requires db connection
78 include_once('slack.php');
80 <link rel
="stylesheet" href
="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
81 <script src
="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script
>
82 <script src
="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script
>
83 <title
>MEPS
- Maryland Eletronic Petition Software
</title
>
86 background
-color
: lightblue
;
98 <div
class="container-fluid">
100 if ($_COOKIE['invite'] != ''){
101 $invite = $petition->real_escape_string($_COOKIE['invite']);
102 $q = "select * from petitions where web_short_name = '$invite'";
103 $r = $petition->query($q);
104 $d = mysqli_fetch_array($r);
105 echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h1 style='text-align:center; color:$d[web_color_text]; background-color:$d[web_color];'>$d[petition_name]</h1></div></div>";
106 if ($d['social_phone'] != ''){
107 echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h3 style='text-align:center; color:$d[web_color_text]; background-color:$d[web_color];'>Support: <a style='color:$d[web_color_text];' href='tel:".$d['social_phone']."'>".$d['social_phone']."</a> <a style='color:$d[web_color_text];' href='mailto:".$d['social_email']."'>".$d['social_email']."</a></h3></div></div>";
109 if ($d['social_email'] != '' && $d['social_phone'] == ''){
110 echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h3 style='text-align:center; color:$d[web_color_text]; background-color:$d[web_color];'>Support: <a style='color:$d[web_color_text];' href='mailto:".$d['social_email']."'>".$d['social_email']."</a></h3></div></div>";