Commit | Line | Data |
---|---|---|
011f4c97 | 1 | <?PHP |
d8efc616 | 2 | include_once('header.php'); |
011f4c97 PM |
3 | setcookie("invite", "Ivey", 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 | |
d8efc616 | 19 | presign(); // requires db connection |
9c542b8b | 20 | $q = "select * from petitions where petition_id = '8'"; |
011f4c97 PM |
21 | $r = $petition->query($q); |
22 | $d = mysqli_fetch_array($r); | |
23 | include_once('../slack.php'); | |
24 | ?> | |
59b5c1b7 | 25 | <meta property="og:url" content="https://www.md-petition.com/invite/Ivey.php" /> |
011f4c97 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" /> | |
59b5c1b7 | 29 | <meta property="og:image" content="https://www.md-petition.com/files/ai.jpg" /> |
011f4c97 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> | |
35 | <body style='background-color:<?PHP echo $d['web_color'];?>;'> | |
36 | <div class="container-fluid"> | |
37 | <?PHP | |
38 | slack_general($d['tab_name'].' Home Page Loaded ('.$_COOKIE['invite'].')','md-petition'); | |
39 | ?> | |
40 | <div class='row'> | |
41 | <div class='col-sm-12' style='text-align:center;'><h1><?PHP echo $d['text_title'];?></h1></div> | |
42 | </div> | |
43 | <div class='row'> | |
44 | ||
45 | <?PHP if ($d['petition_jpg_page2'] != ''){ ?> | |
46 | <div class="row"> | |
47 | <div class='col-sm-6'><center><img class="img-responsive" alt="<?PHP echo $d['text_title'];?>" src="<?PHP echo $d['logo_url'];?>"><h2><?PHP echo $d['text_block'];?></h2></center></div> | |
48 | <div class='col-sm-4'><img class="img-responsive" src='../<?PHP echo $d['petition_jpg_page2'];?>'></div> | |
49 | </div> | |
50 | <?PHP }else{ ?> | |
869a67b9 PM |
51 | <div class='col-sm-3'><center><img class="img-responsive" alt="<?PHP echo $d['text_title'];?>" src="<?PHP echo $d['logo_url'];?>"></center></div> |
52 | <div class='col-sm-8'><?PHP echo $d['text_block'];?></div> | |
011f4c97 PM |
53 | <?PHP } ?> |
54 | </div> | |
55 | ||
56 | <div class='row'> | |
57 | <div class='col-sm-12' style='text-align:center;'><button type="button" class="btn btn-success btn-lg btn-block" onclick="window.location.href='../enter_information.php'"><img style='height:50px; width:100px;' src="../files/click_here.gif"> SIGN <?PHP echo $d['petition_name'];?></button></div> | |
58 | </div> | |
59 | ||
60 | ||
869a67b9 | 61 | <?PHP if ($d['social_phone'] != ''){ ?> |
011f4c97 PM |
62 | <div class='row'> |
63 | <div class='col-sm-6' style='text-align:right;'>Phone</div> | |
64 | <div class='col-sm-6' style='text-align:left;'><?PHP echo $d['social_phone'];?></div> | |
65 | </div> | |
869a67b9 PM |
66 | <?PHP } ?> |
67 | <?PHP if ($d['social_email'] != ''){ ?> | |
011f4c97 PM |
68 | <div class='row'> |
69 | <div class='col-sm-6' style='text-align:right;'>E-Mail</div> | |
70 | <div class='col-sm-6' style='text-align:left;'><?PHP echo $d['social_email'];?></div> | |
71 | </div> | |
869a67b9 | 72 | <?PHP } ?> |
011f4c97 PM |
73 | <div class='row'> |
74 | <div class='col-sm-6' style='text-align:right;'>Website</div> | |
75 | <div class='col-sm-6' style='text-align:left;'><?PHP echo $d['social_website'];?></div> | |
76 | </div> | |
77 | <div class='row'> | |
78 | <div class='col-sm-6' style='text-align:right;'>Facebook</div> | |
79 | <div class='col-sm-6' style='text-align:left;'><?PHP echo $d['social_facebook'];?></div> | |
80 | </div> | |
81 | <div class='row'> | |
82 | <div class='col-sm-6' style='text-align:right;'>Twitter</div> | |
83 | <div class='col-sm-6' style='text-align:left;'><?PHP echo $d['social_twitter'];?></div> | |
84 | </div> | |
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> | |
96 | function myFunction(short_code) { | |
97 | /* Get the text field */ | |
98 | var copyText = document.getElementById(short_code); | |
99 | ||
100 | /* Select the text field */ | |
101 | copyText.select(); | |
102 | copyText.setSelectionRange(0, 99999); /*For mobile devices*/ | |
103 | ||
104 | /* Copy the text inside the text field */ | |
105 | document.execCommand("copy"); | |
106 | ||
107 | /* Alert the copied text */ | |
108 | alert("Copied the Link: " + copyText.value); | |
109 | } | |
110 | </script> | |
111 | ||
112 | <div class='row'> | |
113 | <div class='col-sm-12' style='text-align:center;'><center> | |
114 | <table border="1" cellpadding="2" cellspacing="0"> | |
115 | <tr> | |
116 | <td><div class="fb-share-button" | |
117 | data-href="https://www.md-petition.com/invite/Ivey.php" | |
118 | data-layout="box_count" data-size="large"> | |
119 | </div></td> | |
120 | <td><input type='text' size='50' value='https://www.md-petition.com/invite/Ivey.php' id='Ivey'><button onclick='myFunction("Ivey")'>Copy Link</button></td> | |
121 | </tr> | |
122 | </table></center> | |
123 | </div> | |
124 | </div> | |
125 | ||
126 | ||
127 | ||
128 | <?PHP | |
129 | $copy = '© 2020 Patrick McGuire'; | |
130 | ?> | |
131 | <div class='row'> | |
132 | <div class='col-sm-10' style='text-align:center;'><?PHP echo $copy;?></div> | |
133 | </div> | |
134 | ||
135 | <div class='row'> | |
136 | <div class='col-sm-10' style='text-align:center;'> | |
137 | <?PHP if($_COOKIE['debug'] == 'on'){ ?> | |
138 | <pre><?PHP print_r($_GET); ?></pre> | |
139 | <pre><?PHP print_r($_POST); ?></pre> | |
140 | <pre><?PHP print_r($_COOKIE); ?></pre> | |
141 | <?PHP } ?> | |
142 | </div> | |
143 | </div> |