| 1 |
<?php |
| 2 |
if (isset($_GET['id']) && $_GET['id'] != '') { |
| 3 |
$button_id = intval($_GET["id"]); // validation |
| 4 |
$button = new maxButton(); |
| 5 |
$set = $button->set($button_id,'','trash'); |
| 6 |
if (! $set) exit("Restore failed"); |
| 7 |
$button->setStatus("publish"); |
| 8 |
} |
| 9 |
?> |
| 10 |
<script type="text/javascript"> |
| 11 |
window.location = "<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=list&status=trash&message=1restore"; |
| 12 |
</script> |
| 13 |
|