<?PHP
-if ($_GET['debug'] == 'on'){
- setcookie("debug", 'on');
- header('Location: index.php');
-}
-if ($_GET['debug'] == 'off'){
- setcookie("debug", 'off');
- header('Location: index.php');
-}
+if (isset($_GET['debug'])){
+ if ($_GET['debug'] == 'on'){
+ setcookie("debug", 'on');
+ header('Location: index.php');
+ }
+ if ($_GET['debug'] == 'off'){
+ setcookie("debug", 'off');
+ header('Location: index.php');
+ }
+}
+global $time_on_site;
+if (empty($_COOKIE['start_time'])){
+ setcookie("start_time", time());
+ $time_on_site = 0;
+}else{
+ $now = time();
+ $time_on_site = $now - $_COOKIE['start_time'];
+}
?>
<!DOCTYPE html>
<html lang="en">
<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/Flag_of_Maryland.svg" />
+ <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 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>MEPS - Maryland Eletronic Petition Software</title>
-<?PHP
- /*
- <style>
-* {
- margin: 0;
-}
-html, body {
- height: 100%;
-}
-.page-wrap {
- min-height: 100%;
-
- margin-bottom: -100px;
-}
-.page-wrap:after {
- content: "";
- display: block;
-}
-.site-footer, .page-wrap:after {
- height: 100px;
-}
-.site-footer {
- background: lightblue;
+<style>
+input:focus {
+ background-color: lightblue;
}
+ .click_me{
+ height:50px;
+ width:100px;
+ }
+ .not_me{
+ height:72px;
+ }
</style>
-*/ ?>
</head>
<body>
- <div class="page-wrap">
<div class="container-fluid">
- <?PHP /*
- <ul class="nav nav-pills">
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/index.php'){ echo "class='active'"; } ?> ><a href='index.php'>1: Are You Registered?</a></li>
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/not_a_registered_voter.php'){ echo "class='active'"; } ?> ><a>2: How to Register?</a></li>
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/enter_information.php'){ echo "class='active'"; } ?> ><a>3: Enter Information</a></li>
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/is_the_information_correct.php'){ echo "class='active'"; } ?> ><a>4: Confirm Information</a></li>
- <?PHP if ($_COOKIE['invite'] == ''){ ?>
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/eligible.php'){ echo "class='active'"; } ?> ><a>5: Select Petition</a></li>
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/petition.php'){ echo "class='active'"; } ?> ><a>6: Sign Petition</a></li>
- <?PHP }else{ ?>
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/petition.php'){ echo "class='active'"; } ?> ><a>5: Sign <?PHP echo strtoupper($_COOKIE['invite']);?> Petition</a></li>
- <li role='presentation' <?PHP if($_SERVER['SCRIPT_NAME'] == '/eligible.php'){ echo "class='active'"; } ?> ><a>6: Select Next Petition</a></li>
- <?PHP } ?>
-
- <?PHP if ($_COOKIE['web_name'] != ''){ ?>
- <li role='presentation'><a href="/reset.php">RESET</a></li>
- <?PHP } ?>
- </ul>
- */
+ <?PHP
if ($_COOKIE['invite'] != ''){
$invite = $petition->real_escape_string($_COOKIE['invite']);
$q = "select petition_name, web_color from petitions where web_short_name = '$invite'";
$r = $petition->query($q);
$d = mysqli_fetch_array($r);
- echo "<h1 style='text-align:center; background-color:$d[web_color];'>$d[petition_name]</h1>";
+ 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>";
}
?>