| 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/Flag_of_Maryland.svg" /> |
| 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 | <style> |
| 38 | * { |
| 39 | margin: 0; |
| 40 | } |
| 41 | html, 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> |
| 60 | </head> |
| 61 | <body> |
| 62 | <div class="page-wrap"> |
| 63 | <div class="container-fluid"> |
| 64 | <?PHP /* |
| 65 | <ul class="nav nav-pills"> |
| 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> |
| 70 | <?PHP if ($_COOKIE['invite'] == ''){ ?> |
| 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> |
| 73 | <?PHP }else{ ?> |
| 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> |
| 76 | <?PHP } ?> |
| 77 | |
| 78 | <?PHP if ($_COOKIE['web_name'] != ''){ ?> |
| 79 | <li role='presentation'><a href="/reset.php">RESET</a></li> |
| 80 | <?PHP } ?> |
| 81 | </ul> |
| 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 | ?> |