c267e116625ef0e90a60414d6fb859b73ef46c82
2 include_once('header.php');
3 setcookie("invite", "mgp", time()+
3600, "/"); // we use this later
8 <!-- Global site
tag (gtag
.js
) - Google Analytics
-->
9 <script async src
="https://www.googletagmanager.com/gtag/js?id=G-TY6C66ZWMX"></script
>
11 window
.dataLayer
= window
.dataLayer ||
[];
12 function gtag(){dataLayer
.push(arguments
);}
13 gtag('js', new Date());
15 gtag('config', 'G-TY6C66ZWMX');
18 include_once('/var/www/secure.php'); //outside webserver
19 presign(); // requires db connection
20 $q = "select * from petitions where petition_id = '1'";
21 $r = $petition->query($q);
22 $d = mysqli_fetch_array($r);
23 include_once('../slack.php');
25 <meta property
="og:url" content
="https://www.md-petition.com/invite/mgp.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.md-petition.com/files/MDGREENS_FB_SHARE.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
><?PHP
echo $d['tab_name'];?
></title
>
35 <body style
='background-color:<?PHP echo $d['web_color
'];?>;'>
36 <div
class="container-fluid">
38 slack_general('MGP Home Page Loaded ('.$_COOKIE['invite'].')','md-petition');
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
>
45 <div
class='col-sm-10' style
='text-align:center;'><h3
>If you need assistance
, please contact
:</h3
></div
>
48 .social
{ font
-size
: large
; font
-weight
:bold
; }
50 <?PHP
if ($d['social_phone'] != ''){ ?
>
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
>
56 <?PHP
if ($d['social_email'] != ''){ ?
>
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
>
62 <?PHP
if ($d['social_website'] != ''){ ?
>
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
>
68 <?PHP
if ($d['social_facebook'] != ''){ ?
>
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
>
74 <?PHP
if ($d['social_twitter'] != ''){ ?
>
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
>
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
>
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
>
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
>
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
);
103 js
.src
= "https://platform.twitter.com/widgets.js";
104 fjs
.parentNode
.insertBefore(js
, fjs
);
107 t
.ready
= function(f
) {
112 }(document
, "script", "twitter-wjs"));</script
>
114 function myFunction(short_code
) {
115 /* Get the text field */
116 var copyText
= document
.getElementById(short_code
);
118 /* Select the text field */
120 copyText
.setSelectionRange(0, 99999); /*For mobile devices*/
122 /* Copy the text inside the text field */
123 document
.execCommand("copy");
125 /* Alert the copied text */
126 alert("Copied the Link: " + copyText
.value
);
131 <table border
="1" cellpadding
="2" cellspacing
="0">
133 <td
><div
class="fb-share-button"
134 data
-href
="https://www.md-petition.com/invite/mgp.php"
135 data
-layout
="box_count" data
-size
="large">
138 <a
class="twitter-share-button"
139 href
="https://twitter.com/intent/tweet"
141 data
-text
="Can you spare a minute to sign <?PHP echo $d['petition_name'];?>"
142 data
-url
="https://www.md-petition.com/invite/mgp.php">
144 <td
><input type
='text' size
='50' value
='http://md-petition.com/invite/mgp.php' id
='mgp'><button onclick
='myFunction("mgp")'>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/mgp.php'></a
></td
>
153 $copy = '© 2020 Patrick McGuire';
156 <div
class='col-sm-10' style
='text-align:center;'><?PHP
echo $copy;?
></div
>
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
>