+
+<div class='row'>
+ <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' 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 " <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>
+</div>
+
+<?PHP
+include_once('footer.php');