sep out flagged
[clinton/MarylandElectronicPetitionSignature.git] / header.php
1 <?PHP
2 if (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 }
12 global $time_on_site;
13 if (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 }
20 ?>
21 <!DOCTYPE html>
22 <html lang="en">
23 <head>
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" />
28 <meta property="og:image" content="http://md-petition.com/files/maryland-flag-graphic.png" />
29
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>
39 <?PHP
40 include_once('/var/www/secure.php'); //outside webserver
41 include_once('slack.php');
42 ?>
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>
46 <title>MEPS - Maryland Eletronic Petition Software</title>
47 <style>
48 input:focus {
49 background-color: lightblue;
50 }
51 .click_me{
52 height:50px;
53 width:100px;
54 }
55 .not_me{
56 height:72px;
57 }
58 </style>
59 </head>
60 <body>
61 <div class="container-fluid">
62 <?PHP
63 if ($_COOKIE['invite'] != ''){
64 $invite = $petition->real_escape_string($_COOKIE['invite']);
65 $q = "select petition_name, web_color from petitions where web_short_name = '$invite'";
66 $r = $petition->query($q);
67 $d = mysqli_fetch_array($r);
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>";
69 }
70 ?>