Create printable_qr_code.php
authorPatrick McGuire <insidenothing@gmail.com>
Mon, 8 Jun 2020 14:40:51 +0000 (10:40 -0400)
committerGitHub <noreply@github.com>
Mon, 8 Jun 2020 14:40:51 +0000 (10:40 -0400)
printable_qr_code.php [new file with mode: 0644]

diff --git a/printable_qr_code.php b/printable_qr_code.php
new file mode 100644 (file)
index 0000000..5ea400d
--- /dev/null
@@ -0,0 +1,36 @@
+<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=UA-165887820-1"></script>
+  <script>
+    window.dataLayer = window.dataLayer || [];
+    function gtag(){dataLayer.push(arguments);}
+    gtag('js', new Date());
+
+    gtag('config', 'UA-165887820-1');
+  </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>
+<?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 "<h1>$d2[petition_name]</h1><br><img class='img-responsive' src='https://www.md-petition.com/qrcode.php?s=qrl&d=https://www.md-petition.com/$link'>";
+?>