Update mgp.php
[clinton/MarylandElectronicPetitionSignature.git] / header.php
CommitLineData
f71d99ec 1<?PHP
44f89aba
PM
2if (isset($_GET['debug'])){
3 if ($_GET['debug'] == 'on'){
4 setcookie("debug", 'on');
5 header('Location: index.php');
6 }
7 if ($_GET['debug'] == 'off'){
8 setcookie("debug", 'off');
9 header('Location: index.php');
10 }
11}
57adae6f
PM
12global $time_on_site;
13if (empty($_COOKIE['start_time'])){
14 setcookie("start_time", time());
15 $time_on_site = 0;
16}else{
17 $now = time();
18 $time_on_site = $now - $_COOKIE['start_time'];
19}
f71d99ec 20?>
4fdccf60 21<!DOCTYPE html>
4d0af031 22<html lang="en">
0b056f39 23<head>
3c5a427c
PM
24 <meta property="og:url" content="http://md-petition.com/index.php" />
25 <meta property="og:type" content="website" />
26 <meta property="og:title" content="Maryland Electronic Petition Software" />
27 <meta property="og:description" content="Socially Distant Petitions" />
f81ce1eb 28 <meta property="og:image" content="http://md-petition.com/files/maryland-flag-graphic.png" />
3c5a427c 29
1264618f
PM
30 <!-- Global site tag (gtag.js) - Google Analytics -->
31 <script async src="https://www.googletagmanager.com/gtag/js?id=UA-165887820-1"></script>
32 <script>
33 window.dataLayer = window.dataLayer || [];
34 function gtag(){dataLayer.push(arguments);}
35 gtag('js', new Date());
36
37 gtag('config', 'UA-165887820-1');
38 </script>
4a113be1
PM
39 <?PHP
40 include_once('/var/www/secure.php'); //outside webserver
41 include_once('slack.php');
42 ?>
3005470c
PM
43 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
44 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
45 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
39e01dd9 46 <title>MEPS - Maryland Eletronic Petition Software</title>
d1044b70
PM
47<style>
48input:focus {
49 background-color: lightblue;
5ecdde8f 50}
c2db3685 51 .click_me{
9311cfc1
PM
52 height:50px;
53 width:100px;
54 }
88928cd6
PM
55 .not_me{
56 height:72px;
57 }
5ecdde8f 58</style>
0b056f39
PM
59</head>
60<body>
578cb72f 61 <div class="container-fluid">
d1044b70 62 <?PHP
4bb337ae 63 if ($_COOKIE['invite'] != ''){
2fbe37f3 64 $invite = $petition->real_escape_string($_COOKIE['invite']);
650a35a6 65 $q = "select petition_name, web_color from petitions where web_short_name = '$invite'";
4bb337ae
PM
66 $r = $petition->query($q);
67 $d = mysqli_fetch_array($r);
2a929c5a 68 echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h1 style='text-align:center; background-color:$d[web_color];'>$d[petition_name]</h1></div></div>";
4bb337ae
PM
69 }
70 ?>