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 | ?> | |
40 | ||
41 | <div class='row'> | |
2d546cf5 PM |
42 | <div class='col-sm-5' style='text-align:center;'><h1><?PHP echo $d['text_title'];?></h1><h2 style='text-align:left;'><?PHP echo $d['text_block'];?></h2></div> |
43 | <div class='col-sm-5' style='text-align:center;'><img class="img-responsive" alt="<?PHP echo $d['text_title'];?>" src="<?PHP echo $d['logo_url'];?>"></div> | |
44 | </div> | |
e3df826e | 45 | <div class='row'> |
2d546cf5 PM |
46 | <div class='col-sm-10' style='text-align:center;'><h3>If you need assistance, please contact:</h3></div> |
47 | </div> | |
e3df826e PM |
48 | <style> |
49 | .social { font-size: large; font-weight:bold; } | |
50 | </style> | |
51 | <?PHP if ($d['social_phone'] != ''){ ?> | |
52 | <div class='row'> | |
53 | <div class='col-sm-5 social' style='text-align:right;'>Phone</div> | |
54 | <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> | |
55 | </div> | |
56 | <?PHP } ?> | |
57 | <?PHP if ($d['social_email'] != ''){ ?> | |
58 | <div class='row'> | |
59 | <div class='col-sm-5 social' style='text-align:right;'>E-Mail</div> | |
60 | <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> | |
61 | </div> | |
62 | <?PHP } ?> | |
63 | <?PHP if ($d['social_website'] != ''){ ?> | |
64 | <div class='row'> | |
65 | <div class='col-sm-5 social' style='text-align:right;'>Website</div> | |
943b2c74 | 66 | <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 |
67 | </div> |
68 | <?PHP } ?> | |
69 | <?PHP if ($d['social_facebook'] != ''){ ?> | |
70 | <div class='row'> | |
71 | <div class='col-sm-5 social' style='text-align:right;'>Facebook</div> | |
943b2c74 | 72 | <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 |
73 | </div> |
74 | <?PHP } ?> | |
75 | <?PHP if ($d['social_twitter'] != ''){ ?> | |
76 | <div class='row'> | |
77 | <div class='col-sm-5 social' style='text-align:right;'>Twitter</div> | |
943b2c74 | 78 | <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 |
79 | </div> |
80 | <?PHP } ?> | |
81 | <div class='row'> | |
82 | <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> | |
83 | </div> | |
577c0195 | 84 | |
e3df826e PM |
85 | |
86 | <div id="fb-root"></div> | |
87 | <script>(function(d, s, id) { | |
88 | var js, fjs = d.getElementsByTagName(s)[0]; | |
89 | if (d.getElementById(id)) return; | |
90 | js = d.createElement(s); js.id = id; | |
91 | js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0"; | |
92 | fjs.parentNode.insertBefore(js, fjs); | |
93 | }(document, 'script', 'facebook-jssdk'));</script> | |
94 | ||
95 | <script>window.twttr = (function(d, s, id) { | |
96 | var js, fjs = d.getElementsByTagName(s)[0], | |
97 | t = window.twttr || {}; | |
98 | if (d.getElementById(id)) return t; | |
99 | js = d.createElement(s); | |
100 | js.id = id; | |
101 | js.src = "https://platform.twitter.com/widgets.js"; | |
102 | fjs.parentNode.insertBefore(js, fjs); | |
103 | ||
104 | t._e = []; | |
105 | t.ready = function(f) { | |
106 | t._e.push(f); | |
107 | }; | |
108 | ||
109 | return t; | |
110 | }(document, "script", "twitter-wjs"));</script> | |
111 | <script> | |
112 | function myFunction(short_code) { | |
113 | /* Get the text field */ | |
114 | var copyText = document.getElementById(short_code); | |
115 | ||
116 | /* Select the text field */ | |
117 | copyText.select(); | |
118 | copyText.setSelectionRange(0, 99999); /*For mobile devices*/ | |
119 | ||
120 | /* Copy the text inside the text field */ | |
121 | document.execCommand("copy"); | |
122 | ||
123 | /* Alert the copied text */ | |
124 | alert("Copied the Link: " + copyText.value); | |
125 | } | |
126 | </script> | |
127 | ||
128 | <center> | |
129 | <table border="1" cellpadding="2" cellspacing="0"> | |
130 | <tr> | |
131 | <td><div class="fb-share-button" | |
132 | data-href="https://www.md-petition.com/invite/LPMD.php" | |
133 | data-layout="box_count" data-size="large"> | |
134 | </div></td> | |
135 | <td> | |
136 | <a class="twitter-share-button" | |
137 | href="https://twitter.com/intent/tweet" | |
138 | data-size="large" | |
139 | data-text="Can you spare a minute to sign <?PHP echo $d['petition_name'];?>" | |
140 | data-url="https://www.md-petition.com/invite/LPMD.php"> | |
141 | Tweet</a></td> | |
142 | <td><input type='text' size='50' value='http://md-petition.com/invite/LPMD.php' id='LPMD'><button onclick='myFunction("LPMD")'>Copy Link</button></td> | |
143 | <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> | |
144 | </tr> | |
145 | </table> | |
146 | </center> | |
147 | ||
148 | ||
149 | ||
150 | <?PHP | |
151 | $copy = '© 2020 Patrick McGuire'; | |
152 | ?> | |
153 | <div class='row'> | |
154 | <div class='col-sm-10' style='text-align:center;'><?PHP echo $copy;?></div> | |
155 | </div> | |
156 | ||
157 | <div class='row'> | |
158 | <div class='col-sm-10' style='text-align:center;'> | |
159 | <?PHP if($_COOKIE['debug'] == 'on'){ ?> | |
160 | <pre><?PHP print_r($_GET); ?></pre> | |
161 | <pre><?PHP print_r($_POST); ?></pre> | |
162 | <pre><?PHP print_r($_COOKIE); ?></pre> | |
163 | <?PHP } ?> | |
164 | </div> | |
165 | </div> |