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