Commit | Line | Data |
---|---|---|
e3df826e PM |
1 | <?PHP |
2 | include_once('header.php'); | |
3 | setcookie("invite", "mlp", time()+3600, "/"); // we use this later | |
4 | ?> | |
5 | <!DOCTYPE html> | |
6 | <html lang="en"> | |
7 | <head> | |
8 | <!-- Global site tag (gtag.js) - Google Analytics --> | |
9 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-165887820-1"></script> | |
10 | <script> | |
11 | window.dataLayer = window.dataLayer || []; | |
12 | function gtag(){dataLayer.push(arguments);} | |
13 | gtag('js', new Date()); | |
14 | ||
15 | gtag('config', 'UA-165887820-1'); | |
16 | </script> | |
17 | <?PHP | |
18 | include_once('/var/www/secure.php'); //outside webserver | |
19 | presign(); // requires db connection | |
20 | $q = "select * from petitions where petition_id = '2'"; | |
21 | $r = $petition->query($q); | |
22 | $d = mysqli_fetch_array($r); | |
23 | include_once('../slack.php'); | |
24 | ?> | |
25 | <meta property="og:url" content="https://www.md-petition.com/invite/LPMD.php" /> | |
26 | <meta property="og:type" content="website" /> | |
27 | <meta property="og:title" content="Libertarian Party of Maryland" /> | |
28 | <meta property="og:description" content="Calling all Maryland Registered Voters!" /> | |
29 | <meta property="og:image" content="https://lpmaryland.org/wp-content/uploads/2014/03/lpmd_logo_v2.png" /> | |
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>Libertarian Party of Maryland</title> | |
34 | </head> | |
35 | <body style='background-color:<?PHP echo $d['web_color'];?>;'> | |
36 | <div class="container-fluid"> | |
37 | <?PHP | |
38 | slack_general('MLP Home Page Loaded ('.$_COOKIE['invite'].')','md-petition'); | |
39 | ?> | |
5e822946 PM |
40 | <style> |
41 | body { color: <?PHP echo $d['web_color_text'];?>; } | |
e0effe3d | 42 | a { color: <?PHP echo $d['web_color_text'];?>; } |
7573aa10 | 43 | .rev-button { color: <?PHP echo $d['web_color'];?>; background-color: <?PHP echo $d['web_color_text'];?>; } |
5e822946 | 44 | </style> |
e3df826e | 45 | <div class='row'> |
cadf1105 PM |
46 | <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $d['text_title'];?></h1><img class="rounded float-right" alt="<?PHP echo $d['text_title'];?>" src="<?PHP echo $d['logo_url'];?>"><h2 style='text-align:left;'><?PHP echo $d['text_block'];?></h2></div> |
47 | ||
2d546cf5 | 48 | </div> |
e3df826e | 49 | <div class='row'> |
2d546cf5 PM |
50 | <div class='col-sm-10' style='text-align:center;'><h3>If you need assistance, please contact:</h3></div> |
51 | </div> | |
e3df826e PM |
52 | <style> |
53 | .social { font-size: large; font-weight:bold; } | |
54 | </style> | |
55 | <?PHP if ($d['social_phone'] != ''){ ?> | |
56 | <div class='row'> | |
57 | <div class='col-sm-5 social' style='text-align:right;'>Phone</div> | |
58 | <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> | |
59 | </div> | |
60 | <?PHP } ?> | |
61 | <?PHP if ($d['social_email'] != ''){ ?> | |
62 | <div class='row'> | |
63 | <div class='col-sm-5 social' style='text-align:right;'>E-Mail</div> | |
64 | <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> | |
65 | </div> | |
66 | <?PHP } ?> | |
67 | <?PHP if ($d['social_website'] != ''){ ?> | |
68 | <div class='row'> | |
69 | <div class='col-sm-5 social' style='text-align:right;'>Website</div> | |
943b2c74 | 70 | <div class='col-sm-5 social' style='text-align:left;'><a target='_Blank' href='<?PHP echo $d['social_website'];?>'><?PHP echo $d['social_website'];?></a></div> |
e3df826e PM |
71 | </div> |
72 | <?PHP } ?> | |
73 | <?PHP if ($d['social_facebook'] != ''){ ?> | |
74 | <div class='row'> | |
75 | <div class='col-sm-5 social' style='text-align:right;'>Facebook</div> | |
943b2c74 | 76 | <div class='col-sm-5 social' style='text-align:left;'><a target='_Blank' href='<?PHP echo $d['social_facebook'];?>'><?PHP echo $d['social_facebook'];?></a></div> |
e3df826e PM |
77 | </div> |
78 | <?PHP } ?> | |
79 | <?PHP if ($d['social_twitter'] != ''){ ?> | |
80 | <div class='row'> | |
81 | <div class='col-sm-5 social' style='text-align:right;'>Twitter</div> | |
943b2c74 | 82 | <div class='col-sm-5 social' style='text-align:left;'><a target='_Blank' href='<?PHP echo $d['social_twitter'];?>'><?PHP echo $d['social_twitter'];?></a></div> |
e3df826e PM |
83 | </div> |
84 | <?PHP } ?> | |
85 | <div class='row'> | |
7573aa10 | 86 | <div class='col-sm-10' style='text-align:center;'><button type="button" class="btn btn-success btn-lg btn-block rev-button" 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> |
e3df826e | 87 | </div> |
577c0195 | 88 | |
e3df826e PM |
89 | |
90 | <div id="fb-root"></div> | |
91 | <script>(function(d, s, id) { | |
92 | var js, fjs = d.getElementsByTagName(s)[0]; | |
93 | if (d.getElementById(id)) return; | |
94 | js = d.createElement(s); js.id = id; | |
95 | js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0"; | |
96 | fjs.parentNode.insertBefore(js, fjs); | |
97 | }(document, 'script', 'facebook-jssdk'));</script> | |
98 | ||
99 | <script>window.twttr = (function(d, s, id) { | |
100 | var js, fjs = d.getElementsByTagName(s)[0], | |
101 | t = window.twttr || {}; | |
102 | if (d.getElementById(id)) return t; | |
103 | js = d.createElement(s); | |
104 | js.id = id; | |
105 | js.src = "https://platform.twitter.com/widgets.js"; | |
106 | fjs.parentNode.insertBefore(js, fjs); | |
107 | ||
108 | t._e = []; | |
109 | t.ready = function(f) { | |
110 | t._e.push(f); | |
111 | }; | |
112 | ||
113 | return t; | |
114 | }(document, "script", "twitter-wjs"));</script> | |
115 | <script> | |
116 | function myFunction(short_code) { | |
117 | /* Get the text field */ | |
118 | var copyText = document.getElementById(short_code); | |
119 | ||
120 | /* Select the text field */ | |
121 | copyText.select(); | |
122 | copyText.setSelectionRange(0, 99999); /*For mobile devices*/ | |
123 | ||
124 | /* Copy the text inside the text field */ | |
125 | document.execCommand("copy"); | |
126 | ||
127 | /* Alert the copied text */ | |
128 | alert("Copied the Link: " + copyText.value); | |
129 | } | |
130 | </script> | |
131 | ||
132 | <center> | |
133 | <table border="1" cellpadding="2" cellspacing="0"> | |
134 | <tr> | |
135 | <td><div class="fb-share-button" | |
136 | data-href="https://www.md-petition.com/invite/LPMD.php" | |
137 | data-layout="box_count" data-size="large"> | |
138 | </div></td> | |
139 | <td> | |
140 | <a class="twitter-share-button" | |
141 | href="https://twitter.com/intent/tweet" | |
142 | data-size="large" | |
143 | data-text="Can you spare a minute to sign <?PHP echo $d['petition_name'];?>" | |
144 | data-url="https://www.md-petition.com/invite/LPMD.php"> | |
145 | Tweet</a></td> | |
146 | <td><input type='text' size='50' value='http://md-petition.com/invite/LPMD.php' id='LPMD'><button onclick='myFunction("LPMD")'>Copy Link</button></td> | |
147 | <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/LPMD.php'></a></td> | |
148 | </tr> | |
149 | </table> | |
150 | </center> | |
151 | ||
152 | ||
153 | ||
154 | <?PHP | |
155 | $copy = '© 2020 Patrick McGuire'; | |
156 | ?> | |
157 | <div class='row'> | |
158 | <div class='col-sm-10' style='text-align:center;'><?PHP echo $copy;?></div> | |
159 | </div> | |
160 | ||
161 | <div class='row'> | |
162 | <div class='col-sm-10' style='text-align:center;'> | |
163 | <?PHP if($_COOKIE['debug'] == 'on'){ ?> | |
164 | <pre><?PHP print_r($_GET); ?></pre> | |
165 | <pre><?PHP print_r($_POST); ?></pre> | |
166 | <pre><?PHP print_r($_COOKIE); ?></pre> | |
167 | <?PHP } ?> | |
168 | </div> | |
169 | </div> |