Commit | Line | Data |
---|---|---|
2ed049b9 | 1 | <?PHP |
d305d166 | 2 | include_once('header.php'); |
ee6023c5 | 3 | setcookie("invite", "mgp2021", time()+3600, "/"); // we use this later |
1b157720 PM |
4 | ?> |
5 | <!DOCTYPE html> | |
6 | <html lang="en"> | |
7 | <head> | |
8 | <!-- Global site tag (gtag.js) - Google Analytics --> | |
1696dca6 PM |
9 | <script async src="https://www.googletagmanager.com/gtag/js?id=G-TY6C66ZWMX"></script> |
10 | <script> | |
11 | window.dataLayer = window.dataLayer || []; | |
12 | function gtag(){dataLayer.push(arguments);} | |
13 | gtag('js', new Date()); | |
1b157720 | 14 | |
1696dca6 PM |
15 | gtag('config', 'G-TY6C66ZWMX'); |
16 | </script> | |
1b157720 PM |
17 | <?PHP |
18 | include_once('/var/www/secure.php'); //outside webserver | |
5eb4bb09 | 19 | presign(); // requires db connection |
1b157720 PM |
20 | $q = "select * from petitions where petition_id = '1'"; |
21 | $r = $petition->query($q); | |
22 | $d = mysqli_fetch_array($r); | |
10f8df8c | 23 | include_once('../slack.php'); |
1b157720 | 24 | ?> |
f0273da7 | 25 | <meta property="og:url" content="https://www.md-petition.com/invite/mgp.php" /> |
1b157720 PM |
26 | <meta property="og:type" content="website" /> |
27 | <meta property="og:title" content="<?PHP echo $d['tab_name'];?>" /> | |
28 | <meta property="og:description" content="Maryland Electronic Petition Software - Socially Distant Petitions" /> | |
f0273da7 | 29 | <meta property="og:image" content="https://www.md-petition.com/files/MDGREENS_FB_SHARE.PNG" /> |
1b157720 PM |
30 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> |
31 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
32 | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> | |
33 | <title><?PHP echo $d['tab_name'];?></title> | |
34 | </head> | |
10f8df8c | 35 | <body style='background-color:<?PHP echo $d['web_color'];?>;'> |
1b157720 PM |
36 | <div class="container-fluid"> |
37 | <?PHP | |
2ed049b9 | 38 | slack_general('MGP Home Page Loaded ('.$_COOKIE['invite'].')','md-petition'); |
2ed049b9 | 39 | ?> |
5019f09a | 40 | |
6f0037a3 | 41 | <div class='row'> |
42493ce6 | 42 | <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $d['text_title'];?></h1><h2 style='text-align:left;'><?PHP echo $d['text_block'];?></h2></div> |
5019f09a | 43 | </div> |
3b07e50a PM |
44 | <div class='row'> |
45 | <div class='col-sm-10' style='text-align:center;'><h3>If you need assistance, please contact:</h3></div> | |
46 | </div> | |
31e31d14 PM |
47 | <style> |
48 | .social { font-size: large; font-weight:bold; } | |
49 | </style> | |
6f0037a3 PM |
50 | <?PHP if ($d['social_phone'] != ''){ ?> |
51 | <div class='row'> | |
31e31d14 | 52 | <div class='col-sm-5 social' style='text-align:right;'>Phone</div> |
b41d4efb | 53 | <div class='col-sm-5 social' style='text-align:left;'><a href='tel:<?PHP echo $d['social_phone'];?>'><?PHP echo $d['social_phone'];?></a></div> |
6f0037a3 PM |
54 | </div> |
55 | <?PHP } ?> | |
56 | <?PHP if ($d['social_email'] != ''){ ?> | |
57 | <div class='row'> | |
31e31d14 | 58 | <div class='col-sm-5 social' style='text-align:right;'>E-Mail</div> |
b41d4efb | 59 | <div class='col-sm-5 social' style='text-align:left;'><a href='mailto:<?PHP echo $d['social_email'];?>'><?PHP echo $d['social_email'];?></a></div> |
6f0037a3 PM |
60 | </div> |
61 | <?PHP } ?> | |
62 | <?PHP if ($d['social_website'] != ''){ ?> | |
63 | <div class='row'> | |
31e31d14 | 64 | <div class='col-sm-5 social' style='text-align:right;'>Website</div> |
b41d4efb | 65 | <div class='col-sm-5 social' style='text-align:left;'><a href='<?PHP echo $d['social_website'];?>'><?PHP echo $d['social_website'];?></a></div> |
6f0037a3 PM |
66 | </div> |
67 | <?PHP } ?> | |
68 | <?PHP if ($d['social_facebook'] != ''){ ?> | |
69 | <div class='row'> | |
31e31d14 PM |
70 | <div class='col-sm-5 social' style='text-align:right;'>Facebook</div> |
71 | <div class='col-sm-5 social' style='text-align:left;'><?PHP echo $d['social_facebook'];?></div> | |
6f0037a3 PM |
72 | </div> |
73 | <?PHP } ?> | |
74 | <?PHP if ($d['social_twitter'] != ''){ ?> | |
75 | <div class='row'> | |
31e31d14 PM |
76 | <div class='col-sm-5 social' style='text-align:right;'>Twitter</div> |
77 | <div class='col-sm-5 social' style='text-align:left;'><?PHP echo $d['social_twitter'];?></div> | |
6f0037a3 PM |
78 | </div> |
79 | <?PHP } ?> | |
2ed049b9 | 80 | <div class='row'> |
934db117 | 81 | <div class='col-sm-10' style='text-align:center;'><button type="button" class="btn btn-success btn-lg btn-block" onclick="window.location.href='../enter_information.php'"><img alt='Click here to continue' class='click_me' src="../files/click_here.gif"> CLICK HERE TO BEGIN - SIGN <?PHP echo $d['petition_name'];?></button></div> |
2ed049b9 | 82 | </div> |
10f8df8c PM |
83 | |
84 | <div class='row'> | |
85 | <div class='col-sm-10' style='text-align:center;'> <img class="img-responsive" alt="<?PHP echo $d['text_title'];?>" src="<?PHP echo $d['logo_url'];?>"></div> | |
86 | </div> | |
87 | ||
2ed049b9 PM |
88 | <div id="fb-root"></div> |
89 | <script>(function(d, s, id) { | |
90 | var js, fjs = d.getElementsByTagName(s)[0]; | |
91 | if (d.getElementById(id)) return; | |
92 | js = d.createElement(s); js.id = id; | |
93 | js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0"; | |
94 | fjs.parentNode.insertBefore(js, fjs); | |
95 | }(document, 'script', 'facebook-jssdk'));</script> | |
96 | ||
981ace52 PM |
97 | <script>window.twttr = (function(d, s, id) { |
98 | var js, fjs = d.getElementsByTagName(s)[0], | |
99 | t = window.twttr || {}; | |
100 | if (d.getElementById(id)) return t; | |
101 | js = d.createElement(s); | |
102 | js.id = id; | |
103 | js.src = "https://platform.twitter.com/widgets.js"; | |
104 | fjs.parentNode.insertBefore(js, fjs); | |
105 | ||
106 | t._e = []; | |
107 | t.ready = function(f) { | |
108 | t._e.push(f); | |
109 | }; | |
110 | ||
111 | return t; | |
112 | }(document, "script", "twitter-wjs"));</script> | |
c441ee62 PM |
113 | <script> |
114 | function myFunction(short_code) { | |
115 | /* Get the text field */ | |
116 | var copyText = document.getElementById(short_code); | |
117 | ||
118 | /* Select the text field */ | |
119 | copyText.select(); | |
120 | copyText.setSelectionRange(0, 99999); /*For mobile devices*/ | |
121 | ||
122 | /* Copy the text inside the text field */ | |
123 | document.execCommand("copy"); | |
124 | ||
125 | /* Alert the copied text */ | |
126 | alert("Copied the Link: " + copyText.value); | |
127 | } | |
128 | </script> | |
129 | ||
2ed049b9 PM |
130 | <center> |
131 | <table border="1" cellpadding="2" cellspacing="0"> | |
883db287 | 132 | <tr> |
959ce6a9 | 133 | <td><div class="fb-share-button" |
1bab9531 | 134 | data-href="https://www.md-petition.com/invite/mgp.php" |
959ce6a9 | 135 | data-layout="box_count" data-size="large"> |
2ed049b9 | 136 | </div></td> |
44bf71d3 | 137 | <td> |
29690029 PM |
138 | <a class="twitter-share-button" |
139 | href="https://twitter.com/intent/tweet" | |
140 | data-size="large" | |
636cb88b | 141 | data-text="Can you spare a minute to sign <?PHP echo $d['petition_name'];?>" |
29690029 | 142 | data-url="https://www.md-petition.com/invite/mgp.php"> |
44bf71d3 | 143 | Tweet</a></td> |
883db287 | 144 | <td><input type='text' size='50' value='http://md-petition.com/invite/mgp.php' id='mgp'><button onclick='myFunction("mgp")'>Copy Link</button></td> |
f0273da7 | 145 | <td><a href='../printable_qr_code.php?short=<?PHP echo $d['web_short_name'];?>'><img src='https://www.md-petition.com/qrcode.php?s=qrl&d=https://www.md-petition.com/invite/mgp.php'></a></td> |
883db287 | 146 | </tr> |
2ed049b9 PM |
147 | </table> |
148 | </center> | |
149 | ||
150 | ||
151 | ||
152 | <?PHP | |
153 | $copy = '© 2020 Patrick McGuire'; | |
2ed049b9 PM |
154 | ?> |
155 | <div class='row'> | |
156 | <div class='col-sm-10' style='text-align:center;'><?PHP echo $copy;?></div> | |
157 | </div> | |
557d2041 PM |
158 | |
159 | <div class='row'> | |
160 | <div class='col-sm-10' style='text-align:center;'> | |
161 | <?PHP if($_COOKIE['debug'] == 'on'){ ?> | |
162 | <pre><?PHP print_r($_GET); ?></pre> | |
163 | <pre><?PHP print_r($_POST); ?></pre> | |
164 | <pre><?PHP print_r($_COOKIE); ?></pre> | |
165 | <?PHP } ?> | |
166 | </div> | |
167 | </div> | |
168 |