forked from ElectronicPetitions/Maryland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintable_qr_code.php
65 lines (60 loc) · 2.11 KB
/
printable_qr_code.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<html lang="en">
<head>
<meta property="og:url" content="https://www.md-petition.com/printable_qr_code.php" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Maryland Electronic Petition Software" />
<meta property="og:description" content="Socially Distant Petitions" />
<meta property="og:image" content="http://md-petition.com/files/maryland-flag-graphic.png" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TY6C66ZWMX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-TY6C66ZWMX');
</script>
<?PHP
include_once('/var/www/secure.php'); //outside webserver
include_once('slack.php');
?>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<title>Printable QR Code Invite</title>
<style>
h1 { text-align:center; }
h2 { text-align:center; }
h3 { text-align:center; }
</style>
</head>
<body>
<div class='container-fluid'>
<?PHP
$short = $_GET['short'];
$q2 = "SELECT * FROM petitions where web_short_name = '$short'";
$r2 = $petition->query($q2);
$d2 = mysqli_fetch_array($r2);
$link = "?invite=$d2[web_short_name]";
if ($d2['landing_page'] != ''){
$link = $d2['landing_page'];
}
echo "
<div class='row'>
<div class='col-sm-12'>
<h1>$d2[petition_name]</h1>
</div>
</div>
<div class='row'>
<div class='col-sm-12'>
<img class='img-responsive' style='width:100%;' src='https://www.md-petition.com/qrcode.php?s=qrl&d=https://www.md-petition.com/$link'>
</div>
</div>
<div class='row'>
<div class='col-sm-12'>
<h3>https://www.md-petition.com/$link</h3>
</div>
</div>
";
?>
</div>
</body>