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 | } | |
57adae6f PM |
13 | global $time_on_site; |
14 | if (empty($_COOKIE['start_time'])){ | |
15 | setcookie("start_time", time()); | |
16 | $time_on_site = 0; | |
17 | }else{ | |
18 | $now = time(); | |
19 | $time_on_site = $now - $_COOKIE['start_time']; | |
20 | } | |
f71d99ec | 21 | ?> |
4fdccf60 | 22 | <!DOCTYPE html> |
4d0af031 | 23 | <html lang="en"> |
0b056f39 | 24 | <head> |
232497c6 | 25 | <meta property="og:url" content="https://www.md-petition.com/index.php" /> |
3c5a427c PM |
26 | <meta property="og:type" content="website" /> |
27 | <meta property="og:title" content="Maryland Electronic Petition Software" /> | |
28 | <meta property="og:description" content="Socially Distant Petitions" /> | |
c862a59f | 29 | <meta property="fb:app_id" content="3170466243046869" /> |
96aabaef | 30 | <meta property="og:image" content="http://www.md-petition.com/files/maryland-flag-graphic.png" /> |
e90b8b6f PM |
31 | <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> |
32 | <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> | |
33 | <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> | |
34 | <link rel="manifest" href="/site.webmanifest"> | |
c862a59f PM |
35 | |
36 | <script> | |
37 | window.fbAsyncInit = function() { | |
38 | FB.init({ | |
39 | appId : '3170466243046869', | |
40 | cookie : true, | |
41 | xfbml : true, | |
42 | version : 'v7.0' | |
43 | }); | |
44 | ||
45 | FB.AppEvents.logPageView(); | |
46 | ||
47 | }; | |
48 | ||
49 | (function(d, s, id){ | |
50 | var js, fjs = d.getElementsByTagName(s)[0]; | |
51 | if (d.getElementById(id)) {return;} | |
52 | js = d.createElement(s); js.id = id; | |
53 | js.src = "https://connect.facebook.net/en_US/sdk.js"; | |
54 | fjs.parentNode.insertBefore(js, fjs); | |
55 | }(document, 'script', 'facebook-jssdk')); | |
56 | </script> | |
57 | ||
1264618f PM |
58 | <!-- Global site tag (gtag.js) - Google Analytics --> |
59 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-165887820-1"></script> | |
60 | <script> | |
61 | window.dataLayer = window.dataLayer || []; | |
62 | function gtag(){dataLayer.push(arguments);} | |
63 | gtag('js', new Date()); | |
64 | ||
65 | gtag('config', 'UA-165887820-1'); | |
66 | </script> | |
4a113be1 PM |
67 | <?PHP |
68 | include_once('/var/www/secure.php'); //outside webserver | |
1c2d76f2 | 69 | presign(); // requires db connection |
4a113be1 PM |
70 | include_once('slack.php'); |
71 | ?> | |
3005470c PM |
72 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> |
73 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
74 | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> | |
39e01dd9 | 75 | <title>MEPS - Maryland Eletronic Petition Software</title> |
d1044b70 PM |
76 | <style> |
77 | input:focus { | |
78 | background-color: lightblue; | |
5ecdde8f | 79 | } |
c2db3685 | 80 | .click_me{ |
9311cfc1 PM |
81 | height:50px; |
82 | width:100px; | |
83 | } | |
88928cd6 PM |
84 | .not_me{ |
85 | height:72px; | |
86 | } | |
5ecdde8f | 87 | </style> |
0b056f39 PM |
88 | </head> |
89 | <body> | |
578cb72f | 90 | <div class="container-fluid"> |
d1044b70 | 91 | <?PHP |
4bb337ae | 92 | if ($_COOKIE['invite'] != ''){ |
2fbe37f3 | 93 | $invite = $petition->real_escape_string($_COOKIE['invite']); |
b2a09276 | 94 | $q = "select * from petitions where web_short_name = '$invite'"; |
4bb337ae PM |
95 | $r = $petition->query($q); |
96 | $d = mysqli_fetch_array($r); | |
3518f073 | 97 | 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 | 98 | if ($d['social_phone'] != ''){ |
aea23db0 | 99 | 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 | 100 | } |
bc94efe5 PM |
101 | if ($d['social_email'] != '' && $d['social_phone'] == ''){ |
102 | 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>"; | |
103 | } | |
b2a09276 | 104 | } |
4bb337ae | 105 | ?> |