alert("Copied the Link: " + copyText.value);
}
</script>
-
+<center>
<table border="1" cellpadding="2" cellspacing="0">
<?PHP
- $q2 = "SELECT * FROM petitions";
+ $q2 = "SELECT * FROM petitions where admin_status = 'approved'";
$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 "<tr>
<td align='center'><small>$d2[petition_name]<small></td>
<td><div class=\"fb-share-button\"
- data-href=\"http://md-petition.com/index.php?invite=$d2[web_short_name]\"
- data-layout=\"button_count\">
+ data-href=\"https://www.md-petition.com/$link\"
+ data-layout=\"box_count\" data-size=\"large\">
</div></td>
- <td><a target='_Blank' href='http://md-petition.com/?invite=$d2[web_short_name]'>http://md-petition.com/?invite=$d2[web_short_name]</a></td>
- <td><input type='text' value='http://md-petition.com/?invite=$d2[web_short_name]' id='$d2[web_short_name]'><button onclick='myFunction($d2[web_short_name])'>Copy Link</button></td>
+ <td><input type='text' size='50' value='https://www.md-petition.com/$link' id='$d2[web_short_name]'><button onclick='myFunction(\"$d2[web_short_name]\")'>Copy Link</button></td>
</tr>";
}
?>
</table>
-
+</center>
<?PHP include_once('footer.php');