delete-page.html.php 851 B

12345678910111213141516171819202122232425
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <?php
  3. if (isset($_GET['destination'])) {
  4. $destination = _h($_GET['destination']);
  5. }
  6. $url = $p->file;
  7. $post = $p->url;
  8. if (isset($destination)) {
  9. if ($destination == 'post') {
  10. $back = $post;
  11. } else {
  12. $back = site_url() . $destination;
  13. }
  14. } else {
  15. $back = site_url();
  16. }
  17. $info = $p->title . ' (' . $p->file . ')';
  18. ?>
  19. <p><?php echo sprintf(i18n('Are_you_sure_you_want_to_delete_'), $info);?></p>
  20. <form method="POST">
  21. <input type="hidden" name="file" value="<?php echo $p->file ?>"/><br>
  22. <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
  23. <input type="submit" class="btn btn-danger" name="submit" value="<?php echo i18n('Delete');?>"/>
  24. <span><a class="btn btn-primary" href="<?php echo $back . '">' . i18n('Cancel');?></a></span>
  25. </form>