| 1 | <?PHP |
| 2 | if (isset($_GET['invite'])){ |
| 3 | setcookie("invite", $_GET['invite']); |
| 4 | header('Location: index.php'); |
| 5 | } |
| 6 | $title = 'MEPS - Are you Registered?'; |
| 7 | if ($_COOKIE['invite'] != ''){ |
| 8 | $title = 'MEPS ('.strtoupper($_COOKIE['invite']).') - Are you Registered?'; |
| 9 | } |
| 10 | include_once('header.php'); |
| 11 | slack_general('Home Page Loaded ('.$_COOKIE['invite'].')','md-petition'); |
| 12 | $q = "select * from website_text where id = '1'"; |
| 13 | $r = $petition->query($q); |
| 14 | $d = mysqli_fetch_array($r); |
| 15 | ?> |
| 16 | <script>document.title = "<?PHP echo $title;?>";</script> |
| 17 | <div class='row'> |
| 18 | <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $d['text_title'];?></h1><h2><?PHP echo $d['text_block'];?></h2></div> |
| 19 | </div> |
| 20 | <div class='row'> |
| 21 | <div class='col-sm-5' style='text-align:center;'><button type="button" class="btn btn-success btn-lg btn-block" onclick="window.location.href='enter_information.php'"><img class='click_me' src="files/click_here.gif">YES - CLICK HERE TO BEGIN</button></div> |
| 22 | <div class='col-sm-5' style='text-align:center;'><button type="button" class="btn btn-danger btn-lg btn-block not_me" onclick="window.location.href='not_a_registered_voter.php'">NO</button></div> |
| 23 | </div> |
| 24 | |
| 25 | <div class='row'> |
| 26 | <div class='col-sm-10' style='text-align:center;'><br><br><br><h3>We are hosting the following petitions: </h3> |
| 27 | <?PHP |
| 28 | $q2 = "SELECT * FROM petitions where admin_status = 'approved' order by RAND()"; |
| 29 | $r2 = $petition->query($q2); |
| 30 | while($d2 = mysqli_fetch_array($r2)){ |
| 31 | $link = "?invite=$d2[web_short_name]"; |
| 32 | if ($d2['landing_page'] != ''){ |
| 33 | $link = $d2['landing_page']; |
| 34 | } |
| 35 | echo " <button class='$d2[web_short_name]' style='color:$d2[web_color_text]; background-color:$d2[web_color]; border: solid 1px black; padding:5px;'>$d2[petition_name]</button> |
| 36 | <script> |
| 37 | $('.$d2[web_short_name]').click(function() { |
| 38 | location.href = 'https://www.md-petition.com/$link'; |
| 39 | }); |
| 40 | </script>"; |
| 41 | } |
| 42 | ?> |
| 43 | </div> |
| 44 | </div> |
| 45 | |
| 46 | <?PHP |
| 47 | include_once('footer.php'); |