Commit | Line | Data |
---|---|---|
128bb6df PM |
1 | <?PHP |
2 | include_once('header.php'); | |
3 | setcookie("invite", "UPP", 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=G-TY6C66ZWMX"></script> | |
10 | <script> | |
11 | window.dataLayer = window.dataLayer || []; | |
12 | function gtag(){dataLayer.push(arguments);} | |
13 | gtag('js', new Date()); | |
14 | ||
15 | gtag('config', 'G-TY6C66ZWMX'); | |
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 = '12'"; | |
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/UPP.php" /> | |
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" /> | |
29 | <meta property="og:image" content="https://www.uppmaryland.org/_images/upp-logo-a.jpg" /> | |
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> | |
35 | <body style='background-color:<?PHP echo $d['web_color'];?>;'> | |
36 | <div class="container-fluid"> | |
37 | <?PHP | |
38 | slack_general('UPP Home Page Loaded ('.$_COOKIE['invite'].')','md-petition'); | |
39 | ?> | |
40 | ||
41 | <div class='row'> | |
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> | |
43 | </div> | |
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> | |
47 | <style> | |
48 | .social { font-size: large; font-weight:bold; } | |
49 | </style> | |
50 | <?PHP if ($d['social_phone'] != ''){ ?> | |
51 | <div class='row'> | |
52 | <div class='col-sm-5 social' style='text-align:right;'>Phone</div> | |
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> | |
54 | </div> | |
55 | <?PHP } ?> | |
56 | <?PHP if ($d['social_email'] != ''){ ?> | |
57 | <div class='row'> | |
58 | <div class='col-sm-5 social' style='text-align:right;'>E-Mail</div> | |
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> | |
60 | </div> | |
61 | <?PHP } ?> | |
62 | <?PHP if ($d['social_website'] != ''){ ?> | |
63 | <div class='row'> | |
64 | <div class='col-sm-5 social' style='text-align:right;'>Website</div> | |
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> | |
66 | </div> | |
67 | <?PHP } ?> | |
68 | <?PHP if ($d['social_facebook'] != ''){ ?> | |
69 | <div class='row'> | |
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> | |
72 | </div> | |
73 | <?PHP } ?> | |
74 | <?PHP if ($d['social_twitter'] != ''){ ?> | |
75 | <div class='row'> | |
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> | |
78 | </div> | |
79 | <?PHP } ?> | |
80 | <div class='row'> | |
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> | |
82 | </div> | |
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 | ||
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 | ||
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> | |
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 | ||
130 | <center> | |
131 | <table border="1" cellpadding="2" cellspacing="0"> | |
132 | <tr> | |
133 | <td><div class="fb-share-button" | |
134 | data-href="https://www.md-petition.com/invite/UPP.php" | |
135 | data-layout="box_count" data-size="large"> | |
136 | </div></td> | |
137 | <td> | |
138 | <a class="twitter-share-button" | |
139 | href="https://twitter.com/intent/tweet" | |
140 | data-size="large" | |
141 | data-text="Can you spare a minute to sign <?PHP echo $d['petition_name'];?>" | |
142 | data-url="https://www.md-petition.com/invite/UPP.php"> | |
143 | Tweet</a></td> | |
144 | <td><input type='text' size='50' value='http://md-petition.com/invite/UPP.php' id='UPP'><button onclick='myFunction("UPP")'>Copy Link</button></td> | |
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/UPP.php'></a></td> | |
146 | </tr> | |
147 | </table> | |
148 | </center> | |
149 | ||
150 | ||
151 | ||
152 | <?PHP | |
153 | $copy = '© 2020 Patrick McGuire'; | |
154 | ?> | |
155 | <div class='row'> | |
156 | <div class='col-sm-10' style='text-align:center;'><?PHP echo $copy;?></div> | |
157 | </div> | |
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> |