Update mgp.php
[clinton/MarylandElectronicPetitionSignature.git] / header.php
1 <?PHP
2 if ($_GET['debug'] == 'on'){
3 setcookie("debug", 'on');
4 header('Location: index.php');
5 }
6 if ($_GET['debug'] == 'off'){
7 setcookie("debug", 'off');
8 header('Location: index.php');
9 }
10 ?>
11 <!DOCTYPE html>
12 <html lang="en">
13 <head>
14 <meta property="og:url" content="http://md-petition.com/index.php" />
15 <meta property="og:type" content="website" />
16 <meta property="og:title" content="Maryland Electronic Petition Software" />
17 <meta property="og:description" content="Socially Distant Petitions" />
18 <meta property="og:image" content="http://md-petition.com/files/maryland-flag-graphic.png" />
19
20 <!-- Global site tag (gtag.js) - Google Analytics -->
21 <script async src="https://www.googletagmanager.com/gtag/js?id=UA-165887820-1"></script>
22 <script>
23 window.dataLayer = window.dataLayer || [];
24 function gtag(){dataLayer.push(arguments);}
25 gtag('js', new Date());
26
27 gtag('config', 'UA-165887820-1');
28 </script>
29 <?PHP
30 include_once('/var/www/secure.php'); //outside webserver
31 include_once('slack.php');
32 ?>
33 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
34 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
35 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
36 <title>MEPS - Maryland Eletronic Petition Software</title>
37 <?PHP
38 /*
39 <style>
40 * {
41 margin: 0;
42 }
43 html, body {
44 height: 100%;
45 }
46 .page-wrap {
47 min-height: 100%;
48
49 margin-bottom: -100px;
50 }
51 .page-wrap:after {
52 content: "";
53 display: block;
54 }
55 .site-footer, .page-wrap:after {
56 height: 100px;
57 }
58 .site-footer {
59 background: lightblue;
60 }
61 </style>
62 */ ?>
63 </head>
64 <body>
65
66 <div class="container-fluid">
67 <?PHP /*
68 <ul class="nav nav-pills">
69 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/index.php'){ echo "class='active'"; } ?> ><a href='index.php'>1: Are You Registered?</a></li>
70 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/not_a_registered_voter.php'){ echo "class='active'"; } ?> ><a>2: How to Register?</a></li>
71 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/enter_information.php'){ echo "class='active'"; } ?> ><a>3: Enter Information</a></li>
72 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/is_the_information_correct.php'){ echo "class='active'"; } ?> ><a>4: Confirm Information</a></li>
73 <?PHP if ($_COOKIE['invite'] == ''){ ?>
74 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/eligible.php'){ echo "class='active'"; } ?> ><a>5: Select Petition</a></li>
75 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/petition.php'){ echo "class='active'"; } ?> ><a>6: Sign Petition</a></li>
76 <?PHP }else{ ?>
77 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/petition.php'){ echo "class='active'"; } ?> ><a>5: Sign <?PHP echo strtoupper($_COOKIE['invite']);?> Petition</a></li>
78 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/eligible.php'){ echo "class='active'"; } ?> ><a>6: Select Next Petition</a></li>
79 <?PHP } ?>
80
81 <?PHP if ($_COOKIE['web_name'] != ''){ ?>
82 <li role='presentation'><a href="/reset.php">RESET</a></li>
83 <?PHP } ?>
84 </ul>
85 */
86 if ($_COOKIE['invite'] != ''){
87 $invite = $petition->real_escape_string($_COOKIE['invite']);
88 $q = "select petition_name, web_color from petitions where web_short_name = '$invite'";
89 $r = $petition->query($q);
90 $d = mysqli_fetch_array($r);
91 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>";
92 }
93 ?>