2 setcookie("invite", "mgp", time()+
3600, "/"); // we use this later
7 <!-- Global site
tag (gtag
.js
) - Google Analytics
-->
8 <script async src
="https://www.googletagmanager.com/gtag/js?id=UA-165887820-1"></script
>
10 window
.dataLayer
= window
.dataLayer ||
[];
11 function gtag(){dataLayer
.push(arguments
);}
12 gtag('js', new Date());
14 gtag('config', 'UA-165887820-1');
17 include_once('/var/www/secure.php'); //outside webserver
18 $q = "select * from petitions where petition_id = '1'";
19 $r = $petition->query($q);
20 $d = mysqli_fetch_array($r);
21 include_once('../slack.php');
23 <meta property
="og:url" content
="http://md-petition.com/invite/mgp.php" />
24 <meta property
="og:type" content
="website" />
25 <meta property
="og:title" content
="<?PHP echo $d['tab_name'];?>" />
26 <meta property
="og:description" content
="Maryland Electronic Petition Software - Socially Distant Petitions" />
27 <meta property
="og:image" content
="<?PHP echo $d['logo_url'];?>" />
28 <link rel
="stylesheet" href
="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
29 <script src
="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script
>
30 <script src
="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script
>
31 <title
><?PHP
echo $d['tab_name'];?
></title
>
33 <body style
='background-color:<?PHP echo $d['web_color
'];?>;'>
34 <div
class="container-fluid">
36 slack_general('MGP Home Page Loaded ('.$_COOKIE['invite'].')','md-petition');
40 <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
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'">SIGN
<?PHP
echo $d['petition_name'];?
></button
></div
>
47 <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
>
50 <div id
="fb-root"></div
>
51 <script
>(function(d
, s
, id
) {
52 var js
, fjs
= d
.getElementsByTagName(s
)[0];
53 if (d
.getElementById(id
)) return;
54 js
= d
.createElement(s
); js
.id
= id
;
55 js
.src
= "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
56 fjs
.parentNode
.insertBefore(js
, fjs
);
57 }(document
, 'script', 'facebook-jssdk'));</script
>
60 function myFunction(short_code
) {
61 /* Get the text field */
62 var copyText
= document
.getElementById(short_code
);
64 /* Select the text field */
66 copyText
.setSelectionRange(0, 99999); /*For mobile devices*/
68 /* Copy the text inside the text field */
69 document
.execCommand("copy");
71 /* Alert the copied text */
72 alert("Copied the Link: " + copyText
.value
);
77 <table border
="1" cellpadding
="2" cellspacing
="0">
79 <td
><div
class=\"fb
-share
-button\"
80 data
-href
=\"http
://md-petition.com/invite/mgp.php\"
81 data
-layout
=\"box_count\" data
-size
=\"large\"
>
83 <td
><input type
='text' size
='50' value
='http://md-petition.com/invite/mgp.php' id
='mgp'><button onclick
='myFunction("mgp")'>Copy Link
</button
></td
>
91 $copy = '© 2020 Patrick McGuire';
94 <div
class='col-sm-10' style
='text-align:center;'><?PHP
echo $copy;?
></div
>
98 <div
class='col-sm-10' style
='text-align:center;'>
99 <?PHP
if($_COOKIE['debug'] == 'on'){ ?
>
100 <pre
><?PHP
print_r($_GET); ?
></pre
>
101 <pre
><?PHP
print_r($_POST); ?
></pre
>
102 <pre
><?PHP
print_r($_COOKIE); ?
></pre
>