2 if (isset($_GET['invite'])){
3 setcookie("invite", $_GET['invite']);
4 header('Location: index.php');
6 $title = 'MEPS - Are you Registered?';
7 if ($_COOKIE['invite'] != ''){
8 $title = 'MEPS ('.strtoupper($_COOKIE['invite']).') - Are you Registered?';
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);
16 <script
>document
.title
= "<?PHP echo $title;?>";</script
>
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
>
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
>
26 <div
class='col-sm-10' style
='text-align:center;'><br
><br
><br
><h3
>We are hosting the following petitions
: </h3
>
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'];
35 echo " <button class='$d2[web_short_name]' style='background-color:$d2[web_color]; border: solid 1px black; padding:5px;'>$d2[petition_name]</button>
37 $('.$d2[web_short_name]').click(function() {
38 location.href = 'https://www.md-petition.com/$link';
47 include_once('footer.php');