Add files via upload
[clinton/MarylandElectronicPetitionSignature.git] / index.php
index 05c090e..1d13732 100644 (file)
--- a/index.php
+++ b/index.php
@@ -18,21 +18,26 @@ slack_general('Home Page Loaded ('.$_COOKIE['invite'].')','md-petition');
   <div class='col-sm-10' style='text-align:center;'><h1><?PHP echo $d['text_title'];?></h1><h2><?PHP echo $d['text_block'];?></h2></div>
  </div> 
 <div class='row'>
-  <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'">YES</button></div>
-  <div class='col-sm-5' style='text-align:center;'><button type="button" class="btn btn-danger btn-lg btn-block" onclick="window.location.href='not_a_registered_voter.php'">NO</button></div>
+  <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>
+  <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>
  </div> 
 
 <div class='row'>
-  <div class='col-sm-10' style='text-align:center;'>We are hosting the following petitions: 
+  <div class='col-sm-10' style='text-align:center;'><br><br><br><h3>We are hosting the following petitions: </h3>
     <?PHP
-    $q2 = "SELECT * FROM petitions where admin_status = 'approved'";
+    $q2 = "SELECT * FROM petitions where admin_status = 'approved' order by RAND()";
     $r2 = $petition->query($q2);
     while($d2 = mysqli_fetch_array($r2)){
       $link = "?invite=$d2[web_short_name]";
       if ($d2['landing_page'] != ''){
         $link = $d2['landing_page']; 
       }
-      echo " <a href='https://www.md-petition.com/$link'>$d2[petition_name]</a> ";
+      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>
+      <script>
+      $('.$d2[web_short_name]').click(function() {
+        location.href = 'https://www.md-petition.com/$link';
+    });        
+      </script>";
     }
     ?>
   </div>