Update header.php
[clinton/MarylandElectronicPetitionSignature.git] / header.php
CommitLineData
f71d99ec
PM
1<?PHP
2if ($_GET['debug'] == 'on'){
3 setcookie("debug", 'on');
4 header('Location: index.php');
5}
6if ($_GET['debug'] == 'off'){
7 setcookie("debug", 'off');
8 header('Location: index.php');
9}
10?>
4fdccf60 11<!DOCTYPE html>
4d0af031 12<html lang="en">
0b056f39 13<head>
3c5a427c
PM
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/Flag_of_Maryland.svg" />
19
1264618f
PM
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>
4a113be1
PM
29 <?PHP
30 include_once('/var/www/secure.php'); //outside webserver
31 include_once('slack.php');
32 ?>
3005470c
PM
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>
39e01dd9 36 <title>MEPS - Maryland Eletronic Petition Software</title>
5ecdde8f
PM
37<style>
38* {
39 margin: 0;
40}
41html, body {
42 height: 100%;
43}
44.page-wrap {
45 min-height: 100%;
46 /* equal to footer height */
47 margin-bottom: -100px;
48}
49.page-wrap:after {
50 content: "";
51 display: block;
52}
53.site-footer, .page-wrap:after {
54 height: 100px;
55}
56.site-footer {
57 background: lightblue;
58}
59</style>
0b056f39
PM
60</head>
61<body>
5b5fc0ee 62 <div class="page-wrap">
578cb72f 63 <div class="container-fluid">
e547b0e7 64 <?PHP /*
0b056f39 65 <ul class="nav nav-pills">
b80693ef
PM
66 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/index.php'){ echo "class='active'"; } ?> ><a href='index.php'>1: Are You Registered?</a></li>
67 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/not_a_registered_voter.php'){ echo "class='active'"; } ?> ><a>2: How to Register?</a></li>
68 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/enter_information.php'){ echo "class='active'"; } ?> ><a>3: Enter Information</a></li>
69 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/is_the_information_correct.php'){ echo "class='active'"; } ?> ><a>4: Confirm Information</a></li>
9299d09b 70 <?PHP if ($_COOKIE['invite'] == ''){ ?>
b80693ef
PM
71 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/eligible.php'){ echo "class='active'"; } ?> ><a>5: Select Petition</a></li>
72 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/petition.php'){ echo "class='active'"; } ?> ><a>6: Sign Petition</a></li>
cae07d22 73 <?PHP }else{ ?>
b80693ef
PM
74 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/petition.php'){ echo "class='active'"; } ?> ><a>5: Sign <?PHP echo strtoupper($_COOKIE['invite']);?> Petition</a></li>
75 <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/eligible.php'){ echo "class='active'"; } ?> ><a>6: Select Next Petition</a></li>
cae07d22
PM
76 <?PHP } ?>
77
b2ab3095 78 <?PHP if ($_COOKIE['web_name'] != ''){ ?>
b80693ef 79 <li role='presentation'><a href="/reset.php">RESET</a></li>
6821392f 80 <?PHP } ?>
0b056f39 81 </ul>
4bb337ae
PM
82 */
83 if ($_COOKIE['invite'] != ''){
84 $invite = $petition->real_escape_string($invite);
85 $q = "select petition_name from petitions where web_short_name = '$invite'";
86 $r = $petition->query($q);
87 $d = mysqli_fetch_array($r);
88 echo "<h1>$d[petition_name]</h1>";
89 }
90 ?>