Commit | Line | Data |
---|---|---|
f71d99ec | 1 | <?PHP |
83dce4d1 | 2 | include_once('session.php'); |
44f89aba PM |
3 | if (isset($_GET['debug'])){ |
4 | if ($_GET['debug'] == 'on'){ | |
5 | setcookie("debug", 'on'); | |
6 | header('Location: index.php'); | |
7 | } | |
8 | if ($_GET['debug'] == 'off'){ | |
9 | setcookie("debug", 'off'); | |
10 | header('Location: index.php'); | |
11 | } | |
12 | } | |
7ded4afa PM |
13 | if (isset($_GET['form_version'])){ |
14 | if ($_GET['form_version'] == '2'){ | |
15 | setcookie("form_version", '2'); | |
16 | } | |
ba45d7ab PM |
17 | if ($_GET['form_version'] == '3'){ |
18 | setcookie("form_version", '3'); | |
19 | } | |
7ded4afa | 20 | } |
57adae6f PM |
21 | global $time_on_site; |
22 | if (empty($_COOKIE['start_time'])){ | |
23 | setcookie("start_time", time()); | |
24 | $time_on_site = 0; | |
25 | }else{ | |
26 | $now = time(); | |
27 | $time_on_site = $now - $_COOKIE['start_time']; | |
28 | } | |
f71d99ec | 29 | ?> |
4fdccf60 | 30 | <!DOCTYPE html> |
4d0af031 | 31 | <html lang="en"> |
0b056f39 | 32 | <head> |
232497c6 | 33 | <meta property="og:url" content="https://www.md-petition.com/index.php" /> |
3c5a427c PM |
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" /> | |
c862a59f | 37 | <meta property="fb:app_id" content="3170466243046869" /> |
96aabaef | 38 | <meta property="og:image" content="http://www.md-petition.com/files/maryland-flag-graphic.png" /> |
e90b8b6f PM |
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"> | |
f1b402f4 | 43 | <script data-ad-client="ca-pub-2410355655106377" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> |
c862a59f PM |
44 | <script> |
45 | window.fbAsyncInit = function() { | |
46 | FB.init({ | |
47 | appId : '3170466243046869', | |
48 | cookie : true, | |
49 | xfbml : true, | |
50 | version : 'v7.0' | |
51 | }); | |
52 | ||
53 | FB.AppEvents.logPageView(); | |
54 | ||
55 | }; | |
56 | ||
57 | (function(d, s, id){ | |
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')); | |
64 | </script> | |
65 | ||
1264618f | 66 | <!-- Global site tag (gtag.js) - Google Analytics --> |
42328b35 PM |
67 | <script async src="https://www.googletagmanager.com/gtag/js?id=G-TY6C66ZWMX"></script> |
68 | <script> | |
69 | window.dataLayer = window.dataLayer || []; | |
70 | function gtag(){dataLayer.push(arguments);} | |
71 | gtag('js', new Date()); | |
1264618f | 72 | |
42328b35 PM |
73 | gtag('config', 'G-TY6C66ZWMX'); |
74 | </script> | |
4a113be1 PM |
75 | <?PHP |
76 | include_once('/var/www/secure.php'); //outside webserver | |
1c2d76f2 | 77 | presign(); // requires db connection |
4a113be1 PM |
78 | include_once('slack.php'); |
79 | ?> | |
3005470c PM |
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> | |
39e01dd9 | 83 | <title>MEPS - Maryland Eletronic Petition Software</title> |
d1044b70 PM |
84 | <style> |
85 | input:focus { | |
86 | background-color: lightblue; | |
5ecdde8f | 87 | } |
c2db3685 | 88 | .click_me{ |
9311cfc1 PM |
89 | height:50px; |
90 | width:100px; | |
91 | } | |
88928cd6 PM |
92 | .not_me{ |
93 | height:72px; | |
94 | } | |
5ecdde8f | 95 | </style> |
0b056f39 PM |
96 | </head> |
97 | <body> | |
578cb72f | 98 | <div class="container-fluid"> |
d1044b70 | 99 | <?PHP |
4bb337ae | 100 | if ($_COOKIE['invite'] != ''){ |
2fbe37f3 | 101 | $invite = $petition->real_escape_string($_COOKIE['invite']); |
b2a09276 | 102 | $q = "select * from petitions where web_short_name = '$invite'"; |
4bb337ae PM |
103 | $r = $petition->query($q); |
104 | $d = mysqli_fetch_array($r); | |
3518f073 | 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>"; |
2a3e536e | 106 | if ($d['social_phone'] != ''){ |
aea23db0 | 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>"; |
b2a09276 | 108 | } |
bc94efe5 PM |
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>"; | |
111 | } | |
b2a09276 | 112 | } |
4bb337ae | 113 | ?> |